Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Shape Maker
#7
We should show everything, number of sides and multiplier. Have to go to 720 degrees because some drawings aren't completing.
Code: (Select All)
_Title "Basic Polygon with Multiplier Mod" 'b+ 2022-07-13

' a circle is 360 degree
' a polyon of n side has central angles 360 / n  > think of a pie the central angle are the angle of slices in center
Screen _NewImage(500, 500, 32)
_ScreenMove 350, 100
xC = _Width / 2 '  middle of screen
yC = _Height / 2 ' ditto
r = 200 '          radius = less than half screen height
For n = 5 To 32
    For m = 1 To n - 1
        Cls
        Print "Sides ="; n; " Multiplier ="; m
        Circle (xC, yC), r ' here is our pie,  Apple or Pepperroni :-))
        For angle = 0 To 720 Step 360 / n ' step the size of pie angles
            ' let xC, yC be the coordinates at the center of the pie circle
            ' let r be the radius of the pie
            ' then the n outside points are
            x = xC + r * Cos(m * _D2R(angle) - _Pi / 2) ' x coordinate of outter edge point
            y = yC + r * Sin(m * _D2R(angle) - _Pi / 2) ' y coordinate of outter edge point
            If angle = 0 Then PSet (x, y) Else Line -(x, y) ' outter edge edge
            Line (xC, yC)-(x, y) ' slice from center of pie
        Next
        Print "press any to see next ..."
        Sleep
    Next
Next
Print "Demo is done."

   
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Messages In This Thread
Shape Maker - by SierraKen - 07-11-2022, 06:29 PM
RE: Shape Maker - by bplus - 07-11-2022, 10:07 PM
RE: Shape Maker - by vince - 07-13-2022, 04:56 AM
RE: Shape Maker - by SierraKen - 07-12-2022, 12:13 AM
RE: Shape Maker - by bplus - 07-13-2022, 01:16 PM
RE: Shape Maker - by SierraKen - 07-13-2022, 07:06 PM
RE: Shape Maker - by bplus - 07-13-2022, 10:07 PM
RE: Shape Maker - by SierraKen - 07-14-2022, 02:35 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Word Search Maker SierraKen 27 4,998 01-21-2026, 12:53 AM
Last Post: SierraKen
  Video conversion utility COMMANDER X16 MOVIE MAKER ahenry3068 1 651 11-20-2025, 09:38 PM
Last Post: ahenry3068
  Tiny Maze Maker - ASCII SierraKen 19 1,698 08-09-2025, 11:39 PM
Last Post: SierraKen
  Pringle-like Shape Animation SierraKen 0 472 05-24-2025, 12:38 AM
Last Post: SierraKen
  Random Access word-list maker PhilOfPerth 0 566 03-06-2024, 03:59 AM
Last Post: PhilOfPerth

Forum Jump:


Users browsing this thread: 1 Guest(s)