1

Here some examples of twisted triangle prisms.

enter image description here enter image description here enter image description here

I want to know if a moving triangle will hit a certain point. That's why I need to solve this problem.

The idea is that a triangle with random coordinates becomes the other random triangle whose vertices all move between then

related: How to determine point/time of intersection for ray hitting a moving triangle?

Community
  • 1
  • 1
Mano-Wii
  • 592
  • 5
  • 19
  • Do you want to know if that point lies inside some horizontal section of twisted prism? – MBo May 22 '17 at 07:57
  • @MBo, If by horizontal section you refer to a triangle within the volume that is coplanar to the point, then yes ;) – Mano-Wii May 22 '17 at 16:58

2 Answers2

1

One of my students made this little animation in Mathematica.


Schonhart
It shows the twisting of a prism to the Schönhardt polyhedron. See the Wikipedia page for its significance. It would be easy to determine if a particular point is inside the polyhedron.

But whether it is inside a particular smooth twisting, as in your image, depends on the details (the rate) of the twisting.

Joseph O'Rourke
  • 4,346
  • 16
  • 25
  • The prism is not smoothed, but its sides are. The sides can not be represented by two triangles, as it would not correctly represent the change of the first triangle to the other. Thanks for the wiki – Mano-Wii May 21 '17 at 22:44
0

Let's bottom triangle lies in plane z=0, it has rotation angle 0, top triangle has rotation angle Fi. Height of twisted prism is Hgt.

Rotation angle linearly depends on height, so layer at height h has rotation angle

 a(h) = Fi * h / Hgt

If point coordinates are (x,y,z), then shift point to z=0 and rotate (x,y) coordinates about rotation axis (rx, ry) by -a(z) angle

 t = -a(z) =  - Fi * z / Hgt
 xn = rx + (x-rx) * Cos(t) - (y-ry) * Sin(t)
 yn = ry + (x-rx) * Sin(t) - (y-ry) * Cos(t)

Then check whether (xn, yn) lies inside bottom triangle

MBo
  • 77,366
  • 5
  • 53
  • 86
  • Nice, but this solution would only work if the triangles were similar and had the same normal. The idea is that a triangle with random coordinates becomes the other random triangle as a function of a factor that varies from 0 to 1 – Mano-Wii May 23 '17 at 03:45
  • But you have not specified randomness in your initial post, that is why I felt free to choose convenient model. – MBo May 23 '17 at 05:24