I would like to know is there any method to solve this problem:

let say i have two objects A and B in 3D (in this case cube A and cube B). How can i find which face of object A are facing a face of object B?

i have tried to post an image to make my question more clear. but i could not post it here. however i have posted this image at the other link. this is the link for my question with image.

http://community.wolfram.com/groups/-/m/t/191020?p_p_auth=YNRwwp6r

Thank you for your help!

有帮助吗?

解决方案

Project the polygon B onto the plane of support of face A. This is best done by rotating space so that A becomes parallel to the XY plane, and dropping all Z coordinates. You will know if B faces A if the two 2D polygons intersect each other (http://en.wikipedia.org/wiki/Weiler%E2%80%93Atherton).

You may additionally check if all B vertices are on the same side of the plane of support by checking the signs of the Z coordinates.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top