Contour surfaces of a function from R^3 to R
This functionality does not run in MATLAB.
plot::Implicit3d(f
, x = x_{min} .. x_{max}
, y = y_{min} .. y_{max}
, z = z_{min} .. z_{max}
, <a = a_{min} .. a_{max}
>, options
)
plot::Implicit3d(f(x, y, z), x = x_{min}..x_{max} ,
y = y_{min}..y_{max} , z =
z_{min}..z_{max} )
plots
the surfaces where the smooth function f
is zero.
plot::Implicit3d(f, x = x_{min}..x_{max} ,
y = y_{min}..y_{max} , z =
z_{min}..z_{max} )
plots
the (twodimensional part of the) zeroes of f in
the given range, i.e., the set
.
plot::Implicit3d
assumes that f is regular
almost everywhere on this surface, which means that f must
be differentiable and at least two of its partial derivatives must
be nonzero.
plot::Implicit3d
evaluates the given function
on an equidistant, threedimensional mesh, the coarsity of which can
be set with the attributes XMesh
, YMesh
, and ZMesh
for each of the
three directions, or with the combining attribute Mesh
that sets all three
of these simultaneously.
After finding an initial triangulation of the surface from the
numerical data on the initial grid, plot::Implicit3d
optionally
performs adaptive subdivision of the triangles. To make a long story
short: If the initial calculation misses details altogether, adaptive
refinement will not find them either. On the other hand, if the initial
calculation shows spurious spikes, adaptive refinement will result
in a much more realistic image, at the expense of time; the higher
the value of AdaptiveMesh
, the more. Increasing AdaptiveMesh
by
one may in extreme cases increase calculation time by a factor of
eight or more!
The details of the algorithm are as follows: On top level, the
"effective adaptive level" is set to the value of the attribute AdaptiveMesh
.
If, for a given edge, the effective adaptive level is positive and
the edge is not very short already, compared with the size of the
complete image, and inserting a new point on the implicit surface
near the middle of this edge would cause the two new edges to have
an angle of less than 170 degrees, then the edge is split, the adjoining
triangles are split accordingly (taking into account all their edges)
and all the new edges caused by this operation are examined with an
effective adaptive level reduced by one.
To plot other contours than zeroes, use the option Contours
.
Attribute  Purpose  Default Value 

