plot3d Color Functions - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Graphics : 3-D : Options : color : plot3d/colorfunc

plot3d Color Functions

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

plot3d(plot3dops, color=c)

Parameters

plot3dops

-

other plot3d options; see plot3d/options

color=c

-

color specification; procedure or expression, or a list of three procedures or expressions

Description

• 

Three-dimensional plot objects can be colored with the color option in three ways: using a color name, using specific RGB or hue values (via a color data structure), or using a color function (given as a procedure or expression). For instructions on how to specify a single color using pre-defined names or specific RGB or hue values, see plot/color. See also the plot/colorscheme help page for an alternative way to color a surface. This help page describes how to specify color of 3-D plots using color functions.

• 

You can specify the coloring using 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, you can specify the coloring using 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 cannot be colored in this way.  Instead, you can color those surfaces as described in plot/color.

Examples

In the following example, the surface and the color function are specified by procedures.

fx,y→4sinx2+siny4+3sinx2

f:=x,y→7sin12x+4sin14y

(1)

plot3d(f, 0..20, 0..70, color=proc(x,y) x*y end proc);

In this example, the the surface and the color function are specified by expressions.

plot3dsinx,x=0..8,y=0..8,style=surface,scaling=constrained,color=sinxy,cosxy,0.8,colortype=HSV

plot3dsinx,x=0..8,y=0..8,style=surface,scaling=constrained,color=x16,sinxy,cosxy

See Also

plot/color

plot/colornames

plot/colorscheme

plot3d

plot3d/options

plottools

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam