Archived

This topic is now archived and is closed to further replies.

Antony52

Simplest language for physics engine?

Recommended Posts

Guest Anonymous Poster
The one that gets the job done.

Share this post


Link to post
Share on other sites
C++.
Object oriented, commonly used so you have a large database of examples to choose from.
Also- physics is not an easy topic. Neither is programming.
Programming physics is almost a job description in itself.

To do your job right, you will need to do a lot of learning.
Don''t hinder yourself with odd "easy" languages.
Take the time to learn C++ and physics, and you will be rewarded for your effort.

~V''lion

Bugle4d

Share this post


Link to post
Share on other sites
Why not Visual Basic? It should be fine and quite easy to learn. And although you wouldn''t be able to build a high performance, comprehensive physics engine, it would be fine for learning.

For that matter, something like Python (which is free) could also work.

www.python.org

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

Share this post


Link to post
Share on other sites
One thing that''s really good in C++ when you''re doing math and physics is the ability to overload operators.

For instance, you can have vectorclasses with overloaded *,-,+,^,--,++,*=,-=.. and so on, so that you at the end don''t need to write a lot of functioncalls that can speed up the physicsengine and make it very easy to read the code.


like this:

vector3 v1,v2;
v1 = vector3(4.0f,6.0f,5.0f);
v2 = vector3(1.0f,4.0f,6.0f);
vector3 cross = v1 ^ v2;
float dot = cross * v2;
v1 *= 43.0f;
v1.normalize();


Also, you can have a lot of other advantages with an oop approach

Share this post


Link to post
Share on other sites
First, you''ve got to define what you want your engine to do (EG solve equations a la Mathematica?).

Second, define what the outputs will look like (EG equations, graphs, 3D animations?)

Third, Ask a more specific question to get a more specific answer.

A General Purpose Programming Language will produce a General Purpose solution, but little insight.

A Special Purpose Programming Language will produce a Special Purpose solution and some insight but may lead to a dead end as you begin to question further.

Stevie

Don''t follow me, I''m lost.

Share this post


Link to post
Share on other sites