8/19/2019 Tugas_4-Ridhan_Diaz_125514215.docx
1/2
Tugas 4
Aplikasi Komputer (Aplikom)
Subbab 4.5 soal no 1
Ridhan Diaz T.D
1!5!51415
"#$D%D%KA$ T#K$%K #KTR'$%KA
AK&TAS T#K$%K
$%*#RS%TAS $#+#R% SRA,A-A
!15!1/
8/19/2019 Tugas_4-Ridhan_Diaz_125514215.docx
2/2
S'A&
1. Create a 3-dimensional pyramid using the fill3 function. Can you create each face
individually with vectors defining the x-, y-, and z-coordinates? What aout creating it
with one fill3 command and a set of x-, y-, and z-coordinate matrices?
!.
0aaban
x " #$ 1 1 $ $.%&'
y " #$ $ 1 1 $.%&'
z " #$ $ $ $ 1&'
plot3 (x,y,z,)o),)mar*ersize),+,...
)mar*erfacecolor),)lac*)'
axis eual'
grid'
for i"1length (x text (x(i,y(i,z(i,num!str (i,...
)verticalalignment),)ottom)'
/nd
0specity the triangles
tri"#1 ! %'
! 3 %'
3 + %'
+ 1 %&'
0 generate the triangular mesh plot
hold on'
trimesh (tri,x,y,z,)edgecolor),)lac*)'
asil inputan
yang ada di
matla
asil layout yang didapat dari inputan yang tadi