i_nfunc Library part 1

© Mike Williams 2001,2002,2003,2004

Up | Previous: i_algbr Library part 3 Next: i_nfunc Library part 2 | Alphabetical Index

f_ellipsoid generates spheres and ellipsoids.

The parameters are:

  1. X scale (inverse)
  2. Y scale (inverse)
  3. Z scale (inverse)
Setting these scaling parameters to 1/n gives exactly the same effect as performing a scale operation to increase the scaling by n in the corresponding direction.

function {f_ellipsoid(x,y,z,1,3,1)}
threshold 1
f_blob generates blobs that are similar to a CSG blob with two spherical components.

For some unknown reason, this function only seems to work with negative threshold settings. (It took me lots of attempts with blank images before I thought of trying that.)

The parameters are:

  1. X distance between the two components
  2. Blob strength of component 1
  3. Inverse blob radius of component 1
  4. Blob strength of component 2
  5. Inverse blob radius of component 2

function {f_blob(x,y,z,1,1,0.7,1,1)}
threshold -0.01
This is f_flange_cover

The parameters are:

  1. Spikiness. Set this to very low values to increase the spikes. Set it to 1 and you get a sphere.
  2. Inverse size. Increase this to decrease the size of the surface. (The other parameters also drastically affect the size, but this parameter has no other effects).
  3. Flange. Increase this to increase the flanges that appear between the spikes. Set it to 1 for no flanges.
  4. Threshold. Setting this parameter to 1 and the threshold to zero has exactly the same effect as setting this parameter to zero and the threshold to -1.

function {f_flange_cover(x,y,z,0.01,35,1.5,1)}
The f_blob2 surface is similar to a CSG blob with two spherical components.

The parameters are:

  1. Separation. One blob component is at the origin, and the other is this distance away on the X axis.
  2. Inverse size. Increase this to decrease the size of the surface.
  3. Blob strength.
  4. Threshold. Setting this parameter to 1 and the threshold to zero has exactly the same effect as setting this parameter to zero and the threshold to -1.

function {f_blob2(x,y,z,1,3,2,1)}
The f_cross_ellipsoids surface is like the union of three crossed ellipsoids, one oriented along each axis.

The parameters are:

  1. Eccentricity. When less than 1, the ellipsoids are oblate, when greater than 1 the ellipsoids are prolate, when zero the ellipsoids are spherical (and hence the whole surface is a sphere).
  2. Inverse size. Increase this to decrease the size of the surface.
  3. Diameter. Increase this to increase the size of the ellipsoids.
  4. Threshold. Setting this parameter to 1 and the threshold to zero has exactly the same effect as setting this parameter to zero and the threshold to -1.

function {f_cross_ellipsoids(x,y,z,0.1,8,4,1)}
The f_isect_ellipsoids surface is like the intersection of three crossed ellipsoids, one oriented along each axis.

The parameters are:

  1. Eccentricity. When less than 1, the ellipsoids are oblate, when greater than 1 the ellipsoids are prolate, when zero the ellipsoids are spherical (and hence the whole surface is a sphere).
  2. Inverse size. Increase this to decrease the size of the surface.
  3. Diameter. Increase this to increase the size of the ellipsoids.
  4. Threshold. Setting this parameter to 1 and the threshold to zero has exactly the same effect as setting this parameter to zero and the threshold to -1.

f_isect_ellipsoids(x,y,z,3,1,4,1)
This is the f_spikes surface.

The parameters are:

  1. Spikiness. Set this to very low values to increase the spikes. Set it to 1 and you get a sphere.
  2. Hollowness. Increasing this causes the sides to bend in more.
  3. Size. Increasing this increases the size of the object.
  4. Roundness. This parameter has a subtle effect on the roundness of the spikes.
  5. Fatness. Increasing this makes the spikes fatter.

  function { - f_spikes(x,y,z,0.04,8,1,1,1)}
  threshold -1
This function can be used to generate the surface of revolution of any polynomial up to degree 4.

The parameters are:

  1. Constant
  2. Y coefficient.
  3. Y2 coefficient.
  4. Y3 coefficient.
  5. Y4 coefficient.
To put it another way: If we call the parameters A, B, C, D, E; then this function generates the surface of revolution formed by revolving "x = A + By + Cy2 + Dy3 + Ey4" around the Y axis.

function {f_poly4(x,y,z,0,1,-1,0,0)}

Download a zip file containing the POV source files for all the images that appear on this page.

Up | Previous: i_algbr Library part 3 Next: i_nfunc Library part 2 | Alphabetical Index