Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix : Left Hand or Rigth Hand or Both #25

Open
jdelauney opened this issue Jan 24, 2018 · 9 comments
Open

Matrix : Left Hand or Rigth Hand or Both #25

jdelauney opened this issue Jan 24, 2018 · 9 comments

Comments

@jdelauney
Copy link
Owner

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 ?

  • Add a Flag ? CreateRotationMatrix(axis, angle, viewsystem = cViewSystemRightHand) ?
  • Add more functions with a Prefix : CreateRH_RotationMatrix / CreateLH_RotationMatrix ?
  • Add flags in the record ?
@dicepd
Copy link
Collaborator

dicepd commented Jan 24, 2018

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
Copy link
Collaborator

dicepd commented Jan 24, 2018

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
Copy link
Collaborator

dicepd commented Jan 24, 2018

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
Copy link
Collaborator

dicepd commented Jan 24, 2018

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
Copy link
Collaborator

dicepd commented Jan 24, 2018

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

@jdelauney
Copy link
Owner Author

jdelauney commented Jan 24, 2018

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

@jdelauney
Copy link
Owner Author

jdelauney commented Jan 24, 2018

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
Copy link
Collaborator

dicepd commented Jan 25, 2018

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
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants