How can I intersect a line and a 3D object (cube, sphere, prism)?
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everyone, I am doing a program for the faculty, and in one part of the program I need to know the penetration distance between a line (incident beam) and a geometric shape loaded by the user, which in general can be a cube, sphere or Prism, nothing too complicated. Do you have any idea how I could deal with the problem? The user would initially enter the geometric parameters of the figure, such as radius, height and others. Based on this, he would have to generate the figure and intersect it. I was reading a bit the programs for computational geometry but I get a little dizzy, I am a little new in matlab. If you know any way to solve it or any good reading for the subject I would really appreciate it! Thank you.
0 commentaires
Réponses (1)
darova
le 19 Sep 2019
It is a pyramid. If you want to know if line intersects pyramid you should inspect each plane of it
Once you have all intersection points - inspect if there are points belonging to walls of pyramid
There are conditions that have to be met (use dot product to calculate angle):
0 commentaires
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!