Spiral Generator by ThePeasant



Author & File Information


Submitted: 06/24/2008 | 11:01PM EST

File Info: Game | 31.9 KB | Add Game to Favorites

Current Score: 2.91 / 5.00

309 votes | 1,599 views

Click an icon to vote on this!

You are not logged in.


Related Submissions

Submissions by ThePeasant:

Submissions by Sickster:


Author Comments

UPDATE: Sickster made me a GUI! YAY!!! Now it looks cool.

INSTRUCTIONS:
firstly, there IS a back button, it's called the <Space Bar> - that big long bar on your keyboard. I didn't want to clutter the flash up with buttons so I made the <Space Bar> do it.

Input values to change the spiral. I'll quickly explain what all the value do:

Center Point (x,y) - determines WHERE the spiral is spawned. It does not affect the generated spiral.
Starting Values - determines what values r and a start at. The starting value for 'a' can only be between 0 and 360 (as it's an angle) and doesn't actually affect much, merely the starting orientation of the spiral. The starting value for r determines how big of a hole there will be in the middle.

Curve - determines how much of a curve the spiral has. 0 = straight line. Positive numbers give a counterclockwise spiral, Negative numbers a clockwise one.
Speed - how many pixels gets drawn every itineration
Size - determines the max radius for the spiral (300 gets you to the borders of the screen, ~500 will fill even the corners)
Precision - how detailed every curve is. Mesured in distance between pixels.

Colours - determine the RGB values for the different gradient marks
Colour Length - how many pixels it takes to go from one colour to the next
Colours Used - how many of the 6 colours will be used (only up to 6)

----

the actual formula now, for those interested, is as follows (note:this isn't AS code):
r= r+Precision
a=a+(Curve*Precision)
draw at: (r*sin(a),r*cos(a))

----

HINTS:
-The length of the curve will be [(Size-StartingR)/Precisi on] pixels long. You should keep this in mind when determining the RGB values and Speed.
-If the Speed is equal to the length of the curve, it will spawn a single branch every itineration.

----

My first submission to Newgrounds!

I can't draw, I can't animate, I can't do anything really... but I'm good at math! And some other stuff that isn't flash related...

So this is a way to make math both useful and fun! Make cool spiral patterns to grasp your attention for hours and share them with others.

If you find a nice pattern please post it below. If I also think it's nice then I'll add it to the list of presets.

EDIT: I found someone to make me a UI! Don't know how long it'll take 'im, but hang tight!
Also, nobody found any cool formulae?

EDIT2: I updated the save/load methods to make it easier.

Other Formulae:
"Explosion"
5000 x200 x300 x300 x700000 x6 x1 x0 x1 x0.1111 x0 x0 x0 x100 x50 x50 x255 x170 x100 x255 x255 x255 x200 x200 x200 x150 x150 x150
"Heat Rising"
60000 x600 x300 x-200 x255 x6 x1 x200 x0.012 x25.01 x0 x0 x0 x150 x0 x0 x255 x150 x0 x255 x255 x255 x255 x150 x0 x150 x0 x0

26 reviews | Log in to write a review | Share this!

The people have spoken

Average Score: 8.0 / 10

Score: 10
crackshot911

"Nice"

date: August 14, 2008

lean from your computer a bit and watch this
30000 x200 x300 x300 x500 x4 x6 x2 x1 x0.5 x255 x0 x0 x255 x255 x0 x0 x255 x0 x0 x0 x255 x0 x0 x0 x0 x0 x0

Rate this review:
Helpful!
Useless.
Flag as abusive.
No users have weighed in on this review.

Score: 10
EJRProductions

"awesome"

date: August 12, 2008

this one is mine it hurt my eyes after a while

200 x250 x300 x300 x255 x6 x1 x0 x11 x39 x255 x10 x255 x0 x10 x255 x255 x30 x255 x0 x255 x255 x255 x255 x255 x255 x255 x255

Rate this review:
Helpful!
Useless.
Flag as abusive.
No users have weighed in on this review.

Score: 10
piggy123

"sweet"

date: August 4, 2008

66667 x850 x300 x300 x255 x3 x0 x0 x0.999 x10000000000000000000 x255 x0 x0 x0 x0 x255 x0 x255 x255 x255 x255 x255 x0 x150 x150 x0 x150 x0

i call it the rainbow

Rate this review:
Helpful!
Useless.
Flag as abusive.
No users have weighed in on this review.

Score: 9
gdog163

"pretty fun"

date: June 30, 2008

200000 x850 x300 x300 x255 x6 x9 x1 x0.009 x655 x99 x23 x77 x255 x255 x76 x255 x150 x150 x255 x25 x5 x54 x150 x15 x255 x150 x98

Made a spiral, looks pretty cool.

Rate this review:
Helpful!
Useless.
Flag as abusive.
No users have weighed in on this review.

Score: 10
kingdmheartsking

"Awesome"

date: June 30, 2008

this game rocks and I made a cool one... I call it

spinning forest

205 x200 x300 x300 x123 x6 x1 x0 x0.003 x10 x0 x0 x0 x0 x150 x0 x0 x150 x150 x255 x255 x255 x0 x150 x150 x0 x150 x0

Rate this review:
Helpful!
Useless.
Flag as abusive.
People find this review helpful!