[ODE] a few things (tools, and a transform mystery)

Jaroslav Sinecky jsinecky at tiscali.cz
Tue Jul 12 11:01:34 MST 2005


For the transformation matrix... The most common form (at least for me) is
...

[Ix Jx Kx Tx]
[Iy Jy Ky Ty]
[Iz Jz Kz Tz]
[0  0  0  1 ]

where I, J, K are unit axis vectors of local system in respect to global
system. Multiplying (column) vector in local coordinates by this matrix you
get vector in global coordinates.

[Gx]          [Lx]
[Gy] = M * [Ly]
[Gz]          [Lz]
[ 1 ]           [ 1]

Now other thing is how this matrix is stored in each library. DX vs. OpenGL
vs. ODE etc.

Jaroslav

> > -----Original Message-----
> From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of cr88192
> Sent: Tuesday, July 12, 2005 9:26 AM
> To: ode at q12.org
> Subject: [ODE] a few things (tools, and a transform mystery)
>
>
> sorry, this isn't directly related to ode, but the people here may know
> something or care or something.
>
>
> also (first off), if anyone cares I wrote a few minor tools:
> one takes a trimesh and makes a convex hull;
> the other takes said convex hull and makes another trimesh
> (representing the
> boundaries of the hull).
>
> also tried (but failed):
> the first tool above, but attempting to use a much faster algo (the first
> tool has a complexity somewhere between O(n^3) and O(n^4), where n is the
> total vertex count (it works by generating and testing a set of
> all possible
> planes).
> I attempted an O(n^2) algo (tries to make planes from edges), but
> it doesn't
> seem to work in general.
> the runtime for the first tool, for a 350 vertex model, is about 1m.
>
> a tool attempting to process a trimesh, and make a set of convex hulls
> representing the original model. I attempted to use bsp, but it failed to
> produce "sane" geometry for this task, a new algo idea popped up, but I
> don't feel like it right now and the complexity would probably be
> closer to
> O(n^5) or O(n^6) anyways (basically, it would consist of trying
> to hybridize
> the first algo and bsp to do the partitioning, eg, using the
> O(n^4) algo to
> look for division planes...).
>
> these could be useful if anyone is intending to add convex hulls
> to ode (and
> there is some issue with other similar tools).
>
>
> next up:
> I am writing my own physics engine, and something has popped up
> that I don't
> understand.
> one would intuitively think (I guess) that one would do a set of
> horizontal
> dot products on a matrix to transform a point to local space, and
> a set of
> vertical products to convert to worldspace.
>
> in a recent example (this has also occured previously, but I had
> ignored it
> in the past as it is not that hard to figure out and fix) I have
> to do the
> opposite to get correct behavior.
>
> this does not seem to make much difference in the trivial case
> (eg: directly
> converting from global to local space), but in the case where the
> vertices
> are converted to local space and used later (which a different transform
> back to global space) it makes a signifigant difference.
>
> it is my understanding (and it also seems to hold with
> experience) that it
> is the horizontal components of the transform which represent the
> unit axis.
>
> [IX IY IZ Tx]
> [JX JY JZ Ty]
> [KX KY KZ Tz]
> [0  0  0  1 ]
>
> I would think (where L is local and G is global):
> L=(G*I, G*J, G*K)-T
> G=(L*X, L*Y, L*Z)+T
>
> but instead I need to do:
> L=(G*X, G*Y, G*Z)-T
> G=(L*I, L*J, L*K)+T
>
> it seems that I, J, and K still represent the unit axis.
>
> something here just seems to not make much sense to me.
>
> note: I am not dealing with gl-order matrices, so I doubt it is a
> transpose
> problem (it is possible one of my math functions somewhere is
> transposed),
> however, I would have sensibly noticed this allready afaik, and
> these same
> matrices are used for lots of other things with no noticably weird
> behavior).
>
> can anyone explain this or provide links with some kind of explanation?
> (am I missing something obvious here?).
>
> I just feel it would be helpful to know what exactly is going on here.
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode



More information about the ODE mailing list