### Author Topic: Circular Time - How to make time into a circle.  (Read 4710 times)

#### Hemlos

• To boldy go where no pixel has gone before!
• Global Moderator
• Prof. Inline
• Posts: 1621
• Particle Hawk
##### Circular Time - How to make time into a circle.
« on: 2014-Sep-02 »
New codesnippet...litterally in every sense of it.

This is how you turn time, into a circle

Actually, this shows how i fluxuate a color back and forth....smoothly.
In this snipet...the color fades from White to Black To White in one second.

Code: (glbasic) [Select]
` // Color Override - Fluxuator STATIC ColorRotator% = 0 , ColorWheel% = 1 LOCAL Circulartime = 2.777777778 // = 1000/360, one second of time divided by 360.  Divide gettimer() with this, and accumulate the value every loop, and you get 360 degrees rotating every second. ColorRotator = (GETTIMER()/Circulartime) + ColorRotator IF ColorRotator > 359 THEN ColorRotator = 0 ColorWheel = INTEGER((SIN(ColorRotator) * 127) + 128) Color = RGB(ColorWheel,ColorWheel,ColorWheel)`
« Last Edit: 2014-Sep-02 by Hemlos »
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

#### fuzzy70

• Community Developer
• Prof. Inline
• Posts: 828
• Look left, Look right, LOOK OUT!!
##### Re: Circular Time - How to make time into a circle.
« Reply #1 on: 2014-Sep-02 »
, I love things like this, short & sweet

Lee
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)