Advective Finite Difference Weights
g.sphere
the surface and volume of a sphere
g.spheroid
the surface and volume of a spheroid
g.cylinder
the surface and volume of a cylinder;
note that the surface area calculation ignores the top and bottom.
1 2 3  g.sphere(x)
g.spheroid (x, b = 1)
g.cylinder (x, L = 1)

x 
the radius 
b 
the ratio of long/short radius of the spheroid; if b<1: the spheroid is oblate. 
L 
the length of the cylinder 
A list containing:
surf 
the surface area 
vol 
the volume 
Filip Meysman <filip.meysman@nioz.nl>, Karline Soetaert <karline.soetaert@nioz.nl>
1 2 3 4 5 6 7 8 9  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)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.