CFLib.org – Common Function Library Project

VolEllipsoid(radius1, radius2, radius3)

Last updated July 18, 2001

author

Rob Brooks-Bilson

Version: 1 | Requires: CF5 | Library: MathLib

Description:
Calculates the volume of an ellipsoid.

Return Values:
Returns a simple value.

Example:

<CFSET radius1=2>
  <CFSET radius2=4>
  <CFSET radius3=6>
  <CFOUTPUT>
  Given:
  <UL>
  <LI>radius1=#radius1#
  <LI>radius2=#radius2#
  <LI>radius3=#radius3#
  </UL>
  The volume of the ellipsoid is #VolEllipsoid(radius1, radius2, radius3)#
  </CFOUTPUT>

Parameters:

Name Description Required
radius1 1/2 the diameter of the first axis. Yes
radius2 1/2 the diameter of the second axis. Yes
radius3 1/2 the diameter of the third axis. Yes

Full UDF Source:

/**
 * Calculates the volume of an ellipsoid.
 * 
 * @param radius1 	 1/2 the diameter of the first axis. 
 * @param radius2 	 1/2 the diameter of the second axis. 
 * @param radius3 	 1/2 the diameter of the third axis. 
 * @return Returns a simple value. 
 * @author Rob Brooks-Bilson (rbils@amkor.com) 
 * @version 1.0, July 18, 2001 
 */
function VolEllipsoid(radius1, radius2, radius3)
{
  Return ((4/3) * PI() * radius1 *radius2 * radius3);
}
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Kevin Cotton added
date2ExcelDate
May 5, 2016

Raymond Camden added
CapFirst
April 25, 2016

Chris Wigginton added
loremIpsum
January 18, 2016

Gary Stanton added
calculateArrival...
November 19, 2015

Sebastiaan Naafs - van Dijk added
getDaysInQuarter
November 13, 2015

Created by Raymond Camden / Design by Justin Johnson