rss
Twitter Delicious Facebook Digg Stumbleupon Favorites

Friday, October 7, 2011

Find the area and volume of a cone

A cone is a three-dimensional geometric shape that tapers smoothly from a flat, usually circular base to a point called the apex or vertex. More precisely, it is the solid figure bounded by a plane base and the surface (called the lateral surface) formed by the locus of all straight line segments joining the apex to the perimeter of the base. The term "cone" sometimes refers just to the surface of this solid figure, or just to the lateral surface.
The axis of a cone is the straight line (if any), passing through the apex, about which the lateral surface has a rotational symmetry.
In common usage in elementary geometry, cones are assumed to be right circular, where right means that the axis passes through the centre of the base (suitably defined) at right angles to its plane, and circular means that the base is a circle. Contrasted with right cones are oblique cones, in which the axis does not pass perpendicularly through the centre of the base. In general, however, the base may be any shape, and the apex may lie anywhere (though it is often assumed that the base is bounded and has nonzero area, and that the apex lies outside the plane of the base). For example, a pyramid is technically a cone with a polygonal base.
The volume V of any conic solid is one third of the product of the area B of the base and the height H (the perpendicular distance from the base to the apex).
V = \frac{1}{3} B H
In modern math, this formula can easily be computed using calculus – it is, up to scaling, the integral \int x^2 dx = \tfrac{1}{3} x^3. Without using calculus, the formula can be proven by comparing the cone to a pyramid and applying Cavalieri's principle – specifically, comparing the cone to a (vertically scaled) right square pyramid, which forms one third of a cube. This formula cannot be proven without using such infinitesimal arguments – unlike the 2-dimensional formulae for polyhedral area, though similar to the area of the circle – and hence admitted less rigorous proofs before the advent of calculus, with the ancient Greeks using the method of exhaustion. This is essentially the content of Hilbert's third problem – more precisely, not all polyhedral pyramids are scissors congruent (can be cut apart into finite pieces and rearranged into the other), and thus volume cannot be computed purely by using a decomposition argument.
For a circular cone with radius R and height H, the formula for volume becomes
 V = \int_0^H r^2 \pi dh
where r is the radius of the cone at height h:
 r= R \frac{h}{H}
Thus:
 V = \int_0^H [R \frac{h}{H}]^2 \pi dh
Thus:
V = \frac{1}{3} \pi R^2 H.
For a right circular cone, the surface area A is
A =\pi R^2 + \pi R S\,   where   S = \sqrt{R^2 + H^2}   is the slant height.
The first term in the area formula, πR2, is the area of the base, while the second term, πRS, is the area of the lateral surface.
A right circular cone with height h and aperture , whose axis is the z coordinate axis and whose apex is the origin, is described parametrically as
F(s,t,u) = \left(u \tan s \cos t, u \tan s \sin t, u \right)
where s,t,u range over [0,θ), [0,2π), and [0,h], respectively.
In implicit form, the same solid is defined by the inequalities
\{ F(x,y,z) \leq 0, z\geq 0, z\leq h\},
where
F(x,y,z) = (x^2 + y^2)(\cos\theta)^2 - z^2 (\sin \theta)^2.\,
More generally, a right circular cone with vertex at the origin, axis parallel to the vector d, and aperture , is given by the implicit vector equation F(u) = 0 where
F(u) = (u \cdot d)^2 - (d \cdot d) (u \cdot u) (\cos \theta)^2   or   F(u) = u \cdot d - |d| |u| \cos \theta
where u = (x,y,z), and u \cdot d denotes the dot product.

class Cone{
 String name;
     double p=3.141592654;
     double r=4;
     double h=5;
     double l=6;
 void calculate(){
  System.out.println(p*r*l);
 }
 void calculate1(){
  System.out.println((p*r*r*h)/3);
 }
}
class CalCo{
 public static void main(String args[]){
  Cone c1=new Cone();
  c1.name="Cone-Area";
  System.out.println(c1.name);
  c1.calculate();

 Cone c2=new Cone();
  c2.name="Cone-Volume";
  System.out.println(c2.name);
  c2.calculate1();
    }

}

0 comments:

Post a Comment

Powered by Blogger.