Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 15 May 2012
Offline Last Active Dec 19 2014 09:42 AM

Posts I've Made

In Topic: When/where does handedness really matter?

12 March 2013 - 07:38 PM

Never. In both cases the vector mathematics is the same. The only difference is that in a right handed system it will be on the right hand side of the origin, and in a left handed system it will be on the other side.

Oh good, because this is exactly what I was thinking when I revisited cross product definition; although handedness decides the direction of the resultant of the cross when it boils down to math, the formulas don't change, numbers are still numbers, the resulting numbers would be the same; it's humans who interpret it based on the coordinate system handedness based on our liking.

Now, if you happen to be using either system, and introduce a scaling of -1 in one of the axes, then your coordinate-frame will now be the opposite handedness to your coordinate-system. I suspect that's what the author of the book was attempting to explain.

Yeah, in the reference of one system, when a new one is introduced via mirroring then this test would help.


In Topic: When/where does handedness really matter?

12 March 2013 - 01:16 PM

I'm now clear of the part that a model/asset by itself isn't explicitly left or right handed while to see it exactly the way its creator expected it to be seen, we need to interpret in that system.

However, I'm reading "Essential Mathematics for Game Programmers", in which there is a statement which goes, "when we've three basis vectors i, j and k, performing scalar triple product like (i x j) . k > 0 then it is right handed while if it's negative it's left handed".

What confuses me is, I took 3 vectors say 1i, 3j, 4k and drew them both in a left and right handed system, perform the aforementioned scalar triple product, I always get 12, which is positive, when would this be negative to show that the basis is left handed?

In Topic: When/where does handedness really matter?

12 March 2013 - 01:30 AM

Well if your projection matrix and view matrix are set up for a left-handed coordinate system, then if you interpret the data in a resource file as right-handed, and attempt to render them, everything will be on its side and backwards (from the point of view of humans looking through a monitor) smile.png


Agreed. My point is how do you differentiate a LHS model and RHS model, what exactly is different between the two? The reason I'm not able to differentiate is that both models will've just numbers; say in a triangle of vertices v0 (0, 0, 0), v1 (0, 0, 1), v2 (1, 0, 1) where's the handedness encoded/lurking?


Similarly, given three vectors say i (1, 0, 0), j (0, 1, 0), k (0, 0, 1), how do you know if it's left or right handed. In my first post, I'd quoted



you can test the "handedness" of a coordinate
system given the basis {v1, v2, v3}.

if (v1 x v2) . v3 > 0, then it''s right-handed.
if (v1 x v2) . v3 < 0, then it''s left-handed


But then with the above vectors, considering them as either left or right both pass the test. Then how do I differentiate?

In Topic: Can't decide which math/physics basics book to get

12 March 2013 - 01:25 AM

Essential Mathematics for Games and Interactive Applications

Seems appropriate for my level
Seems to use proper terminology
Does not cover trigonometry or calculus, doesn't even include a reference of the trigonometric identities


Nope, I've this book, in the disc provided with it, you've 4 appendices. Perhaps you didn't look at the TOC properly.

Appendix A - Trigonometry

Appendix B - Calculus

Appendix C - Coordinate Systems
Appendix D - Taylor series


My review of the book is that it covers the basics extremely well, the authors seem to be very sincere in what they did, giving so much of attention to detail. I've come up till Chapter 6, and so far so good!

In Topic: Handedness

11 March 2013 - 03:58 PM

Just a quick comment on the 'handedness' issue. Generally speaking, the (geometric) handedness of the coordinate system used should not affect your math library code (by which I mean code that constructs or manipulates vectors, matrices, quaternions, and so on). In other words (for example) a function that builds a rotation matrix or quaternion or computes the cross product of two vectors should be exactly the same regardless of the handedness of the coordinate system being used.

Projection transforms and 'view' transforms (e.g. a 'look at' transform) are exceptions in that they're generally constructed differently for left- and right-handed systems. The differences actually have to do with which direction is considered 'forward' in view space, but are also an indirect result of the coordinate system handedness and the convention that the positive x axis should point to the right in view space.

As for computing cross products, with a typical orthonormal basis the relationships between the vectors should be:

x = yXz
y = zXx
z = xXy
If you're seeing the arguments flipped around depending on handedness, you might be looking at a 'look at' function (where the flipping is related to which direction is to be considered forward in view space).

Even though most functions should be unaffected by handedness, you may find that the results of applying said functions change when switching handedness. For example, triangle windings may flip, models may be mirrored, and rotations may appear to go the 'wrong' way. In these cases though it's the input data that should be changed, not the functions that work with the data.

Also, keep in mind that the DirectX/D3D and OpenGL APIs differ in a few other ways as well, most notably matrix layout (row major vs. column major), vector notation (row vs. column vectors) and the near plane distance for the canonical view volume (zero vs. negative one). The issues of matrix layout, vector notation, and coordinate system handedness are often confused with each other, but in fact they are three separate and unrelated issues (although they can interact with each other in ways that can be quite confusing).


This led me to thinking about coordinate system handedness and I see the point that numbers are numbers and the formula for cross or dot product are the same irrespective of the human who perceives it and hence we'd get the same results be it we consider data in any handedness. Then why do we see handedness conversions being talked about? i.e. converting some asset from one handed system to another doesn't seem to make sense; say a triangle data of v0 = (0, 0, 0), v1 = (0, 0, 1), v2 = (1, 0, 1) could be interpreted as a triangle irrespective of the system used and in both cases the base of the triangle would be away from the origin, hence why would this (or any asset/mesh) data be called LHS or RHS.


Also in another post I noticed this


you can test the "handedness" of a coordinate
system given the basis {v1, v2, v3}.

if (v1 x v2) . v3 > 0, then it''s right-handed.
if (v1 x v2) . v3 < 0, then it''s left-handed


but what beats me is, even here, I'm unable to differentiate the handedness, since in both systems, i x j = k and there by k.k will always be > 0 (k^2, to be exact), then how does the above hold true?


It'd be great if you can explain this to me.

Thanks for you time.