
#1
Dec707, 07:28 PM

P: 117

Given a point on a unit radius sphere (let's say at coords x=0, y=0.4, z=0.9165 as shown in the attached diagram), and given a starting angle from 0 to 360 for which the point to travel, what math can I use to exactly 'cut' the sphere in half?
For example, the attached diagram below shows the sphere cut exactly in half in two different ways according to the starting direction (blue line about 30 degrees (anticlockwise from 3 o'clock), and orange line about 75 degrees). So input is: x, y, z, starting angle direction, and distance travelled around the sphere (as an angle). And output is newx, newy, and newz. What equation can I use? 



#2
Dec707, 07:39 PM

Mentor
P: 4,499

Any great circle (circle that defines a diameter) will work for this. To find what the possible great circles are, note they have to cross through the point directly opposite your starting point, i.e. be on the line defined by the starting point and the center of the circle. This is fortunately trivial to calculate as the center is the origin, so you can just take the negative of each coordinate.
Given those two points you can draw a circle of radius one on any plane passing through them (the circle and the plane passing through the points that is) and you've found a possible great circle. Note this gives you infinite possible solutions. I'm not quite sure how you're defining the starting angle for a generic point, but once you pick a way, you've narrowed it down to exactly one path 



#3
Dec707, 08:29 PM

P: 117

Yes, all that makes sense. To answer your question, the starting angle is arbitrary from 0360 and that's why I gave it as one of the starting variables. Do you know the math formula to output the new x, y & z values given the initial 5 variables as said at the end of my initial post?




#4
Dec707, 08:35 PM

Mentor
P: 4,499

Rotate point on sphere to exactly 'cut sphere in half'
I know the starting angle is arbitrary, but you have to say what it's an angle with respect to so it's defined well. For example, when you give polar coordinates, you give the angle with respect to the positive xaxis. I imagine it's tricky to find something good to do this with as in general, there's no set axis or plane where you can define the angle off of, since the perspective of the point skews as it moves
EDIT: I just noticed, your distance traveled around the sphere is kind of useless, because the point always travels around a great circle, so it never changes 



#5
Dec707, 09:40 PM

P: 117

I understand this will create sudden 'about turn' anomalies on the bright green circle of the shown sphere, but that doesn't worry me at this point in time. I hope this answers your question. See below attachment for clarification. By the way, thanks for offering your time to work this out. I'm getting excited about the prospects of how I can use this if it works. 



#6
Dec807, 08:39 AM

Mentor
P: 4,499

I'll preface this by saying that for the duration of this post, in the images you posted the xaxis is horizontal and the zaxis is vertical (yaxis is into/out of the page)
Ok, so instead of being something in the front or the back of the sphere, if instead the point was off to the side (so maybe, from our perspective, at (1,0,0) if we're looking at this from the negative yaxis), from our perspective it has a projection angle of zero, so the way of describing this isn't very good as it's not defined for two points I think. The top and bottom might not work either, as you have no up/down rotation to determine what the angle is. I'm starting to see now, when you say I think what we need to do is describe the sphere in spherical coordinates. If you don't know what they are, look here http://en.wikipedia.org/wiki/Spherical_coordinates. we know the radius of the sphere is 1, so we can describe the point by stating the angle w.r.t. the zaxis (angle formed by the zaxis and the line from the origin to the point, always between 0 and 180) and the angle of the projection onto the xy plane w.r.t. the xaxis, which is between 0 and 360. We'll call these P and T (P for phi, and T for theta. I'm too lazy to keep texing) Then the coordinates of your point are (P,T). If you want the input as (x,y,z) that's fine, as we can algorithmically calculate P and T based on them. But input as (P,T) probably would be better depending on your application as there can't be any rounding error in making sure the point actually is on the sphere (e.g. if x,y,z are repeating or irrationals). Then based on the point's location, we can give a trajectory (p,t). For example, the zero degrees that you have up there would be described as (90,0) as , if you put the trajectories on the origin, they would form a 0 degree angle with the xaxis and a ninety degree angle with the zaxis. If it was a point on the side (one that I said you couldn't do with your system), then it would be (p, 90) or (p,270) depending on which way it was pointing. If the trajectory was pointing straight up or straight down, then the t portion wouldn't be well defined, but you can probably just put a 0 in there and find a way to make it work. How the whole algorithm would come together I'm not entirely sure of yet, so I'll have to get back to you after thinking a bit 



#7
Dec807, 09:50 PM

P: 117

Hope you manage to solve it! 



#8
Dec807, 10:20 PM

Mentor
P: 4,499

Actually, I realized my stupid (p,t) trajectory system was complete bullocks (I've always wanted to use that word), because of the exact same problem that came from trying to do the static one dimensional version (i.e. the vector skews as it goes around the sphere). The system would work, but actually calculating what the trajectory vector is would be a pain for nontrivial points on the sphere. here's what's needed I think:
An outward pointing normal vector at (x,y,z) is (x,y,z) which is the normal of the plane [tex]xx_0 + yy_0 + zz_0 = c[/tex] where the [tex]x_0,y_0, z_0[/tex] are the variables. So given (x,y,z) the tangent plane to the sphere at that point is is [tex]xx_0 + yy_0 + zz_0 = x^2 + y^2 + z^2=1[/tex] as the point (x,y,z) must be on the plane and (x,y,z) is on the sphere. So on the plane described by [tex]xx_0+yy_0+zz_0=1[/tex] we need to pick a vector on the plane, and then describe the angle w.r.t. that vector. To satisfy our geometric intuition that you were trying to use before, we're going to pick a vector on it with no z_{0} component (then picking the angle is equivalent to what you were doing for most cases). So we have [tex]xx_0+yy_0=1[/tex] which is satisfied by [tex]x_0=1/(2x), y_0=1/(2y)[/tex]. Unless, of course, x or y (or both) is zero. So we break it down to if else statements to determine what you're measuring your angle with respect to (vectors placed on the sphere at the starting point): if (x=0) angle is measured with respect to (1,0,0) if (y=0) angle is measured with respect to (0,1,0) (these two cases you should be able to see visually in your head why they work) else angle is measured with respect to (1/(2x),1/(2y),0) Notice how this makes some intuitive sense as we can take any multiple of the vector we're measuring w.r.t. (since we only need direction), so for x large w.r.t. y, the angle is measured with something that has a large y component, and then taken to the extreme for y zero, the y component must be infinitely larger than the x component. So now that that's sorted with a solid level of rigor, next up is figuring out what great circle you're looking at given a point, and an angle w.r.t. a tangent vector (coming up tomorrow probably) EDIT: If you can confirm this makes sense, that would be great :) If you have any questions on the above, feel free to ask 



#9
Dec1007, 07:59 PM

Mentor
P: 4,499

Much better way of doing things:
If your starting point is (P,T), first, you calculate the matrix that rotates this to (1,0,0), which would be combining a rotation of T around the zaxis, then a rotation of P around the xaxis. multiply the two to get your final matrix. Then amazingly enough orientation of any 'horizontal' vector is still horizontal, so we can describe the trajectory by an angle O w.r.t an a vector parallel to (0,1,0). Then the great circle is going to be parametrized by cos(t)i + sin(t)j + 0k and we need to rotate this by an angle O around the xaxis. This gives us a parametrization w.r.t. angle for position on the great circle, and by multiplying by the inverse of the original rotation matrix, we find the position you're looking for. Smooth as silk 



#10
Dec1007, 10:11 PM

P: 117

I'm afraid I can't easily follow your last two posts, but it looks as though you may have cracked it judging from your last one. Nice one! (You'd never guess what this is all for by the way :D )
So from your latest post, could you express the newx, newy and newz output variables in terms of the 5 input vars (or 4 if you use spherical coords) ? 



#11
Dec1207, 02:43 PM

Mentor
P: 4,499

I'm taking an eight hour plane flight in less than 24 hours, but I'll post up a full description of the method on friday or saturday




#12
Feb808, 10:03 AM

P: 111

Sorry to butt in here but I'm curious to know whether the following
alternative solution derived from vector algebra is the same as the elegant solution proposed by Office_Shredder: Let [tex] \{x,y,z\} [/tex] be an orthonormal set of basis vectors spanning 3D space, and let [tex] a [/tex] be a unit vector specifying the initial point on the unit sphere: [tex] a = Xx + Yy +Zz [/tex], where [tex] \{X,Y,Z\} [/tex] are just real numbers. Following the suggestion in the previous posts, [tex] a [/tex] can be specified in terms of spherical coordinates: [tex] X=\sin{\theta}\cos{\phi}; \ Y=\sin{\theta}\sin{\phi}; \ Z=\cos{\theta} [/tex]. The plane tangent to the sphere at the point specified by [tex] \ a [/tex] is [tex] P := xyza = Xyz +Yzx +Zxy [/tex]. Now define two orthonormal reference vectors in this plane: [tex] e_1 = z \cdot P/ \left z \cdot P \right  = (Yx  Xy)/t [/tex], where [tex]t = \sqrt{X^2 + Y^2}[/tex] [tex] e_2 = (z \cdot P)P^{1} \\ = (Yx  Xy)(Xzy + Yxz + Zyx) \\ = z  Za. [/tex] The unit vectors [tex] (a, e_1, e_2) [/tex] comprise a set of orthonormal vectors. The great circle dividing the sphere in half may now be specified by defining a unit vector [tex]u[/tex] in terms of an angle [tex] \tau, \ (0 \leq \tau \leq 2\pi) [/tex]: [tex] u = e_1\ \cos{\tau} + e_2\ \sin{\tau} [/tex]. The great circle lies in the plane [tex] a\wedge u[/tex]. Any point on this great circle can be expressed in terms of an angle [tex] \beta, \ (0 \leq \beta \leq 2\pi) [/tex] to define a vector r pointing from the origin to a point on the circle: [tex] r(\beta) = a\ \cos{\beta} + u\ \sin{\beta} [/tex]. If the radius of the sphere is R, then simply multiply r by R. This formula will fail if the starting point is on the zaxis. In this case, one can develop an alternative formula by defining the reference vectors with x instead of with z. The above procedure should produce the same result as the one by Office_Shredder but it does not require rotation matrices. 


Register to reply 
Related Discussions  
Making domed/half sphere closed loops for EDS.  Electrical Engineering  14  
Half a sphere  Advanced Physics Homework  2  
Integration bounds when integrating a half sphere  Calculus & Beyond Homework  12  
Average Volume of Half a Sphere  Introductory Physics Homework  1  
Distance from a point on a sphere to a point on a plane...  Calculus  6 