This is a modification of the lisp program given by "pardal"
This can draw a polygon of any number of equal sides, calculate its enclosed area and its perimeter.
; Program for drawing polygon of any number of sides (greater than 2 of course),
; given the length of each side, the number of sides and the origin point
(defun c

lg ()
(prin1 "\n TYPE PLG TO START"

;(clr)
(setq leng (getdist "\n Length of each side, mm:"

nos (getint "\n Number of sides:"

pt0 (getpoint "\n Pick origin point please :"

pt pt0
ang (/ (* pi 2.0) nos) ;Angle between each side
an ang
n 0) ; trouble shooting purposes
;(setq leng1 leng) ;old program
;(setq leng2 leng)
;(setq leng3 leng)
;(Setq ang1 (dtr 120)) ;old program
;(Setq ang2 (dtr 240))
;(Setq ang3 (dtr 0))
;(setq pt pt0) ; the origin point
;(Setq pt1 (polar pt0 ang1 leng1)) ;polar gives the point from PT at ANG with LENG... old program
;(Setq pt2 (polar pt1 ang2 leng2))
;(Setq pt3 (polar pt2 ang3 leng3))
;(command "_pline" pt0 pt1 pt2 pt3 ""

;the poligon as a polyline... old program
(repeat nos
(progn
(command "_line" pt (polar pt an leng)""

(setq
pt (polar pt an leng)
an (+ an ang)
n (+ n 1)
)
)
)
(command "_pedit" pt "" "join" "all" "" ""

(command "_.AREA" "O" "L"

(SETQ AREA (getvar "AREA"

)
(SETQ AREA1 (RTOS AREA 2 3))
(SETQ PERIM (getvar "PERIMETER"

)
(SETQ PERIM1 (RTOS PERIM 2 3))
(SETQ SCRE ( STRCAT "THE AREA IS " AREA1 " AND PERIMETER IS " PERIM1 ))
(PRINC SCRE )
(COMMAND "._zoom" "E"

(COMMAND "._ZOOM" "0.9X"

(PRINC)
) ;end the program