areacone: Provides the surface are of a cone

Description Usage Arguments Details Author(s) Examples

View source: R/areacone.R

Description

Provides the surface area of a cone with an elliptical base. For a circular cone, simply use Radius=radius.

Usage

1
areacone(Radius, radius=Radius, hypotenuse=NULL, height, ends=1)

Arguments

Radius

The Radius of the major axis of the base of the cone.

radius

The radius of the minor axis of the base of the cone.

hypotenuse

The hypotenuse of the height of the cone (if blank, determined from radius and height)

height

The height of the cone (if hypotenuse is known, leave height blank)

ends

To include the base area in surface area calculation, set ends = 1, otherwise set ends = 0.

Details

Calculates the surface are of a cone with an elliptical base.

Author(s)

Glenn J Tattersall

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
## The function is currently defined as
function(Radius, radius=Radius, hypotenuse=NULL, height, ends=1)
{
  if(is.null(hypotenuse)){
    hypotenuse<-sqrt(height^2+Radius^2)
  }
  Area <- ends*pi*Radius*radius + pi*Radius*hypotenuse
  Area
}

# Example calculation from a measure of a bird bill.

# Typically, a bird bill will be measured by its depth (d) at the base, its width (w) at the 
# base and by its overall length.  The length (l) is typically measured along the length of
# the culmen, and thus is a diagonal measure along the hypotenuse of the cone.

d<-12
w<-6
l<-18
areacone(Radius=d/2, radius=w/2, hypotenuse=l, height=NULL, ends=1)


# If the perpendicular cone height (h) is instead measured, rather than the hypotenuse, then
# substitute h for height and assign hypotenuse = NULL, to obtain the same result

h<-sqrt(l^2-(d/2)^2)
areacone(Radius=d/2, radius=w/2, hypotenuse=NULL, height=h, ends=1)


# To only show surface area of the exposed surface, and exclude the oval base of the cone
# set ends=0:

areacone(Radius=d/2, radius=w/2, hypotenuse=l/2, height=NULL, ends=0)

Thermimage documentation built on Nov. 6, 2018, 1:03 a.m.