7.7.2  functions.inc - Internal Functions

Here is a list of the internal functions in the order they appear in the "functions.inc" include file

f_algbr_cyl1(x,y,z, P0, P1, P2, P3, P4). An algebraic cylinder is what you get if you take any 2d curve and plot it in 3d. The 2d curve is simply extruded along the third axis, in this case the z axis.
With the SOR Switch switched on, the figure-of-eight curve will be rotated around the Y axis instead of being extruded along the Z axis.

f_algbr_cyl2(x,y,z, P0, P1, P2, P3, P4). An algebraic cylinder is what you get if you take any 2d curve and plot it in 3d. The 2d curve is simply extruded along the third axis, in this case the z axis.
With the SOR Switch switched on, the cross section curve will be rotated around the Y axis instead of being extruded along the Z axis.

f_algbr_cyl3(x,y,z, P0, P1, P2, P3, P4). An algebraic cylinder is what you get if you take any 2d curve and plot it in 3d. The 2d curve is simply extruded along the third axis, in this case the Z axis.
With the SOR Switch switched on, the cross section curve will be rotated around the Y axis instead of being extruded along the Z axis.

f_algbr_cyl4(x,y,z, P0, P1, P2, P3, P4). An algebraic cylinder is what you get if you take any 2d curve and plot it in 3d. The 2d curve is simply extruded along the third axis, in this case the z axis.
With the SOR Switch switched on, the cross section curve will be rotated around the Y axis instead of being extruded along the Z axis.

f_bicorn(x,y,z, P0, P1). The surface is a surface of revolution.

f_bifolia(x,y,z, P0, P1). The bifolia surface looks something like the top part of a a paraboloid bounded below by another paraboloid.

f_blob(x,y,z, P0, P1, P2, P3, P4). This function generates blobs that are similar to a CSG blob with two spherical components. This function only seems to work with negative threshold settings.

f_blob2(x,y,z, P0, P1, P2, P3). The surface is similar to a CSG blob with two spherical components.

f_boy_surface(x,y,z, P0, P1). For this surface, it helps if the field strength is set low, otherwise the surface has a tendency to break up or disappear entirely. This has the side effect of making the rendering times extremely long.

f_comma(x,y,z, P0). The 'comma' surface is very much like a comma-shape.

f_cross_ellipsoids(x,y,z, P0, P1, P2, P3). The 'cross ellipsoids' surface is like the union of three crossed ellipsoids, one oriented along each axis.

f_crossed_trough(x,y,z, P0)

f_cubic_saddle(x,y,z, P0). For this surface, it helps if the field strength is set quite low, otherwise the surface has a tendency to break up or disappear entirely.

f_cushion(x,y,z, P0)

f_devils_curve(x,y,z, P0)

f_devils_curve_2d(x,y,z, P0, P1, P2, P3, P4, P5). The f_devils_curve_2d curve can be extruded along the z axis, or using the SOR parameters it can be made into a surface of revolution. The X and Y factors control the size of the central feature.

f_dupin_cyclid(x,y,z, P0, P1, P2, P3, P4, P5)

f_ellipsoid(x,y,z, P0, P1, P2). f_ellipsoid generates spheres and ellipsoids. Needs "threshold 1".
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.

f_enneper(x,y,z, P0)

f_flange_cover(x,y,z, P0, P1, P2, P3)

f_folium_surface(x,y,z, P0, P1, P2). A 'folium surface' looks something like a paraboloid glued to a plane.

f_folium_surface_2d(x,y,z, P0, P1, P2, P3, P4, P5). The f_folium_surface_2d curve can be rotated around the X axis to generate the same 3d surface as the f_folium_surface, or it can be extruded in the Z direction (by switching the SOR switch off)

f_glob(x,y,z, P0). One part of this surface would actually go off to infinity if it were not restricted by the contained_by shape.

f_heart(x,y,z, P0)

f_helical_torus(x,y,z, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9). With some sets of parameters, it looks like a torus with a helical winding around it. The winding optionally has grooves around the outside.

f_helix1(x,y,z, P0, P1, P2, P3, P4, P5, P6)

f_helix2(x,y,z, P0, P1, P2, P3, P4, P5, P6). Needs a negated function

f_hex_x(x,y,z, P0). This creates a grid of hexagonal cylinders stretching along the z-axis. The fatness is controlled by the threshold value. When this value equals 0.8660254 or cos(30) the sides will touch, because this is the distance between centers. Negating the function will inverse the surface and create a honey-comb structure. This function is also useful as pigment function.

f_hex_y(x,y,z, P0). This is function forms a lattice of infinite boxes stretching along the z-axis. The fatness is controlled by the threshold value. These boxes are rotated 60 degrees around centers, which are 0.8660254 or cos(30) away from each other. This function is also useful as pigment function.

f_hetero_mf(x,y,z, P0, P1, P2, P3, P4, P5). f_hetero_mf (x,0,z) makes multifractal height fields and patterns of '1/f' noise
'Multifractal' refers to their characteristic of having a fractal dimension which varies with altitude. Built from summing noise of a number of frequencies, the heteromf parameters determine how many, and which frequencies are to be summed.
An advantage to using these instead of a height_field {} from an image (a number of height field programs output multifractal types of images) is that the heteromf function domain extends arbitrarily far in the x and z directions so huge landscapes can be made without losing resolution or having to tile a height field. Other functions of interest are f_ridged_mf and f_ridge.

f_hunt_surface(x,y,z, P0)

f_hyperbolic_torus(x,y,z, P0, P1, P2)

f_isect_ellipsoids(x,y,z, P0, P1, P2, P3). The 'isect ellipsoids' surface is like the intersection of three crossed ellipsoids, one oriented along each axis.

f_kampyle_of_eudoxus(x,y,z, P0, P1, P2). The 'kampyle of eudoxus' is like two infinite planes with a dimple at the center.

f_kampyle_of_eudoxus_2d(x,y,z, P0, P1, P2, P3, P4, P5)The 2d curve that generates the above surface can be extruded in the Z direction or rotated about various axes by using the SOR parameters.

f_klein_bottle(x,y,z, P0)

f_kummer_surface_v1(x,y,z, P0). The Kummer surface consists of a collection of radiating rods.

f_kummer_surface_v2(x,y,z, P0, P1, P2, P3). Version 2 of the kummer surface only looks like radiating rods when the parameters are set to particular negative values. For positive values it tends to look rather like a superellipsoid.

f_lemniscate_of_gerono(x,y,z, P0). The "Lemniscate of Gerono" surface is an hourglass shape. Two teardrops with their ends connected.

f_lemniscate_of_gerono_2d(x,y,z, P0, P1, P2, P3, P4, P5). The 2d version of the Lemniscate can be extruded in the Z direction, or used as a surface of revolution to generate the equivalent of the 3d version, or revolved in different ways.

f_mesh1(x,y,z, P0, P1, P2, P3, P4) The overall thickness of the threads is controlled by the isosurface threshold, not by a parameter. If you render a mesh1 with zero threshold, the threads have zero thickness and are therefore invisible. Parameters P2 and P4 control the shape of the thread relative to this threshold parameter.

f_mitre(x,y,z, P0). The 'Mitre' surface looks a bit like an ellipsoid which has been nipped at each end with a pair of sharp nosed pliers.

f_nodal_cubic(x,y,z, P0). The 'Nodal Cubic' is something like what you'd get if you were to extrude the Stophid2D curve along the X axis and then lean it over.

f_noise3d(x,y,z)

f_noise_generator(x,y,z, P0)

f_odd(x,y,z, P0)

f_ovals_of_cassini(x,y,z, P0, P1, P2, P3). The Ovals of Cassini are a generalization of the torus shape.

f_paraboloid(x,y,z, P0). This paraboloid is the surface of revolution that you get if you rotate a parabola about the Y axis.

f_parabolic_torus(x,y,z, P0, P1, P2)

f_ph(x,y,z) = atan2( sqrt( x*x + z*z ), y )
When used alone, the "PH" function gives a surface that consists of all points that are at a particular latitude, i.e. a cone. If you use a threshold of zero (the default) this gives a cone of width zero, which is invisible. Also look at f_th and f_r

f_pillow(x,y,z, P0)

f_piriform(x,y,z, P0). The piriform surface looks rather like half a lemniscate.

f_piriform_2d(x,y,z, P0, P1, P2, P3, P4, P5, P6). The 2d version of the "Piriform" can be extruded in the Z direction, or used as a surface of revolution to generate the equivalent of the 3d version.

f_poly4(x,y,z, P0, P1, P2, P3, P4). This f_poly4 can be used to generate the surface of revolution of any polynomial up to degree 4.
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.

f_polytubes(x,y,z, P0, P1, P2, P3, P4, P5). The 'Polytubes' surface consists of a number of tubes. Each tube follows a 2d curve which is specified by a polynomial of degree 4 or less. If we look at the parameters, then this function generates "P0" tubes which all follow the equation " x = P1 + P2y + P3y2 + P4y3 + P5y4 " arranged around the Y axis.
This function needs a positive threshold (fatness of the tubes).

f_quantum(x,y,z, P0). It resembles the shape of the electron density cloud for one of the d orbitals.

f_quartic_paraboloid(x,y,z, P0). The 'Quartic Paraboloid' is similar to a paraboloid, but has a squarer shape.

f_quartic_saddle(x,y,z, P0). The 'Quartic saddle' is similar to a saddle, but has a squarer shape.

f_quartic_cylinder(x,y,z, P0, P1, P2). The 'Quartic cylinder' looks a bit like a cylinder that's swallowed an egg.

f_r(x,y,z) = sqrt( x*x + y*y + z*z )
When used alone, the "R" function gives a surface that consists of all the points that are a specific distance (threshold value) from the origin, i.e. a sphere. Also look at f_ph and f_th

f_ridge(x,y,z, P0, P1, P2, P3, P4, P5). This function is mainly intended for modifying other surfaces as you might use a height field or to use as pigment function. Other functions of interest are f_hetero_mf and f_ridged_mf.

f_ridged_mf(x,y,z, P0, P1, P2, P3, P4, P5). The "Ridged Multifractal" surface can be used to create multifractal height fields and patterns. 'Multifractal' refers to their characteristic of having a fractal dimension which varies with altitude. They are built from summing noise of a number of frequencies. The f_ridged_mf parameters determine how many, and which frequencies are to be summed, and how the different frequencies are weighted in the sum.
An advantage to using these instead of a height_field{} from an image is that the ridgedmf function domain extends arbitrarily far in the x and z directions so huge landscapes can be made without losing resolution or having to tile a height field. Other functions of interest are f_hetero_mf and f_ridge.

f_rounded_box(x,y,z, P0, P1, P2, P3). The Rounded Box is defined in a cube from <-1, -1, -1> to <1, 1, 1>. By changing the " Scale" parameters, the size can be adjusted, without affecting the Radius of curvature.

f_sphere(x,y,z, P0)

f_spikes(x,y,z, P0, P1, P2, P3, P4)

f_spikes_2d(x,y,z, P0, P1, P2, P3) =2-D function : f = f( x, z ) - y

f_spiral(x,y,z, P0, P1, P2, P3, P4, P5)

f_steiners_roman(x,y,z, P0). The "Steiners Roman" is composed of four identical triangular pads which together make up a sort of rounded tetrahedron. There are creases along the X, Y and Z axes where the pads meet.

f_strophoid(x,y,z, P0, P1, P2, P3). The "Strophoid" is like an infinite plane with a bulb sticking out of it.

f_strophoid_2d(x,y,z, P0, P1, P2, P3, P4, P5, P6). The 2d strophoid curve can be extruded in the Z direction or rotated about various axes by using the SOR parameters.

f_superellipsoid(x,y,z, P0, P1). Needs a negative field strength or a negated function.

f_th(x,y,z) = atan2( x, z )
f_th() is a function that is only useful when combined with other surfaces.
It produces a value which is equal to the "theta" angle, in radians, at any point. The theta angle is like the longitude co-ordinate on the Earth. It stays the same as you move north or south, but varies from east to west. Also look at f_ph and f_r

f_torus(x,y,z, P0, P1)

f_torus2(x,y,z, P0, P1, P2). This is different from the f_torus function which just has the major and minor radii as parameters.

f_torus_gumdrop(x,y,z, P0). The "Torus Gumdrop" surface is something like a torus with a couple of gumdrops hanging off the end.

f_umbrella(x,y,z, P0)

f_witch_of_agnesi(x,y,z, P0, P1, P2, P3, P4, P5). The "Witch of Agnesi" surface looks something like a witches hat.

f_witch_of_agnesi_2d(x,y,z, P0, P1, P2, P3, P4, P5). The 2d version of the "Witch of Agnesi" curve can be extruded in the Z direction or rotated about various axes by use of the SOR parameters.