2023 update:
Code: (Select All)
_Title "Xmas Star 2023" ' b+ 2022-12-25 update 2023-12-26
Const a = _Pi(2 / 16)
Screen _NewImage(760, 760, 32)
_ScreenMove 250, -23
rr1 = 100: rr2 = 200: rr3 = 300
rrr1 = 20: rrr2 = 40: rrr3 = 60
xc = 380: yc = 380
XmasStar 370, 370, 100, 200, 300, &HFFFFFFFF
For i = 0 To 15
If i Mod 2 = 1 Then
ElseIf i Mod 4 = 0 Then
x1 = xc + rr3 * Cos(i * a): y1 = yc + rr3 * Sin(i * a)
ElseIf i Mod 4 = 2 Then
x1 = xc + rr2 * Cos(i * a): y1 = yc + rr2 * Sin(i * a)
End If
XmasStar x1, y1, 20, 40, 60, &HFFDDDDFF
For j = 0 To 15
If j Mod 2 = 1 Then
'x1 = xc + rr1 * Cos(j * a): y1 = yc + rr1 * Sin(j * a)
ElseIf j Mod 4 = 0 Then
x2 = x1 + rrr3 * Cos(j * a): y2 = y1 + rrr3 * Sin(j * a)
ElseIf j Mod 4 = 2 Then
x2 = x1 + rrr2 * Cos(j * a): y2 = y1 + rrr2 * Sin(j * a)
End If
XmasStar x2, y2, 6, 12, 18, &HFFFFFFDD
Next
Next
XmasStar 380, 380, 20, 40, 60, &HFFDDDDFF
For j = 0 To 15
If j Mod 2 = 1 Then
'x1 = xc + rr1 * Cos(j * a): y1 = yc + rr1 * Sin(j * a)
ElseIf j Mod 4 = 0 Then
x2 = 380 + rrr3 * Cos(j * a): y2 = 380 + rrr3 * Sin(j * a)
ElseIf j Mod 4 = 2 Then
x2 = 380 + rrr2 * Cos(j * a): y2 = 380 + rrr2 * Sin(j * a)
End If
XmasStar x2, y2, 6, 12, 18, &HFFFFFFDD
Next
Sleep
Sub XmasStar (xc, yc, r1, r2, r3, c As _Unsigned Long)
For p = 0 To 200
p1 = p / 200
For i = 0 To 15
If i Mod 2 = 1 Then
x1 = xc + p1 * r1 * Cos(i * a): y1 = yc + p1 * r1 * Sin(i * a)
ElseIf i Mod 4 = 0 Then
x1 = xc + p1 * r3 * Cos(i * a): y1 = yc + p1 * r3 * Sin(i * a)
ElseIf i Mod 4 = 2 Then
x1 = xc + p1 * r2 * Cos(i * a): y1 = yc + p1 * r2 * Sin(i * a)
End If
If i > 0 Then Line (lastx, lasty)-(x1, y1), c - &HEE000000 Else firstx = x1: firsty = y1
lastx = x1: lasty = y1
Next
Line (lastx, lasty)-(firstx, firsty), c - &HEE000000
Next
End Sub
b = b + ...