Maxima – 271 – draw – 18

mbru

Marco Bruno

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

transform
Default value: none.

If transform is none, the space is not transformed and graphic objects are drawn as defined. When a space transformation is desired, a list must be assigned to option transform. In case of a 2D scene, the list takes the form [f1(x,y), f2(x,y), x, y]. In case of a 3D scene, the list is of the form [f1(x,y,z), f2(x,y,z), f3(x,y,z), x, y, z].

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

(%i1) th : %pi / 4$

(%i2) draw2d(
        color = "#e245f0",
        proportional_axes = 'xy,
        line_width = 8,
        triangle([3,2],[7,2],[5,5]),
        border = false,
        fill_color = yellow,
        transform = [cos(th)*x - sin(th)*y,
            sin(th)*x + cos(th)*y, x, y],
        triangle([3,2],[7,2],[5,5]) )$

271-0

Translation in 3D.

(%i3) draw3d(
        color = "#a02c00",
        explicit(20*exp(-x^2-y^2)-10,x,-3,3,y,-3,3),
        transform = [x+10,y+10,z+10,x,y,z],
        color = blue,
        explicit(20*exp(-x^2-y^2)-10,x,-3,3,y,-3,3) )$

271-1

transparent
Default value: false.

If transparent is false, interior regions of polygons are filled according to fill_color.

This option affects the following graphic objects in gr2d: polygon, rectangle and ellipse.

(%i4) draw2d(polygon([[3,2],[7,2],[5,5]]),
        transparent = true,
        color = blue,
        polygon([[5,2],[9,2],[7,5]]) )$

271-2.png

unit_vectors
Default value: false.

If unit_vectors is true, vectors are plotted with module 1. This is useful for plotting vector fields. If unit_vectors is false, vectors are plotted with its original length. This option is relevant only for vector objects.

(%i5) draw2d(xrange = [-1,6],
        yrange = [-1,6],
        head_length = 0.1,
        vector([0,0],[5,2]),
        unit_vectors = true,
        color = red,
        vector([0,3],[5,2]))$

271-3

user_preamble
Default value: "" (empty string).

Expert Gnuplot users can make use of this option to fine tune Gnuplot’s behaviour by writing settings to be sent before the plot or splot command.

The value of this option must be a string or a list of strings (one per line).

Since this is a global graphics option, its position in the scene description does not
matter.

Tell Gnuplot to draw axes and grid on top of graphics objects:

(%i6) draw2d(
        xaxis = true, xaxis_type=solid,
        yaxis = true, yaxis_type=solid,
        user_preamble = "set grid front",
        region(x^2+y^2<1 ,x,-1.5,1.5,y,-1.5,1.5))$

271-4

Tell gnuplot to draw all contour lines in black:

(%i7) draw3d(
        contour=both,
        surface_hide=true,enhanced3d=true,wired_surface=true,
        contour_levels=10,
        user_preamble="set for [i=1:8] linetype i dashtype i linecolor 0",
        explicit(sin(x)*cos(y),x,1,10,y,1,10));
(%o7)                          [gr3d(explicit)]

271-5

Posta un commento o usa questo indirizzo per il trackback.

Rispondi

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

Logo 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: