Provides the surface area of a cylinder, including the circular bases.

1 | ```
areacylinder(Radius, radius=Radius, height, ends = 2)
``` |

`Radius` |
The major radius of the base of the cylinder. |

`radius` |
The minor radius of the base of the cylinder. Default is to equal the major Radius in the case of a circular base. |

`height` |
The height of the cylinder (alternatively, the length of a horizontal cylinder) |

`ends` |
How many ends to include in the surface area calculation (2=both ends, 1=one end, 0=neither end) |

Glenn J Tattersall

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ```
## The function is currently defined as
function(Radius, radius=Radius, height, ends=2)
{
Area <- (Radius+radius)*pi*height + ends*pi*Radius*radius
Area
}
# Example calculation:
# Typically, a body part might be modelled as cylindrical if it appears to be approximately
# circular or elliptical and elongated. By measuring the major diameter (D) and minor
# diameter (d) as well as the length or height (l), the overall surface area can be
# determined:
D<-12
d<-6
l<-18
areacylinder(Radius=D/2, radius=d/2, height=l, ends=2)
# To only show surface area of the exposed surface, and exclude the oval base of the
# cylinder, set ends=0
areacylinder(Radius=D/2, radius=d/2, height=l, ends=0)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.