- #1
ducati321
- 1
- 0
"simple" 3d orbit question
Hi folks,
I am following this pattern:
http://www.bit-101.com/tutorials/3D-rotation.html
to build a 3d model of an atom, using silverlight. I have what i think is an easy question for math pros... I'd like to know what I can change to make the angle of the orbiting item (my electron) be different.
In other words, my electron is currently orbiting in a horizontal left-to-right pattern. what can I do to get it to a 45 or 30 or N degrees angle, so it's traversing my nucleus diagonally?
the blue dot is my electron orbiting the yellow nucleus...
2 pics below show it going from left to right, it's centerY is constant...
here is my math:
newx = Math.Cos(t * Math.PI / 180) * radius + xCenter;
newy = yCenter; //-- y is constant cause it's horizontal
newz = Math.Sin(t * Math.PI / 180) * radius + zCenter;
scale1 = fl / (fl + newz);
electron1.Width = electron1.Height = scale1 * 100;
Thanks folks!
Hi folks,
I am following this pattern:
http://www.bit-101.com/tutorials/3D-rotation.html
to build a 3d model of an atom, using silverlight. I have what i think is an easy question for math pros... I'd like to know what I can change to make the angle of the orbiting item (my electron) be different.
In other words, my electron is currently orbiting in a horizontal left-to-right pattern. what can I do to get it to a 45 or 30 or N degrees angle, so it's traversing my nucleus diagonally?
the blue dot is my electron orbiting the yellow nucleus...
2 pics below show it going from left to right, it's centerY is constant...
here is my math:
newx = Math.Cos(t * Math.PI / 180) * radius + xCenter;
newy = yCenter; //-- y is constant cause it's horizontal
newz = Math.Sin(t * Math.PI / 180) * radius + zCenter;
scale1 = fl / (fl + newz);
electron1.Width = electron1.Height = scale1 * 100;
Thanks folks!