This is another example showing how complex geometry
objects, here solids, can be modeled in MuPAD. I developed
here a procedure that will produce a pyramid and
then I use this procedure to plot pyramids with different
number of sides, height and radius of the base.
pyramid:=proc(r,height,n)
local i, angle, topPoint, bottomPoint;
begin
angle := 2*PI/n:
topPoint := plot::Point([0,0,height]):
bottomPoint := plot::Point([0,0,0]):