Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
N-pointed star
#2
Code: (Select All)
Code: (Select All)
Screen 12
Const pi = 3.1415926#
a% = 20
b% = 10
Dim deg As Double
Dim Shared As Single x2, y2
Window (-30, 30)-(30, -30)
Circle (0, 0), 2, 10
For theta = 0 To 360 Step 0.5
deg = theta * pi / 180
x = a% * Cos(deg)
y = b% * Sin(deg)
' PSet (x, y), 10
u1 = 30 * pi / 180
u2 = 90 * pi / 180
u3 = 150 * pi / 180
Call rote(x, y, u1)
PSet (x2, y2), 10
Call rote(x, y, u2)
PSet (x2, y2), 10
Call rote(x, y, u3)
PSet (x2, y2), 10
Next theta
Sub rote (x1, y1, u)
x2 = x1 * Cos(u) - y1 * Sin(u)
y2 = y1 * Cos(u) + x1 * Sin(u)
End Sub

[Image: 2.jpg]
Reply


Messages In This Thread
N-pointed star - by macalwen - 12-09-2024, 05:12 AM
RE: N-pointed star - by macalwen - 12-09-2024, 05:18 AM
RE: N-pointed star - by bplus - 12-09-2024, 12:26 PM
RE: N-pointed star - by bplus - 12-09-2024, 02:09 PM
RE: N-pointed star - by SierraKen - 12-09-2024, 09:44 PM
RE: N-pointed star - by James D Jarvis - 12-09-2024, 10:01 PM
RE: N-pointed star - by NakedApe - 12-10-2024, 12:26 AM
RE: N-pointed star - by macalwen - 12-10-2024, 10:57 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Star Trek (from long long ago and far away) SMcNeill 0 543 11-13-2023, 06:29 AM
Last Post: SMcNeill
  Star Trek X The Search for The BOB's White Cake Pete 16 3,404 12-06-2022, 11:44 AM
Last Post: Pete
Star Recurring Star Power bplus 11 2,139 10-19-2022, 02:42 AM
Last Post: Pete
  Andross from Star Fox SierraKen 1 683 07-26-2022, 07:19 PM
Last Post: bplus

Forum Jump:


Users browsing this thread: