Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

why is this called a DIGITAL DIFFERENTIAL ANALYZER?

Name: Anonymous 2014-10-02 13:51

(defun lineDDA (xa ya xb yb)
(let ((dx (- xb xa)) (dy (- yb ya))
steps k xIncrement yIncrement
(x xa) (y ya))
(if (> (abs dx) (abs dy))
(setq steps (abs dx))
(setq steps (abs dy)))
(setq xIncrement (/ dx steps)
yIncrement (/ dy steps))
(setPixel (round x) (round y))
(setq k 0)
(while (< k steps)
(setq k (+ k 1))
(setq x (+ x xIncrement)
y (+ y yIncrement))
(setPixel (round x) (round y)))))

Name: Anonymous 2014-10-02 13:58

difference is any product of subtraction.

analyzing is applying the rules of logic to some process

your code obviously does subtraction and applies some logic to its result.

Don't change these.
Name: Email:
Entire Thread Thread List