Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun conserve(x,y,a,b,c,max)
- (command "_LINE" '(0 0) (list x 0) (list x y) (list 0 y) '(0 0) "")
- (setq
- a1 (list c c)
- a2 (list c (+ c b))
- a3 (list (+ c a) (+ c b))
- a4 (list (+ c a) c)
- maxrows (+ (/ y (+ c b)) -2)
- maxcols (+ (/ x (+ c a)) -2)
- v (+ a c)
- w (+ b c)
- rows 1 cols 1 x1 0 y1 0
- )
- (while (<= rows maxrows)
- (setq cols 1)
- (while (<= cols maxcols)
- (setq
- p1 (list (+ x1 (NTH 0 a1)) (+ y1 (last a1)))
- p2 (list (+ x1 (NTH 0 a2)) (+ y1 (last a2)))
- p3 (list (+ x1 (NTH 0 a3)) (+ y1 (last a3)))
- p4 (list (+ x1 (NTH 0 a4)) (+ y1 (last a4)))
- )
- (command "_LINE" p1 p2 p3 p4 p1 "")
- (setq cols (+ cols 1) x1(+ v x1))
- )
- (setq rows(+ rows 1) y1(+ w y1) x1 0)
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement