I am coding the intersection of a 3D Bézier curve with parametric equation and a parametric sphere equation, with the objective of splitting the Bézier curve at that specific point. Can you check my equations?
I define my sphere and Bézier as: $$\begin{array}{l}{X_s} = r*\cos (v)\cos (u)\\{Y_s} = r*\cos (v)\sin (u)\\{Z_s} = r*\sin (v)\\B(t) = {(1 - t)^3}{P_{01}} + 3(t - 2{t^2} - {t^3}){P_{11}} + 3({t^2} - {t^3}){P_{21}} + {t^3}{P_{31}}\end{array} $$
Under this equations my intersection is defined as:
$$\begin{array}{l}r*\cos (v)\cos (u) = {(1 - t)^3}{P_{01X}} + 3(t - 2{t^2} - {t^3}){P_{11X}} + 3({t^2} - {t^3}){P_{21X}} + {t^3}{P_{31X}}\\r*\cos (v)\sin (u) = {(1 - t)^3}{P_{01Y}} + 3(t - 2{t^2} - {t^3}){P_{11Y}} + 3({t^2} - {t^3}){P_{21Y}} + {t^3}{P_{31Y}}\\r*\sin (v) = {(1 - t)^3}{P_{01Z}} + 3(t - 2{t^2} - {t^3}){P_{11Z}} + 3({t^2} - {t^3}){P_{21Z}} + {t^3}{P_{31Z}}\end{array} $$
This gives me a system of three unknown $u,v,t$ and three equations. Am I correct? Is there a better way?