Polyspiral animation

Post Reply
User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Polyspiral animation

Post by Mr. Kibernetik »

Code: Select all

width,height = #.scrsize()
#.angle(#.degrees)
#.scroff()
incr = 0
>
  incr = (incr+0.05)%360
  x = width/2
  y = height/2
  length = 5
  angle = incr
  #.scrclear()
  #.drawline(x,y,x,y)
  > i, 1..150
    x += length*#.cos(angle)
    y += length*#.sin(angle)
    #.drawcolor(#.hsv2rgb(angle,1,1):3)
    #.drawline(x,y)
    length += 3
    angle = (angle+incr)%360
  <
  #.scr()
<
polyspiral_screen.png
polyspiral_screen.png (156.95 KiB) Viewed 2001 times

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Polyspiral animation

Post by rbytes »

This runs without errors, but produces only a single line on my graphics screen.
Attachments
Screenshot (5).png
Screenshot (5).png (26.07 KiB) Viewed 1990 times
The only thing that gets me down is gravity...

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: Polyspiral animation

Post by Mr. Kibernetik »

Please check this program again after SPL update.
This can be caused by an outdated version.

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Polyspiral animation

Post by rbytes »

Thanks. I will watch for the update.

Got the update today! :D
Last edited by rbytes on Wed Aug 23, 2017 1:04 am, edited 1 time in total.
The only thing that gets me down is gravity...

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Polyspiral animation

Post by rbytes »

I am having a lot of fun with Polyspiral animation, and learning a lot by changing parameters one at a time.
By setting incr to specific values rather than incrementing it continuously, I can generate beautiful static patterns. Here is the result of setting incr to 121. I added a few lines of code to print the angle and incr values at the top left. I comment them out when running the animation since they slow it down a bit.

Spiral 3.PNG
Spiral 3.PNG (1.02 MiB) Viewed 1980 times
The only thing that gets me down is gravity...

Post Reply