Maxima – 255 – draw – 2

MFRO

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

Funzioni e variabili per draw

gr2d (argument_1, ...)
Function gr2d builds an object describing a 2D scene. Arguments are graphic options, graphic objects, or lists containing both graphic options and objects. This scene is interpreted sequentially: graphic options affect those graphic objects placed on its right. Some graphic options affect the global appearance of the scene.

This is the list of graphic objects available for scenes in two dimensions: bars, ellipse, explicit, image, implicit, label, parametric, points, polar, polygon, quadrilateral, rectangle, triangle, vector and geomap (this one defined in package worldmap). See also draw and draw2d.

(%i1) draw(
        gr2d(
        key="sin (x)",grid=[2,2],
        explicit(
          sin(x),
          x,0,2*%pi
          )
      ),
        gr2d(
          key="cos (x)",grid=[2,2],
          explicit(
            cos(x),
            x,0,2*%pi
            )
        )
      );
(%o1)                  [gr2d(explicit), gr2d(explicit)]

255-0

gr3d (argument_1, ...)
Function gr3d builds an object describing a 3d scene. Arguments are graphic options, graphic objects, or lists containing both graphic options and objects. This scene is interpreted sequentially: graphic options affect those graphic objects placed on its right. Some graphic options affect the global appearance of the scene.

This is the list of graphic objects available for scenes in three dimensions: cylindrical, elevation_grid, explicit, implicit, label, mesh, parametric, parametric_surface, points, quadrilateral, spherical, triangle, tube, vector, and geomap (this one defined in package worldmap). See also draw and draw3d.

draw (arg_1, ...)
Plots a series of scenes; its arguments are gr2d and/or gr3d objects, together with some options, or lists of scenes and options. By default, the scenes are put together in one column.

Besides scenes the function draw accepts the following global options: terminal, columns, dimensions, file_name and delay.

Functions draw2d and draw3d shortcuts that can be used when only one scene is required, in two or three dimensions, respectively.

See also gr2d and gr3d.

(%i2) scene1: gr2d(title="Ellipse", nticks=300,
                   parametric(2*cos(t), 5*sin(t), t, 0, 2*%pi))$

(%i3) scene2: gr2d(title="Triangle",
                   polygon([4, 5, 7], [6, 4, 2]))$

(%i4) draw(scene1, scene2, columns = 2)$

255-1

(%i5) scene1: gr2d(title="A sinus", grid=true,
                   explicit(sin(t), t, 0, 2*%pi))$

(%i6) scene2: gr2d(title="A cosinus", grid=true,
                   explicit(cos(t), t, 0, 2*%pi))$

(%i7) draw(scene1, scene2)$

255-2

The following two draw sentences are equivalent:

(%i8) draw(gr3d(explicit(x^2+y^2, x, -1, 1, y, -1, 1)));
(%o8)                          [gr3d(explicit)]
(%i9) draw3d(explicit(x^2+y^2, x, -1, 1, y, -1, 1));
(%o9)                          [gr3d(explicit)]

255-3

Creating an animated gif file (crea zzz.gif):

(%i10) draw(
        delay
        = 100,
        file_name = "zzz",
        terminal = 'animated_gif,
        gr2d(explicit(x^2,x,-1,1)),
        gr2d(explicit(x^3,x,-1,1)),
        gr2d(explicit(x^4,x,-1,1)));
3 frames in animation sequence
(%o10)         [gr2d(explicit), gr2d(explicit), gr2d(explicit)]

zzz-r

See also gr2d, gr3d, draw2d and draw3d.

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: