Giter Site home page Giter Site logo

Random rotation about sophus HOT 4 CLOSED

strasdat avatar strasdat commented on May 19, 2024
Random rotation

from sophus.

Comments (4)

strasdat avatar strasdat commented on May 19, 2024

There is a simple, well-known method to sample uniformly from a sphere:
Draw x_i from a normal distribution N(0,1), construct a=(x_0, x_1, x_2) and normalize this to vector axis := a/a.norm(). Obviously, if a=0 we need to discard the samples and try again.
[1, Muller, M. E. "A Note on a Method for Generating Points Uniformly on N-Dimensional Spheres." Comm. Assoc. Comput. Mach. 2, 19-20, Apr. 1959.]

Now, axis is our axis of rotation. In addition, we sample theta from (-p, pi] uniformly.
Then SO3::exp(theta * axis) should be a uniform sample on the manifold SO(3), if I'm not mistaken.

from sophus.

versatran01 avatar versatran01 commented on May 19, 2024

Thanks for the answer. I was just wondering if you can add this to the interface?

from sophus.

strasdat avatar strasdat commented on May 19, 2024

Will do.

from sophus.

strasdat avatar strasdat commented on May 19, 2024

I implemented this for SO(2) and SO(3). See #114.

from sophus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.