How to solve the intersections between helix and sphere?

12 views (last 30 days)
Helix:
x=R*cos(wt)+x0,
y=R*sin(wt)+y0;
z=h*t;
Sphere:
(x-xc)^2+(y-yc)^2+(z-zc)^2=r^2
substitute the heilx into sphere:
(R*cos(wt)+x0-xc)^2+(R*sin(wt)+y0-yc)^2+(ht-zc)^2=r^2;
How to solve the "t" quickly and easily? or do you have anyother methods to solve the question? Thank you very much

Accepted Answer

darova
darova on 5 Jul 2019
You have to find t where distance from center coordinates to helix equals sphere radius
x = r*cos(w*t)+x0;
y = r*sin(w*t)+y0;
z = h*t;
r1 = sqrt(x.^2 + y.^2 + z.^2); % distance from center to helix (radius)
t0 = [t(1) t(end)]; % just horizontal line
R0 = [R R];
[t1,~] = polyxpoly(t,r1,t0,R0); % find t1 where radius == sphere radius
img.png
Look also HERE

More Answers (1)

KSSV
KSSV on 5 Jul 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!