Previous Up Next

27.14.1  Cubes

The cube command creates cubes.

Examples

C1:=cube([0,0,0],[0,4,0],[0,0,1])
c1,c2,c3,c4,c5,c6,c7,c8:=vertices(C1)
faces(C1)
     
[


0,0,0
,
0,4,0
,
0,4,4
,
0,0,4

,
         
 


4,0,0
,
4,4,0
,
4,4,4
,
4,0,4

,
         
 


0,0,0
,
4,0,0
,
4,0,4
,
0,0,4

,
         
 


0,0,0
,
0,4,0
,
4,4,0
,
4,0,0

,
         
 


0,4,0
,
0,4,4
,
4,4,4
,
4,4,0

,
         
 


0,0,4
,
4,0,4
,
4,4,4
,
0,4,4

]
         
C2:=cube([0,0,0],[0,4,0],[0,0,-1])
a1,a2,a3,a4,a5,a6,a7,a8:=vertices(C2)

Previous Up Next