Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Ellipsoid Creation and Rotation

  1. May 14, 2008 #1
    A little background first is that I'm currently a rising Sophomore at Winthrop University in South Carolina. I am a Computer Science and Mathematics Double Major. After finishing half-way through third semester calculus and dealing with 3-Dimensional space, vectors, planes, and surfaces, I really loved it. I decided to mold my two majors and create a video game engine, primarily First Person Shooter. Anyway, back to my question:

    In order to detect bullet and model collision, I am going to create Hitboxes like counter-strike. But instead of rectangular prisms I was going to use Ellipsoids for a smoother body. Anyway, But in order for this to work properly I would have to create a torso, head, arms, and legs. Understandable. Now, I have no problem creating the initial ellipsoids, because the origins are all fixed relative to the torso's origin. The problem is about when I want to rotate the body.

    Other information is that I have a unit vector representing the facing direction of the body.

    Anyone have any suggestions. I'm getting so frustrated that I feel like scrapping the whole thing.
  2. jcsd
  3. May 14, 2008 #2
    Could you express the ellipsoids in a spherical rather than cartesian co-ordinate system, and then parameterize the angles, so you have a parameterized function [tex]\psi(\theta,\varphi)=(2r\cos{\varphi}\cos{\theta}, 3r\cos{\varphi}\sin{\theta},\sin{\varphi})[/tex]
    Last edited: May 14, 2008
  4. May 14, 2008 #3
    Well, for some reason, that maths didn't come out as I'd expected, maybe you can quote my post to see what I meant.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Ellipsoid Creation and Rotation