0
$\begingroup$

I need to do all this in $\mathbb{R}^3$

  • a plane by $n \cdot p = -k$
  • a circle within this plane by radius = $r$ and center = $c$
  • a point $a$ on the inside on the circle (on the plane)
  • a direction $d$ orthogonal to $n$

Now I want to move $a$ onto the circle outline using $d$. I am not sure how to find the scalar $s$ needed to "hit" the outline of the circle with $o = a + sd$ where $o$ is the point on the outline.

I was thinking of the cosine law but then I don't know the wanted point on the circle outline.

Can someone help me? A closed form solution would be great. Thanks

$\endgroup$
0
$\begingroup$

Let $\theta$ be the angle between $a-c$ and $d$. Then by the law of cosines applied to triangle $aoc$ you get: $$ s^2+2sl\cos\theta+l^2-r^2=0, $$ where $l$ is the distance between $a$ and $c$. From that you can readily compute $s$: $$ s=\sqrt{r^2-l^2\sin^2\theta}-l\cos\theta. $$

$\endgroup$
4
  • $\begingroup$ yes I can follow that myself now. Somehow I missed that I can use the $d$ for the angle. Thanks! $\endgroup$
    – elfeck
    Aug 7 '15 at 11:04
  • $\begingroup$ although there is a sign mistake: I think it should be $s = \sqrt{ ... } + l \cos \theta$ $\endgroup$
    – elfeck
    Aug 7 '15 at 11:43
  • $\begingroup$ It depends on which angle you choose as $\theta$ between the two formed by $d$ with line $ac$. $\endgroup$ Aug 7 '15 at 12:46
  • $\begingroup$ ah of course! Thanks again $\endgroup$
    – elfeck
    Aug 7 '15 at 12:49

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.