谢谢你的好意。
我也使用了点实体,分辨率为500x500,不需要考虑缩放因子;我只是调整了AutoCAD窗口的大小,直到它看起来很好。之后,我启动了lisp,它使用outjpg命令生成了图像。计算机工作了大约3个小时,生成了25幅图像,我把它们放在一个动画gif中。不幸的是,我不能张贴动画,可能文件大小太大…
此外,颜色映射是最简单的:如果在9次迭代后,点感觉不到圆,则该点获得9号颜色(根据AutoCAD颜色方案)。
我不是一个艺术家,我很高兴我得到了这些图片-我写的程序是为了我自己的乐趣,我决定在这里分享这些图片。
再次感谢,祝你愉快! https://www.cadtutor.net/forum/attachment.php?attachmentid=57619&cid=1&stc=1
为了简化我的计算机工作,这次我只画了颜色(意味着迭代次数)在5到250之间的点(也就是说,250是我考虑的最大迭代次数)。
可能是我贴的最后一张图片:在三维空间中移动。
Fuccaro,看到你仍然喜欢跳出禁区,创造一点魔法,真的很令人振奋,在这么多年之后,做得很好! 非常好的fuccaro下一个挑战是曼德尔灯泡 使用公式Z=Z^2+C,我得到了前面的图像。对于Z=Z^2+C,我得到了这个:
https://www.cadtutor.net/forum/attachment.php?attachmentid=57649&cid=1&stc=1
Sierpinski再一次,这次遵循概率规则。https://www.cadtutor.net/forum/attachment.php?attachmentid=60059&cid=1&stc=1
李,在你的允许下,我用了你的两个套路——正如预期的那样,谢谢!
(defun c:Sierpinski()
(setq v (list '(1 1 0) '(0 1 1) '(1 0 1) '(0 0 0))) ;vertices
(repeat 500
(setq point (list (LM:randrange -2 2) (LM:randrange -2 2) (LM:randrange -2 2)))
(repeat 25 (setq point (next point)))
(repeat 500
(setq point (next point))
(entmake (list (cons 0 "POINT")
(cons 10 point)
(cons 62 (fix (apply '+ (mapcar '* '(3 9 40 111) (mapcar 'distance (list point point point point) v)))))))
)
)
)
(defun next (p)
(mapcar '* '(0.5 0.5 0.5) (mapcar '+ p (nth (LM:randrange 0 3) v)))
)
;; Rand-Lee Mac
;; PRNG implementing a linear congruential generator with
;; parameters derived from the book 'Numerical Recipes'
(defun LM:rand ( / a c m )
(setq m 4294967296.0
a 1664525.0
c 1013904223.0
$xn (rem (+ c (* a (cond ($xn) ((getvar 'date))))) m)
)
(/ $xn m)
)
;; Random in Range-Lee Mac
;; Returns a pseudo-random integral number in a given range (inclusive)
(defun LM:randrange ( a b )
(+ (min a b) (fix (* (LM:rand) (1+ (abs (- a b))))))
)
页:
1
[2]