geometry

How to generate a random sample of points from a 3-D ellipsoid using Python?

£可爱£侵袭症+ 提交于 2020-06-27 22:58:47
问题 I am trying to sample around 1000 points from a 3-D ellipsoid, uniformly. Is there some way to code it such that we can get points starting from the equation of the ellipsoid? I want points on the surface of the ellipsoid. 回答1: Here is a generic function to pick a random point on a surface of a

How to find the rotation matrix between two coordinate systems?

ε祈祈猫儿з 提交于 2020-06-24 01:56:15
问题 There are two coordinate systems. We know the 3D coordinates of the origin and the 3D vectors of the axes of the second coordinate system with respect to the first coordinates system. Then how can we find the rotation matrix that transforms the first coordinate system into the second coordinate

What's the simple way to compute the diagonal length of a 3D mesh bounding box?

末鹿安然 提交于 2020-06-16 19:06:13
问题 I would like to compute the diagonal length of the bounding box of a 3D mesh. Using C++, I iterate of the vertices and search for the (min,max) of X coordinates, (min,max) of Y coordinates and (min,max) of Z coordinates. However I don't know how can I exploit these obtained min/max for the

Cone to box collision

两盒软妹~` 提交于 2020-06-16 17:27:29
问题 I'm looking to implement collision detection between a cone (With a round bottom. So it's basically a slice of a sphere) and a box. I'm not too fussed about it being AABB or OBB because transforming should be simple enough. Every solution I find uses a triangular cone but my cone is more of an

Cone to box collision

别等时光非礼了梦想. 提交于 2020-06-16 17:25:31
问题 I'm looking to implement collision detection between a cone (With a round bottom. So it's basically a slice of a sphere) and a box. I'm not too fussed about it being AABB or OBB because transforming should be simple enough. Every solution I find uses a triangular cone but my cone is more of an