Grids in three dimensions
List of pictures
Figure 0001
figure 0001
Figure 0002
figure 0002
Figure 0003
figure 0003
Figure 0004
figure 0004
Figure 0005
figure 0005
Figure 0006
figure 0006
Figure 0001: fig0100.asy
Figure 0001
import grid3;

size(10cm,0);
currentprojection=orthographic(.5,1,.5);

defaultpen(overwrite(SuppressQuiet));
bbox3 b=limits((-2,-2,0),(0,2,2));
aspect(b,1,1,1);

grid3(
       pic=currentpicture,            // picture (default=currentpicture)

       b=b,                           // bbox3 : the box.

       gridroutine=XYZgrid(           // gridtype3droutine or gridtype3droutine [] (alias gridtype3droutines)
                           //                         or gridtype3droutines []:
                           //                         The routine(s) to draw the grid(s);
                           //                         the values can be as follows:
                           //                            * XYgrid : draw grid from X in direction of Y
                           //                            * YXgrid : draw grid from Y in direction of X
                           //                                etc...
                           //                            * An array of previous values XYgrid, YXgrid, ...
                           //                            * XYXgrid : draw XYgrid and YXgrid grids
                           //                            * YXYgrid : draw XYgrid and YXgrid grids
                           //                            * ZXZgrid : draw ZXgrid and XZgrid grids
                           //                            * YX_YZgrid : draw YXgrid and YZgrid grids 
                           //                            * XY_XZgrid : draw XYgrid and XZgrid grids 
                           //                            * YX_YZgrid : draw YXgrid and YZgrid grids 
                           //                            * An array of previous values XYXgrid, YZYgrid, ...
                           //                            * XYZgrid : draw XYXgrid, ZYZgrid and XZXgrid grids.
                           pos=Relative(0)), // position (default=Relative(0)) :
       //                          this is the position of the grid relatively to
       //                          the perpendicular axe of the grid.
       //                          If 'pos' is a the real, 'pos' is a coordinate relativly to this axe.
       //                          Alias 'top=Relative(1)', 'middle=Relative(.5)'
       //                          and 'bottom=Relative(0)' can be used as value.
       
       // Following arguments are similar as the function 'Ticks'.
       N=0,                // int (default=0)
       n=0,                // int (default=0)
       Step=0,             // real (default=0)
       step=0,             // real (default=0)
       begin=true,         // bool (default=true)
       end=true,           // bool (default=true)
       pGrid=grey,         // pen (default=grey)
       pgrid=lightgrey,    // pen (default=lightgrey)
       put=Above,          // bool (default=Above)
       
       P=currentprojection // Projection to use (default=currentprojection).
       );

xaxis(Label("$x$",position=EndPoint,align=S), b, RightTicks());
yaxis(Label("$y$",position=EndPoint,align=S), b, RightTicks());
zaxis(Label("$z$",position=EndPoint,align=(0,.5)+W), b, RightTicks());
Figure 0002: fig0200.asy
Figure 0002
import grid3;

size(10cm,0);
currentprojection=orthographic(.5,1,.5);

defaultpen(overwrite(SuppressQuiet));
bbox3 b=limits((-2,-2,0),(0,2,2));
aspect(b,1,1,1);

scale(Linear, Linear, Log(automax=false));
grid3(b,XZXgrid);
grid3(b,XYXgrid);
xaxis(Label("$x$",position=EndPoint,align=S), b, RightTicks());
yaxis(Label("$y$",position=EndPoint,align=S), b, RightTicks());
zaxis(Label("$z$",position=EndPoint,align=(0,.5)+W), b, RightTicks());
Figure 0003: fig0300.asy
Figure 0003
import grid3;

size(10cm,0);
currentprojection=orthographic(.5,1,.5);

defaultpen(overwrite(SuppressQuiet));
bbox3 b=limits((-2,-2,0),(0,2,2));
aspect(b,1,1,1);

grid3(b, new grid3routines [] {XYXgrid(Relative(1)), XZXgrid(0)});
xaxis(Label("$x$",position=EndPoint,align=S), b, RightTicks());
yaxis(Label("$y$",position=EndPoint,align=S), b, RightTicks());
zaxis(Label("$z$",position=EndPoint,align=(0,.5)+W), b, RightTicks());
Figure 0004: fig0400.asy
Figure 0004
import grid3;

size(10cm,0);
currentprojection=orthographic(.5,1,.5);

defaultpen(overwrite(SuppressQuiet));
bbox3 b=limits((-2,-2,0),(0,2,2));
aspect(b,1,1,1);

grid3(b, new grid3routines [] {XYXgrid(-.5), XYXgrid(1.5)},
       pGrid=new pen[] {red, blue},
       pgrid=new pen[] {.5red, .5blue});
xaxis(Label("$x$",position=EndPoint,align=S), b, RightTicks());
yaxis(Label("$y$",position=EndPoint,align=S), b, RightTicks());
zaxis(Label("$z$",position=EndPoint,align=(0,.5)+W), b, RightTicks());
Figure 0005: fig0500.asy
Figure 0005
import grid3;

size(10cm,0);
currentprojection=orthographic(.5,1,.5);

defaultpen(overwrite(SuppressQuiet));
bbox3 b=limits((-2,-2,0),(0,2,2));
aspect(b,1,1,1);

real Step=.5, step=.2;
xaxis(Label("$x$",position=EndPoint,align=S), b,
      Ticks(Label(align=unit(project(-Y))),
            Step=Step, step=step,
            gridroutine=XYgrid,
            pGrid=red, pgrid=.5red));

yaxis(Label("$y$",position=EndPoint,align=S), b,
      Ticks(Label(align=unit(project(X))), Step=Step, step=step,
            gridroutine=YXgrid,
            pGrid=red, pgrid=.5red));

zaxis("$z$", b, RightTicks());
Figure 0006: fig0600.asy
Figure 0006
import grid3;

size(10cm,0);
currentprojection=orthographic(.5,1,.5);

defaultpen(overwrite(SuppressQuiet));
bbox3 b=limits((-2,-2,0),(0,2,2));
aspect(b,1,1,1);

xaxis(Label("$x$",position=EndPoint,align=S), b,
      RightTicks(Step=.5, gridroutine=XYgrid));
yaxis(Label("$y$",position=EndPoint,align=S), b,
      Ticks(Label("",align=.5project(X)),N=8,n=2, gridroutine=YX_YZgrid));
zaxis("$z$", b, RightTicks(ZYgrid));

Dernière modification/Last modified: mercredi 18 juillet 2007, 00:35:29 (UTC+0200)
Philippe Ivaldi

Valide XHTML