How to create a surface with "faces" and "vertices" to use surface interface ?
조회 수: 5 (최근 30일)
이전 댓글 표시
i am trying a simple code:
clc;
clear all;
close all;
%Below are 3D points I would like to generate mesh
x1=[0 0 1 1 1 1 0 0 0 0];
y1=[0 0 0 0 1 1 1 1 0 0];
z1=[0 1 0 1 0 1 0 1 0 1];
% Below are expanded to 2D version;
x=[0 0 1 1 2 2 3 3 4 4];
y=[0 1 0 1 0 1 0 1 0 1];
z=[0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5];
% generate mesh for 2D version,
DT = delaunaydelaunay(x,y);
%Plot the results for 3D version
Surface1=trimesh(DT,x1,y1, z1)
hold on;
Surface2=trimesh(DT,x,y, z)
[~, Surf12] = SurfaceIntersection(Surface1, Surface2);
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Delaunay Triangulation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!