明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 974|回复: 1

[求助] repeat求点

[复制链接]
发表于 2008-10-22 13:10 | 显示全部楼层 |阅读模式

请教下各位:

(defun c:test00 ()
  (setq t0 1)
  (repeat 10
    (setq p1 (list (sin t0) (cos t0)))
    (setq t0 (+ t0 1))
    另外求最后一点p10,怎么写?
  )
  (princ p1)

 (princ p10)
  (princ)
)

发表于 2008-10-23 09:19 | 显示全部楼层
  1. (defun c:test00 ()
  2. (setq t0 1 pt "p")
  3. (repeat 10
  4.   (set (read(strcat pt (itoa t0))) (list (sin t0) (cos t0)))
  5.   (princ (eval(read(strcat pt(itoa t0))))) (princ "\n")
  6.   (setq t0 (+ t0 1))
  7. )
  8. (princ)
  9. )
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-3 17:27 , Processed in 0.410215 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表