X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fsam.git;a=blobdiff_plain;f=chapters%2FBackground%2FRendering%2FStraightLines.tex;fp=chapters%2FBackground%2FRendering%2FStraightLines.tex;h=69faa451e4389c0e4da3ee04bf8fb9539f4097e2;hp=a1a13936b46253fac6640ca5f10e5490a8d13863;hb=a1ede3cfc3ef650aa0f7d3d06e78c6c6ef4cb0cc;hpb=7fe12ce195f039925222ad98b38018ad31d1b1f2 diff --git a/chapters/Background/Rendering/StraightLines.tex b/chapters/Background/Rendering/StraightLines.tex index a1a1393..69faa45 100644 --- a/chapters/Background/Rendering/StraightLines.tex +++ b/chapters/Background/Rendering/StraightLines.tex @@ -5,7 +5,7 @@ It is well known that in cartesian coordinates, a line between points $(x_1, y_1 \text{ and } c = y_1 - m x_1 \end{align} -On a raster display, only points $(x,y)$ with integer coordinates can be displayed; however $m$ will generally not be an integer. Thus a straight forward use of Equation \ref{eqn_line} will require costly floating point operations and rounding (See Section\ref{Precision and Rounding}). Modifications based on computing steps $\Delta x$ and $\Delta y$ eliminate the multiplication but are still less than ideal in terms of performance\cite{computergraphics2}. +On a raster display, only points $(x,y)$ with integer coordinates can be displayed; however $m$ will generally not be an integer. Thus a straight forward use of Equation \ref{eqn_line} will require floating point operations and therefore rounding (See Section \ref{Floating Point Number Representations}). Modifications based on computing steps $\Delta x$ and $\Delta y$ eliminate the multiplication but are still less than ideal in terms of performance\cite{computergraphics2}. It should be noted that algorithms for drawing lines can be based upon sampling $y(x)$ only if $|m| \leq 1$; otherwise sampling at every integer $x$ coordinate would leave gaps in the line because $\Delta y > 1$. Line drawing algorithms can be trivially adopted to sample $x(y)$ if $|m| > 1$.