Пентаграмма

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

mx,my = #.scrsize()
xc = mx/2
yc = my/2
mr = #.min(mx,my)/3
#.angle(#.degrees)
#.drawcolor(1,0,0)
#.drawsize(10)
> r, mr..0,-1
  #.drawline(xc,yc-r,xc,yc-r)
  > a, 54..630,144
    #.drawline(r*#.cos(a)+xc,r*#.sin(a)+yc)
  <
  #.drawcolor(1,1,0)
  #.drawsize(1)
<
star.PNG
star.PNG (18.4 KiB) Viewed 3132 times

Post Reply