2

How can I compute points along a circle that lays on a plane given the following:

  • center $P$ = $(a, b, c)$
  • radius $r$
  • plane equation $2x - 8y + 5z = 18$

I need to find points along this circle from $[0,2\pi]$ in $\frac{\pi}{4}$ increments. In 2D I would do this like:

$$x = a + r * \cos{\theta}$$ $$y = b + r * \cos{\theta}$$

But I am not sure how I would do this in 3D to include Z.

I've found this and this but I'm not fully understanding how they are getting their perpendicular vectors; I know that the normal vector to the plane $n$ is $\langle 2, -8, 5 \rangle$.

pstatix
  • 249
  • 1
    If you use cosine for both $x$ and $y$, you don’t get a circle. I expect that you meant $y=b+r\sin\theta$. – amd Aug 02 '18 at 20:36
  • 2
    In short, rewrite your parametric equations as a single vector equation. The same parametric vector equation will work in 3D. The key is to choose a pair of orthogonal unit vectors parallel to the plane to use as the new “x” and “y” axes. This also means deciding where you want your “$\pi/4$ increments” to start. – amd Aug 02 '18 at 20:39

1 Answers1

1

Basically you need to find two unit vectors $u$ and $v$ orthogonal to each other in the rotation plane. Once you have those you can compute the circle points $p$ as:

$p(r, c, \theta) = c + r u \cos \theta + r v \sin \theta$

Where $c$ is the center point, $r$ the radius and $\theta$ the angle.

Now, you can obtain $u$ and $v$ from the plane equation:

$n \cdot x = d$

Where $n$ is the plane normal and $d$ the distance to the origin.

We can pick a random vector $x$ not parallel with $n$

$u = x \times n / \|x \times n\|$

$v = u \times n$

You can check that $n \cdot (c+u) = d$ and $n \cdot (c+v) = d$