autolisp绘制同心圆

;|concentric circles|;
(defun c:concentric_circles (/
	      point_0			;圆心|;
	      point_temp		;用户输入点|;
	      point_temp_1		;以point_0为圆心(point_temp_1,point_temp)为直径的圆|;
	     )
  (setq point_0 (getpoint "设置圆心:"))
  (if (/= point_0 nil)
    (progn
      (setq point_temp '(1,1,1))
      (while (/= point_temp nil)
	(progn
	  (setq point_temp (getpoint "圆上一点:"))
	  (if (/= point_temp nil)
	    (progn
	      (setq point_temp_1
		     (list
		       (- (* 2.0 (car point_0))
			  (car point_temp)
		       )
		       (- (* 2.0 (cadr point_0))
			  (cadr point_temp)
		       )
		       (- (* 2.0 (caddr point_0))
			  (caddr point_temp)
		       )
		     )
	      )
	      (command "circle" "2p" point_temp_1 point_temp)
	    )
	  )
	)
      )
    )
  )
  (princ)
)

你可能感兴趣的:(autolisp,autolisp)