Fast mesh-mesh intersection using ray-tri intersection with octree spatial partitioning.

버전 1.5.0.0 (2.7 MB) 작성자: Thomas
Fast mesh-mesh intersection based on ray-tri solution. Octree partitioning gives large speed-up.
다운로드 수: 1.1K
업데이트 날짜: 2015/2/16

라이선스 보기

% Putative points of intersection between each pair of surfaces are located
% by assuming that each constituent mesh triangle edge represents an
% infinitesimal ray, then solving the ray-triangle intersection problem
% using the Barycentric coordinate based solution presented by Möller and
% Trumbore [1997: vectorized implementation for speed]. Positive
% intersections occur when the intersecting point, p0 lies between the end
% nodes of its corresponding triangle edge (p1, p2), identified when the
% following criterion is satisfied:
% ‖p0 - p1‖ + ‖p0 - p2‖ = ‖p1 - p2‖
% Note: rounding errors do not permit solving of the above criteria
% directly. Dot and cross functions are instead used for constraining
% whether the point is between the triangle edge end nodes.
% Ray tracing becomes prohibitive for meshes greater than a few thousand
% triangles. The reliance on spatial partitioning using octree subdivision
% carries overhead in binning the two input meshes, but is still usually
% MUCH faster than a brute force search for most mesh objects.
% INPUT:
% pointsA: nx3 vertex list for mesh A
% pointsB: nx3 vertex list for mesh B
% facesA: nx3 face list of triangle corner indices for mesh A
% facesB: nx3 face list of triangle corner indices for mesh B
% octs: maximum bin size (single integer)
% OUTPUT
% intersections: nx3 vertex list of intersections between the two meshes
% Note: the octree object is created using the excellent octree.m function of Sven:
% http://www.mathworks.com/matlabcentral/fileexchange/40732-octree-partitioning-3d-points-into-spatial-
% subvolumes

% Test data (testData.mat) containing two meshed intersecting fractal surfaces is provided with the package

인용 양식

Thomas (2024). Fast mesh-mesh intersection using ray-tri intersection with octree spatial partitioning. (https://www.mathworks.com/matlabcentral/fileexchange/49160-fast-mesh-mesh-intersection-using-ray-tri-intersection-with-octree-spatial-partitioning), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2013a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.5.0.0

Bug fix: fixed potentially degenerate behaviour relating to empty face/vertex octree bins

1.4.0.0

Updated image

1.3.0.0

Edited description

1.2.0.0

Edited description

1.1.0.0

Simplified I/O

1.0.0.0