Center of Arc with Two Points, Radius, and Normal in 3D

2.7k Views Asked by At

I'm struggling to get the math to work out on this. I need to derive an alorithm for a program where I'm representing geometric entities. In this case, it's an arc. I would like to create the arc in 3D space using two points, the radius, and a normal. Any help would be greatly appreciated.

Edit:

To clarify....

  • The two points, radius, and normal are given.
  • It is a circular arc
  • The two points are the end points of the arc.
  • The radius is the radius of the circle defining the arc. Thus as would be expected, the segments from the two end points of the arc to the center would have a length equal to the radius.
  • The normal is the normal unit vector to the plane of the circle defining the arc, thus yes perpendicular to the plane of the arc.

I'm just trying to derive an algorithm to find the center point of the circle defining the arc with the aforementioned given in 3D space. Any help would be greatly appreciated.

2

There are 2 best solutions below

2
On BEST ANSWER

The plane of the arc is found from one of the points with $d=\hat{n} \cdot \vec{p}_1$ such that any point $\vec{r}=(x,y,z)$ belongs to the plane if $$ \hat{n} \cdot \vec{r} = d$$ where $\hat{n}$ is the unit normal vector.

The midpoint of the two points is $$\vec{p}_m = \frac{\vec{p}_1 + \vec{p}_2}{2} $$

Next we need two unit vectors on the plane to define planar coordinates. Use $$\hat{u} = {\rm unitvector}(\vec{p}_2-\vec{p}_1) $$ $$ \hat{v} = \hat{n} \times \hat{u} $$

We need the center of the arc point on the plane, and we can find it by moving from the mid point $\vec{p}_m$ along the direction $\vec{v}$ by $$h = \frac{ \ell^2}{2 r}$$ where $\ell = \| \vec{p}_2 - \vec{p}_1 \|$.

The figure below shows the arc and the height calculation from the chord length $\ell$ and radius $r$.

pic

So the center is at $$\vec{p}_c = \vec{p}_m + (h-r) \hat{v}$$

The included angle of the arc is $$\theta = 2 \sin^{-1} \left( \frac{\ell}{2 r} \right) $$

Finally the arc is parametrically defined as $$\vec{r}(t) = \vec{p}_c + {\rm Rot}(\hat{n}, -\frac{\theta}{2} + t \theta) \hat{v} r $$

0
On

You can get a result matching the problem statement (but not the only result; see below) by carefully reading the comments of this other answer and using them to correct the formulas in the answer itself. But you can further simplify the problem by skipping the entire question of the midpoint of the arc.

So let's say you are given the radius $r,$ a vector $n$ orthogonal to the plane of the circular arc, and the two points $p_1$ and $p_2$ at the endpoints of the arc. (Depending on how the problem is actually encountered, $n$ may be a unit vector, but I am not going to make that assumption.)

Find the center of the chord of the arc, $$ p_m = \frac{p_1 + p_2}{2}. $$

Now if $p_c$ is the center of the arc, it is at distance $r$ from each of the points $p_1$ and $p_2.$ The points $p_m,$ $p_1,$ and $p_c$ form a right triangle with right angle at $p_m$; the hypotenuse of the triangle has length $r$ and the leg from $p_m$ to $p_1$ has length $$ a = \lVert p_m - p_1 \rVert = \frac12 \lVert p_2 - p_1 \rVert. $$

The leg from $p_m$ to $p_c$ therefore has length $$ b = \sqrt{r^2 - a^2}. $$

Let $$ v = n \times (p_2 - p_1). $$ Then $$ \hat v = \pm \frac{v}{\lVert v\rVert} $$ is a unit vector in the direction from $p_m$ to $p_c.$

The $\pm$ sign signifies that there are actually two such unit vectors pointing in opposite directions, which is due to an ambiguity in the problem statement; the normal defines a plane through one of the endpoints of the arc and the other endpoint must lie in the same plane (or else the problem is ill-posed), but given two points in a plane and a radius greater than half the distance between the points there are two circles through those two points with that radius, each providing a different arc with those endpoints.

Choose one of the two possible vectors called $\hat v$ in the formula above; then $$ p_c = p_m + b \hat v $$ is the corresponding center of the arc.

Note that it works just as well if you let $v = n \times (p_m - p_1)$ or $v = n \times (p_m - p_2).$ The step where we convert $v$ to the unit vector $\hat v$ (and possibly reverse its direction) leads to the same choices of $\hat v.$

There is a further ambiguity in the problem statement that did not need to be considered when finding the center: is the arc the shorter arc between the given points, or the longer arc? (Or might it even be an arc that goes around the circle more than one full circumference?)

The ambiguities in the problem statement can be eliminated by placing extra conditions, for example we can explicitly say we are looking for the shortest arc between $p_1$ and $p_2$ with radius $r$, and we can say that the vectors $p_1 - p_c,$ $p_2 - p_c,$ and $n$ (in that sequence) should form a right-handed coordinate system. But you would need to look more carefully at how the problem was encountered in order to determine what the correct conditions are.