maahee Posted December 31, 2023 Share Posted December 31, 2023 (edited) (defun c:BM () (setq divdist (getint "\nEnter number: ")) (setq m 1) (setq n 1) (setq i 1) (if (= (rem divdist 2) 0) (progn (setq e (/ (+ divdist 1) 2)) (setq o (- (+ divdist 1) e)) ) (progn (setq e (/ divdist 2)) (setq o (- (- divdist 1) e)) ) ) (while (and (< m e) (< n o) (< i divdist)) (setq stpti (polar p1 (angle p1 p2) (* (- (* m 2) 1) inc))) ;; (setq stpti-f (polar p1 (angle p1 p2) (+ (* (- (* m 2) 1) inc) 0.025))) ;;Calculate the forward point (setq fwpti (polar p1 (angle p1 p2) (* (* n 2) inc))) ;; (setq fwpti-f (polar p1 (angle p1 p2) (+ (* (* n 2) inc) 0.025))) ;;Calculate the forward poin (setq vertptfi-b (polar p1 (angle p1 p2) (* (* i 3) inc))) (setq fwpt2-b (polar p1 (angle p1 p2) (- (* (+ (* i 3) 1) inc) 0.025))) ;;Calculate the back point (setq m (+ m 1)) (setq n (+ n 1)) (setq i (+ i 1)) ) ; while loop end ) While function run in multiple values Edited January 4 by maahee Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.