Previous Up Next

26.13.7 Perimeter of a polygon

See also arcLen, Section 13.3.8.

The perimeter command finds the length of a circle, circular arc or polygon.

Examples

perimeter(circle(0,1))
2 π           
perimeter(circle(0,1,pi/4,pi))
3
4
π
          
perimeter(arc(0,pi/4,pi))
1
8
π 2
          
perimeter(triangle(0,1,i))
2
+2
          
perimeter(square(0,2))
8           

The perimeter command has perimeterat and perimeteratraw versions (see Section 26.13.1).


Previous Up Next