Extend radius line outward of a sphere and get its coordinates

In summary: You are trying to find the coordinates of a point on a line that extends from the centre of a sphere outwards. The equation you are using is x^2 + y^2 + z^2 = r^2. You will need to calculate x, y, and z using spherical coordinates.
  • #1
quddusaliquddus
354
2

Homework Statement



I have a sphere and a line of radius extending from its centre to the outer surface.

I would like to know the coordinates of a point on the tip of the radial line if I were to extend it beyond the surface of the sphere in a straight line.

So I have the length of the radius of the sphere centred @ (0,0,0).

I would like to extend the radius line outward in a straight line by a give amount.

Then I would like to know the coordinates of the tip of the new extended radius line.

Homework Equations



x^2 + y^2 + z^2 = r^2

The Attempt at a Solution



(x+a)^2 + (y+b)^2 + (z+c)^2 = (r+d)^2

In the above I know what (r+d)^2 is.

I need to calculate what a, b and c are.
 
Physics news on Phys.org
  • #2
Do you mean you want to increase the radius of the sphere? My first thought, that you wanted "the coordinates of the tip of the new extended radius line" would require that you specify which radius you want to extend. But the form (x+a)^2 + (y+b)^2 + (z+c)^2 = (r+d)^2, another sphere, not the coordinates of a single point, indicates that you are extending every radius to form a new sphere. If that is the case, a= b= c= 0 still while d is the amount you are extending the radius by.

If that is not what you mean, please specify.
 
  • #3
Hi. Thanks for the reply.

Basically I have one sphere only. I have a line extending from the centre to a specific point on the outer shell of the sphere. This is the radius I mean. Now given anyone of the radiuses I would like to extend it outward further beyond the sphere by a given amount. Then given all this - I would like to calculate the coords of the end of the new extended radius (going through the sphere).
 
  • #4
To be clear - the sphere doesn't change. Only a particular radius-line extends itself outward from inside the sphere.
 
  • #5
I think all i need is to create a new larger sphere with the new radius and then get the coordinates from there.
 
  • #6
[URL=http://img4.imageshack.us/my.php?image=68660891.jpg][PLAIN]http://img4.imageshack.us/img4/5059/68660891.th.jpg[/URL][/PLAIN]
 
  • #7
Then how are you given the line? Are you given angles or are you given the coordinates of the point where it crosses the sphere?

I would use spherical coordinates: For a sphere of radius R, centered at [itex](x_0, y_0, z_0)[/itex], [itex]x= \rho cos(\theta)sin(\theta)sin(\phi)+ x_0[/itex], [itex]y= \rho cos(\theta)sin(\phi)+ y_0[/itex], [itex]z= \rho cos(\phi+ z_0[/itex].

If the line is designated by angles [itex]\theta[/itex] and [itex]\phi[/itex], just replace [itex]\rho[/itex] by R+ d.

If you are told that the line crosses the sphere at [itex]\left(x_1, y_1, z_1\right)[/itex] then you can use [itex]x_1-x_0= \rho cos(\theta)sin(\theta)sin(\phi)+ x_0[/itex], [itex]y_1-y_0= \rho cos(\theta)sin(\phi)+ y_0[/itex], [itex]z_1-z_0= \rho cos(\phi)[/itex] to find [itex]\theta[/itex] and [itex]\phi[/itex].

Dividing the second equation by the first, [itex](y_1-y_0)/(x_1-x_0)= sin(\theta)/cos(\theta)= tan(\theta)[/itex] so [itex]\theta= tan^{-1}(y_1-y_0)/(x_1-y_0)[/itex]. Also [itex](x_1-x_0)^2+ (y_1-y_0)^2= \rho^2 cos^2(\theta)sin^2(\phi)+ \rho^2 sin^2(\theta)sin^2\phi= \rho^2sin^2\phi[/itex] and [itex]\sqrt{(x_1-x_0)^2+ (y_1-y_0)^2}= \rho sin \phi[/itex] while [itex]z_1- z_0= \rho cos\phi[/itex] so [itex]\sqrt{(x_1-x_0)^2+ (y_1-y_0)^2}/(z_1-z_0)= sin\phi/cos\phi= tan\phi[/itex]. [itex]\phi= tan^{-1}\sqrt{(x_1-x_0)^2+ (y_1-y_0)^2}/(z_1- z_0)[/itex].
Now use [itex]x= \rho cos(\theta)sin(\theta)sin(\phi)+ x_0[/itex], [itex]y= \rho cos(\theta)sin(\phi)+ y_0[/itex], [itex]z= \rho cos(\phi)[/itex] with those values of [itex]\theta[/itex] and [itex]\phi[/itex] and [itex]\rho= R+ d[/itex].
 
Last edited by a moderator:
  • #8
Thank you. I will go over the equations and tell you whether I've understood them. Again - thanks.
 
  • #9
BTW - I am given the point of intersection with the sphere and the length of the line both inside and outside the sphere.
 
  • #10
Ah, then you are given the [itex](x_1, y_1, z_1)[/itex] as above. I assume the "length of the line inside" was the radius of the circle. If not then I don't see how it is relevant. The "length of the line outside the sphere" is the d above.
 
  • #11
Thanks again Ivy! What are the two angles (theta & phi) and rho?
 
  • #12
Hi. Could someone help me with this please? I used this a while back and now forgotten how to.

I am doing this for each point of the sphere without success:

Code:
        Dim p As Double = Radius + Length

        Dim phi As Double = Acos((PointOfIntersection.X - Centre.X) / p)

        Dim theta As Double = Acos((PointOfIntersection.Y - Centre.Y) / (p * Sin(phi)))

        Dim x, y, z As Double

        x = p * Cos(theta) * Sin(theta) * Sin(phi) + Centre.X
        y = p * Cos(theta) * Sin(phi) +Centre.Y
        z = p * Cos(phi)

        Return New Point3D(x, y, z)

What am i doing wrong?
 
  • #13
nvm - i give up
 
Last edited:

Related to Extend radius line outward of a sphere and get its coordinates

1. What is the purpose of extending a radius line outward of a sphere?

The purpose of extending a radius line outward of a sphere is to find the coordinates of a point on the surface of the sphere that is a specific distance away from the center of the sphere.

2. How do you extend a radius line outward of a sphere?

To extend a radius line outward of a sphere, you can use the formula x = r * cosθ, y = r * sinθ, z = r * cosφ, where r is the radius of the sphere, θ is the angle of longitude, and φ is the angle of latitude.

3. What is the difference between a sphere's radius and its coordinates?

A sphere's radius is the distance from its center to any point on its surface, while its coordinates represent the location of a point on the surface of the sphere in a three-dimensional coordinate system.

4. How do you determine the coordinates of a point on the surface of a sphere?

To determine the coordinates of a point on the surface of a sphere, you need to know the radius of the sphere, as well as the angles of longitude and latitude of the point. You can then use the formula x = r * cosθ, y = r * sinθ, z = r * cosφ to calculate the coordinates.

5. Can the coordinates of a point on the surface of a sphere be negative?

Yes, the coordinates of a point on the surface of a sphere can be negative. This usually happens when the point is located in the southern or western hemisphere, or if the spherical coordinate system being used has negative values for certain angles.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
673
  • Calculus and Beyond Homework Help
Replies
13
Views
451
  • Calculus and Beyond Homework Help
Replies
7
Views
745
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
21
Views
3K
  • Calculus and Beyond Homework Help
Replies
2
Views
506
  • Calculus and Beyond Homework Help
Replies
15
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
2K
Back
Top