converting 3-d geometric shapes to pde.DiscreteGeometry class
18 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Is that possible to draw 3-d geometric shapes (paraboloid for example) using surf or plot and convert them to pde.DiscreteGeometry class?
0 Kommentare
Antworten (1)
akshatsood
am 28 Aug. 2023
Bearbeitet: akshatsood
am 12 Jan. 2024
Hi Mohamed,
I understand that you wish to plot 3d geometric shapes using surf or plot and convert to pde.DiscreteGeometry class. Given below is an example code to plot a paraboloid using the surf function.
% create a 3D sphere
[X, Y, Z] = sphere;
% plot the sphere
figure;
surfObj = surf(X, Y, Z);
axis equal;
% Add labels and a title
xlabel('X-axis');
ylabel('Y-axis');
zlabel('Z-axis');
title('3D Sphere');
In respone to your question, you can leverage surf2stl to write STL file from surface data (via passing the "surfObj" to the function). Once you have the STL file, you can use the importGeometry function from the Partial Differential Equations toolbox to create the geometry object.
I hope this helps.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Geometry and Mesh finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
