원에 내접하는 작은 원을 그리는 리습인데염…
큰 원의 값을 입력후 작은 원의 수량을 입력하면 원의 내접하는 원이
그려지는 겁니다… 좀 봐주세염… 안되네염 ㅡㅜ
(defun c:arr(/ p1 p2 p3 p4 p5 i d g r line1 line2 c1 c2)
(setq i(getpoint “n원의 중심점:”))
(setq d(getreal “n큰 원의 지름:”))
(setq g(getint “n작은 원의 수:”))
(setq p1(polar i 0 (/ d 2)))
(setq p2(polar i (dtr (/ 360 g))(/ d 2)))
(setq r(/ d 2))
(command “line” i p1 “”)
(setq line1 (entlast))
(command “line” i p2 “”)
(setq line2 (entlast))
(setq p3(polar i 0 (/ r 2)))
(setq p4(polar i (dtr (/ 360 g))(/ r 2)))
(setq p5(polar i (dtr (/ (/ 360 g) 2)) r))
(command “circle” i r)
(setq c1 (entlast))
(command “circle” “3p” “tan” p3 “tan” p4 “tan” p5)
(setq c2 (entlast)
(command “array” c2 “” “p” i g “” “”)
(command “erase” line1 line2 “”)
(princ)
)
공유