|
Plot3d Color Functions
|
|
Calling Sequence
|
|
plot3d(plot3dops, color=c)
|
|
|
Parameters
|
|
|
plot3dops
|
-
|
other plot3d options; see plot3d/options
|
|
color=c
|
-
|
color specification
|
|
|
|
|
|
Description
|
|
|
•
|
Three-dimensional plot objects can be colored in three ways: a single color, a procedure or an expression. For instructions on how to specify a single color using pre-defined names or specific RGB or hue values, see plot/color.
|
|
•
|
The color can also be specified by an expression or a list of three expressions in terms of the plot variables. In case of the single expression, the resulting values over the plotting domain are mapped to the HUE coloring scheme. In case of the list of three expressions, the resulting tuples over the plotting domain are mapped to RGB values. To map to HSV values, include the option colortype=HSV as the fourth element of the list.
|
|
•
|
Similarly, the color can be specified by a procedure or a list of three procedures optionally followed by colortype=HSV . The use of an expression or a procedure in the color specification should be consistent with the input that is provided for plotting. For example, if the first argument to plot3d is a procedure, then a procedure (taking two input parameters and returning a HUE value), rather than an expression, should be used with the color option.
|
|
•
|
In general, specifying the color using procedures or expressions works only with surfaces defined explicitly by a procedure or expression. For example, spacecurves generated by the plots[spacecurve] command and most surfaces generated by the plottools package commands can be colored only with a single color.
|
|
|
|
Examples
|
|
In the following example, the color is specified by a procedure.
|
>
|
|
|
| (1) |
|
>
|
plot3d(f, 0..20, 0..70, style=patch, color=proc(x,y) x*y end proc);
|
In this example, the color is specified by an expression.
|
>
|

|
|
| (2) |
|
>
|
|
|
>
|
![plot3d(50+100*w*v^2/(w^2+v^4), x = 1 .. 100, y = 1 .. 180, style = patch, orientation = [0, 11], color = [sin(x*y), cos(x*y), tan(x*y), colortype = HSV])](/support/help/helpview.aspx?si=5580/file04580/math120.png)
|
|
|
Download Help Document
Was this information helpful?