Page 78 - DCAP313_LAB_ON_COMPUTER_GRAPHICS
P. 78

Lab on Computer Graphics



                   Notes         The area of an ellipse sector between two points on the ellipse is the area swept out by a vector
                                 from the origin to the first point as the vector travels along the ellipse in a counter-clockwise
                                 direction to the second point. The area of an ellipse sector can be determined with the Gauss-
                                 Green formula, using the parametric angles θ 1  and θ 2 .
                                 The Gauss-Green formula applied to an ellipse (Equation (2b)) can be used to determine the
                                 area of an ellipse sector as shown in Figure 5.1:

                                                          ◊
                                                                           ◊
                                            Sector Area =   AB  q 2  dt =  q (  2  - q ) AB                (4)
                                                                       1
                                                          2  Ú q 1     2
                                 The parametric angle θ corresponding to a point (x, y) on the ellipse is formed between the positive
                                 x-axis, with positive θ in the counter-clockwise direction. Using the ellipse parameterizations,
                                 and the principal-valued opposite trigonometric functions that return angles in the in the range
                                 0 ≤ θ ≤ for θ = across (z), and in the range –/2 ≤ θ ≤/2 for θ = arcsin (z), ellipse parametric
                                 angles can be found with the relations.
                                       Quadrant II (x ≤ 0 and y ≥ 0)     Quadrant I (x ≥ 0 and y ≥ 0)
                                                θ =  arccos(x/A)                      θ =  arccos(x/A)

                                                  =   – arcsin(y/B)                   =  arcsin(y/B)
                                       Quadrant III (x < 0 and y < 0)    Quadrant IV (x ≥ 0 and y < 0)
                                                θ =  2 – arccos(x/A)                 θ =  2 – arccos(x/A)

                                                  =   – arcsin(y/B)                   =  2 + arcsin(y/B)
                                 For calculating a sector area, the Gauss-Green formula is sensitive to the direction of integration.
                                 For the larger goal of determining ellipse overlap areas, we follow the convention that the sector
                                 area is calculated from the first point (x 1 , y 1 ) to the second point (x 2 , y 2 ) in a counter-clockwise
                                 direction. For example, if the points (x 1 , y 1 ) and(x 2 , y 2 ) of Figure 5.1 were to have their labels
                                 switched, then the ellipse sector defined by the new points will have an area that is complementary
                                 to that of the sector in Figure 5.1, as shown in Figure(See Figure 5.2)

                                        Figure 5 2: The Ellipse Sector Area is Calculated From the First Point (x 1 , y 1 )
                                              to the Second Point (x 2 , y 2 ) in a Counter-clockwise Direction


















                                 The definitions will always produce an angle in the range 0 ≤ θ < 2 for any point on the ellipse;
                                 as such, with the point orientations shown in Figure 5.2, the corresponding angles will be ordered
                                 as θ 1  > θ 2 . The first angle can be transformed by subtracting 2 to restore the condition that θ 1  <
                                 θ 2  and the sector area formula (Equation (4) can then be used, with the integration angle from
                                 (θ 1  – 2) through θ 2 .





        72                                LOVELY PROFESSIONAL UNIVERSITY
   73   74   75   76   77   78   79   80   81   82   83