Display equations, and visualize energy.

Suggest changes and improvements to Algodoo.

Display equations, and visualize energy.

Postby nemrod » Tue Feb 06, 2018 12:56 am

Hi,
Algodoo could be more educational if the equations used to solve physics were displayed somewhere in objects properties. (in the informations properties maybe ?)
Would be also very cool if there were some sort of visualisation of energy (by type ?) with colors.
Ex:
kinetic energy dispay mode : all objects are rendered with a gradient color according to their kinetic energy.
(or other alternatives more human readable than number and vectors)
nemrod
 
Posts: 1
Joined: Mon Feb 05, 2018 11:47 pm

Re: Display equations, and visualize energy.

Postby FRA32 » Tue Aug 07, 2018 12:32 am

While not included in algodoo itself, one can cause these effects by use of the integrated scripting language Thyme. Your example would be realized by inserting this script into the "Poststep" field of all objects that should have the gradient (replace anything in <> with the actual values):

(e)=>{
Color1 = <[r,g,b,a]>; <- Color 1 of your gradient(Low energy)
Color2 = <[r,g,b,a]>; <- Color 2 of your gradient(High energy)
gradScale = <x>; <- Scale of the gradient, larger number means more energy required to reach Color2
Ekin = density*area/2*math.vec.len(vel)^2;
funcVal = 0.5^(Ekin/gradScale);
color = Color1*funcVal+Color2*(1-funcVal)
}

If you plug [.8,0,0,1],[0,.9,.9,1] and 4 as values in, you get a nice color change between red and cyan. Other possibilities would be to use the graph window in the properties menu, which graphs various object properties(Including some energies) depending on other properties(mostly time).
If you directly message me on the forum, I could help you by providing more scripts, should you desire something that can be done using them.
FRA32
 
Posts: 213
Joined: Wed Dec 03, 2014 9:51 pm


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest

cron