根据以下要求,提供Autolisp代码:输入半径和起始点,生成二维封闭半圆。
时间: 2023-03-29 12:01:45 浏览: 186
以下是Autolisp代码:
(defun c:halfcircle (/ radius startpt endpt centerpt angle)
(setq radius (getreal "\nEnter the radius: "))
(setq startpt (getpoint "\nEnter the start point: "))
(setq centerpt (list (+ (car startpt) radius) (cadr startpt)))
(setq angle (/ pi 2))
(setq endpt (list (+ (car centerpt) radius) (cadr centerpt)))
(command "arc" startpt endpt centerpt)
(princ)
)
阅读全文