Giter Site home page Giter Site logo

UnitQuat should have to_rot4 about nalgebra HOT 3 CLOSED

dimforge avatar dimforge commented on August 18, 2024
UnitQuat should have to_rot4

from nalgebra.

Comments (3)

milibopp avatar milibopp commented on August 18, 2024

You can call unit_quad.to_rot().to_homogeneous() to do just that.

from nalgebra.

sebcrozet avatar sebcrozet commented on August 18, 2024

And note that to call .to_homogeneous(), you have to import the nalgebra::ToHomogeneous trait. In general, .to_homogeneous() will take and algebraic object, assume it is expressed in the trivial basis of dimension Dim::dim(), and immerse it into a projective space (aka. "homogeneous" coordinates).

Hence, it will add a 0 to vectors, a 1 to points, add a line and column filled with zeros (everywhere but in the diagonal) to matrices, and assemble correctly the isometric (Iso) transformation into a matrix combining both the translation and rotation (using right-multiplication as a convention).

from nalgebra.

andrewrk avatar andrewrk commented on August 18, 2024

Thank you for the explanation. For someone whose linear algebra skills are underdeveloped this information is helpful.

If this kind of info were in the docs I think it would make it possible for people who are not already experts to use the library. (I say this in a "let's improve things" attitude rather than a criticism)

from nalgebra.

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.