Previous Up Next

27.14.8  Edges

The line_segments command takes as argument a polyhedron.

line_segments returns and draws the list of the edges of a polyhedron. For example:

line_segments(polyhedron([0,0,0],[-2,0,0],[2,0,0],[0,2,0],[0,0,2]))

Individual line segments can be obtained by using the [] operator. For example, the command line

line_segments(polyhedron([0,0,0],[-2,0,0],[2,0,0],[0,2,0],[0,0,2]))[1]

returns the second segment.


Previous Up Next