Keeping track of global coordinate system with successive translations/rotations in a local one.

edited July 2014 in How To...

I'm using lindenmayer-systems and turtle logic to generate branching structures in 3D. The basis of my code is from The Nature of code, section 6, but then generalized to 3D. I would like to keep track of my turtles global position and be able to record those positions in an array.

Does processing already keep track of this information for me? Maybe something akin to how pushMatrix() and popMatrix() work to find a previous positions and orientations.

If there's not an easy toggle for global position how best could I track my positions along the way? PVector's and PMatrix3D and applying individual rotations?

I'm running processing 2.2.1 and Windows 8.


Sign In or Register to comment.