Q:

Using the patch function, create a black box with unit dimensions (so, there will be eight vertices and six faces). Set the edge color to white so that when you rotate the figure, you can see the edges

0

Using the patch function, create a black box with unit dimensions (so, there will be eight vertices and six faces). Set the edge color to white so that when you rotate the figure, you can see the edges. 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Ch12Ex25.m

% Draws a black box with unit dimensions

% set up the 8 vertices

polyhedron.vertices = [...

0 0 0

1 0 0

1 1 0

0 1 0

0 0 1

1 0 1

1 1 1

0 1 1];

% connect the 6 faces

polyhedron.faces = [...

 1 2 3 4

 5 6 7 8

 1 2 6 5

 1 4 8 5

 2 3 7 6

 3 4 8 7];

pobj = patch(polyhedron, ...

'FaceColor',[0 0 0],...

'EdgeColor','white');

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now