Page 1 of 1
Polyspiral animation
Posted: Sun Aug 13, 2017 1:12 pm
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 (156.95 KiB) Viewed 2000 times
Re: Polyspiral animation
Posted: Mon Aug 21, 2017 6:18 pm
by rbytes
This runs without errors, but produces only a single line on my graphics screen.
Re: Polyspiral animation
Posted: Mon Aug 21, 2017 7:41 pm
by Mr. Kibernetik
Please check this program again after SPL update.
This can be caused by an outdated version.
Re: Polyspiral animation
Posted: Mon Aug 21, 2017 8:29 pm
by rbytes
Thanks. I will watch for the update.
Got the update today!
Re: Polyspiral animation
Posted: Wed Aug 23, 2017 12:58 am
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 (1.02 MiB) Viewed 1979 times