
-----------------------------------
The_Bean
Mon Apr 07, 2008 5:48 pm

Spinning Flower
-----------------------------------
It's using polar coordinates to make a flower with a smiley face inside.


View.Set ("graphics:500,500,title:Turing Flower,offscreenonly,nobuttonbar")
var x1, y1, x2, y2, a : int
var r, n : real
n := 5
a := 250
loop
    for k : 0 .. 360
        cls
        Draw.FillBox (0, 0, maxx, maxy, 7)
        for t : 0 .. 360
            r := sind ((t + k) * n) * a
            x1 := round (cosd (t) * r) + maxx div 2
            y1 := round (sind (t) * r) + maxy div 2
            r := sind ((t + 1 + k) * n) * a
            x2 := round (cosd ((t + 1)) * r) + maxx div 2
            y2 := round (sind ((t + 1)) * r) + maxy div 2
            Draw.Line (x1, y1, x2, y2, 5)
        end for
        for i : 1 .. round(n)
            x1 := round (cosd (i * 72 - k + 18) * a / 4 * 3) + maxx div 2
            y1 := round (sind (i * 72 - k + 18) * a / 4 * 3) + maxy div 2
            Draw.Fill (x1, y1, 5, 5)
        end for
        Draw.FillOval (maxx div 2, maxy div 2, 50, 50, 43)
        for i : 235 .. 315
            x1 := round (cosd (i - k) * 35) + maxx div 2
            y1 := round (sind (i - k) * 35) + maxy div 2
            Draw.FillOval (x1, y1, 5, 5, 7)
        end for
        x1 := round (cosd (50 - k) * 30) + maxx div 2
        y1 := round (sind (50- k) * 30) + maxy div 2
        Draw.FillOval (x1, y1, 7, 7, 7)
        x1 := round (cosd (130 - k) * 30) + maxx div 2
        y1 := round (sind (130 - k) * 30) + maxy div 2
        Draw.FillOval (x1, y1, 7, 7, 7)
        View.Update
        delay (5)
    end for
    exit when hasch
end loop


-----------------------------------
repsoccer16
Tue Apr 08, 2008 8:09 am

RE:Spinning Flower
-----------------------------------
pretty good but this is basically the omg trippy cool flashes group thing...remember to think what you are going to post before you post it and see if it is good enough.

-----------------------------------
Mackie
Tue Apr 08, 2008 10:19 am

RE:Spinning Flower
-----------------------------------
This has some merit, it shows how to use rotation. I say it's not OMG tripy flash thing at all.

-----------------------------------
petree08
Tue Apr 08, 2008 10:48 am

RE:Spinning Flower
-----------------------------------
Nah, this isn't "OMG trippy... "

there is an actual mathimatical process being followed here.

Now if it was just drawing random circles or a flashy box then it could be considered.  

This is pretty neat

-----------------------------------
Tallguy
Tue Apr 15, 2008 9:51 am

RE:Spinning Flower
-----------------------------------
ha ha i like it good job, can u do that for any object?

-----------------------------------
The_Bean
Tue Apr 15, 2008 7:41 pm

Re: Spinning Flower
-----------------------------------
Yes and No depending on what you mean by any object.

-----------------------------------
crysis
Wed Apr 16, 2008 8:25 am

RE:Spinning Flower
-----------------------------------
cool program

-----------------------------------
repsoccer16
Wed Apr 16, 2008 8:30 am

RE:Spinning Flower
-----------------------------------
ya true it isn't the omg trippy and it is pretty cool...sry for previous comment.

-----------------------------------
andrew.
Fri Apr 18, 2008 9:08 pm

RE:Spinning Flower
-----------------------------------
The program is a bit slow to exit though. It takes about 10 seconds. Maybe it's my computer. But otherwise good, I attempted to make a rotating image a while back but failed as it just kept eating Windows' resources.

-----------------------------------
The_Bean
Mon Apr 21, 2008 7:21 pm

Re: Spinning Flower
-----------------------------------
it only takes that long to exit because of the placement of the exit when 
and im developing a Draw.Flower(x,y,xRad,yRad,petals,colour 1,colour 2)

-----------------------------------
crysis
Tue Apr 22, 2008 8:39 pm

RE:Spinning Flower
-----------------------------------
try to make it so the leaves change and the center changes
