Solved

rotate and zoom world in blender (math question)

Posted on 2007-12-04
3
1,546 Views
Last Modified: 2013-12-21
Hi,

I have created a model in blender and I would like to programmatically rotate and zoom in and out on the object.

So far I have been directed to using the

Window.GetViewMatrix() command  in blender.

I can manually rotate my world using blender and then spit out the GetViewMatrix().

This matrix is 4x4 in size.

I would like to know what math is involved to manipulate this matrix to rotate my world by say, 5 degrees.

I'm guessing that one might not need to be familiar with blender to help with this question.

Thank you,

b

0
Comment
Question by:bryanberg
3 Comments
 
LVL 84

Assisted Solution

by:ozo
ozo earned 225 total points
ID: 20408180
0
 
LVL 18

Accepted Solution

by:
JoseParrot earned 275 total points
ID: 20408734
Hi bryanberg,

4x4 matrices are for affine transformations, that is, a rotation and a translation at same time.
The upper left 3x3 matrix inside the 4x4 matrix is the linear rotation.
By continuing ozo's comment, at same tutorial, take a look at
http://www.euclideanspace.com/maths/geometry/affine/matrix4x4/index.htm
Specific to Blender, take a look at
http://www.blender.org/documentation/244PythonDoc/Mathutils.Matrix-class.html

GetViewMatrix function uses 4x4, say 3x3 rotation and a vector.

Jose
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now