Анимация полиспирали

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

Анимация полиспирали

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 3068 times

Post Reply