intersection - Algorithm for determining whether a point is inside a 3D mesh -
what fast algorithm determining whether or not point inside 3d mesh? simplicity can assume mesh triangles , has no holes.
what know far 1 popular way of determining whether or not ray has crossed mesh count number of ray/triangle intersections. has fast because using haptic medical simulation. cannot test of triangles ray intersection. need kind of hashing or tree data structure store triangles in determine triangle relevant.
also, know if have arbitrary 2d projection of vertices, simple point/triangle intersection test necessary. however, i'd still need know triangles relevant and, in addition, triangles lie in front of point , test triangles.
i solved own problem. basically, take arbitrary 2d projection (throw out 1 of coordinates), , hash aabbs (axis aligned bounding boxes) of triangles 2d array. (a set of 3d cubes mentioned titus overkill, gives constant factor speedup.) use 2d array , 2d projection of point testing small set of triangles, 3d ray/triangle intersection test on (see intersections of rays, segments, planes , triangles in 3d) , count number of triangles ray intersection z-coordinate (the coordinate thrown out) greater z-coordinate of point. number of intersections means outside mesh. odd number of intersections means inside mesh. method not fast, easy implement (which looking for).
Comments
Post a Comment