|
|
| There are some special parameters with complicated effects that are found in several of these functions. Rather than describe them each time they occur, they are described here, and referred to them later as "Cross section type", "Field Strength", "Field Limit" etc. | |
|
|
In the helixes and spiral functions, the 6th parameter is the cross section type.
The following values seem to work:
|
|
|
|
|
The numerical value at a point in space generated by the function is multiplied by the Field Strength. The set of
points where the function evaluates to zero are unaffected by any positive value of this parameter, so if you're
just using the function on its own with threshold = 0, the generated surface is still the same.
In some cases, the field strength has a considerable effect on the speed and accuracy of rendering the surface. In general, increasing the field strength speeds up the rendering, but if you set the value too high the surface starts to break up and may disappear completely. The surface generated with threshold = 0.1 and field strength 1 is the same as the surface generated with threshold = 0.2 and field strength 2. Doubling the field strength has doubled the numeric value at a point in space, but doubling the threshold tells Megapov to look for points where the numeric value is double. Setting the field strength to a negative value produces the inverse of the surface, like setting sign -1. |
|
|
|
|
The numerical value at a point in space generated by the function is limited to plus
or minus the field limit.
E.g. if you set the field limit to 2, then the value returned for a point that is a large distance from the surface will be +2 or -2. This won't make any difference to the generated surface if you're using threshold that's within the field limit (and will kill the surface completely if the threshold is greater than the field limit). However, it may make a huge difference to the rendering times. If you use the function to generate a pigment, then all points that are a long way from the surface will have the same color, the color that corresponds to the numerical value of the field limit. |
|
|
|
![]() |
"algbr_cyl1", <1, 1.5, 1, 0, 0> |
|
If greater than zero, the curve is swept out as a surface of revolution (SOR).
If the value is zero or negative, the curve is extruded linearly in the Z direction. The image is sliced in half so that you can see the 2d figure-of-eight curve that generates it. |
|
|
|
![]() |
"algbr_cyl1", <1, 1.5, 1, 0.4, 0> |
|
If the SOR switch is on, then the curve is shifted this distance in the X direction
before being swept out.
This time the figure-of-eight curve has been shifted 0.4 units to the right before being swept out by setting SOR Offset to 0.4. |
|
|
|
![]() |
"algbr_cyl1", <1, 1.5, 1, 0.8, 90> |
|
If the SOR switch is on, then the curve is rotated this number of degrees about the Z axis
before being swept out.
This time the figure-of-eight curve has been rotated by 90 degrees and shifted 0.8 units to the right before being swept out by setting SOR Angle to 90. |
|
|
|
|
Sometimes, when you render a surface, you may find that you get only the shape of the container.
This could be caused by the fact that some of the build in functions are defined inside out. MegaPOV defines the "inside" of the surface as the region of space where the function is less than the threshold (i.e. in this case the region where the function evaluates to a negative value). To see what's going on, we can slice the object in half. (Note that when performing CSG operations on an isosurface we need to specify a max_trace parameter, otherwise some parts of the surface may be missing). The algbr_cyl1 we used to show the working of the SOR Switch is defined correctly. We can invert the isosurface by adding the "sign -1" parameter, and get this result: |
|
![]() |
"algbr_cyl1", <1, 1.5, 1, 0, 0>
sign -1 |
We can see that the surface that we wanted is buried inside, and it's hollow.
Another way of solving the problem is to make the contained_by surface "open". This is equivalent to using
"clipped_by" in POV.
Another way of solving the problem is to add an invisible copy of the contained_by surface after the isosurface. Because the two surfaces exactly coincide, only the second one is rendered, and if the pigment of the second one is totally transparent you can't see it. Of the three methods, the "sign -1" is normally the best solution. |
|
|
|
|
The first three functions (R, TH, PH) are more
useful when used in combination with other functions, or for expressing a surface in terms of 3d polar co-ordinates,
but here the images show them working alone.
The functions "R", "TH" and "PH" are equivalent to the standard 3d polar co-ordinates Radius, Theta and Phi. |
|
|
|
|
|
![]() |
#declare F = function {"R"}
isosurface { function { F(x,y,z) - 0.7}} Parameters (0):
|
|
In this image we have subtracted 0.7 from the function, which is identical to setting the threshold
to 0.7.
When used alone, the "R" function gives a surface that consists of all the points that are a specific distance from the origin, i.e. a sphere. If you use a threshold of zero (the default) this gives a sphere of size zero, which is invisible. |
|
|
|
|
When used alone, the "TH" function gives a surface which consists of
all points that have a longitude of zero or 180 degrees. I.e. a plane through the origin.
"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. |
|
![]() |
#declare Theta = function{"TH"}
#declare Sphere = function{"sphere" <1>} isosurface { function { Sphere + sin(Theta*20)*0.05*(1-y*y) } Parameters (0):
|
| This surface is a sphere to which has been added a height that's proportional to sin(theta), but which also decreases as you get near the poles (otherwise the ridges look out of proportion when the come close together). | |
|
|
| For this image, the threshold is set to 0.5. To do this, we have subtracted 0.5 from the function, which is identical to setting the threshold to 0.5. The cone consists of all points that have Phi equal to 1 radian. | |
![]() |
#declare F = function {"PH"}
isosurface { function { F(x,y,z) - 0.5 } Parameters (0):
|
| 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. | |
|
|
![]() |
"sphere", <1.0>
Parameters (1):
|
| The "sphere" function creates a sphere, which gives exactly the same results as you would get by using a conventional sphere{0, 1} object or using the mathematical isosurface function (x^2 + y^2 + z^2 - 1) | |
|
|
![]() |
"helix1", <1, 8, 0.3, 0.9, 0.6, 0.2, 0>
Parameters (7):
|
|
The "func_6" surface is identical the the standard "helix1" surface in all
respects.
"Helix1" is intended for use with helixes where the major radius is greater than the minor radius. |
|
|
|
![]() |
"func_7", <0, 8, 0.3, 0.2, 1, 1, 0>
sign -1 Parameters (7):
|
|
The "func_7" surface is identical to the standard "helix2" surface in all respects.
"helix2" is intended for use with helixes where the minor radius is greater than the major radius. I.e. for situations like twisty table legs. |
|
|
|
![]() |
"func_8", <0.3, 0.1, 1, 0, 0, 2>
Parameters (6):
|
| The "func_8" surface is identical the the standard "spiral" surface in all respects. | |
|
|
![]() |
"func_14", <1/5, 1/4, 1/6, 0.0001, 1/10>
threshold 0.005 Parameters (5):
|
|
The func_14 surface is remarkably similar to the standard "mesh1" surface.
"mesh1" gives a set of threads that weave up and down through each other in a rectangular pattern. Note: 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 3 and 5 control the shape of the thread relative to this threshold parameter. |
|
|
|
![]() |
"rounded_box", <0.2>
Parameters (1):
|
|
|
![]() |
"torus", <0.8, 0.2>
Parameters (2):
|
| Thus the isosurface function {"torus" <0.8,0.1>} is identical to the conventional torus {0.8,0.1}. | |
|
|
![]() |
"superellipsoid", <0.3, 0.5>
sign -1 Parameters (2):
|
|
The "superellipsoid" isosurface function creates a surface that's the same
as the conventional superellipsoid object, and the two parameters have the same effects.
However, it only seems to work if turned inside out, by using sign -1. |
|
|
|
![]() |
"func_0", <1/0.95, 1/0.3, 1/0.95>
threshold 1 Parameters (3):
|
|
func_0 generates spheres and ellipsoids.
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. |
|
|
|
![]() |
"func_1", <1.4, 1, 0.8, 1.2, 1>
threshold -0.3 Parameters (5):
|
|
func_1 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. |
|
|
|
![]() |
"func_2", <0.01, 35, 1.5, 1.2>
Parameters (4):
|
|
|
![]() |
"func_2b", <1, 1/0.2, 2, 1>
Parameters (4):
|
| Although the mathematics of func_2b are similar to that of func_2 (hence the name) the surface produced is more like func_1. The surface is similar to a CSG blob with two spherical components. | |
|
|
![]() |
"func_3", <0.05, 8, 8, 1>
Parameters (4):
|
| The func_3 surface is like the union of three crossed ellipsoids, one oriented along each axis. | |
|
|
![]() |
"func_4", <5, 1, 18, 1>
Parameters (4):
|
| The func_4 surface is like the intersection of three crossed ellipsoids, one oriented along each axis. | |
|
|
![]() |
"func_5", <0.04, 5.6, -4, 0.1, 1>
Parameters (5):
|
|
|
![]() |
"func_9", <0, 1, -1, 0, 0>
Parameters (5):
|
|
This function 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. |
|
|
|
![]() |
"func_10", <0.7, 15, 15, 2.2>
Parameters (4):
|
|
|
![]() |
"func_11", <0>
Parameters (1):
|
|
There's a comment in the source code that says "well known function in quantum
mechanics". It resembles the shape of the electron density cloud for one of the d orbitals.
This function doesn't use the passed parameter, but the MegaPOV syntax requires that at least one parameter be present. |
|
|
|
![]() |
"func_12", <2, 7, 1, 0.1, 1, 0.5, 1, 6, 2.0, 0>
Parameters (10):
|
|
This is the "func_12" surface. With some sets of parameters, it looks like a torus with
a helical winding around it. The winding optionally has grooves around the outside.
I'm not completely sure about how the parameters work for this surface. |
|
|
|
![]() |
"func_13", <1>
Parameters (1):
|
| The "func_13" surface is very much like a comma-shape. | |
|
|
![]() |
"func_16", <8, -1, -1/100, -0.02, 0.1, -0.25>
threshold 0.4 Parameters (6):
|
|
The func_16 surface consists of a number of tubes. Each tube follows a 2d curve which is
specified by a polynomial of degree 4 or less.
To put it another way: If we call the parameters A, B, C, D, E, F; then this function generates "A" tubes which all follow the equation " x = B + Cy + Dy2 + Ey3 + Fy4 " arranged around the Y axis. |
|
|
|
![]() |
"algbr_cyl1", <1, 1.5, 1, 0, 0>
Parameters (5): |
|
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 is now rotated around the Y axis instead of being extruded along the Z axis. |
|
|
|
![]() |
"algbr_cyl2", <0.3, 5, 1, 0, 0>
sign -1 Parameters (5): |
|
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 curve is now rotated around the Y axis instead of being extruded along the Z axis. |
|
|
|
![]() |
"algbr_cyl3", <1, 3, 1, 0, 0>
sign -1 Parameters (5): |
|
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 curve is now rotated around the Y axis instead of being extruded along the Z axis. |
|
|
|
![]() |
"algbr_cyl4", <0.4, 5, 1, 0, 0>
sign -1 Parameters (5): |
|
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 curve is now rotated around the Y axis instead of being extruded along the Z axis. |
|
|
|
![]() |
"bicorn", <0.01, 3>
sign -1 Parameters (2):
|
| The bicorn surface looks something like the top part of a a paraboloid bounded below by another paraboloid. | |
|
|
![]() |
"bifolia", <1, 3>
sign -1 Parameters (2):
|
| The surface is a surface of revolution. | |
|
|
![]() |
"boy_surface", <0.001, 0.01>
sign -1 Parameters (2):
|
|
The "Boy_surface" is a model of the projective plane without singularities.
Found by Werner Boy on assignment from David Hilbert.
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. |
|
|
|
![]() |
"ovals_of_cassini", <0.1, 0.4, 0.18, 6>
sign -1 Parameters (4):
|
|
The Ovals of Cassini are a generalization of the torus shape.
The surface is actually inside out, so it may need inverting - either by setting "sign -1" or setting the field strength negative. |
|
|
|
![]() |
"cubic_saddle", <0.5>
sign -1 Parameters (1): |
| 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. | |
|
|
![]() |
"cushion", <0.25>
sign -1 Parameters (1): |
|
One odd thing about the "odd" surface is that it's identical to the "cushion"
surface.
The rear face puckers forward to meet the dimple from the front face. |
|
|
|
![]() |
"devils_curve", <0.2>
sign -1 Parameters (1): |
|
|
![]() |
"devils_curve2d", <1, 0.25, 0.3, 1, 0, 0>
sign -1 Parameters (6):
|
|
The 2d devil's 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. If the X factor is slightly stronger than the Y factor, then the side pieces are linked to the central piece by a horizontal bridge at each corner. If the Y factor is slightly greater than the X factor, then there is a vertical gap between the side pieces and the central piece at each corner. If the X and Y factors are equal each of the four corners meets at a point. |
|
|
|
![]() |
"dupin_cyclid", <0.05, 0.27, 0.04, 0.55, 0.0, 1.0>
sign -1 Parameters (6):
|
|
The Dupin Cyclid can take several forms depending on the parameters.
A Dupin Cyclid can be considered to be the envelope of all the possible spheres that just kiss three other spheres. It can also be considered to be the envelope of all spheres on a conic section that just touch a given sphere. And it can also be considered to be the "inversion" of a torus. The parameters of the Dupin Cyclid consider it to be generated by the "inversion" of a torus. (Inversion here has some weird mathematical meaning, don't confuse it with the POV concept of "inverse"). |
|
|
|
![]() |
"folium_surface", <0.02, 15, 15>
sign -1 Parameters (3):
|
| A Folium Surface looks something like a paraboloid glued to a plane. | |
|
|
![]() |
"folium_surface2d", <0.01, 12, 20, 1, 0, 0>
sign -1 Parameters (6):
|
| The 2d folium curve can be rotated around the X axis to generate the same 3d surface as the folium_surface, or it can be extruded in the Z direction (by switching the SOR switch off), or it can be rotated around the Y axis. | |
|
|
![]() |
"torus_gumdrop", <0.01>
sign -1 Parameters (1): |
| The "Torus Gumdrop" surface is something like a torus with a couple of gumdrops hanging off the end. | |
|
|
![]() |
"hunt_surface", <0.01>
sign -1 Parameters (1): |
|
|
![]() |
"hyperbolic_torus", <0.005, 1, 0.6>
sign -1 Parameters (3):
|
|
|
![]() |
"kampyle_of_eudoxus", <0.001, 0.01, 2>
sign -1 Parameters (3):
|
| The "Kampyle of Eudoxus" is like two infinite planes with a dimple at the center. | |
|
|
![]() |
"kampyle_of_eudoxus2d", <0.001, 0, 2, 1, 0, 90>
sign -1 Parameters (6):
|
| 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. | |
|
|
![]() |
"klein_bottle", <0.0005>
sign -1 Parameters (1): |
| The klein bottle is the 3d equivalent of the Moebius Strip. It's a surface with only one side. | |
|
|
![]() |
"kummer_surface_v1", <0.01>
sign -1 Parameters (1): |
| The Kummer surface consists of a collection of radiating rods. | |
|
|
![]() |
"kummer_surface_v2", <0.0005, -0.3, -0.97, 0.0>
sign -1 Parameters (4):
|
| 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. | |
|
|
![]() |
"lemniscate_of_gerono", <0.1>
sign -1 Parameters (1): |
| The "Lemniscate_of_Gerono" surface is an hourglass shape. Two teardrops with their ends connected. | |
|
|
![]() |
"lemniscate_of_gerono2d", <0.1, 1, 1, 1, 2, -45>
sign -1 Parameters (6):
|
| 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. To produce the 3d Lemniscate, switch SOR on and set the SOR offset to zero and the SOR angle to 90. | |
|
|
![]() |
"paraboloid", <1>
sign -1 Parameters (1): |
| This paraboloid is the surface of revolution that you get if you rotate a parabola about the Y axis. | |
|
|
![]() |
"parabolic_torus", <0.1, 0.4, 0.5>
sign -1 Parameters (3):
|
|
|
![]() |
"piriform", <0.7>
Parameters (1): |
| The piriform surface looks rather like half a lemniscate. | |
|
|
![]() |
"piriform2d", <1, 1, -1, 0.9, 1, 0, -90>
sign -1 Parameters (7):
|
|
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.
This might be a useful shape for making hot air balloons - reduce the fatness parameter to make a weather balloon. |
|
|
|
![]() |
"quartic_paraboloid", <0.01>
sign -1 Parameters (1): |
| The Quartic paraboloid is similar to a paraboloid, but has a squarer shape. | |
|
|
![]() |
"quartic_saddle", <0.05>
Parameters (1): |
| The Quartic saddle is similar to a saddle, but has a squarer shape. | |
|
|
![]() |
"quartic_cylinder", <1, 0.8, 0.2>
sign -1 Parameters (3):
|
| The Quartic cylinder looks a bit like a cylinder that's swallowed an egg. | |
|
|
![]() |
"steiners_roman", <1>
sign -1 Parameters (1): |
|
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.
It is a model of the projective plane. |
|
|
|
![]() |
"strophoid", <0.2, 2, 0.5, 0.9>
sign -1 Parameters (4):
|
|
The Strophoid is like an infinite plane with a bulb sticking out of it.
When the Size and Sharpness parameters are equal, the surface is given the special name "right strophoid". When the Size parameter is 3 times the Sharpness, the surface is given the special name "trisectrix of Maclaurin". |
|
|
|
![]() |
"strophoid2d", <0.02, -8, 0.8, 0.3, 1, 0, 0>
Parameters (7):
|
| The 2d strophoid curve can be extruded in the Z direction or rotated about various axes by using the SOR parameters. | |
|
|
![]() |
"glob", <1>
sign -1 Parameters (1): |
|
This Glob function is rotated through z*90 so that it looks like a falling drip of thick liquid.
One part of this surface would actually go off to infinity if it were not restricted by the contained_by shape. It's possible to select just the teardrop part by choosing the contained_by shape appropriately. |
|
|
|
![]() |
"pillow", <1>
Parameters (1): |
| This "pillow" surface apparently featured on the back cover of the 1992 Siggraph proceedings. | |
|
|
![]() |
"crossed_trough", <0.05>
sign -1 Parameters (1): |
|
|
![]() |
"witch_of_agnesi", <0.09, 0.02>
sign -1 Parameters (2):
|
| The "Witch of Agnesi" surface looks something like a witches hat. | |
|
|
![]() |
"witch_of_agnesi2d", <0.2, 0.2, 0.08, 1, 0, 0>
sign -1 Parameters (6):
|
|
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.
To produce a surface that matches the 3d version, the height parameter needs to be the square of the size parameter. |
|
|
|
![]() |
"mitre", <0.5>
sign -1 Parameters (1): |
| The "Mitre" surface looks a bit like an ellipsoid which has been nipped at each end with a pair of sharp nosed pliers. | |
|
|
![]() |
"heart", <0.001>
sign -1 Parameters (1): |
| A surface for Valentine's Day. | |
|
|
![]() |
"torus2", <1, 0.4, 0.07>
sign -1 Parameters (3):
|
| This is different from the standard torus function which just has the major and minor radii as parameters. | |
|
|
![]() |
"nodal_cubic", <0.005>
sign -1 Parameters (1): |
| 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. | |
|
|
![]() |
"umbrella", <0.2>
sign -1 Parameters (1): |
|
|
![]() |
"enneper", <0.1>
sign -1 Parameters (1): |
|
|
![]() |
"heteromf", <1.1, 2.05, 15, 0.26, 0.01>
Parameters (3):
|
|
This is the Hetero Multifractal surface used on its own.
But this function is mainly intended for use as pigment function or for modifying other surfaces. |
|
|
|
![]() |
#declare Hex_X = function {"hex_x", <1>}
function {Hex_X(x,y,z) - threshold } Parameters (1):
|
|
This is 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.
Adding "sign -1" will inverse the function and create a honey-comb structure. This function is also useful as pigment function. |
|
|
|
![]() |
#declare Hex_Y = function {"hex_y", <1>}
function {Hex_Y(x,y,z) - 0.07 } Parameters (1):
|
|
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. Adding "sign -1" will inverse the function and create an object sliced by the lattice structure. This function is also useful as pigment function. |
|
Last update : 28 Jan. 2001