Google Answers Logo
View Question
Q: Simple geometry question: calculating a rotation from vectors ( No Answer,   0 Comments )
Subject: Simple geometry question: calculating a rotation from vectors
Category: Science > Math
Asked by: amorphia-ga
List Price: $20.00
Posted: 11 Nov 2006 12:43 PST
Expires: 12 Nov 2006 02:10 PST
Question ID: 781914
I know (from a motion capture system) the location in 3D space of
three markers placed on the head of an person, at the front, at the
back left, and the back right. Assume that the person's gaze is in the
direction of a vector from the center of the triangle out through the
front marker, and up and down from their visual perspective is
perpendicular to the triangle.

I want to use the 3D plotting system Blender ( to
replicate the person's eye view of the other markers in my scene. All
I need to do is position Blender's camera at the location of the front
head marker (this I can do), and rotate it to face the right direction
and have the right tilt (this I can't do yet).

Blender uses Python as a scripting language, and has a range of high
level commands for manipulating vectors, matrixes, and quaternions
I am comfortable with using the language but I don't really understand
the geometry. I am sure that if one understands the geometry the
necessary script would be very simple to write.

If you aren't familiar with Blender or Python you may still be able to
answer this question providing you can provide an algorithm
(implementable in Python, perl, or C), which outputs a Euler for the
rotation (as Blender Python understand a Euler, see:

So to restate, an acceptable answer is preferably a Python script
which rotates  a camera based, as describe, on the three points, using
the Python Blender mathutils. Failing that, an acceptable answer may
be a formula which I can easily implement. I don't know a lot of
matrix algebra, so such a formula should be written in explicit pseudo
code using basic math and trig functions which I can port into a
language such as Python or C.

Thanks in advance!

There is no answer at this time.

There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  

Google Home - Answers FAQ - Terms of Service - Privacy Policy