My buddy, a Flash developer, wants to learn 3D rotation of objects from first principles, i.e. using trig. I know there are shrink-wrapped engines out there that will do this for you, but he wants to(adsbygoogle = window.adsbygoogle || []).push({}); learnit. From me. Cuz I'm the math whiz.

I used to do this simply when I'd plot simple 3D graphs in "Basic classic" but now I'm stepping it up a notch.

I'll start off with a primitive object and rotation on one axis.

So... my primitive object is a line in the XYZ space. It extends from 0,0,0 to 0,0,100. From my observer PoV, where I can only see the XY plane, the line is seen end-on and will appear as a point.

Now I rotate my line about the origin by 5 degrees. I know that I've got to do sin(5), which is about .087(x100 = 8.7). So the line is now visible in my XY viewing plane connecting 0 , 0 and 8.7 , 0.

Good so far?

Ultimately, it seems to me, I'm going to end up with two equations, x=... and y=... where the right side will be a long string of trig functions with x,y and zanglesand x,y and zdistancesas variables.

Are there more robust techniques I can use? My buddy talks about multiplying matrices, which I know nothing about (but who knows, maybe I'm a quick learn).

And then I've got to add perspective...

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Rotating objects in x y and z

Loading...

Similar Threads for Rotating objects | Date |
---|---|

Java Java Applet: Moving Image Object | Feb 10, 2017 |

Setting up 3-D rotation in web page | Aug 11, 2016 |

Rotating arrays/pixels | Jun 30, 2016 |

C++ Rotation function works in 2D perspective but fails in 3D | Jul 24, 2012 |

AI optimal rotation of a rigid body | Jul 18, 2012 |

**Physics Forums - The Fusion of Science and Community**