Raw File
Tip revision: 72984f188f682cc270e18126009c8e56b7aab80d authored by Karline Soetaert on 10 August 2011, 00:00 UTC
version 1.3.2
Tip revision: 72984f1

  Surface Area and Volume of Geometrical Objects

    \item \code{g.sphere} the surface and volume of a sphere
    \item \code{g.spheroid} the surface and volume of a spheroid
    \item \code{g.cylinder} the surface and volume of a cylinder;
      note that the surface area calculation ignores the top and bottom.


g.spheroid (x, b = 1)
g.cylinder (x, L = 1)


  \item{x }{the radius 
  \item{b }{the ratio of long/short radius of the spheroid;
    if b<1: the spheroid is oblate.
  \item{L }{the length of the cylinder

  A list containing:
  \item{surf }{the surface area 
  \item{vol }{the volume 

  Filip Meysman <f.meysman@nioo.knaw.nl>,
  Karline Soetaert <k.soetaert@nioo.knaw.nl>


 mf <- par(mfrow = c(3, 2))
 x  <- seq(from = 0, to = 1, length = 10)
 plot(x, g.sphere(x)$surf, main = "sphere surface")
 plot(x, g.sphere(x)$vol, main = "sphere volume")
 plot(x, g.spheroid(x, b = 0.5)$surf, main = "spheroid surface")
 plot(x, g.spheroid(x, b = 0.5)$vol, main = "spheroid volume")
 plot(x, g.cylinder(x, L = 1)$surf, main = "cylinder surface")
 plot(x, g.cylinder(x, L = 1)$vol, main = "cylinder volume")
 par("mfrow" = mf)


back to top