- (defun c:jiancao(/ a b p0 r x0 xe ye ce p1 p2 p3)
- (setq a (getreal "a=:"))
- (setq b (getreal "b=:"))
- (setq p0 (getpoint "enter stare point :"))
- (setq r (getreal "r=:"))
- (setq x0 (car p0) y0 (cadr p0))
- (setq xe (- x0 (/ a 2.0)))
- (setq ye (+ y0 (sqrt (- (* r r) (* a a 0.25))
- )
- )
- )
- (setq ce (list xe ye))
- (setq p1 (list (- x0 a) y0))
- (setq p2 (list (- x0 a) (- y0 b)))
- (setq p3 (list x0 (- y0 b)))
- (command "pline" p0 "a" "ce" ce p1 "l" p2 p3 "c")
- )
|