Thanks
Rob
Robert Orf <rob_...@hotmail.com> wrote in message
news:R8IV5.21631$II2.2...@newsread2.prod.itd.earthlink.net...
SPLINE;
X1,Y1;
X2,Y2;
etc
Then run the script in ACAD to generate the curve.
....Joe
Robert Orf <rob_...@hotmail.com> wrote in message
news:R8IV5.21631$II2.2...@newsread2.prod.itd.earthlink.net...
(defun plot (fx x1 x2 step window clr / pt n p1 p2)
(if (not step) (setq step 0.1))
(if (not Window) (setq window '((-10 0 0)(10 0 0)(0 -10 0) (0 10 0))))
(if (not clr) (setq clr 1))
(setvar "expert" 4)
(setvar "cmdecho" 0)
(setvar "blipmode" 0)
(command "undo" "g")
(setq p1 (car window)
p2 p1)
(foreach it window
(setq p1 (mapcar 'max it p1)
p2 (mapcar 'min it p2)))
(command "zoom" "w" p1 p2)
(command "color" 7)
(setq p1 (nth 0 window)
p2 (nth 1 window))
(command "pline" p1 p2 "")
(setq p1 (nth 2 window)
p2 (nth 3 window))
(command "pline" p1 p2 "")
(command "color" clr)
(setq n x1)
(setq pt (list n (fx n)))
(command "pline" pt)
(while (< n x2)
(setq n (+ n step))
(setq pt (list n (fx n)))
(command pt)
)
(command "")
(command "undo" "e")
(princ)
)
(defun c:test ()
(plot
(lambda (x) (* 2 (sin x))) ;function to plot
-4 ;start plot
4 ;end plot
0.1 ;step rate
(list '(-4 0 0) '(4 0 0) '(0 -4 0) '(0 20 0)) ;display window
3 ;color for graph
)
)
The Excel way seems to be the easiest way to make the sine wave.
Thanks
Rob
"Mark Robertson" <mark...@earthlink.net> wrote in message
news:7z3W5.24911$II2.2...@newsread2.prod.itd.earthlink.net...
>
> "Robert Orf" <rob_...@hotmail.com> wrote in message
> news:R8IV5.21631$II2.2...@newsread2.prod.itd.earthlink.net...