Physics Engine Development - C++ vs. OOP in Matlab
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Recently I've been interested in implementing a top-down physics engine for a group of differential robots, all inside Matlab. The thing is, there is a lot of additional computations that I want to do apart from the physics simulations asociated with the engine. However, after looking a little bit into it, its obvious that a physics engine will hog a lot of the computational resources available, in particular if you use object oriented programming to implement physical entities (Given that OOP in Matlab is relatively slow). A possible solution that came to mind was to code the physics engine in C++ and then import the .cpp file to Matlab. However, I don't know if this will result in a better performance or the possible performance gains would be undermined by the additional processing required to parse a .cpp file.
I tried a physics engine called "CapSim" and it runs too slow for my liking.
Thanks in advance!
2 commentaires
James Tursa
le 9 Juil 2020
I suggest you code up a small C++ example that does something you will need and see how you like the performance. It is hard to advise you without knowing all of the things your physics engine will be doing.
Réponses (0)
Voir également
Catégories
En savoir plus sur Robotics dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!