Page 1 of 2

Double pendulum

Posted: Fri May 07, 2021 10:59 pm
by darkfrei
Hi all!

Here is my try to make a double pendulum (thanks for reddit):

Re: Double pendulum

Posted: Sat May 08, 2021 3:34 pm
by darkfrei
Second version:

Draw with lines, not points.

Press space to start.

Re: Double pendulum

Posted: Sat May 08, 2021 8:40 pm
by darkfrei
The third version: 10000 double pendulums, on start the difference is just (1/1000000) radians and it makes big difference after few seconds.

Many thanks to Alexander Gustafsson: https://www.youtube.com/watch?v=H7nMP-MYyIc

Re: Double pendulum

Posted: Tue May 11, 2021 2:40 pm
by darkfrei
Version 04:

red-green-blue gradient:

Code: Select all

function value_to_color (t, alpha) -- value from 0 (red) to 1 (blue)
	local r = 2-4*t
	local g = t < 1/2 and 4*t or 4-4*t
	local b = -2 + 4*t
	return {r,g,b,alpha}
end
You can enable/disable points (circles) and lines with keys Z and X.

Re: Double pendulum

Posted: Tue May 11, 2021 5:26 pm
by Gunroar:Cannon()
This all looks really great and fancy! Any possible uses in gamedev or is it just like a test/implementation?

Re: Double pendulum

Posted: Tue May 11, 2021 7:57 pm
by darkfrei
Gunroar:Cannon() wrote: Tue May 11, 2021 5:26 pm This all looks really great and fancy! Any possible uses in gamedev or is it just like a test/implementation?
Just proof of concept, but such pendulum can be used on the game level as a help to the exit or like a boss. Just put the disc saw on the free end of this pendulum >:)

Re: Double pendulum

Posted: Wed May 12, 2021 9:39 am
by Gunroar:Cannon()
darkfrei wrote: Tue May 11, 2021 7:57 pm
Just proof of concept, but such pendulum can be used on the game level as a help to the exit or like a boss. Just put the disc saw on the free end of this pendulum >:)
:ultrahappy: Hahah!! I see!

Re: Double pendulum

Posted: Thu May 13, 2021 11:11 pm
by darkfrei
Gunroar:Cannon() wrote: Wed May 12, 2021 9:39 am
darkfrei wrote: Tue May 11, 2021 7:57 pm
Just proof of concept, but such pendulum can be used on the game level as a help to the exit or like a boss. Just put the disc saw on the free end of this pendulum >:)
:ultrahappy: Hahah!! I see!
Pretty hard game, level 6 is very difficult.

Re: Double pendulum

Posted: Fri May 14, 2021 11:43 am
by Gunroar:Cannon()
Level 6 is very difficult??! I just got past level 2 after 117 deaths!!
But I really like the game, haha, it was fun. The mean balls toturing the little bunny rabit. Now I really see!!!!

Re: Double pendulum

Posted: Fri May 14, 2021 12:42 pm
by darkfrei
Gunroar:Cannon() wrote: Fri May 14, 2021 11:43 am Level 6 is very difficult??! I just got past level 2 after 117 deaths!!
But I really like the game, haha, it was fun. The mean balls toturing the little bunny rabit. Now I really see!!!!
My try up to level 4:


How to insert the embed youtube video?