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

Parametric Sphere Explanation

  1. Oct 22, 2010 #1
    The equation for a circle is

    x = r cos(u)
    y = r sin(u)

    Where u is 0 <= u <= 2 pi, because 2 pi is for calculating circle.

    While a sphere is

    x = r cos(u)cos(v)
    y = r sin(v)cos(v)
    z = r sin(v)

    Where u is the same, 2 pi but v is 0<= v <= 1 pi.

    Why only 1 pi for v? and not 2? Why does it not have to turn a full circle?
     
  2. jcsd
  3. Oct 22, 2010 #2

    fzero

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Think about the cross-section of the sphere into the yz-plane. This is a circle and running u from 0 to 2 pi rotates the circle through the entire sphere. Therefore we should only let v range over a semi-circle if we don't want to trace the sphere out twice. So v ranges from 0 to pi.

    Similarly, you can compute the volume of a sphere and see explicitly that integrating v from 0 to 2 pi will give you twice the volume of the sphere.
     
  4. Oct 22, 2010 #3
    Putting it in the layman terms does it mean :

    x = r cos(u)
    y = r sin(u)

    0 <= u <= 2 pi

    This is to draw the circle, a ratio of a circle is 2 pi.

    x = r cos(u)cos(v)
    y = r sin(u)cos(v)
    z = r sin(v)

    0 <= u <= 2 pi
    0 <= v <= pi

    The extra stuff is to make the circle "pop up" till it becomes a Sphere.

    As its already a circle which is already round, it only needs to "pop up" itself on a straight line(180 degree) to become a Sphere?

    If you increase the degree, there will be no visible change(Maybe the some part become thicker in color due to more drawing.) because its all within the 360 degree of the circle?

    Is that right?
     
  5. Oct 22, 2010 #4

    fzero

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Yes that's a very good way to think about it.
     
  6. Oct 22, 2010 #5
    I used the formula for a Sphere and I got only half a Sphere :

    x=cos(u)*cos(v);
    y=sin(u)*cos(v);
    z=sin(v);

    Basically u = 0.0001 to 6.282 and v = 0.0001 to 3.141, its a piece of programming code but the logic is the same.

    Erm..., did I do anything wrong?
     
  7. Oct 22, 2010 #6

    fzero

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    The volume element is

    [tex] r^2 \sin u ~dr~du~dv[/tex]

    and the integral should give [tex]4\pi R^3/3[/tex]. I'm not sure what you did.
     
  8. Oct 22, 2010 #7
    Erm... not that, I am trying to define a Sphere using VRML a 3D programming language. My teacher gave us this, its derive from the equation of a Sphere :

    parameters [0.0001 6.282 0.0001 3.141]
    definition "
    x=cos(u)*cos(v);
    y=cos(u)*sin(v);
    z=sin(u);"

    Parameter actually just means u's range is from 0.0001 to 6.282 or 0 <= u <= 2 pi and v is 0.0001 to 3.141 or 0 <= v <= pi

    This generates a sphere...

    But I find it weird that he is using the range of u as 0 <= u <= 2 pi and v as 0 <= v <= pi.


    I tried switching the range for u and v and got half a sphere instead...

    Shouldn't u be 0 <= u <= pi and v be 0 <= v <= 2 pi according to the definition of a Sphere :

    x = r cos(a)cos(b)
    y = r sin(a)cos(b)
    z = r sin(b)

    Where 0 <= a <= 2 pi and 0 <= b <= pi?
     
  9. Oct 22, 2010 #8

    fzero

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member


    Oh, sorry I didn't notice that before. Yes, you're right. If you look at his choice of coordinates and try to compute the volume, you'll actually find zero. So those ranges are not properly spanning the sphere.
     
  10. Oct 22, 2010 #9
    Thanks a lot.

    I think I got it already.

    I haven't been looking at the range at an angle point of view.

    I think I got it already, thanks a lot.
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook