How to plot three dimensional triangular based pyramid?

12 visualizaciones (últimos 30 días)
rohit sharma
rohit sharma el 29 de Jun. de 2020
Respondida: pascal giorgi el 29 de Oct. de 2021
I want to plot a 3d triangular based pyramid in Matlab. In 2d it's basically an equilateral triangle. Shall I need to write an equation for each faces individually?
How can I plot it?
Thanks in advance.

Respuesta aceptada

darova
darova el 30 de Jun. de 2020
Here is the way
[x,y] = pol2cart(deg2rad(0:120:360),1);
x1 = [x*0; x; x*0];
y1 = [y*0; y; y*0];
z1 = [x*0+1; x*0; x*0];
surf(x1,y1,z1)
axis vis3d

Más respuestas (1)

pascal giorgi
pascal giorgi el 29 de Oct. de 2021
Thnaks mate !

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by