Maxima – 261 – draw – 8

cll1

Continuo da qui, copio dal Reference Manual, PDF scaricabile da qui, sono a p.804.

enhanced3d
Default value: none.

If enhanced3d is none, surfaces are not colored in 3D plots. In order to get a colored surface, a list must be assigned to option enhanced3d, where the first element is an expression and the rest are the names of the variables or parameters used in that expression. A list such [f(x,y,z), x, y, z] means that point [x,y,z] of the surface is assigned number f(x,y,z), which will be colored according to the actual palette. For those 3D graphic objects defined in terms of parameters, it is possible to define the color number in terms of the parameters, as in [f(u), u], as in objects parametric and tube, or [f(u,v), u, v], as in object parametric_surface. While all 3D objects admit the model based on absolute coordinates, [f(x,y,z), x, y, z], only two of them, namely explicit and elevation_grid, accept also models defined on the [x,y] coordinates, [f(x,y), x, y]. 3D graphic object implicit accepts only the [f(x,y,z), x, y, z] model. Object points accepts also the [f(x,y,z), x, y, z] model, but when points have a chronological nature, model [f(k), k] is also valid, being k an ordering parameter.

When enhanced3d is assigned something different to none, options color and surface_hide are ignored.

The names of the variables defined in the lists may be different to those used in the definitions of the graphic objects.

In order to maintain back compatibility, enhanced3d = false is equivalent to enhanced3d = none, and enhanced3d = true is equivalent to enhanced3d = [z, x, y, z]. If an expression is given to enhanced3d, its variables must be the same used in the surface definition. This is not necessary when using lists.

See option palette to learn how palettes are specified.

explicit object with coloring defined by the [f(x,y,z), x, y, z] model.

(%i1) draw3d(
        enhanced3d = [x-z/10, x, y, z],
        palette = gray,
        explicit(20*exp(-x^2-y^2)-10, x, -3, 3, y, -3, 3))$

261-0

explicit object with coloring defined by the [f(x,y), x, y] model. The names of the variables defined in the lists may be different to those used in the definitions of the graphic objects; in this case, r corresponds to x, and s to y.

(%i2) draw3d(
        enhanced3d = [sin(r*s), r, s],
        explicit(20*exp(-x^2-y^2)-10, x, -3, 3, y, -3, 3))$

261-1

parametric object with coloring defined by the [f(x,y,z), x, y, z] model.

(%i3) draw3d(
        nticks = 100,
        line_width = 2,
        enhanced3d = [if y>= 0 then 1 else 0, x, y, z],
        parametric(sin(u)^2,cos(u), u, u, 0, 4*%pi))$

261-2

parametric object with coloring defined by the [f(u), u] model. In this case, (u-1)^2 is a shortcut for [(u-1)^2,u].

(%i4) draw3d(
        nticks = 60,
        line_width = 3,
        enhanced3d = (u-1)^2,
        parametric(cos(5*u)^2,sin(7*u), u-2, u, 0, 2))$

261-3

elevation_grid object with coloring defined by the [f(x,y), x, y] model.

(%i5) m: apply(matrix,
        makelist(makelist(cos(i^2/80-k/30), k, 1, 30), i, 1, 20))$

(%i6) draw3d(
        enhanced3d = [cos(x*y*10), x, y],
        elevation_grid(m, -1, -1, 2, 2),
        xlabel = "x",
        ylabel = "y");
(%o6)                       [gr3d(elevation_grid)]

261-4

Pausa; altri esempi prossimamente.

Posta un commento o usa questo indirizzo per il trackback.

Trackback

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo di WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione /  Modifica )

Google photo

Stai commentando usando il tuo account Google. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...

Questo sito utilizza Akismet per ridurre lo spam. Scopri come vengono elaborati i dati derivati dai commenti.

%d blogger hanno fatto clic su Mi Piace per questo: