8

enter myproblem

Sorry if this sounds too silly but my math skills are very poor and I just need this problem fixed. I made this graphic with geogebra 3D and it was quite easy there but I don't know how to write the equations for this. In the image you can see:

  • Sphere with radius 1.
  • Point $B$ on the sphere with spherical coordinates.
  • Point $C$ on the sphere with spherical coordinates.
  • $\alpha$ is the angle between $B$ and $C$.
  • Circle $d$ on the sphere from segment $b$ through point $C$.
  • $G$ and $D$ are points on that circle.
  • $\theta$ is the angle between $C$ and $D$ from the center of the circle.

What I want is an equation that, given and Initial Point ($B$), and $\alpha$ angle, gives me points on the circle $d$ ( like $C$, $G$ or $D$) with $\theta$ as a parameter. And if possible in spherical coordinates... Thanks

  • There are multiple ways to proceed, and the "preferred" strategy may depend on your intended purpose for these formulas. Could you please say a little about where the question comes from? Also, spherical coordinates are often denoted $\theta$ and $\phi$; there's no universal convention on which means what (longitude, latitude, or co-latitude), and your suggested parameter $\theta$ is presumably not the spherical coordinate $\theta$? – Andrew D. Hwang Jan 19 '14 at 00:37
  • Hi, thanks for the interest. I am trying to do a little Script in a program called Zbrush. It's a 3d modeling software. What I want to do is a tree trunk with branches. the Alpha angle is the angle of the new generated branch with its parent's branch. – dargelos Jan 19 '14 at 02:48

2 Answers2

13

Construct a parametrization of the circle $d$ in $3$ stages of increasing generality.

1. Suppose that $B$ is the north pole (colatitude $\varphi = 0$).

The circle is the parallel (line of constant colatitude $\varphi = \alpha$), which has $z = \cos \alpha$ and $r = \sin \alpha$; hence, it is parametrized in rectangular coordinates by $t \mapsto \big( x(t), y(t), z(t) \big)$, where $$ \left\{ \begin{align} x &= \sin \alpha \cos t \\ y &= \sin \alpha \sin t \\ z &= \cos \alpha \end{align} \right. \qquad \text{for } 0 \le t < 2\pi. $$

2. Suppose that $B$ is on the prime meridian (longitude $\theta = 0$) but colatitude has some value $\varphi = \beta$, where $0 < \beta \le \pi$.

We take the coordinates $(x, y, z)$ of the circle with center at the north pole (from 1.) and rotate them through an angle $\beta$ along the great circle that includes the prime meridian. Using standard formulas for rotating coordinates, we have $$ \begin{bmatrix} x \\ y \\ z \end{bmatrix} \mapsto \begin{bmatrix} x \cos \beta + z \sin \beta \\ y \\ -x \sin \beta + z \cos \beta \end{bmatrix}. $$

3. Suppose that $B$ is anywhere on the sphere with spherical coordinates $(\varphi, \theta) = (\beta, \gamma)$. Take the resulting coordinates from 2. and rotate them about the polar axis of the sphere through an angle of $\gamma$: $$ \begin{bmatrix} x \\ y \\ z \end{bmatrix} \mapsto \begin{bmatrix} x \cos \gamma - y \sin \gamma \\ x \sin \gamma + y \cos \gamma \\ z \end{bmatrix}. $$

Putting these together, the general case for a circle $d$ with center at $(\varphi, \theta) = (\beta, \gamma)$ and central angle $\alpha$ (that determines the radius) has rectangular coordinates: $$ \left\{ \begin{align} x &= \phantom{-}( \sin \alpha \cos \beta \cos \gamma ) \cos t + ( \sin \alpha \sin \gamma ) \sin t - (\cos \alpha \sin \beta \cos \gamma ) \\ y &= -( \sin \alpha \cos \beta \sin \gamma ) \cos t + ( \sin \alpha \cos \gamma ) \sin t + (\cos \alpha \sin \beta \sin \gamma ) \\ z &= \phantom{-}( \sin \alpha \sin \beta ) \cos t + \cos \alpha \cos \beta. \end{align} \right. $$

Sammy Black
  • 28,409
  • If you like the answer, then you should upvote it and select it, so the question is listed as answered. – Sammy Black Jan 20 '14 at 01:12
  • I am sure your answer is perfect but I must be doing something wrong in my program...I get the circle but not around the segment from the center to B. – dargelos Jan 20 '14 at 02:25
  • 1
    About a decade too late, but in case this helps anyone: I was coding this answer up and found the same result as @dargelos. I found I needed to replace $\gamma$ with $\gamma'=\pi-\gamma$ in the formulas above for the circle to be centered on $B$. – Andrew Jun 30 '21 at 16:03
1

By my math, the final result should be:

$$x = (\sinα\cosβ\cosγ)\cos t - (\sinα\sinγ)\sin t + (\cosα\sinβ\cosγ)$$

$$y =(\sinα\cosβ\sinγ)\cos t + (\sinα\cosγ)\sin t + (\cosα\sinβ\sinγ)$$

$$z = -(\sinα\sinβ)\cos t+\cosα\cosβ.$$