1
$\begingroup$

I have a problem where I need to determine if a point is contained in the area of a circle in 3d space.

For my circle, I have the radius (R), the position of the center (C) and a normal vector to the circle (N). With that, I can easily draw my circle.

Now, I will have a point generated and I want to know if this point is located on the area of the circle.

Currently, I'm thinking of obtaining the parametric equations of my circle which are:

\begin{align*} x &= r\cos\phi\cos\theta \\ y &= r\sin\phi \\ z &= r\cos\phi\sin\theta \end{align*}

Then, I could easily verify if the point verifies these equations.

However, I don't know how to convert the data I have (Radius, Center position and normal vector) into these 3 parametric equations and I need help with that !

$\endgroup$
1
$\begingroup$

Here's my opinion,
1. check if $|CP|\leq R$
2. check if $\vec{CP}\cdot N = 0$

more specifically, if $C = (x_{0},y_{0},z_{0})$ , $N=(a,b,c) $ and $P=(x,y,z)$
P is on disc C when,
1. $(x-x_{0})^{2}+(y-y_{0})^{2}+(z-z_{0})^{2}\leq R$
2. $(x-x_{0})*a+(y-y_{0})*b+(z-z_{0})*c=0$

the second condition ensures that P is on the same plane as the disc.

$\endgroup$
  • $\begingroup$ What do you mean by vertical, parallel ? I think I should check also that the distance between C and P is smaller than the radius right ? $\endgroup$ – CoachNono Nov 6 '13 at 16:11
  • $\begingroup$ I meant perpendicular * $\endgroup$ – CoachNono Nov 6 '13 at 16:22
  • $\begingroup$ Yes, you should check if CP is smaller than R. $\endgroup$ – Weijian Nov 6 '13 at 16:22
  • $\begingroup$ if CP and N are perpendicular, P is on the same plane with the disc. $\endgroup$ – Weijian Nov 6 '13 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.