How can I intersect a line and a 3D object (cube, sphere, prism)?
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
darova
el 19 de Sept. de 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 comentarios
Ver también
Categorías
Más información sobre Surface and Mesh Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!