Newsgroups: comp.robotics
Path: utzoo!utgpu!watserv1!watcgl!megauthi
From: megauthi@watcgl.waterloo.edu (Marc E. Gauthier)
Subject: Re: Help with Bresenham line DDA and XY tables: they don't work together!
Message-ID: <1991Mar25.003612.18976@watcgl.waterloo.edu>
Keywords: bresenham DDA CNC stepper motor
Organization: University of Waterloo
References: <2237@wet.UUCP>
Date: Mon, 25 Mar 1991 00:36:12 GMT
Lines: 46

In article <2237@wet.UUCP> smiller@wet.UUCP (Gregory Shane Miller) writes:
>Tue 19 March 1991
>Re: Bresenham's Linear DDA and Motion Systems
>---------------
>
>Everybody knows that Bresenham wrote a paper in 1965 called "Algorithm
>for Computer Control of a Digital Plotter".
	(well, I wasn't aware of the paper)
>The idea is of course to
>generate a line (an approximation of desired line) very quickly.
>
>What I want to call attention to is its application to moving systems.
>It seems to me that the algorithm does not work generally with motion
>systems especially at high speeds or with high loads.  I want to know if
>anybody can correct my thinking on this or advise me on an alternative
>to linear DDAs.
>
>To illustrate my concern very quickly, assume a XY table is at currently
>[...detailed description of using bresenham to increment X and Y of a
> plotter pen, with all movements synchronised with the increment of the
> "longer" axis... deleted...]
>
>After a little more consideration, I concluded any linear DDA will exhibit
>this problem (I developed my own DDA and it suffers from the same problem).
>What can you do?  Am I wrong?  Is there a way to make a line nicely even
>at high speeds?  How could Bresenham title his paper "... for Computer Control
>of Digital Plotters"?  I tried to get the original article so as see for myself
>but somebody stole that issue from my local university (UC Berkeley).
>[...]
>HELP PLEASE - thanks - smiller@wet.UUCP

You were right in saying (somewhere in the deleted text?) that you need
to control both axis independently, so they each move as uniformly as
possible.  In controlling this timing however, it occurred to me that
precision is usually of finite granularity, e.g. you usually have a timer
which can signal your program in "ticks"; the question is, then, at which
tick shall I increment X, and at which tick shall I increment Y?
So what you have is really two bresenham lines being drawn simultaneously,
one on the X-vs-time plane, the other on the Y-vs-time plane (where on
the time axis you have ticks instead of pixels).
    Is this clear?  Was this in the Bresenham paper?

-Marc
-- 
Marc E. Gauthier   megauthier@watcgl.waterloo.edu   University of Waterloo
		   129.97.128.64		    885-1211 x3469 or x4548
