How to plot three dimensional triangular based pyramid?

조회 수: 11 (최근 30일)
rohit sharma
rohit sharma 2020년 6월 29일
답변: pascal giorgi 2021년 10월 29일
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.

채택된 답변

darova
darova 2020년 6월 30일
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

추가 답변 (1개)

pascal giorgi
pascal giorgi 2021년 10월 29일
Thnaks mate !

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by