GameLabGraz / Maroon

An interactive and immersive laboratory for Web, PC and VR.
https://maroon.tugraz.at
32 stars 16 forks source link

Port CRT experiment to reusable motion solver #509

Closed jonathanplatzer closed 2 weeks ago

jonathanplatzer commented 1 month ago

Closes #508

jonathanplatzer commented 2 weeks ago

Yeah, it is indeed a bit slower, which is quite expected, since the implementation before was using native C#, where as now it is using NCalc to evaluate the ODEs. I think it is quite alright when using a release build, but improvements could be made nonetheless.

A possibility would be for me to look into lambda compilation, but I don't know how much work that would entail. I think it would involve a refactor of MotionEntity and and the whole evaluation of expressions and such. There is also the need for some dynamic context for the parameters and custom expressions, as opposed to a static one, like shown in the example.

At least the benchmarks are very promising, but I don't think I want to go down that rabbit hole for now.