Display equations, and visualize energy.
2 posts • Page 1 of 1
Display equations, and visualize energy.
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)
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.
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.
(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: 229
- Joined: Wed Dec 03, 2014 9:51 pm
2 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest