Page 268 - Open Soource Technologies 304.indd
P. 268

Web Technologies-I



                   Notes         On a typical computer generated graphics raster, there are several hundred pixel points available
                                 in both the horizontal and vertical directions, and they are much closer together than suggested
                                 in figure 11.2 below. The standard grid could simply be modified to take this into account, but
                                 only points with whole number coordinates can be properly depicted. The point (¼, 1) would
                                 have to be depicted as (3, 1) unless some form of scaling were used. Indeed, since the individual
                                 pixels are rather close together on the screen, it might be better to magnify this and use, say,
                                 ten points for a unit, marking (31, 10) on the raster to represent this point.

                                                     Figure 11.2: Continuous and Discrete Grids















                                                 Continuous Grid                  Discrete Grid
                                 11.3.2 Where is the Origin?

                                 When the Macintosh, the first popular graphics-oriented computer was developed but at the
                                 top left corner. The positive horizontal direction was still to the right, but the positive vertical
                                 direction goes down, rather than up. There are still four quadrants, as points can have negative
                                 coordinates,  but  three of  the quadrants  are  off  the screen.  As  with many  other parts  of  the
                                 interface, this arrangement was subsequently copied into other graphics user systems, including
                                 the various versions of Windows. The standard mathematical system and the Mac/Windows
                                 screen are illustrated in Figure 11.3.

                                 A graphing module used on either of these systems will need to have the option of using the
                                 native system directly, or passing conventional mathematical coordinates and then translating
                                 to the native screen.
                                       Figure 11.3: The Standard Mathematical System and the Mac/Windows Screen

                                                                                                 +
                                                        +
                                                                              (0, 0)



                                            –           (0, 0)   +



                                                           IV
                                                         –                    +
                                             Conventional Axes                 Macintosh/Windows Axes

                                 11.3.3 Measuring Angles
                                 Yet another option needed for graphing is created by the fact that when the focus is on polar
                                 coordinates that is, the angle and distance from the origin are given rather than on rectangular
                                 coordinates, there are two common systems for measuring angles. In the standard system used



        262                               LOVELY PROFESSIONAL UNIVERSITY
   263   264   265   266   267   268   269   270   271   272   273