quaternions's Introduction
% given a quaternion [X, Y, Z] from MR3 that we want to be the βzeroβ orientation zeroQuat = [-0.4067, -0.5282, -0.4345] % the quaternion helper functions require the format [W X Y Z] % so we use a helper function calculate W = SQRT(MAX(0,1-(X*X+Y*Y+Z*Z))) % and build the full quaternion zeroQuat = q3to4(zeroQuat) % now we need to find the inverse of zeroQuat calQuat = qinverse(zeroQuat) % now we can transform any further quaternions by calQuat to get a rotation % from the zero orientation % first let's check that the zero scheme works by applying it to the quaternion we % used to create it. we should get the identity quaternion (no rotation) % [1 0 0 0] z = qtransform(zeroQuat, calQuat) % now let's apply it to another quaternion that has a small delta from the % zero orientation testQuat = [-0.4046 -0.5313 -0.4285] testQuat = q3to4(testQuat) % apply zero to find delta from zero orientation zeroedTestQuat = qtransform(testQuat, calQuat)
quaternions's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.