ええと、私はちょっと立ち往生していて、何をすべきかわかりません。AutoLisp を使用して五芒星を描画するプログラムを作成する必要があります。私は AutoLisp プログラミングの知識はありませんが、なんとかこれを書きました。私には正しいように思えますが、AutoCAD は何も描画しません。多分誰かが助けることができますか?(長い数字はラジアン単位の角度です) コード:
(defun C:Figura3 ()
(setq pl (getpoint "\nStart coordinate: ")) ;;; Coordinates of circle center
(setq aukst (getint "\nRadius: "))
;;; Coordinates of vertices
(setq p2 (polar p1 1.570796327 aukst)) ;;; 90 (degrees)
(setq p3 (polar p1 2.827433388 aukst)) ;;; 162
(setq p4 (polar p1 4.08407045 aukst)) ;;; 234
(setq p5 (polar p1 5.340707511 aukst)) ;;; 306
(setq p6 (polar p1 0.3141592654 aukst)) ;;; 18
;;; Drawing
(command "color" "white")
(command "lweight" 0.35)
(command "circle" p1 aukst)
(command "line" p2 p4 p6 p3 p5 p2 "")
)