how to move a sphere until it intersect a surface?
Show older comments
Hi mates!
My idea is creat a sphere with center fixed in x and y but free in z. So it had movemet in z, up and down. Then, i have a surface and i want to move the sphere until it intersect the surface and get the intersection point. Someone can help? thanks!
10 Comments
Kevin Phung
on 7 Mar 2019
what part do you need help with specifically?
Luís Asevedo
on 11 Mar 2019
Jan
on 11 Mar 2019
There is an infinite number of ways to "move a sphere". Do you want a linear translation? Do you really need to move the sphere, or would the determination of the final position be sufficient already? Wouldn't it be trivial to determine the center of a sphere touching a surface at a specific point?
Luís Asevedo
on 11 Mar 2019
KSSV
on 11 Mar 2019
YOu can use knnsearch......read about it.
Jan
on 11 Mar 2019
How is the surface defined?
Luís Asevedo
on 11 Mar 2019
Jan
on 11 Mar 2019
@Luis: Please do not let us guess, what your inputs are. Maybe you have a real 3D object and it is a part of the problem to digitize the surface. Or maybe the surface is stored as equi-distributed Z values in a MAT file. Or you have a surface or patch object. Maybe the suface is convex or concave or perhaps you have a point cloud and need to create an alpha-shape at first. It would be a waste of time, if I guess the wrong type of input.
John D'Errico
on 11 Mar 2019
Edited: John D'Errico
on 11 Mar 2019
Yes. It does matter what the surface is. Is this a functional form, like z(x,y)? Is it a surface that you created, possibly using meshgrid? Is is just a scattered list of points with no defined connectivity? I'd solve the problem differently depending on what I have to deal wih.
Luís Asevedo
on 12 Mar 2019
Accepted Answer
More Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
