Understanding the Parametric Equation for a Sphere

Click For Summary
The discussion clarifies the parametric equations for a sphere, highlighting that the variable v ranges from 0 to π to avoid tracing the sphere twice, while u spans from 0 to 2π to complete the circle. It emphasizes that the integration of v over 2π would incorrectly calculate the volume of the sphere, resulting in double the expected value. A participant shares their experience with VRML programming, noting confusion over the ranges of u and v, which led to generating only half a sphere. The conversation concludes with a realization that the chosen coordinate ranges must properly span the sphere to yield correct results. Understanding these parameters is crucial for accurate 3D modeling and volume calculations.
DorumonSg
Messages
61
Reaction score
0
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?
 
Physics news on Phys.org
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.
 
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?
 
Yes that's a very good way to think about it.
 
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?
 
DorumonSg said:
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?

The volume element is

r^2 \sin u ~dr~du~dv

and the integral should give 4\pi R^3/3. I'm not sure what you did.
 
fzero said:
The volume element is

r^2 \sin u ~dr~du~dv

and the integral should give 4\pi R^3/3. I'm not sure what you did.

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?
 
DorumonSg said:
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?


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.
 
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.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
Replies
4
Views
2K
Replies
3
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
Replies
14
Views
2K
  • · Replies 1 ·
Replies
1
Views
964
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 20 ·
Replies
20
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K