How to create a surface with "faces" and "vertices" to use surface interface ?
6 views (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!