1 create a function that will draw an octagonal prism as shown below the base of the 5346485

1)Create a function that will draw an octagonal prism as shown below. The base of the prism is a regular octagon (all the sides are equal). This function should have 3 function inputs (input parameters): an array that contains the xyz values of the point of origin, P0; a scalar value for the side of the octagonal prism, and a scalar value for the height of the octagonal prism. Generate the x,y,z arrays that define the 9 faces of the pyramid (octagonal base and 8 triangles. Use fill3 command to create the faces (faces with parallel bases should be in the same color). You may either plot the front faces, set the transparency, then draw the back faces as shown below or plot all the faces and then set the transparency. You do not have to label the axes or show the point of origin. In the script file prompt the user to enter the values for the origin, the side of the base and the height and call the function.

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now