Computer Science Canada spiral |
Author: | Homer_simpson [ Wed Sep 24, 2008 11:47 pm ] |
Post subject: | spiral |
just a bucha circles that move the same length at every radius. Quote: View.Set ("offscreenonly")
colorback (black) var x, y, xt, yt : real := 0 const valence := 200 const detail := 1 const pie := 3.14 function divi (x, y : real) : real if y = 0 then result 9999999 else result (x / y) end if end divi var len := 5 %(2 * pie * (valence * detail)) / 300 var dx, dxp : real := 0 cls color (white) for ii : 0 .. 9000 for rad : (2 * detail) .. valence * detail by detail %360=(2*pie*rad) %x=length dx := (len * 360) / (2 * pie * rad) Draw.Line ( %round (cosd (((ii * len) * (2 * pie * (rad - detail)) / 360) + 90) * (rad - detail)) + 320, %round (sind (((ii * len) * (2 * pie * (rad - detail)) / 360) + 90) * (rad - detail)) + 200, round (cosd (ii * dxp + 90) * (rad - detail)) + 320, round (sind (ii * dxp + 90) * (rad - detail)) + 200, round (cosd (ii * dx + 90) * rad) + 320, round (sind (ii * dx + 90) * rad) + 200, white) Draw.Line ( %round (cosd (((ii * len) * (2 * pie * (rad - detail)) / 360) + 90) * (rad - detail)) + 320, %round (sind (((ii * len) * (2 * pie * (rad - detail)) / 360) + 90) * (rad - detail)) + 200, round (cosd (ii * dxp + 270) * (rad - detail)) + 320, round (sind (ii * dxp + 270) * (rad - detail)) + 200, round (cosd (ii * dx + 270) * rad) + 320, round (sind (ii * dx + 270) * rad) + 200, white) dxp := (len * 360) / (2 * pie * rad) end for %put (ii * ((len * 360) / (2 * pie * detail)) + 90) div 360 %Draw.FillOval (320, 200, 3, 3, blue) View.Update %delay (100) cls end for |
Author: | Homer_simpson [ Wed Sep 24, 2008 11:48 pm ] |
Post subject: | Re: spiral |
and colors Quote: View.Set ("offscreenonly")
colorback (black) var x, y, xt, yt : real := 0 const valence := 100 const detail := 1 const pie := 3.14 var len := 1 %(2 * pie * (valence * detail)) / 300 var dx, dxp : real := 0 cls color (white) for ii : 0 .. 9000 for rad : (2 * detail) .. valence * detail by detail for deg : 1 .. 360 by 36 %360=(2*pie*rad) %x=length dx := (len * 360) / (2 * pie * rad) Draw.Line ( %round (cosd (((ii * len) * (2 * pie * (rad - detail)) / 360) + 90) * (rad - detail)) + 320, %round (sind (((ii * len) * (2 * pie * (rad - detail)) / 360) + 90) * (rad - detail)) + 200, round (cosd (ii * dxp + deg) * (rad - detail)) + 320, round (sind (ii * dxp + deg) * (rad - detail)) + 200, round (cosd (ii * dx + deg) * rad) + 320, round (sind (ii * dx + deg) * rad) + 200, (rad + ii) mod 255) /*Draw.Line ( %round (cosd (((ii * len) * (2 * pie * (rad - detail)) / 360) + 90) * (rad - detail)) + 320, %round (sind (((ii * len) * (2 * pie * (rad - detail)) / 360) + 90) * (rad - detail)) + 200, round (cosd (ii * dxp + 270) * (rad - detail)) + 320, round (sind (ii * dxp + 270) * (rad - detail)) + 200, round (cosd (ii * dx + 270) * rad) + 320, round (sind (ii * dx + 270) * rad) + 200, blue) */ end for dxp := (len * 360) / (2 * pie * rad) end for %put (ii * ((len * 360) / (2 * pie * detail)) + 90) div 360 %Draw.FillOval (320, 200, 3, 3, blue) View.Update %delay (100) %cls end for |
Author: | petree08 [ Thu Sep 25, 2008 11:48 am ] |
Post subject: | RE:spiral |
A+ +bits very nice i love trig |
Author: | SNIPERDUDE [ Thu Sep 25, 2008 2:54 pm ] |
Post subject: | Re: RE:spiral |
petree08 @ September 25th 2008 wrote: i love trig
Trig is awesome. And cool spiral. |
Author: | Clayton [ Thu Sep 25, 2008 7:08 pm ] |
Post subject: | RE:spiral |
I'm not too sure of what exactly is going on here, but I think this topic is spammy enough to warrant being locked. I'm still confused though. |