Plotting polygons

The polygonplot() command plots polygons in 3D.

The polygonplot() command

    polygonplot([[x1, y1, z1],...,[xn,yn,zn]], options);

       xi, yi, zi : vertices of the polygon
       (number of vertices should be at least 3)

The usual plotting options as described in Plotting Options apply. However, only the patch and patchnogrid styles are currently available. The program will crash if other styles are requested.

Remark: The vertices of the polygon are expected to be co-planar. Otherwise the results may not be as expected.

Examples:

	p1 := polygonplot([[-1,-1,1],[1,-1,1],[0,0,2]]):
	p2 := polygonplot([[1,-1,1],[1,1,1],[0,0,2]]):
	p3 := polygonplot([[1,1,1],[-1,1,1],[0,0,2]]):
	p4 := polygonplot([[-1,1,1],[-1,-1,1],[0,0,2]]):
	display([p1,p2,p3,p4]);
Back to table of contents