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

Confusing rand methods with Euler rotaions #155

Closed
hyrodium opened this issue May 2, 2021 · 3 comments
Closed

Confusing rand methods with Euler rotaions #155

hyrodium opened this issue May 2, 2021 · 3 comments
Labels

Comments

@hyrodium
Copy link
Collaborator

hyrodium commented May 2, 2021

On current master branch:

  • rand(RotX) is same as RotX(2π*rand()).
  • rand(RotXY) is same as RotXY(2π*rand(), 2π*rand()).
  • rand(RotXYZ) is not same as RotXYZ(2π*rand(), 2π*rand(), 2π*rand()).
  • But rand(RotXYZ) is same as RotXYZ(rand(UnitQuaternion)).

This makes confusing, so we have two choices:

  • Define rand(RotXYZ) by RotXYZ(2π*rand(), 2π*rand(), 2π*rand()).
  • Add more clear documents.

I guess the first choice would be prefered.

cf.

# Not really sure what this distribution is, but it's also not clear what

Not really sure what this distribution is, but it's also not clear what it should be! rand(RotXY) is invariant to pre-rotations by a RotX and post-rotations by a RotY...

@andyferris
Copy link
Contributor

Hmm. I agree with the status-quo for the first and last, because they are the right measure spaces for 2D and 3D rotations respectively, but I'm not sure what space / measure you should use to define RotXY. The current definition doesn't seem like the one it should be, but I have no idea.

As you say, we could just document it (until someone has a better idea of what it should be).

@hyrodium
Copy link
Collaborator Author

Thanks for the comment! Okay, I'll update the document that way.

@hyrodium
Copy link
Collaborator Author

This has been documented in #174, so I will close this issue.
https://juliageometry.github.io/Rotations.jl/dev/functions/#rand-for-RotXY-and-etc.

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

No branches or pull requests

2 participants