BruceSherwood/vpython-wx

Working with rotation matrices

Opened this issue · 1 comments

It'd be great if there were some functionality for getting the matrix transformations that have been applied to a frame. I don't know how objects are stored internally in vpython, but this might be trivial to expose.

Basically, I want to make a simulation of some really complicated frame transformations I'm doing in some navigation software, and I thought I'd see if I could do it easily with vpython. But I'm stumped as to how to do any transformations other than a rotation. More importantly, I'd like to be able to do the rotation with a known homogeneous transform matrix, where I don't necessarily know the euler angles.

Not sure this will be of any use to you, but the file src/core/frame.cpp contains the frame rotation machinery, which calls the rotation function in src/core/util/tmatrix.cpp. Objects have three vector attributes that come into play and that have to be adjusted: pos, axis, and up.