A window on two-dimensional space

Ian O. Angell, Dimitrios Tsoubelis · 1992

Example 1.5 ought to convince us that we should consider plotting views on the graphics display where the objects drawn are defined not in terms of pixels, but in real continuous units, whether these be millimetres or miles. Therefore, we have to put the relationship between the viewport and continuous space onto a formal footing. Since our Viewport methods draw using pixels, we now have to consider a file of constants, structure types, variables and functions which relate real space with the pixels of our viewport. In listing 2.1 we create a class named Window ; the declarations (2.1a) should be stored in file “window.h” , and the methods (2.1b) in “window.cpp” . However, before explaining these listings, we must first discuss ways of representing two-dimensional Euclidean space by means of Cartesian co-ordinate geometry.

Read the paper · More papers on PaperTik