How to express a circle in spherical coordinates

Click For Summary

Discussion Overview

The discussion centers around finding the equation of a circle resulting from the intersection of a plane with a unit sphere, specifically in spherical coordinates. Participants explore different approaches to this problem, including parametrization techniques and considerations for computational implementation.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant suggests starting with a unit sphere at the origin and finding the intersection circle's equation in spherical coordinates, expressing uncertainty about how to begin.
  • Another participant recommends using Cartesian coordinates instead, proposing a method involving a rotation matrix to transform a parametrized vector to align with the normal vector of the plane.
  • A third participant mentions working with a NURBS sphere and intends to use the great circle distance equation to find the intersection in uv space, providing a formula for calculating the circle's parameters.
  • One participant cautions against modeling circles as great circles unless they truly are, highlighting the need for careful consideration of the geometry involved.
  • Another participant responds to the caution by clarifying their intent to use great circles only under specific conditions, indicating a nuanced understanding of the relationship between circles and geodesics on a sphere.

Areas of Agreement / Disagreement

Participants express differing opinions on the best approach to the problem, with some favoring Cartesian coordinates and others advocating for spherical coordinates. There is no consensus on the optimal method, and the discussion remains unresolved.

Contextual Notes

Participants note the importance of distinguishing between great circles and other types of circles based on the specific planes involved, indicating potential limitations in applying certain methods universally.

TBTTyler
Messages
3
Reaction score
0
I've got a unit sphere sitting at the origin. This sphere is cut by an arbitrary plane. I'm looking to find the equation of the circle that results from the intersection in spherical coordinates.

This is for a computer program I'm writing, and I've already set it up to approximate this by sampling (which is pretty easy), but I've been wracking my brain on this one. I don't even know where to start.

If anybody could suggest a good starting point, or a plan of attack, I don't mind doing the heavy lifting.

Thanks!
 
Physics news on Phys.org
You are really much better off using cartesian coordinates.

We first parametrize a vector x(t) by x(t) = (cos(t),sin(t),0) for 0 < t < 2pi.

Now all you need to do is find some orthogonal linear transformation (i.e. matrix) which takes the vector (0,0,1) to the vector n = (n1,n2,n3), where n is the normal vector to the plane you want the circle to lie in. This will essentially be a rotation matrix (with a possible reflection).

There will be many such orthogonal linear transformations, because you are only determining where the vector (0,0,1) goes, and you don't care about where the other two basis vectors go, so long as all the vectors remain orthogonal.

If we call such a matrix M, then Mx(t) will parametrize the circle you want.

The only question left is how to find such a matrix.

We want it to be of the form:

[a d n1]
[b e n2]
[c f n3]

Where the vectors (a,b,c) and (d,e,f) are orthogonal to each other, and to n.

We want it to be of this form, because this ensures the vector (0,0,1) gets sent to n.

Now you just need to figure out how to choose (a,b,c) and (d,e,f). You can do this mechanically, however, by applying the Gram-Schmidt Process :http://en.wikipedia.org/wiki/Gram–Schmidt_process

First, determine a coordinate plane that n does NOT lie in. Then choose the two basis vectors for that plane. For example, so long a n isn't of the form (n1,n2,0), we can choose the basis vectors (1,0,0) and (0,1,0) to apply the G-S process to.

Now we have three vectors, n, (1,0,0), and (0,1,0). You apply the G-S process as in the article, with n as the first vector, and then you will end up with three new vectors: n, (a,b,c), and (d,e,f) which will be orthogonal. You have now determined the coefficients of the matrix M.

Now simply carry out the multiplication Mx(t) and you will have parametrized the circle.
 
I'm intersecting a plane with a NURBS sphere, and I need the intersection in uv space, so I really do need the circle in spherical coodinates.

I found a possible path to a solution. A circle is just the distance from a point, so I'm going to try using the great circle distance equation to get the solution

Edit:
http://en.wikipedia.org/wiki/Great-circle_distance
I used the first formula from that page because my circles are going to be relatively large on the sphere.
I just plugged in y and x for the standpoint Latitude and Longitude, and solved for y

y = acos( (cos(a) - sin(p)sin(x)) / (cos(p)cos(x)) ) + L
Where a is the internal angle formed by the circle's center, the center of the sphere, and any point on the circle.
p is the latitude of the center of the circle
L is the longitude of the center of the circle

The graph for this only shows half of the curve, but it's trivial to mirror it
 
Last edited:
just a quick note: be careful you don't model your circles as great circles unless they really are, you mentioned using 'arbitrary planes'...
 
homology said:
just a quick note: be careful you don't model your circles as great circles unless they really are, you mentioned using 'arbitrary planes'...

Indeed I did, but I think you're misinterpreting what I said. I only mention great circles because they are the geodesics of a sphere.
You're saying the planar equivalent of "Be careful you don't make your circle a straight line" just because I mentioned that radii were straight lines :)

I would just have to set the variable "a" to pi/2 to make great circles.
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
6K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 5 ·
Replies
5
Views
90K