General Math Library ?

Hello Ever1

Does someone knows if theres a General Purpose Math Library somewhere ? I mean, not as general as javax.vecmath.
I often have problems with simple math operations like rotating one point around another, measuring one box’s left side angle compared to another one ( OR something like that). I know I will never learn the math behind this so I’ve had my cousin over to help me quite a few times (he is a math wizz AND a java wizz too ).
I dont wanna spend next 5 years learning this (Though it would be fun, but time…) so I would like to know if there are (Java) ibraries around like that ? I know there SHOULD be since no doubt these kind of problems are very common in 3D game programming.
Just a simple yet extensive library for common 3D Math operations in games…

Nope.

This is all way too application specific to be worth puttign in a library and way too simpel if you have any grasp of the math at all to bother with.

You will find books and libraries that define fundemental math functions (dot product, cross product, trig, transformations etc) but beyond that you need to know what to do with it. For 3D programs, a scenegraph like Xith or Java3D can automate much of it BUT you need to at least understand the underlying math on a theoretical level or you will get very confused by your results.

Sometimes, when something is aprticualrly tricky or tricky to do efficiently, you may find algorithyms in books like Graphics Gems. (A good example are line and polygon intersection calculations.) But as for basic math manipulations you really need to understand what the math is and how it works.

To be honest if you are that math phobic you are probably in the wrong field. Computers are math machines. The best you are likely to be able to do with out the math is write “scripts” for game engines other people write.

Just cant see why someone can’t make a library like that., just as a convinence for new 3D programmers until they caught up with the real knowledge. But your right, I must learn it and I am also learning a little bit every day. Just need a lill help from my firends :slight_smile:

I think this demonstrates what is wrong with a lot of the newbies these days. They want to build the next MMORPG without an understanding of the basic principles.

You need to build a strong foundation on which to base your designs and algorithms. It’s like building a bridge, then afterwords going back and taking some physics classes to see if it will collapse under load. It is the wrong way around. Sure if you make your bridge look like other bridges, you might by chance end up with something that works. But don’t code by chance, code by understanding. In the end it is a lot more satisfying.

Have patience. You will get much more frustrated by trying to do too much before you are ready. (And usually that means cluttering forums like this one with “why doesn’t this work?” questions that could have been avoided.)

Sometimes you “3D gurus” might forget that some times 3D is only 10% of a mmorpg game and the rest is something that us “newbies” are very much capable of programming. Which explains why we might not be interrested in spending five years of a our life just to learn something that is not the most important aspect of our game…But your right learning things is ALLWAYS better… and BTW you think I dont know that !?

I am far from a 3D guru. I was just commenting on your statement in general, not meaning to imply anything about any particular person’s knowledge or abilities.

When it is only 10% of the game and you don’t want to bother with it, generally you get someone else to bother with it, someone that has learned the necessary details… as in, use a game engine that is already constructed, or even just another member of your own team if it’s more than just you.

I have not used any 3D game engines myself, but I am under the impression that they are higher level and will deal with the rotation and collision aspects. If you want more fundamental things like measuring angles and doing rotations yourself, then like Jeff says, it is too basic for the library to be practical.

If it is just a few small things like what you mentioned (calculating angles and rotation etc.) you don’t need to be a 3D guru to learn it. In fact even if you use a game engine you will probably need to know at least that much. At the moment I can’t remember much of that stuff either, but I know enough that after a quick google I will be able to code it without difficulty. It sounds like you are in the same situation. If you know basic math and a few rules of trig then it won’t take you long to learn what you need, about as fast as it would be to learn how to use the APIs in some general purpose math library.