Bonsoir,
On Sat, 24 Feb 2007 19:17:49 +0100
Guillaume CONNAN <gconnan@free.fr> wrote:
>
>
> Bonjour,
> comme je ne l'ai pas vue dans "papier2.mp" de Christophe (et que j'en
> ai besoin pour cette heureuse semaine de rentrée), j'ai rajouté
> une petite macro pour faire du papier semi-log
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> %%%
>
> %%% pour un log d'aspect naturel
> vardef ln(expr x) =
> mlog(x)/256
> enddef;
>
>
>
> vardef papiersemilog=
> save $;
> picture $;
> orig:=false;
> x.u:=1cm;
> y.u:=1cm;
> quad.u:=1cm;
> $=image(
> path p[];
> %horizontale
> p1:=(0,0)--(x.ne*cm,0);
> %verticale
> p2:=(0,y.so*cm)--(0,y.ne*cm);
> %grille semilog
> pickup pencircle scaled 0.2;
>
> %% c'est ici que j'ai rajouté un truc
>
> %horizontales logarithmiques
> for j:=y.so step 0.1 until y.ne:
> draw p1 shifted (0,j*cm);
> endfor;
> %verticales
> for k:=0 step 1 until 10 :
> for j:=1 step 1 until 10 :
> draw p2 shifted ((k*ln(10)+ln(j))*cm,0);
> endfor;
> endfor;
>
> %%% c'est tout
>
>
>
> %grille demi-centimétrique
> pickup pencircle scaled 0.5;
> %horizontales
> for j:=y.so step 0.5 until y.ne:
> draw p1 shifted (0,j*cm);
> endfor;
>
> %grille centimétrique
> pickup pencircle scaled 0.7;
> %horizontales
> for j:=y.so step 1 until y.ne:
> draw p1 shifted (0,j*cm);
> endfor;
>
> %% Pour avoir des traits plus gros tous les ln(10^j)
> %verticales
> for j:= step 1 until x.ne :
> draw p2 shifted (j*ln(10)*cm,0);
> endfor;
>
>
> );
> $
> enddef;
>
Merci beaucoup, je vais voir à l'inclure...sur la pile :)
J'ai beaucoup de choses en attente :)
> --
> Guillaume Connan
>
Christophe.
_______________________________________________
Liste de diffusion Syracuse
Syracuse@melusine.eu.org
http://melusine.eu.org/cgi-bin/mailman/listinfo/syracuse
Adresse alternative du site :
http://syracuse.eu.org/syracuse/
Received on Sun Feb 25 18:46:15 2007
Cette archive a été créée par hypermail 2.1.8 : dim fév 25 2007 - 19:37:02 CET