Azzera filtri
Azzera filtri

How to create a 3D surface plot from scatter3?

15 visualizzazioni (ultimi 30 giorni)
SAHOO Sudeep Kumar
SAHOO Sudeep Kumar il 22 Giu 2022
Modificato: Chunru il 24 Giu 2022
Hello All,
I would like to create a 3D surface plot from the 625 data points which are taken at certain intervals. Each data points in a row represents a vector with its X,Y and Z values represented in the first, second and third column, respectively. Using scatter3 function I can visualize the results. Below is the code. But I need to represent it in the form of a continuous 3Dsurface for better visualization.
Could anyone suggest me how can I proceed?
For creating the 3D surface the colour code should follow: sqrt(x^2+y^2+z^2)
The test.txt file is also included in order to have a look.
Thanking you in advance.
test=load('test.txt');
x = test(:,1);
y = test(:,2);
z = test(:,3);
s=scatter3(x,y,z);
view(3);

Risposte (1)

Chunru
Chunru il 24 Giu 2022
Modificato: Chunru il 24 Giu 2022
test=load('test.txt');
x = test(:,1);
y = test(:,2);
z = test(:,3);
s=scatter3(x,y,z);
view(3);
figure
dt = delaunayTriangulation(x, y, z);
Warning: Duplicate data points have been detected and removed.
The Triangulation indices are defined with respect to the unique set of points in delaunayTriangulation.
figure
tetramesh(dt, 'EdgeColor', 'none')

Prodotti


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by