1

I am trying to find a sphere and a cubic Bézier curve intersection points.

Sphere: $$ \begin{align} x &= x_0 + r \sin \theta \; \cos\varphi \\ y &= y_0 + r \sin \theta \; \sin\varphi \qquad (0 \leq \theta \leq \pi,\; 0 \leq \varphi < 2\pi ) \\ z &= z_0 + r \cos \theta \,\end{align} $$

May be just: $$ \begin{align} x &= r \sin \theta \; \cos\varphi \\ y &= r \sin \theta \; \sin\varphi \\ z &= r \cos \theta \,\end{align} $$

Bézier curve: $$ \mathbf{B}(t) = (1-t)^3\mathbf{P}_0+3(1-t)^2t\mathbf{P}_1+3(1-t)t^2\mathbf{P}_2+t^3\mathbf{P}_3,\ 0 \le t \le 1 $$

Here the answerer gave the formula: $$ \mathbf{B}(t) \cdot \mathbf{B}(t) = r^2 $$

He says, this is «equation of degree 6», but I don't get why. It seems the cosine of the vector dot product must equal to 1, so it must be just: $$ \mathbf{B}(t) = r $$

If not, then why? And, if I mistake, how to solve this?

Edit:

Well, it's actually: $$ \| \mathbf B (t) \| = r $$

  • 1
    A scalar product of a vector with itself is a number, so comparing it to $r^2$ is OK. But a vector itself can not be compared to a scalar $r$. However, you may say $\left\vert \mathbf{B}(t) \right\vert = r$ instead. – CiaPan Sep 15 '21 at 10:40
  • 1
    Please see the comments I made following my answer to the other question. I said essentially the same thing as @CiaPan. – bubba Sep 15 '21 at 10:50
  • 1
    Also, it’s easy to draw a cubic Bézier curve that intersects a sphere in 6 places, so whatever equation you choose to solve must have (at least) 6 roots. – bubba Sep 15 '21 at 10:53

0 Answers0