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

Velocity on the surface of a sphere

  1. Jan 31, 2012 #1
    Hi,

    I want to move an object along the surface of a sphere with a given velocity. I essentially want to make a simple tether airplane simulator (control line).

    I know that I need to work in spherical coordinates for the position of the object and its velocity.

    I have seen an old post that descibes a similar problem but I cannot get it to work and cannot fully get my head around it. https://www.physicsforums.com/showthread.php?t=295684

    Any help would be much appreciated.

    Thanks
     
  2. jcsd
  3. Feb 1, 2012 #2
    your object should have a vector for its velocity toward the center of the earth an a manipulatable vector for it velocity tangent to the outside of the sphere. This will give the object a overall velocity "curved" around your sphere.
     
  4. Feb 1, 2012 #3
    This is what I have so far. I initially get the position of the object. Theta and Phi are initially zero and Radius = 2; Therefore the polar to opengl result is (0,0,2);

    void init()
    {
    //position from polar to opengl
    pos.x = Radius * sin(theta) * sin(phi);
    pos.y = Radius * cos(phi);
    pos.z = Radius* cos(theta) * sin(phi);
    }

    The velocity must be orthogonal to the position vector.

    void update()
    {
    //update velocity
    velocity.x = speed*cos((heading));
    velocity.y = speed*sin((heading));

    //ensure velocity is orthogonal to position
    float proj = (velocity.x * pos.x + velocity.y* pos.y + 0*pos.z)/(Radius*Radius);
    velocity.x = velocity.x - proj * pos.x;
    velocity.y = velocity.y - proj * pos.y;
    }

    How can I apply this velocity vector to my object to ensure that it remains on the sphere and the speed remains constant around the poles and equator?

    Thanks
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Velocity on the surface of a sphere
  1. Velocity on a sphere (Replies: 14)

Loading...