AdaptiveMesh  adaptive sampling  0 
AffectViewingBox  influence of objects on the ViewingBox of
a scene  TRUE 
Color  the main color  RGB::Red 
Contours  the contours of an implicit function  [0 ] 
Filled  filled or transparent areas and surfaces  TRUE 
FillColor  color of areas and surfaces  RGB::Red 
FillColor2  second color of areas and surfaces for color blends  RGB::CornflowerBlue 
FillColorType  surface filling types  Dichromatic 
FillColorFunction  functional area/surface coloring  
FillColorDirection  the direction of color transitions on surfaces  [0 , 0 , 1 ] 
FillColorDirectionX  xcomponent of the direction of color transitions on surfaces  0 
FillColorDirectionY  ycomponent of the direction of color transitions on surfaces  0 
FillColorDirectionZ  zcomponent of the direction of color transitions on surfaces  1 
Frames  the number of frames in an animation  50 
Function  function expression or procedure  
Legend  makes a legend entry  
LegendText  short explanatory text for legend  
LegendEntry  add this object to the legend?  TRUE 
LineColor  color of lines  RGB::Black.[0.15] 
LineWidth  width of lines  0.35 
LineColor2  color of lines  RGB::DeepPink 
LineStyle  solid, dashed or dotted lines?  Solid 
LineColorType  line coloring types  Flat 
LineColorFunction  functional line coloring  
LineColorDirection  the direction of color transitions on lines  [0 , 0 , 1 ] 
LineColorDirectionX  xcomponent of the direction of color transitions on lines  0 
LineColorDirectionY  ycomponent of the direction of color transitions on lines  0 
LineColorDirectionZ  zcomponent of the direction of color transitions on lines  1 
Mesh  number of sample points  [11 , 11 , 11 ] 
MeshVisible  visibility of irregular mesh lines in 3D  FALSE 
Name  the name of a plot object (for browser and legend)  
ParameterEnd  end value of the animation parameter  
ParameterName  name of the animation parameter  
ParameterBegin  initial value of the animation parameter  
ParameterRange  range of the animation parameter  
PointStyle  the presentation style of points  FilledCircles 
PointsVisible  visibility of mesh points  FALSE 
Shading  smooth color blend of surfaces  Smooth 
TimeEnd  end time of the animation  10.0 
TimeBegin  start time of the animation  0.0 
TimeRange  the real time span of an animation  0.0 .. 10.0 
Title  object title  
TitleFont  font of object titles  [" sansserif " , 11 ] 
TitlePosition  position of object titles  
TitleAlignment  horizontal alignment of titles w.r.t. their coordinates  Center 
TitlePositionX  position of object titles, x component  
TitlePositionY  position of object titles, y component  
TitlePositionZ  position of object titles, z component  
Visible  visibility  TRUE 
VisibleAfter  object visible after this time value  
VisibleBefore  object visible until this time value  
VisibleFromTo  object visible during this time range  
VisibleAfterEnd  object visible after its animation time ended?  TRUE 
VisibleBeforeBegin  object visible before its animation time starts?  TRUE 
XContours  contour lines at constant x values  [Automatic , 15 ] 
XMax  final value of parameter "x"  
XMesh  number of sample points for parameter "x"  11 
XMin  initial value of parameter "x"  
XName  name of parameter "x"  
XRange  range of parameter "x"  
YContours  contour lines at constant y values  [Automatic , 15 ] 
YMax  final value of parameter "y"  
YMesh  number of sample points for parameter "y"  11 
YMin  initial value of parameter "y"  
YName  name of parameter "y"  
YRange  range of parameter "y"  
ZContours  contour lines at constant z values  [Automatic , 15 ] 
ZMax  final value of parameter "z"  
ZMesh  number of sample points for parameter "z"  11 
ZMin  initial value of parameter "z"  
ZName  name of parameter "z"  
ZRange  range of parameter "z" 
The set of x, y, z where x^{2} + y^{2} + z^{2} = 1 form a sphere:
plot(plot::Implicit3d(x^2 + y^2 + z^2  1, x = 1.5..1.5, y = 1.5..1.5, z = 1.5..1.5), Scaling = Constrained)
The set of zeroes of a product is the union of the zeroes of the individual functions:
plot(plot::Implicit3d((x^2 + y^2 + z^2  1) * x, x = 1.5..1.5, y = 1.5..1.5, z = 1.5..1.5), Scaling = Constrained)
Note that this image is largely dominated by artifacts caused by the coarse evaluation mesh. Increasing this mesh improves the graphics, but increases computation time:
plot(plot::Implicit3d((x^2 + y^2 + z^2  1) * x, x = 1.5..1.5, y = 1.5..1.5, z = 1.5..1.5, Mesh = [21, 9, 9], AdaptiveMesh = 2), Scaling = Constrained)
With MeshVisible = TRUE
, the internal triangulation
becomes visible:
plot(plot::Implicit3d(z^2  sin(z  x^2*y^2) = 0, x = 1 .. 1, y = 1 .. 1, z = 0 .. 1, AdaptiveMesh = 2, MeshVisible = TRUE, LineColor = RGB::Black.[0.25])):
Using functions that are not continuously differentiable, it is possible to generate sharp edges in the images:
plot(plot::Implicit3d(min(x^2 + y^2 + z^2  2, z), x = 2..2, y = 2..2, z = 1.5..0.5), Axes = None, Scaling = Constrained)
Just like in the preceding example, these sharp corners are prime sources of artifacts, which may require a finer initial mesh and/or adaptive mesh refinement:
im := plot::Implicit3d(min(x^2 + y, y^2  z), x = 2..2, y = 2..2, z = 0..1): plot(im)
plot(im, AdaptiveMesh = 3)
Animating plot::Implicit3d
objects takes
a lot of time. It is easy and fast, though, to add an animated camera object:
plot(plot::Implicit3d(sin(x)+sin(y)+sin(z), x=5..5, y=5..5, z=5..5), plot::Camera([42*sin(t),42*cos(t),42*cos(tsin(t))], [0,0,0], PI/12, t=0..2*PI), AnimationStyle=Loop)

A realvalued expression or an equation in




Realvalued expressions, possibly in the animation parameter.
The image is plotted with


Animation parameter, specified as 