3D rotation for Orbit 3D
- To: mathgroup at smc.vnet.net
- Subject: [mg16685] 3D rotation for Orbit 3D
- From: Graham First <firstg at home.com>
- Date: Sat, 20 Mar 1999 02:08:59 -0500
- Organization: @Home Network
- Sender: owner-wri-mathgroup at wolfram.com
I am working on a 3D orbit simulator in c++ which is quickly approaching a simple game. It involves a bunch of "planet" objects whose relative positions are determined using the x, y, z position and x, y, z viewing angles of the viewer. Each planet's relative position is moved x, y and z and then rotated x, y and z. The problem comes when the viewer's angle is at (0, [non zero], 0) and the command comes in to rotate on the x-axis (of the view, not absolute). Basically, I need to be able to turn y rotation followed by x rotation into x, y and then z rotation. Any help would be greatly appreciated. :)