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);
}

Search CFLib.org


Latest Additions

Raymond Camden added
QueryDeleteRows
November 04, 2017

Leigh added
nullPad
May 11, 2016

Raymond Camden added
stripHTML
May 10, 2016

Kevin Cotton added
date2ExcelDate
May 05, 2016

Raymond Camden added
CapFirst
April 25, 2016

Created by Raymond Camden / Design by Justin Johnson