Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
3D Disco Lights
#5
(08-23-2022, 03:02 PM)Kernelpanic Wrote: Great! It's even movable. What are the routines that create the movement?

I once designed a rocket with CorelDraw, but I couldn't get it moving. It's supposed to look like it's flying up.

[Image: Nicks-Rakete-C-All.jpg]

For each of the lights, it does the following, where X and Y is the middle of the circle and w is the wheel of the mouse. r is the radius of the circle light. It's in a loop where t keeps changing making it go a full orbit. But t starts out outside of the loop with this: t = (_Pi / 2) * 100, which is just the radian of where the location of the orbit will be. I timed it by 100 to make it easier to understand. 
To get the mouse wheel, do this:   While _MouseInput: wheel = wheel + _MouseWheel: Wend     
Then I make w = wheel so I could also add the random mode. 

Code: (Select All)
    x = (Sin(t) * 20) * (_Pi * 2) + 400
    y = (Cos(t) * 10) * (_Pi / 2) + 200
    r = (Cos(t) * 180) / _Pi / 1.5 + 50
    t = t - (.25 + w / 10)
Reply


Messages In This Thread
3D Disco Lights - by SierraKen - 08-23-2022, 04:52 AM
RE: 3D Disco Lights - by James D Jarvis - 08-23-2022, 05:04 AM
RE: 3D Disco Lights - by SierraKen - 08-23-2022, 05:06 AM
RE: 3D Disco Lights - by Kernelpanic - 08-23-2022, 03:02 PM
RE: 3D Disco Lights - by SierraKen - 08-23-2022, 05:44 PM



Users browsing this thread: 4 Guest(s)