jdelauney / SIMD-VectorMath-UnitTest

For testing asm SIMD (SSE/SSE 2/SSE 3/SSE 4.x / AVX /AVX 2) vector math library (2f, 4f, matrix, quaternion...) with Lazarus and FreePascal Compiler
Mozilla Public License 2.0
8 stars 0 forks source link

Matrix : Left Hand or Rigth Hand or Both #25

Open jdelauney opened 6 years ago

jdelauney commented 6 years ago

I've just read some of my "technicals maths docs" I admit that I am a little lost. I have to focus on it, check and correct the code of  matrix creation. In order to standardize them and base them on the same system : the "Right Hand" it's the system you're using, I'm right ? For Left Hand system what will the better ?

dicepd commented 6 years ago

Right hand is the most used convention. It always seems to enable direct use of most math formulas and coords systems I have used in the past. One verification of this was that I have just done the move around tests for the camera and it behaves perfectly for spherical and lat/lon systems. I was not looking forward to testing that but it proved easier than I thought. Read my many comments there.

It is very rare I have found the use of LHR to be needed, in fact I know I have used it once but can't for the life of me remember why found it useful in what instance.

dicepd commented 6 years ago

One caveat to the above is I have never done much with viewports and view transforms, most of my work was in technical or engineering, before getting into financials. We had scene viewers to do all that for us ;) (first was inventor in the early 90's)

dicepd commented 6 years ago

Sticking to one convention is far less confusing, if we do need to implement LHR, say for ease of import or some none time critical task, then the RotateAroundX style would suffice RotateAroundXLHR would suffice and be enough to put people off from using it unless they had to, and knew what they were doing and why.

dicepd commented 6 years ago

https://softwareengineering.stackexchange.com/questions/17519/why-does-directx-use-a-left-handed-coordinate-system

being from a technical engineering background RHR is more natural for me, and as various people in that post point out, the more complex the math gets the fewer references there are in LHR because all the maths ppl think in RHR. They have a piece of graph paper on the desk and Z goes up ;)

dicepd commented 6 years ago

hmm.. just tidying the movearound and I find North South does not work properly I forgot to reset up.

jdelauney commented 6 years ago

It's ok for me, for now, we just take in charge the RH. and for LH we will see later if needed.

jdelauney commented 6 years ago

One caveat to the above is I have never done much with viewports and view transforms, most of my work was in technical or engineering, before getting into financials.

In all case you be better than me in Maths :) I'm just a "Head Cook" since more 25 years so never use maths in my job. I often understand nothing to maths formulas. But when i'm coding or see a code i understand the concept but don't ask me a full explain :)

We had scene viewers to do all that for us ;) (first was inventor in the early 90's) Who ??? And yes is the scene 'viewer / manager) that makes the calculations

dicepd commented 6 years ago

here are my two goto sites for most of this stuff

http://geomalgorithms.com/algorithms.html

http://paulbourke.net/

I don't know if you know of these.

jdelauney commented 6 years ago

I don't know the first. Paul Bourke is a reference. I have also some books as reference like :