Java web server - 947Chapter 48Data Visualization with Venn DiagramsNecessary TrigonometryLet s get
947Chapter 48Data Visualization with Venn DiagramsNecessary TrigonometryLet s get the math out of the way first. Unavoidably, because we re talking about circles andareas, we re going to be talking about trigonometry. (As we ve said, though, if you re not inter- ested and are willing to trust us that we have code to calculate the area of circle intersec- tions, please do skip ahead to the section Planning the display, later in this chapter.) The eventual task for our system is to start with three quantities (items in set A, items in setB, and items in the intersection) and produce a diagram containing two circles, with areasproportional to the set sizes, and positioned so that the area of overlap is proportional to thesize of the intersection. For this section, we go in the other direction and calculate intersec- tion area from given circles. Our starting information will be the radii of the two circles andthe distance between their centers. With reference to Figure 48-1, say that our circles have centers at points C and D, respectively, and that we know the radius of the circle on the left (segment CA or segment CB) and theradius of the circle on the right (DA or DB). What we d like to know is the size of that oddlens-shaped object in the middle. Figure 48-1:Area of intersectionThe lens-shaped intersection area is split into two halves by segment AB (not quite halvesbecause the circle sizes may be different), and we can calculate the area of each half indepen- dently. The crucial thing to notice is that the area of each of these half-lenses is the area thatyou get after you subtract the area of a triangle from the area of a pizza-slice-shaped sector ofa circle. The right-hand lens half, for example, has an area equal to the sector of the left-handcircle determined by angle ACB, minus the area of the triangle ACB. So if we can calculate the areas of sectors and triangles, then we are nearly done. The area ofa sector is straightforward it s just the area of the circle multiplied by the fraction of thatcircle that the angle of the sector sweeps over. Area of intersecting circlesACDB54
You want to have a cheap webhost for your apache application, then check apache web hosting services.