<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.4" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>J2Ee Hosting, Sun Java Developing, Domain Name Hosting Blog</title>
	<link>http://domain.b5websitehosting.com</link>
	<description>My weblog on MySQL5, PHP5 and Java programming</description>
	<pubDate>Mon, 26 May 2008 00:23:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.4</generator>
	<language>en</language>
			<item>
		<title>Anonymous web server - 955Chapter 48Data Visualization with Venn Diagrams} else if</title>
		<link>http://domain.b5websitehosting.com/domain/anonymous-web-server-955chapter-48data-visualization-with-venn-diagrams-else-if/</link>
		<comments>http://domain.b5websitehosting.com/domain/anonymous-web-server-955chapter-48data-visualization-with-venn-diagrams-else-if/#comments</comments>
		<pubDate>Mon, 26 May 2008 00:23:31 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Domain</category>
		<guid isPermaLink="false">http://domain.b5websitehosting.com/domain/anonymous-web-server-955chapter-48data-visualization-with-venn-diagrams-else-if/</guid>
		<description><![CDATA[955Chapter 48Data Visualization with Venn Diagrams} else if (($intersection_area == $area_left_side) &#038;&#038; ($intersection_area < $area_right_side)) { // The right set completely contains the left set// We need to place the left circle somewhere  // inside the right circle. $center_x_right = $middle_x; $center_x_left = $middle_x -  ($radius_right_side - $radius_left_side) / 2; $left_fill_x = -1; [...]]]></description>
			<content:encoded><![CDATA[<p>955Chapter 48Data Visualization with Venn Diagrams} else if (($intersection_area == $area_left_side) &#038;&#038; ($intersection_area < $area_right_side)) { // The right set completely contains the left set// We need to place the left circle somewhere  // inside the right circle. $center_x_right = $middle_x; $center_x_left = $middle_x -  ($radius_right_side - $radius_left_side) / 2; $left_fill_x = -1;  $right_fill_x =  (($center_x_left + $radius_left_side) +  ($center_x_right + $radius_right_side))  / 2.0; $intersection_fill_x = $center_x_left; } else if ($intersection_area == $area_right_side) { $center_x_left = $middle_x; $center_x_right = $middle_x + ($radius_left_side - $radius_right_side) / 2; $right_fill_x = -1; $left_fill_x =  (($center_x_left - $radius_left_side) +  ($center_x_right - $radius_right_side))  / 2.0; $intersection_fill_x = $center_x_right; } <br />We recommend high quality webhost to host and run your jsp application: <a href="http://jsp.armadillowebhosting.com">christian web host</a> services.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://domain.b5websitehosting.com/domain/anonymous-web-server-955chapter-48data-visualization-with-venn-diagrams-else-if/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Web site design - 954Part VCase StudiesListing 48-2(continued) $center_x_left = $default_center_x_left; $center_x_right</title>
		<link>http://domain.b5websitehosting.com/domain/web-site-design-954part-vcase-studieslisting-48-2continued-center_x_left-default_center_x_left-center_x_right/</link>
		<comments>http://domain.b5websitehosting.com/domain/web-site-design-954part-vcase-studieslisting-48-2continued-center_x_left-default_center_x_left-center_x_right/#comments</comments>
		<pubDate>Sun, 25 May 2008 09:20:25 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Domain</category>
		<guid isPermaLink="false">http://domain.b5websitehosting.com/domain/web-site-design-954part-vcase-studieslisting-48-2continued-center_x_left-default_center_x_left-center_x_right/</guid>
		<description><![CDATA[954Part VCase StudiesListing 48-2(continued) $center_x_left = $default_center_x_left; $center_x_right = $default_center_x_right; $left_fill_x = $center_x_left; $right_fill_x = $center_x_right; $intersection_fill_x = -1; } else if (($intersection_area < $area_left_side) &#038;&#038; ($intersection_area < $area_right_side)) { // The complicated case --- we must decide where the// circle centers should be so that the overlap is// proportional to the set intersection// First, [...]]]></description>
			<content:encoded><![CDATA[<p>954Part VCase StudiesListing 48-2(continued) $center_x_left = $default_center_x_left; $center_x_right = $default_center_x_right; $left_fill_x = $center_x_left; $right_fill_x = $center_x_right; $intersection_fill_x = -1; } else if (($intersection_area < $area_left_side) &#038;&#038; ($intersection_area < $area_right_side)) { // The complicated case --- we must decide where the// circle centers should be so that the overlap is// proportional to the set intersection// First, we call a function that decides how far apart// the circle centers need to be. $center_distance =  find_center_distance($radius_left_side,  $radius_right_side, $intersection_area,  $CENTER_FINDING_ITERATIONS); // Once we know the distance, we place the circle centers// approximately in the middle of the image$center_x_left = $middle_x // left/right middle of image- ($center_distance * ($radius_left_side /  ($radius_left_side + $radius_right_side))); $center_x_right = $middle_x // left/right middle of image+ ($center_distance * ($radius_right_side /  ($radius_left_side + $radius_right_side))); // we have decided the sizes and centers of the circles. // Now, we must determine good points to start a  //  flood fill  coloring of the three different regions$left_fill_x =  (($center_x_left - $radius_left_side) +  ($center_x_right - $radius_right_side))  / 2.0; $right_fill_x =  (($center_x_left + $radius_left_side) +  ($center_x_right + $radius_right_side))  / 2.0; $intersection_fill_x =  (($center_x_right - $radius_right_side) + ($center_x_left + $radius_left_side))  / 2.0;  <br />We recommend you use <a href="http://j2ee.jspwebsitehosting.com">shared web hosting</a> services, because many users agree that it is cheap, reliable and customer-satisfying webhost.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://domain.b5websitehosting.com/domain/web-site-design-954part-vcase-studieslisting-48-2continued-center_x_left-default_center_x_left-center_x_right/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Photoshop web design - 953Chapter 48Data Visualization with Venn Diagrams// &#8212; create</title>
		<link>http://domain.b5websitehosting.com/domain/photoshop-web-design-953chapter-48data-visualization-with-venn-diagrams-create/</link>
		<comments>http://domain.b5websitehosting.com/domain/photoshop-web-design-953chapter-48data-visualization-with-venn-diagrams-create/#comments</comments>
		<pubDate>Sat, 24 May 2008 16:13:05 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Domain</category>
		<guid isPermaLink="false">http://domain.b5websitehosting.com/domain/photoshop-web-design-953chapter-48data-visualization-with-venn-diagrams-create/</guid>
		<description><![CDATA[953Chapter 48Data Visualization with Venn Diagrams// &#8212; create the image and allocate colors$image = imagecreate($IMAGE_WIDTH, $IMAGE_HEIGHT) or die( Could not create image ); $background_color = ImageColorAllocate($image, 255,255,255); $left_color = ImageColorAllocate($image, 100, 100, 200); $right_color = ImageColorAllocate($image, 200, 100, 100); $intersection_color =  ImageColorAllocate($image, 225, 225, 225); $black_color = ImageColorAllocate($image, 0,0,0);  // &#8212; decide how [...]]]></description>
			<content:encoded><![CDATA[<p>953Chapter 48Data Visualization with Venn Diagrams// &#8212; create the image and allocate colors$image = imagecreate($IMAGE_WIDTH, $IMAGE_HEIGHT) or die( Could not create image ); $background_color = ImageColorAllocate($image, 255,255,255); $left_color = ImageColorAllocate($image, 100, 100, 200); $right_color = ImageColorAllocate($image, 200, 100, 100); $intersection_color =  ImageColorAllocate($image, 225, 225, 225); $black_color = ImageColorAllocate($image, 0,0,0);  // &#8212; decide how big the circles should be$max_radius = min((($IMAGE_HEIGHT * 0.9) / 3), (($IMAGE_WIDTH * 0.9) / 4)); $center_y = $IMAGE_HEIGHT / 3.0; $default_center_x_left = $IMAGE_WIDTH / 4.0; $default_center_x_right = (3 * $IMAGE_WIDTH) / 4.0; $middle_x = $IMAGE_WIDTH / 2.0; $radius_left_side_raw = area_to_radius($left_amount); $radius_right_side_raw = area_to_radius($right_amount); $intersection_radius_raw =  area_to_radius($intersection_amount); $scale_factor = $max_radius / (max($radius_left_side_raw, $radius_right_side_raw)); $radius_left_side = $radius_left_side_raw * $scale_factor; $radius_right_side = $radius_right_side_raw * $scale_factor; // (it s convenient to pretend that the intersection area// has a radius (although it s not circular) just so we can// calculate things the same way as the circles) $intersection_radius =  $intersection_radius_raw * $scale_factor; $area_left_side = M_PI *  $radius_left_side * $radius_left_side; $area_right_side = M_PI *  $radius_right_side * $radius_right_side; $intersection_area = M_PI *  $intersection_radius * $intersection_radius; // We now have all necessary info except where to locate the// centers of the circles.  // Four cases:  // 1) no intersection, 2) partial intersection// 3) left is strict subset of right,  // 4) right is subset of left. if ($intersection_amount == 0) { // No intersectionContinued54  <br />If you are searching for cheap webhost for your web application, please visit <a href="http://tomcat.b5websitehosting.com">MySQL5 Web Hosting</a> services.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://domain.b5websitehosting.com/domain/photoshop-web-design-953chapter-48data-visualization-with-venn-diagrams-create/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Space web hosting - 952Part VCase Studies .One set is completely contained</title>
		<link>http://domain.b5websitehosting.com/domain/space-web-hosting-952part-vcase-studies-one-set-is-completely-contained/</link>
		<comments>http://domain.b5websitehosting.com/domain/space-web-hosting-952part-vcase-studies-one-set-is-completely-contained/#comments</comments>
		<pubDate>Sat, 24 May 2008 01:08:47 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Domain</category>
		<guid isPermaLink="false">http://domain.b5websitehosting.com/domain/space-web-hosting-952part-vcase-studies-one-set-is-completely-contained/</guid>
		<description><![CDATA[952Part VCase Studies .One set is completely contained in the other that is, one of the sets has the same sizeas the intersection. For this case, we just choose to put the center of the larger circle inthe middle of the diagram and the middle of the other circle offset a bit from it but [...]]]></description>
			<content:encoded><![CDATA[<p>952Part VCase Studies .One set is completely contained in the other that is, one of the sets has the same sizeas the intersection. For this case, we just choose to put the center of the larger circle inthe middle of the diagram and the middle of the other circle offset a bit from it but notso much that any of the smaller circle is outside the larger one. .The two sets are the same(and all three input numbers are the same). For this, we justdraw one circle with an x-coordinate right in the middle of the picture. The hard caseNow the hard one: If the sets only partially overlap, where should we put the circle centers? At this point, we have some math in our pocket from the  Necessary trigonometry  section: Given two circles and the distance between their centers, we can figure out the area of over- lap. Unfortunately, this is not the direction we need the calculation go in we start with thedesired area of intersection, and we must work backwards to the desired locations of the  circle centers. Now if we were good and diligent mathematicians but lazy programmers, we would just invertthe trigonometric equations we used in trig.php, to solve for center distance rather than forintersection area. As it is, though, we re enthusiastic programmers, and if we re any kind ofmathematicians at all we re definitely the lazy kind. So what we re going to do instead issearch for the answer. The function find_circle_centers()in Listing 48-2 implements abinary search for the answer: It starts with a middling distance, asks our trigonometry codewhat the resulting area would be, and successively refines the distance to zero in on thedesired area. (The rest of the code in Listing 48-2 is discussed in the next section.) Listing 48-2:venn.php<?phpinclude_once( trig.php ); $IMAGE_WIDTH = 600; $IMAGE_HEIGHT = 300; $CENTER_FINDING_ITERATIONS = 20; function imagecircle ($image, $center_x, $center_y, $radius, $color)  { $diameter = $radius * 2; imagearc($image, $center_x, $center_y,  $diameter, $diameter, 0, 360, $color); } function venn_visualization  ($left_amount, $left_name, $right_amount, $right_name,  $intersection_amount) { global $IMAGE_HEIGHT, $IMAGE_WIDTH,  $CENTER_FINDING_ITERATIONS;  <br />We would like to recommend you tested and proved <a href="http://jboss.jspwebsitehosting.com">virtual web hosting</a> services, which you will surely find to be of great quality.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://domain.b5websitehosting.com/domain/space-web-hosting-952part-vcase-studies-one-set-is-completely-contained/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>951Chapter 48Data Visualization with Venn Diagrams .The centers  (Business web site)</title>
		<link>http://domain.b5websitehosting.com/domain/951chapter-48data-visualization-with-venn-diagrams-the-centers-business-web-site/</link>
		<comments>http://domain.b5websitehosting.com/domain/951chapter-48data-visualization-with-venn-diagrams-the-centers-business-web-site/#comments</comments>
		<pubDate>Fri, 23 May 2008 07:03:58 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Domain</category>
		<guid isPermaLink="false">http://domain.b5websitehosting.com/domain/951chapter-48data-visualization-with-venn-diagrams-the-centers-business-web-site/</guid>
		<description><![CDATA[951Chapter 48Data Visualization with Venn Diagrams .The centers of the circles are always on the same horizontal line. This means that theiry-coordinate is decided in advance, and we change the area of intersection just bychanging the x-coordinates. .The circles always fit within the top two-thirds of the diagram (reserving the lower thirdfor labels). So put [...]]]></description>
			<content:encoded><![CDATA[<p>951Chapter 48Data Visualization with Venn Diagrams .The centers of the circles are always on the same horizontal line. This means that theiry-coordinate is decided in advance, and we change the area of intersection just bychanging the x-coordinates. .The circles always fit within the top two-thirds of the diagram (reserving the lower thirdfor labels). So put the y-coordinate of the centers one-third of the way down the imagefrom the top. And because the circles may not intersect at all, they shouldn t be largerthan half of the width of the image, so we have room to display two of them. We alsomake sure that the circles are no greater than 90 percent of the room available giveneverything we ve said so far, so that they don t touch the image borders. Finally, wedecide that, regardless of the actual numbers as input, the larger of the two circles is aslarge as it can be. (Scale is consistent within the diagram, but not between diagrams.) Determining size and scaleNow we have nearly all the information needed to create a visualization, and the pieces weare lacking, of course, depend on the input values we are going to receive. We use the sizes ofthe actual sets to determine the radii of the circles for display. We want the larger of the twoset counts to correspond to the largest circle we can afford to display, and then scale every- thing else appropriately. (We do all this in the code in Listing 48-2 (venn.php) you maywant to look ahead to that code as we lay out what we need to do in it.) It s actually easiest for us to calculate the largest radius we can afford: Given the constraintswe ve already listed, the larger radius should be 90 percent of 1/4of the image width, or 90 per- cent of 1/3of the image height, whichever is smaller. So we calculate this maximum radius, assume that the larger set size is proportional to the area of a circle with this radius, andcome up with a general conversion for mapping from input numbers to area as measured inpixels. We use this to decide on the areas of the circles and of the intersection area we want. What numbers should we know at this point? We know: .The radius of the bigger circle. (It s the largest radius that fits our constraints.) .The area of the bigger circle (calculated as pi  r2). .The radius of the smaller circle (from the ratio of the input set sizes treated as arearatios and then mapped back to a radius). .The area of the smaller circle (calculated). .The area of intersection (scaled the same way as other areas, from the input numbers). .The y-coordinate of the circle centers. (We decreed that it be the line that s one-third ofthe way down the image.) What are we missing before we can display our circles? The only thing that we re missing isthe x-coordinates of the centers. The easy casesWhere we decide to put the circle centers depends on the extent to which our sets overlap. There are some cases that we can dispense with, that don t need all this trigonometry we vebeen spending our time on. Those are: .No items are in the intersection.In this case, we don t want the circles to touch at all. Wesimply locate the centers at default locations in the middles of the two halves of thediagram. Because of the way that we limited the maximum radius, the circles are com- pletely separated.  <br />From our experience, we can recommend <a href="http://php5.armadillowebhosting.com">PHP5 Web Hosting</a> services, if you need affordable webhost to host and run your web application.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://domain.b5websitehosting.com/domain/951chapter-48data-visualization-with-venn-diagrams-the-centers-business-web-site/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Web hosting billing - 950Part VCase StudiesListing 48-1(continued) ($left_sector_angle / (2 *</title>
		<link>http://domain.b5websitehosting.com/domain/web-hosting-billing-950part-vcase-studieslisting-48-1continued-left_sector_angle-2/</link>
		<comments>http://domain.b5websitehosting.com/domain/web-hosting-billing-950part-vcase-studieslisting-48-1continued-left_sector_angle-2/#comments</comments>
		<pubDate>Thu, 22 May 2008 14:01:02 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Domain</category>
		<guid isPermaLink="false">http://domain.b5websitehosting.com/domain/web-hosting-billing-950part-vcase-studieslisting-48-1continued-left_sector_angle-2/</guid>
		<description><![CDATA[950Part VCase StudiesListing 48-1(continued) ($left_sector_angle / (2 * M_PI)) * (M_PI * $radius_left * $radius_left); $right_sector_area =  ($right_sector_angle / (2 * M_PI)) * (M_PI * $radius_right * $radius_right); $intersection_area = 2 * (($left_sector_area -  ($left_triangle_sign * $left_triangle_area)) + ($right_sector_area -  ($right_triangle_sign * $right_triangle_area))); return($intersection_area);  } } ?> Note that all the [...]]]></description>
			<content:encoded><![CDATA[<p>950Part VCase StudiesListing 48-1(continued) ($left_sector_angle / (2 * M_PI)) * (M_PI * $radius_left * $radius_left); $right_sector_area =  ($right_sector_angle / (2 * M_PI)) * (M_PI * $radius_right * $radius_right); $intersection_area = 2 * (($left_sector_area -  ($left_triangle_sign * $left_triangle_area)) + ($right_sector_area -  ($right_triangle_sign * $right_triangle_area))); return($intersection_area);  } } ?> Note that all the angle calculations are in radians, rather than degrees. In radians, a right angleis pi/2, and a complete revolution around a circle is 2  pi. We tend to use PHP constants forthese values whenever we can, in particular M_PI(the value of pi), and M_PI_2(pi/2). There s one final wrinkle that we ve ignored in our discussion so far, but which we had to dealwith in the code. The problem is that it s possible for either angle ACE or angle ADE (as wecall them in Figure 48-1) to be obtuse that is, more than 90 degrees in size. To see this, lookat that diagram and imagine what happens as you make the circle on the right smaller, andmove its center D progressively closer to C. At some point D actually moves to the left of seg- ment AB. In this case, the circle intersection area to the left of AB is actually the sum of a sec- tor and a triangle rather than a difference. The sector determined by DA and DB sweeps outmore than half of the circle centered at D, and the remaining portion we want to include is thearea of the triangle ADB. We handle this in the code by testing if the angles are obtuse, andmultiplying the triangle areas by either 1 or -1, depending on the result of the test. Planning the DisplayNow we pop up a couple of levels and think about actually generating a diagram. We assumethat we have as input three numbers (size of set 1, size of set 2, and size of intersection), along with some textual labels. We want to scale and locate these circles so that everythinghas the right area, labels get associated with the right circles, and everything fits within thesize of the diagram we re creating. Simplifying assumptionsWe start off with some totally arbitrary decisions that, after being made, simplify everything. We decree that: .All the images that we generate are the same size, and that size is 300 pixels high and600 pixels wide.  <br />From our experience, we can recommend <a href="http://php5.armadillowebhosting.com">PHP5 Web Hosting</a> services, if you need affordable webhost to host and run your web application.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://domain.b5websitehosting.com/domain/web-hosting-billing-950part-vcase-studieslisting-48-1continued-left_sector_angle-2/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>949Chapter 48Data Visualization with Venn Diagrams//  (Tomcat web server) formed by</title>
		<link>http://domain.b5websitehosting.com/domain/949chapter-48data-visualization-with-venn-diagrams-tomcat-web-server-formed-by/</link>
		<comments>http://domain.b5websitehosting.com/domain/949chapter-48data-visualization-with-venn-diagrams-tomcat-web-server-formed-by/#comments</comments>
		<pubDate>Wed, 21 May 2008 20:08:00 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Domain</category>
		<guid isPermaLink="false">http://domain.b5websitehosting.com/domain/949chapter-48data-visualization-with-venn-diagrams-tomcat-web-server-formed-by/</guid>
		<description><![CDATA[949Chapter 48Data Visualization with Venn Diagrams// formed by the two radii and the distance// between them$left_sector_angle =  angle_given_sides($radius_right, $radius_left, $distance); $right_sector_angle =  angle_given_sides($radius_left, $radius_right, $distance); // test for obtuseness &#8212; the sector angle can// be obtuse, but the triangle angle should not// be. Also save the result as a sign for the// eventual [...]]]></description>
			<content:encoded><![CDATA[<p>949Chapter 48Data Visualization with Venn Diagrams// formed by the two radii and the distance// between them$left_sector_angle =  angle_given_sides($radius_right, $radius_left, $distance); $right_sector_angle =  angle_given_sides($radius_left, $radius_right, $distance); // test for obtuseness &#8212; the sector angle can// be obtuse, but the triangle angle should not// be. Also save the result as a sign for the// eventual area calculationif ($left_sector_angle < M_PI / 2) { $left_triangle_angle = $left_sector_angle; $left_triangle_sign = 1; } else { $left_triangle_angle = M_PI - $left_sector_angle; $left_triangle_sign = -1; } if ($right_sector_angle < M_PI / 2) { $right_triangle_angle = $right_sector_angle; $right_triangle_sign = 1; } else { $right_triangle_angle = M_PI - $right_sector_angle; $right_triangle_sign = -1; } // next, find the height of that triangle, assuming// the distance is the base$height = ($radius_left / sin(M_PI_2)) * sin($left_triangle_angle); $base_left = ($radius_left / sin(M_PI_2)) * sin(M_PI_2 - $left_triangle_angle); $base_right = ($radius_right / sin(M_PI_2)) * sin(M_PI_2 - $right_triangle_angle); // finally find triangle and sector areas, and  // subtract (or add) appropriately to get the  // intersection area. Multiply by 2 to reflect  // areas on both sides of the segment connecting// the circle centers$left_triangle_area = $base_left * $height / 2; $right_triangle_area = $base_right * $height / 2; $left_sector_area =  Continued54  <br />If you are looking for cheap and quality webhost to host and run your website check <a href="http://php5.b5websitehosting.com">Jboss Web Hosting</a> services.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://domain.b5websitehosting.com/domain/949chapter-48data-visualization-with-venn-diagrams-tomcat-web-server-formed-by/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>948Part VCase StudiesIt takes a little more work  (Free web design)</title>
		<link>http://domain.b5websitehosting.com/domain/948part-vcase-studiesit-takes-a-little-more-work-free-web-design/</link>
		<comments>http://domain.b5websitehosting.com/domain/948part-vcase-studiesit-takes-a-little-more-work-free-web-design/#comments</comments>
		<pubDate>Thu, 08 May 2008 01:14:31 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Domain</category>
		<guid isPermaLink="false">http://domain.b5websitehosting.com/domain/948part-vcase-studiesit-takes-a-little-more-work-free-web-design/</guid>
		<description><![CDATA[948Part VCase StudiesIt takes a little more work and trigonometry to get the areas of the triangles. In our code, wemake the job more straightforward by drawing a line from point C to point D, and consideringonly the half of the diagram above that line then at the end, we multiply by two to get [...]]]></description>
			<content:encoded><![CDATA[<p>948Part VCase StudiesIt takes a little more work and trigonometry to get the areas of the triangles. In our code, wemake the job more straightforward by drawing a line from point C to point D, and consideringonly the half of the diagram above that line then at the end, we multiply by two to get thereal area. If we say that the intersection of segments AB and CD is point E, what we eventuallycare about is the area of triangles CAE and DAE. We start by calculating the angles of triangleCDA (whose side lengths are known to us) and, by using that information, determining thelengths of CE, DE, and AE. After we know these lengths, we know the bases and heights, andthe areas of the right triangles CAE and DAE are just 1/2(base height). Listing 48-1 shows code to do this kind of area calculation. Its main  public  function is  circle_intersection_area(), which expects as arguments the radii of two circles and thedistance between them. The simplest case is where the distance is greater than the sum ofthe radii: The circles do not touch; there is no intersection, and the answer is zero. Listing 48-1:trig.php<?php  function angle_given_sides ($opposite, $other_1, $other_2) { if (($opposite <= 0) ||  ($other_1 <= 0) ||  ($other_2 <= 0) || ($opposite >= ($other_1 + $other_2)) || ($other_1 >= ($opposite + $other_2)) || ($other_2 >= ($other_1 + $opposite))) { die( Triangle with impossible side lengths in  .  angle_given_sides: $opposite, $other_1, $other_2 ); } else {  $numerator =  ((($other_1 * $other_1) + ($other_2 * $other_2)) - ($opposite * $opposite)); $denominator = 2 * $other_1 * $other_2; return(acos($numerator / $denominator)); } } function area_to_radius ($area) { return (sqrt ($area / M_PI)); } function circle_intersection_area ($radius_left, $radius_right,  $distance) { if ($radius_right + $radius_left <= $distance) { return(0); } else { // first, we find the angle measures of a triangle54  <br />We recommend cheap and reliable webhost to host and run your web applications: <a href="http://coldfusion.armadillowebhosting.com">Coldfusion Web Hosting</a> services.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://domain.b5websitehosting.com/domain/948part-vcase-studiesit-takes-a-little-more-work-free-web-design/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Java web server - 947Chapter 48Data Visualization with Venn DiagramsNecessary TrigonometryLet s get</title>
		<link>http://domain.b5websitehosting.com/domain/java-web-server-947chapter-48data-visualization-with-venn-diagramsnecessary-trigonometrylet-s-get/</link>
		<comments>http://domain.b5websitehosting.com/domain/java-web-server-947chapter-48data-visualization-with-venn-diagramsnecessary-trigonometrylet-s-get/#comments</comments>
		<pubDate>Wed, 07 May 2008 07:26:59 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Domain</category>
		<guid isPermaLink="false">http://domain.b5websitehosting.com/domain/java-web-server-947chapter-48data-visualization-with-venn-diagramsnecessary-trigonometrylet-s-get/</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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  <br />You want to have a cheap webhost for your apache application, then check <a href="http://apache.armadillowebhosting.com">apache web hosting</a> services.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://domain.b5websitehosting.com/domain/java-web-server-947chapter-48data-visualization-with-venn-diagramsnecessary-trigonometrylet-s-get/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>946Part VCase StudiesIf we re going to offer a  (Free web host)</title>
		<link>http://domain.b5websitehosting.com/domain/946part-vcase-studiesif-we-re-going-to-offer-a-free-web-host/</link>
		<comments>http://domain.b5websitehosting.com/domain/946part-vcase-studiesif-we-re-going-to-offer-a-free-web-host/#comments</comments>
		<pubDate>Tue, 06 May 2008 15:26:44 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>Domain</category>
		<guid isPermaLink="false">http://domain.b5websitehosting.com/domain/946part-vcase-studiesif-we-re-going-to-offer-a-free-web-host/</guid>
		<description><![CDATA[946Part VCase StudiesIf we re going to offer a way to query the database, then it may as well be via a Web form. Sothe end-to-end view of our task is that we start with a Web form and end up with a picture todisplay. Let s start the design by enumerating the things that [...]]]></description>
			<content:encoded><![CDATA[<p>946Part VCase StudiesIf we re going to offer a way to query the database, then it may as well be via a Web form. Sothe end-to-end view of our task is that we start with a Web form and end up with a picture todisplay. Let s start the design by enumerating the things that need to happen for this to comeabout. We ll need to: 1.Generate (or at least present) the Web form itself. 2.Receive the submitted form data and transform it into appropriate SQL queries for  submission to the database. 3.Receive results from the SQL queries. 4.Use the SQL results to decide on the locations and sizes of all the elements in ourgraphic. 5.Actually generate the graphic and send it back to the user. All of the code in this chapter should work with either PHP4 or PHP5, but it assumes that yourPHP installation has access to the gdimage library and is configured to produce PNG images. Any version of gdlater than 1.8, bundled or unbundled, should be OK. (See Chapter 42 fordetails of configuration and installation of gd.) Outline of the CodeOur system contains the following code files: .visualization_form.php:This is essentially a hard-coded form that enables the userto choose two different restrictions on the data in our table. The restrictions chosenmap directly to whereclauses loaded from an auxiliary file called query_clauses.php. .db_visualization.php:This code handles the form data sent by visualization_ form.phpand builds three SQL statements: one with only the first where clause, onewith the second whereclause, and a third with both clauses joined by an and. It col- lects resulting three counts and displays the numbers in a graphic by calling functionsloaded from venn.php. .venn.php:This actually produces the Venn diagram graphic and ships it back to theuser. Its primary function takes as input the three amounts (the sizes of the two sets andtheir intersection), decides the sizes and locations of corresponding circles, and does allthe drawing and shading necessary. For the complicated case of sets that actually havean overlapping area, it uses functions loaded from trig.phpto calculate areas. .trig.php:This code actually calculates the intersection area whenever circles overlap. We discuss these code files in reverse order, from the bottom up. By the way, although we likethis example, we don t want to give the impression that you need to do trigonometry to docomputer graphics in PHP, or even vector graphics in PHP. If you want to understand everybit of this example, then you need to go through the trig, but we encourage those who don tcare to skip the next section ( Necessary trigonometry ). The core of the graphics code itselfis in venn.php, and that example code really is important to understand if you want to do  gd-based graphics in PHP. Note54  <br />If you are searching for cheap webhost for your web application, please visit <a href="http://tomcat.b5websitehosting.com">MySQL5 Web Hosting</a> services.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://domain.b5websitehosting.com/domain/946part-vcase-studiesif-we-re-going-to-offer-a-free-web-host/feed/</wfw:commentRSS>
		</item>
	</channel>
</rss>
