Extend radius line outward of a sphere and get its coordinates

Click For Summary

Homework Help Overview

The discussion revolves around determining the coordinates of a point extending from the center of a sphere along a radius line beyond its surface. The original poster has a sphere centered at (0,0,0) and seeks to extend a specific radius outward by a given length.

Discussion Character

  • Exploratory, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • Participants explore the implications of extending a radius and whether this involves creating a new sphere or simply finding a point. Questions arise regarding the specification of the radius to extend and the coordinates of the intersection point with the sphere.

Discussion Status

Some participants have provided equations and methods for calculating the coordinates based on spherical coordinates, while others seek clarification on the parameters involved, such as angles and the point of intersection. There is an ongoing exploration of the problem without a clear consensus on the approach.

Contextual Notes

Participants note that the original poster has the coordinates of the intersection point with the sphere and the lengths of the line both inside and outside the sphere. There is mention of potential confusion regarding the definitions of angles and the relevance of certain lengths.

quddusaliquddus
Messages
353
Reaction score
3

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
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.
 
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).
 
To be clear - the sphere doesn't change. Only a particular radius-line extends itself outward from inside the sphere.
 
I think all i need is to create a new larger sphere with the new radius and then get the coordinates from there.
 
[URL=http://img4.imageshack.us/my.php?image=68660891.jpg][PLAIN]http://img4.imageshack.us/img4/5059/68660891.th.jpg[/URL][/PLAIN]
 
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:
Thank you. I will go over the equations and tell you whether I've understood them. Again - thanks.
 
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:

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
Replies
3
Views
2K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 13 ·
Replies
13
Views
1K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 21 ·
Replies
21
Views
4K