So i have been trying to explore with papervision and i ran into either a math problem i can’t figure out (i really do need to bone up on math as a future goal) or something papervision rotation properties are doing that I am not prepared for either way I am trying to find someone to school me because i am apparently making no progress talking to myself.
So the project is just me simulating something like an atom where an orb spins around another orb, the problem i am having lies in a movieclip plane with a flat circle drawn in it, and i want to place that plane within the path the orb is spinning, thus making it look like a graphical orbit.
the code i am being tripped up at is commented out below
this._theta = limitToPI(this._theta+this._xVelocity);
this._phi = limitToPI(this._phi+this._zVelocity)
this._node.x = this._rho * Math.sin(this._phi) * Math.cos(this._theta);
this._node.y = this._rho * Math.sin(this._phi) * Math.sin(this._theta);
this._node.z = this._rho * Math.cos(this._phi);
this._orbit.rotationX = 90-(this._phi * 180/Math.PI);
//this._orbit.rotationY = (this._theta * 180/Math.PI);
//this._orbit.rotationZ = (this._theta * 180/Math.PI);
render();
here is a jpeg of what i am trying to achieve roughly sketched out
http://troyblank.com/temp/3DplanedisectProb/projectedPath.gif
and here is the swf you can see the above code running
http://troyblank.com/temp/3DplanedisectProb/deploy/AtomicMotion.swf
and here is the source in fla and as files
http://troyblank.com/temp/3DplanedisectProb/AtomicMotion.zip
here is what i am using to get me formulas:
http://www.flashandmath.com/mathlets/multicalc/coords/shilmay23fin.html