Advertisement

can't we just stop the axes from moving?

Started by September 27, 2002 10:00 PM
9 comments, last by RolandofGilead 22 years, 4 months ago
Okay, the whole rotation thing is bugging me. Actually, it''s not bugging me but I remember profanity not being allowed. I also assume that we''re all familiar with matrix multiplication, the fact that it''s not commutative, and therefore rotation transformations done with them are not accurate but their close enough since they''re done every frame and in tiny increments. I was re-reading a book because I had just finished reading an article on physics equations and games and my head was hurting from all the big words and funny symbols. Anyway, a line from the book caught my attention, "angles are given with respect to moving axes". So, how about we use world coordinates instead of local coordinates? Will that finally work? It will be more work to figure out the forces relative to the world from the orientation of the forces in local coordinates, but seriously, if I have to play at .1 fps to get rotations done right, I just might do it. So, am I off my rocker or what?
someone else stop me if I''m wrong... but one big advantage to these moving axes is relative coordinates. Lets say you do have a model. You just translate to the right place, and draw the model with the same coordinates you always have -- its simpler (and faster too).


"There is no dark side of the moon really,
As a matter of fact, its all dark."
Advertisement
Whenever you do transformations with matrices, the multiplications affect the axis an object lies on. The result is a transformed object, yes, but remember the effect is on the axis, and the object transformation can be seen as a "byproduct" as this axis transformation. Thus, you have to specify the angle relative to the moving axis, because when doing matrix transformations, the concept is that the axises actually are moving, and the objects just follow their axises.
Okay, I may be wrong, and forgive if I am, but it sounds like you just repeated my post.
It doesn''t look like I repeated anything. However, I don''t know who you are, so I really can''t tell if I repeated you

I really don''t see the limitations you are implying exist with the current system of relative angles and such... is there something specific you wish to accomplish?

quote:
Original post by RolandofGilead
I also assume that we''re all familiar with matrix multiplication, the fact that it''s not commutative, and therefore rotation transformations done with them are not accurate but their close enough since they''re done every frame and in tiny increments.


Just because matrix multiplication is not commutative doesn''t make it any less accurate. The only accuracy issues I''ve ever encountered come from floating-point precision errors, which is another good reason to work from a local coordinate system each time, otherwise the errors do add up.


[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]
Advertisement
DarkHamster: yes, it''s simpler and faster to do it the way everybody does it already.

Zipster: What am I trying to accomplish? As accurate as I can get them physics routines.
The limitations with the current way is indeed small enough not to worry about.
I was asking if you were repeating me or adding something new cause from your first post, it looked like all you had done was to state my problem(the way rotations are usually done).

Kylotan: you bothered to quote me, so why didn''t you read the entire statement, I said it was close enough-since the rotations are applied in small doses. To be perfect, they''d have to be infinitely small transformations.

The problem is not that axes move, they have to. The problem is when they move. I''d like them to move simultaneously-hence infinitely small transformations would be needed when doing one at a time. Using matrices, they move one at a time, usually based on the world update, which is small, but not infinite.
Given a spaceship with various fixed thrusters in free fall and in space. When those thrusters fire, we know exactly how much torque there is, but only along the local axes.

My idea, then, for the example, is to figure out the components of all those forces in the world coordinate system and rotate from there.
Once again, I don''t see the "limitations" you are implying exist. Or at least in the examples you have given, I don''t see anything wrong with what''s going on.
Well, you''d be doing way too many calculations anyways...There is no definite WCS, its relative as well...

The real reason is that none of the forces applied to your object have any relationship to a WCS center, but they have a profound relationship to the local coordinate system''s origin...

its easier to apply some things in the WCS and some in the LCS. Usually, games use the LCS and then whenever something is easier in a WCS, each LCS has a function that will return its relative coordanates in the WCS...

Kinda a long way around, but it saves if you have a lot of things moving around the screen...
~~~~~Screaming Statue Software. | OpenGL FontLibWhy does Data talk to the computer? Surely he's Wi-Fi enabled... - phaseburn

This topic is closed to new replies.

Advertisement