Skip to Main Content Skip to Search
Product Documentation

plot::Waterman – Waterman polyhedra

plot::Waterman(r) creates the Waterman polyhedron of radius r.

→ Examples

Call:

plot::Waterman(r, <a = amin .. amax>, Options)

Parameters:

r

an arithmetical expression: the radius of the polyhedron (see below for details).
r is equivalent to the attribute Radius.

See Also:

plot, plot::Sphere

Plato's regular polyhedra

Details:

Attributes for plot::Waterman

AffectViewingBox = TRUE

influence of objects on the ViewingBox of a scene

Center = [0, 0, 0]

center of objects, rotation center

CenterX = 0

center of objects, rotation center, x-component

CenterY = 0

center of objects, rotation center, y-component

CenterZ = 0

center of objects, rotation center, z-component

Color = RGB::SafetyOrange

the main color

FillColor = RGB::SafetyOrange

color of areas and surfaces

FillColor2 = RGB::CornflowerBlue

second color of areas and surfaces for color blends

FillColorDirection = [0, 0, 1]

the direction of color transitions on surfaces

FillColorDirectionX = 0

x-component of the direction of color transitions on surfaces

FillColorDirectionY = 0

y-component of the direction of color transitions on surfaces

FillColorDirectionZ = 1

z-component of the direction of color transitions on surfaces

FillColorFunction

functional area/surface coloring

FillColorType = Flat

surface filling types

Filled = TRUE

filled or transparent areas and surfaces

Frames = 50

the number of frames in an animation

Legend

makes a legend entry

LegendEntry = FALSE

add this object to the legend?

LegendText

short explanatory text for legend

LineColor = RGB::Grey40.[0.4]

color of lines

LineColor2 = RGB::DeepPink

color of lines

LineColorDirection = [0, 1, 1]

the direction of color transitions on lines

LineColorDirectionX = 0

x-component of the direction of color transitions on lines

LineColorDirectionY = 1

y-component of the direction of color transitions on lines

LineColorDirectionZ = 1

z-component of the direction of color transitions on lines

LineColorFunction

functional line coloring

LineColorType = Flat

line coloring types

LineStyle = Solid

solid, dashed or dotted lines?

LinesVisible = TRUE

visibility of lines

LineWidth = 0.25

width of lines

Name

the name of a plot object (for browser and legend)

ParameterBegin

initial value of the animation parameter

ParameterEnd

end value of the animation parameter

ParameterName

name of the animation parameter

ParameterRange

range of the animation parameter

PointSize = 1.5

the size of points

PointStyle = FilledCircles

the presentation style of points

PointsVisible = FALSE

visibility of mesh points

Radius

radius of circles, spheres etc.

Shading = Smooth

smooth color blend of surfaces

TimeBegin = 0.0

start time of the animation

TimeEnd = 10.0

end time of the animation

TimeRange = 0.0 .. 10.0

the real time span of an animation

Title

object title

TitleAlignment = Center

horizontal alignment of titles w.r.t. their coordinates

TitleFont = ["sans-serif", 11]

font of object titles

TitlePosition

position of object titles

TitlePositionX

position of object titles, x component

TitlePositionY

position of object titles, y component

TitlePositionZ

position of object titles, z component

Visible = TRUE

visibility

VisibleAfter

object visible after this time value

VisibleAfterEnd = TRUE

object visible after its animation time ended?

VisibleBefore

object visible until this time value

VisibleBeforeBegin = TRUE

object visible before its animation time starts?

VisibleFromTo

object visible during this time range

Example 1

With increasing radius, Waterman polyhedra get ever closer to spheres:

plot(plot::Waterman(r, r=0..10,
                    PointsVisible, PointSize=1,
                    LineColor=RGB::Black,
                    Color=RGB::Red.[0.75]),
     plot::Sphere(r, [0,0,0], r=0..10,
                  Color=RGB::Yellow.[0.3]),
     CameraDirection=[2,10,1])

MuPAD graphicsimage

Example 2

Waterman polyhedra have a rather general definition and can be made from spheres centered anywhere:

plot(plot::Waterman(5, Center=[0,0,0]))

MuPAD graphics

plot(plot::Waterman(5, Center=[0,0,1]))

MuPAD graphics

To translate or scale a Waterman polyhedron, use plot::Translate3d and plot::Scale3d:

n := 3:
r := i -> 3/2+sqrt(i+1):
plot(plot::Translate3d([i mod n, i div n, 0],
               plot::Scale3d([1/(3*r(i)) $ 3],
                  plot::Waterman(r(i), Color=RGB::random())))
     $ i = 0..n^2-1, Axes=None)

MuPAD graphics

Example 3

As usual, many attributes can be animated, although by the nature of Waterman polyhedra, the resulting animation will not be smooth:

plot(plot::Waterman(5, Center=[a/PI, cos(a), 0],
                    a=0..2*PI),
     AnimationStyle=BackAndForth, CameraDirection=[0,0.1,1])

MuPAD graphicsimage

Example 4

The LineColorFunction and FillColorFunction attributes can be set to functions which get indices of the currently painted surfacepolygon and its current vertex as fourth and fifth argument, repectively. This allows to color the polygons individually:

colors := [RGB::random() $ i = 1..42]:
plot(plot::Waterman(5, FillColorFunction=((x,y,z,i) -> colors[i])))

MuPAD graphics

Another way of getting random colors which remain constant for each polygon is to use a procedure with option remember:

col :=
proc(n)
  option remember;
begin
  RGB::fromHSV([360*frandom(), 1, 1]);
end:
plot(plot::Waterman(7, FillColorFunction=((x,y,z,i) -> col(i))))

MuPAD graphics

Background:

plot::Waterman uses plot::hull (and therefore, the Geometry Centre's qhull code) to compute the convex hull of the coordinates. Most of the remaining code has been contributed by Mirek Majewski.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS