|
Post by bluatigro on May 21, 2018 5:54:36 GMT
try to fint 3 points on 1 line
you wil not fint them
''bluatigro 21 may 2018 ''sun flower WindowWidth = 1000 WindowHeight = 600 global winx , winy , pi , golden.ratio winx = 1000 winy = 600 pi = atn( 1 ) * 4 golden.ratio = ( sqr( 5 ) - 1 ) / 2 nomainwin open "sun flower" for graphics as #m #m "trapclose [quit]" #m "backcolor black" dx = 1 dy = 0 for i = 0 to 300 #m "goto " ; winx / 2 + a ; " " ; winy / 2 + b #m "down" #m "circlefilled 3" #m "up" call rotate dx , dy , 360 * golden.ratio a = dx * i b = dy * i next i ''#m "print" notice "ready" wait [quit] close #m end function rad( deg ) rad = deg * pi / 180 end function sub rotate byref k , byref l , deg s = sin( rad( deg ) ) c = cos( rad( deg ) ) hk = k * c - l * s hl = k * s + l * c k = hk l = hl end sub
|
|