\documentstyle{article}[12pt,a4]
\title{Graphics Supervision Work 1\\http://www.matthew.ath.cx/notes/}
\author{Matthew Johnson\\Trinity Hall\\mjj29-notes@srcf.ucam.org}
\begin{document}
\maketitle
\setcounter{secnumdepth}{-2}
\section{1}
\subsection{W}
\subsubsection{3}
Its better to look at dim stars off center because the retina has a higher density of rods away from the fovea, and the rods are more sensitive to low levels of light, albeit in monochrome.
\subsubsection{4}
Dunno, why would it be?
\subsection{P}
\subsubsection{1}
Colour spaces: RGB vs XYZ vs HSV.
The RGB system is composed by using Red Green and Blue as primary colours, and expressing all other colours as a sum of those bases. The possible colour space this represents is, however, less than the possible colours that the eye can see. Therefore CIE defined the XYZ colour space, which is a superset of all visible colours. This is a system which allows you to define all possible colours, but it not intuitive to use.
The compromise is HSV colour. This system was designed by Munsell to be similar to what people experience. This is because its quite difficult to estimate the Red, Green and Blue required to form a given colour. Both have Hue (colour), Saturation (intensity of colour) and either Value or Lightness to give the intensity. In the case of Lightness, you have the most vividness at half the maximum lightness, whereas value has the maximum saturation at the maximum value.
\subsection{E}
\subsubsection{3}
Using a system where pixels have 3 colour filters over each other to produce colours, in red, green and blue, would not work because it is using an addative system of colours, but with a subtractive system. This is because, the 1st filter (say red) will cut out everything but red (only emit red), and then the next filter will block everything but (say) blue. You can adjust how much of the other two colours you remove, but you are limited to removing 2 colours at once at any one filter. This limits the range of displayable colours. What you need to do is to use colours that only {\em absorb} one wavelength, rather than {\em emitting} one wavelength. A colour scheme that works is Cyan, Magenta and Yellow. These colours each filter one of the primary colours.
Even this system cannot display all the colours, because picking any 3 arbitrary colours as your bases, will only be able to display colours that occur inside the convex hull of their points in XYZ space.
\subsubsection{4}
{\em do by projecting $1mm^2$ on the retina onto the screen, and then saying there must be the same number of pixels in one as cones in the other}
If a pixel size of smaller than the resolution of the eye is wanted, and given that the eye can resolve approximately 1 minute of angle, this corresponds to a pixel size of less than 1 minute at normal working distance. If we assume 1m distance, then $d/1 = \tan \theta$ therefore $d = \tan \frac {1} {60} = 0.29mm$. This corresponds to a resolution of approximately 87 dpi.
For halftoning, you must use an NxN grid of pixels to display 1 pixel. Assuming 8x8 grid, for 256 shades, you then need an $87 * 8 = 696$ dpi screen.
\section{2}
\subsection{P}
\subsubsection{1}
The cicle drawing algorithm for the first octant is:
\begin{verbatim}
x = x0
y = y0
d = (x + 1)*(x + 1) + (y - 1/2)*(y - 1/2) - r*r
DRAW(x,y)
WHILE x < (x1 - 1/2) DO
x ++
IF d < 0 THEN #move East
d = d + 2x +3
ELSE #move South East
d = d + 2x - 2y + 5
y ++
FI
DRAW(x,y)
ELIHW
\end{verbatim}
\subsubsection{2}
The reason we have octants is because we must draw some of them by incrementing $x$ every step, and possibly inc- or decrementing $y$. The change over point is to do with the angle of the line we're drawing. This occurs when the normal to the tangent is at 45 degrees.
\subsubsection{3}
The midpoint line drawing algorithm has 5 operations, 2 tests and a draw per pixel iteration, but operates on floating point numbers, which is 50 cycles for operations, plus the tests and the draw. Bresenham's line drawing algorithm, with integer end points, does only 4 operations, plus the tests and the draw. Therefore, it will be significantly faster than the midpoint algorithm.
\begin{tabular}{ccc}
Pixels&Midpoint Cycles&Bresenham Cycles\\
5&250&20\\
10&500&40\\
20&1000&80\\
\end{tabular}
both algorithms have the same number of tests and draws.
\section{Notes}
The processes of computer graphics and image analysis \& computer vision and can be considered the converse of each other.
\subsection{XYZ}
The XYZ graph plots little x \& y - which are functions of X, Y \& Z.
\end{document}