How to create a surface with "faces" and "vertices" to use surface interface ?

3 次查看(过去 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 个)

类别

Help CenterFile Exchange 中查找有关 Delaunay Triangulation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by