geometryvolume

ellipsoidal cap

Available under GPL (Free) and Commercial licence
get a GPL licence
COST (GBP)
this unit 0.80
sub units 0.00
add a commercial licence to your cart
0
viewed 911 times and licensed 2 times
www.codecogs.com/d-ox/geometry/volume/ellipsoidal_cap.php
Controller: CodeCogs    Contact Controller

Interface

#include <codecogs/geometry/volume/ellipsoidal_cap.h>

using namespace Geometry::Volume;

double ellipsoidal_cap (double x, double a, double b, double c)[inline]
Computes the volume of an ellipsoidal cap.
Click for details on using CodeCogs in ExcelReal cc_ellipsoidal_cap (Real x, Real a, Real b, Real c)
This function is available as a Microsoft Excel add-in.

Function Documentation

Add calculator to your site or email
 
doubleellipsoidal_capdoublex
doublea
doubleb
doublec )[inline]
This module calculates the volume of an ellipsoidal cap.

The general equation for the ellipsoid is:
(1)
\displaystyle \frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} = 1

where a is the x semi-axis (width), b is the y semi-axis (depth) and c is the z semi-axis (height).

Consider X(0,0,x) a point on the height of the ellipsoid such that -c \leq x \leq c . The plane parallel to xOy going through the point X will intersect the ellipsoid and determine a subsection.

The volume of the resulting ellipsoidal cap is given by:
(2)
\displaystyle V = \pi a b\left( \frac{2c}{3} - x + \frac{x^3}{3c^2}\right)

The situation is described below, where the filled cap is the volume we want to calculate.

1/ellipsoidcap2-746.png
Example:
#include <stdio.h>
#include <codecogs/geometry/volume/ellipsoidal_cap.h>
 
int main()
{
  // the x semi-axis
  double a = 10.5;
  
  // the y semi-axis
  double b = 5.2;
 
  // the z semi-axis
  double c = 3;
 
  // display the lengths of the semi-axes
  printf("a = %.1lf\nb = %.1lf\nc = %.1lf\n\n", a, b, c);
 
  // display the volume for different values of x
  for (double x = c; x >= -c; x -= 0.5)
    printf("x = %4.1lf    V = %.1lf \n",
    x, Geometry::Volume::ellipsoidal_cap(x, a, b, c));
 
  return 0;
}
Output
a = 10.5
b = 5.2
c = 3.0
 
x =  3.0    V = 0.0
x =  2.5    V = 13.5
x =  2.0    V = 50.8
x =  1.5    V = 107.2
x =  1.0    V = 177.9
x =  0.5    V = 258.1
x =  0.0    V = 343.1
x = -0.5    V = 428.0
x = -1.0    V = 508.2
x = -1.5    V = 578.9
x = -2.0    V = 635.3
x = -2.5    V = 672.6
x = -3.0    V = 686.1
Parameters:
xthe coordinate which determines the ellipsoidal cap
athe x semi-axis (width)
bthe y semi-axis (depth)
cthe z semi-axis (height)
Returns:
the volume of the ellipsoidal cap
Note:
the value of x must satisfy the inequality -c \leq x \leq c .
Authors:
Eduard Bentea (November 2006)
Source Code:
Register

- To get code register with CodeCogs. Already a Member, then Login.


Last Modified: 11 Nov 07 @ 20:44     Page Rendered: 2008-05-09 15:23:03

Page Comments

  You must login to leave a messge


Valid CSS!   Valid XHTML 1.0 Transitional