geometryarea

circle

Only available under a commercial licence
COST (GBP)
this unit 1.60
sub units 0.00
add a commercial licence to your cart
0
viewed 2359 times and licensed 1 times
www.codecogs.com/d-ox/geometry/area/circle.php
Controller: CodeCogs    Contact Controller

Interface

#include <codecogs/geometry/area/circle.h>

using namespace Geometry::Area;

double circle (double r, double h)[inline]
Computes the area of the circular segment within a circle tangent to a reference line.
Click for details on using CodeCogs in ExcelReal cc_circle (Real r, Real h)
This function is available as a Microsoft Excel add-in.

Function Documentation

Add calculator to your site or email
 
doublecircledoubler
doubleh )[inline]
This module computes the area of the circular segment formed between a circle tangent to a reference line and a line found at a given distance from this reference line.

The various cases are described by the images given in the following documentation, where the area which we want to compute is that of the filled shape.

Solution

Consider an orthogonal coordinate system and \mathcal{C}(O, r) a circle so that there exists P \in \mathcal{C}(O, r) with P on the x-axis. Also let d be parallel to the x-axis so that the distance from it to the x-axis is h \in \mathbb{R}_+ and d \cap \mathcal{C} = \{A, B\} .

Let S be the area which we must determine. Based on the relation between h and r we get the following cases:

1) h<r \Rightarrow S = \mathcal{A}_{APB}

1/circle_1-746.jpg

Further information available when you purchase a licence.

2) h = r \Rightarrow S = \mathcal{A}_{\mathcal C} /2

Because \mathcal{A}_{\mathcal C} = \pi r^2 , we find the solution:
(7)
\displaystyle S = \frac{\pi r^2}{2}

3) r<h<2r \Rightarrow S = \mathcal{A}_{APB}

1/circle_3-746.jpg

Further information available when you purchase a licence.

4) h \geq 2r \Rightarrow S = \mathcal{A}_{\mathcal{C}}

Because \mathcal{A}_{\mathcal{C}} = \pi r^2 , the solution is:
(14)
\displaystyle S = \pi r^2

Output:
r = 2.5
 
h = 0.0   Area = 0.000
h = 0.5   Area = 1.022
h = 1.0   Area = 2.796
h = 1.5   Area = 4.954
h = 2.0   Area = 7.334
h = 2.5   Area = 9.817
h = 3.0   Area = 12.301
h = 3.5   Area = 14.681
h = 4.0   Area = 16.839
h = 4.5   Area = 18.613
h = 5.0   Area = 19.635
h = 5.5   Area = 19.635
Example:
#include <codecogs/geometry/area/circle.h>
#include <stdio.h>
 
int main()
{
  // the length of the radius
  double r = 2.5;
 
  // display the lenghts of the radius
  printf("r = %.1lf\n\n", r);
 
  // display the area for different values of h
  for (double h = 0; h < 5.6; h += 0.5)
  printf("h = %.1lf   Area = %.3lf\n", h, 
  Geometry::Area::circle(r, h));
 
  return 0;
}
Parameters:
rthe radius of the circle
hthe distance between line d and the reference line
Returns:
The value of the desired area.
Authors:
Eduard Bentea (September 2006)
Source Code:
Register

- To get code register with CodeCogs. Already a Member, then Login.


Last Modified: 18 Oct 07 @ 17:07     Page Rendered: 2008-05-09 14:48:33

Page Comments

  You must login to leave a messge


Valid CSS!   Valid XHTML 1.0 Transitional