用AUTOLISP语言编写一个名为tuxing的自定义函数,
主题是;用AUTOLISP语言编写一个名为tuxing的自定义函数,要求执行此函数时使用键盘输入一个圆的圆心坐标和半径值,然后自动绘出该圆,与该圆在左右侧相切且直径相同的...
主题是;用AUTOLISP语言编写一个名为tuxing的自定义函数,要求执行此函数时使用键盘输入一个圆的圆心坐标和半径值,然后自动绘出该圆,与该圆在左右侧相切且直径相同的另外两个圆,以及这两个圆的圆心的连线。
展开
展开全部
(defun c:tuxing()
(setvar "cmdecho" 0)
(setq pt1 (getpoint "\n输入圆心坐标:"))
(setq rad (getdist "\n输入半径:"))
(setq pt2 (polar pt1 pi (* rad 2)))
(setq pt3 (polar pt1 0 (* rad 2)))
(command "circle" pt1 rad)
(command "circle" pt2 rad)
(command "circle" pt3 rad)
(command "line" pt2 pt3 "")
(setvar "cmdecho" 1)
(princ)
)
(setvar "cmdecho" 0)
(setq pt1 (getpoint "\n输入圆心坐标:"))
(setq rad (getdist "\n输入半径:"))
(setq pt2 (polar pt1 pi (* rad 2)))
(setq pt3 (polar pt1 0 (* rad 2)))
(command "circle" pt1 rad)
(command "circle" pt2 rad)
(command "circle" pt3 rad)
(command "line" pt2 pt3 "")
(setvar "cmdecho" 1)
(princ)
)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
(defun c:tuxing()
(setvar "cmdecho" 0)
(setq pt1 (getpoint "\n输入圆心坐标:"))
(setq rad (getdist "\n输入半径:"))
(setq pt2 (polar pt1 pi (* rad 2)))
(setq pt3 (polar pt1 0 (* rad 2)))
(command "circle" pt1 rad)
(command "circle" pt2 rad)
(command "circle" pt3 rad)
(command "line" pt2 pt3 "")
(setvar "cmdecho" 1)
(princ)
)
(setvar "cmdecho" 0)
(setq pt1 (getpoint "\n输入圆心坐标:"))
(setq rad (getdist "\n输入半径:"))
(setq pt2 (polar pt1 pi (* rad 2)))
(setq pt3 (polar pt1 0 (* rad 2)))
(command "circle" pt1 rad)
(command "circle" pt2 rad)
(command "circle" pt3 rad)
(command "line" pt2 pt3 "")
(setvar "cmdecho" 1)
(princ)
)
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-04-14
展开全部
AUTOLISP ? 没学过啊!不过看你的问题描述 这个问题应该很简单。。。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询