metahoguet
clone your own copy | download snapshot

Snapshots | iceberg

Inside this repository

parametric.mp
text/plain

Download raw (6.6 KB)

% eps output
prologues := 3;
outputtemplate := "%c.svg";
outputformat := "svg";

% repères verticaux
leftEdge := 0;
width := 257;

% repères horizontaux
baseLine := 0;
capHeight := 800;
barreduE := 400;
barreduA :=380;
overshoot := 805;
undershoot :=-5;

% Letter A
beginfig(65);
pickup pencircle scaled 50;
    x1 = leftEdge;
    x3 = width;
    x2 = .5[x1,x3];

    y1 = y3 = baseLine;
    y2 = capHeight;
    y4 = y5 = barreduA;

    z4 = whatever[z1,z2];
    z5 = whatever[z2,z3];

    draw z1 -- z2 -- z3;
    draw z4 -- z5;
endfig;


def numeros=
defaultscale:=3pt;
for i=1 upto 20:
 dotlabels.top([i]);
endfor;
enddef;

% Letter B
beginfig(66);
pickup pencircle scaled 50;
	x1 = x5 = x8 = leftEdge;
	x2 = x4 = x7 = width/4;
	x3 = width;
	x6 = (width/4)*3;
	

	y1 = y2= baseLine;
	y3 = .5[y1,y5];
	y6 = (capHeight/4)*3;
	y7 = y8 = capHeight;

	y4 = y5 = barreduE;

	% REVERSE !!! draw z1--z2{up}..z3..{left}z4--z5--cycle withcolor blue;
	draw z8--z1;
	draw z8---z7... z6 ... z4 ---z5;
	draw z5---z4...z3...z2---z1;
	% draw z5--z4{right}..z3..{left}z2--z1--cycle;
	% draw z8--z7..z6..z4--z5--cycle;
	numeros;
	
	
endfig;


% Letter C
beginfig(67);
    pickup pencircle scaled 50;
    
    x1 = width;
    x3 = leftEdge;
    x2 = x4 = x5 = .5[x3,x1];
    
    y4 = undershoot;
    y2 = overshoot;
    y3 = y1 = y5 = .5[y2,y4];
    path paf;
    paf := z1 ... z2 ... z3 ... z4 ... cycle;
    draw subpath(.5, 3.5) of paf;
endfig;


% Letter D
beginfig(68);
  %  x1 = x2 = leftEdge;
   % x3 = width;

%    y1 = baseLine;
   % y2 = capHeight;
   % y3 = .5[y1,y2];

%    draw z1 -- z2 .. z3 .. cycle;


pickup pencircle scaled 50;
	x1 = x8 = leftEdge;
	x2 = x7 = width/4;
	x4 = width;
	% x6 = (width/4)*3;
	

	y1 = y2= baseLine;
	y4 = .5[y1,y8];
	% y6 = (capHeight/4)*3;
	y7 = y8 = capHeight;

	y4 = barreduE;

	% REVERSE !!! draw z1--z2{up}..z3..{left}z4--z5--cycle withcolor blue;
	draw z8---z7..z4{down}..z2---z1;
	draw z8--z1;
	% draw z5--z4{right}..z3..{left}z2--z1--cycle;
	% draw z8--z7..z6..z4--z5--cycle;
	numeros;
	
endfig;

% Letter E
beginfig(69);
pickup pencircle scaled 50;
x1 = x2 = x6 = leftEdge;
x3 = x5 = width;
x4 = .5[x1,x3];

y1 = y3 = capHeight;
y2 = y5 = baseLine;
y4 = y6 = barreduE;

draw z3--z1--z2--z5;
draw z6--z4;
endfig;


% Letter F
beginfig(70);
pickup pencircle scaled 50;
x1 = x2 = x6 = leftEdge;
x3= width;
x4= .5[x1,x3];

y1 = y3 = capHeight;
y2 = baseLine;
y4 = y6 = barreduE;

draw z1--z2;
draw z1--z3;
draw z6--z4;
endfig;


% Letter G
beginfig(71);
    pickup pencircle scaled 50;
    
    x1 = width;
    x3 = leftEdge;
    x2 = x4 = x5 = .5[x3,x1];
    
    y4 = undershoot;
    y2 = overshoot;
    y3 = y1 = y5 = .5[y2,y4];
    path paf;
    paf := z1 ... z2 ... z3 ... z4 ... cycle;
    draw subpath(.5, 4) of paf;
    draw z1--z5;
endfig;


% Letter H
beginfig(72);
pickup pencircle scaled 50;
x1= x2 = x5 = leftEdge;
x3 = x4 = x6 = width;

y1 = capHeight;
y2 = y4 = baseLine;
y3 = capHeight;
y5 = y6 = barreduE;

draw z1--z2;
draw z3--z4;
draw z5--z6;
endfig;


% Letter I
beginfig(73);
pickup pencircle scaled 50;
x1 = x2 = width/2;

y1 = capHeight;
y2 = baseLine;

draw z1--z2;
endfig;


% Letter J
beginfig(74);
pickup pencircle scaled 50;
x1 = x2 = width;
x3 = width/2;
x4 = leftEdge;
x5 = .5[x3,x2];

y1 = capHeight;
y2 = .4capHeight;
y4 = .2capHeight;
y3 = baseLine;
y5 = .5[y3,y2];

draw z1--z2{down}..z3..z4;
endfig;


% Letter K
beginfig(75);
pickup pencircle scaled 50;
x1 = x2 = x3 = leftEdge;
x4  = x5 = width;
z6 = .3[z3,z4];

y1 = y4 = capHeight;
y2 = y5 = baseLine;
y3 = barreduA;

draw z1--z2;
draw z3--z4;
draw z6--z5;
endfig;


% Letter L
beginfig(76);
pickup pencircle scaled 50;
x1 = x2 = leftEdge;
x3= width/2;


y1 = capHeight;
y2 = y3 = baseLine;

draw z1--z2--z3;

endfig;


% Letter M
beginfig(77);
pickup pencircle scaled 50;
x1 = x2 = leftEdge;
x3= width/2;
x4 = x5 = width;
y1 = y5 = baseLine;
y2 = y4 = capHeight;
y3 = barreduA;

draw z1--z2--z3--z4--z5;




endfig;


% Letter N
beginfig(78);
pickup pencircle scaled 50;
x1 = x2 = leftEdge;

x4 = x5 = width;
y1 = y5 = baseLine;
y2 = y4 = capHeight;
draw z1--z2--z5--z4;

endfig;


% Letter O
beginfig(79);
pickup pencircle scaled 50;
    x2 = leftEdge;
    x4 = width;
    x1 = x3 = .5[x2,x4];

    y1 = baseLine;
    y3 = capHeight;
    y2 = y4 = .5[y1,y3];

    draw z1 .. z2 .. z3 .. z4 .. cycle;
endfig;


% Letter P
beginfig(80);
pickup pencircle scaled 50;
x1 = x2 = x5 = leftEdge;
x3  = width;
x4 = x7 = width/3;

y1 = y7 = capHeight;
y2  = baseLine;
y3 = .25[y1,y5];
y5 = y4 = barreduA;

draw z1--z2;
draw z1--z7..z3..z4--z5;
endfig;


% Letter Q
beginfig(81);
pickup pencircle scaled 50;
    x2 = leftEdge;
    x4 = width;
    x1 = x3 = .5[x2,x4];

    y1 = undershoot;
    y3 = overshoot;
    y2 = y4 = .5[y1,y3];

    x5 = x1;
    x6 = width;
    y5 = y2;
    y6 = undershoot;
    

    draw z1 ... z2 ... z3 ... z4 ... cycle;
    draw z5--z6;
endfig;


% Letter R
beginfig(82);
pickup pencircle scaled 50;
x1 = x2 = x5 = leftEdge;
x3 = x6 = width;
x4 = x7 = width/3;

y1 = y7 = capHeight;
y2 = y6 = baseLine;
y3 = .25[y1,y5];
y5 = y4 = barreduA;

draw z1--z2;
draw z1--z7..z3..z4--z5;
draw z4--z6;
endfig;


% Letter S
beginfig(83);
pickup pencircle scaled 50;
x1 = x4 = width;
x2 = x5 = width/2;
x3 = x6 = leftEdge;


y1 = y3 = overshoot*.75;
y2 = overshoot;
y4 = y6 = overshoot*.25;
y5 = undershoot;


draw z1..z2..z3..z4..z5..z6;
endfig;


% Letter T
beginfig(84);
pickup pencircle scaled 50;
x1= leftEdge;
x2= width;
x3 = x4 = width/2;

y1 = y2 = y3 = capHeight;
y4 = baseLine;

draw z1--z2;
draw z3--z4;
endfig;


% Letter U
beginfig(85);
pickup pencircle scaled 50;
y1 = y5 = capHeight;
y2 = y4 = barreduA;
x1 = x2 = leftEdge;
x5 = x4 = width;
y3 = baseLine;
x3 = .5[x2,x4];
 draw z1---z2...z3...z4---z5;

endfig;


% Letter V
beginfig(86);
pickup pencircle scaled 50;
y1 = y5 = capHeight;
x1  = x2 = leftEdge;
x5 = x4 = width;
y2 = y4 = barreduA;
y3 = baseLine;
x3 = .5[x2,x4];
draw z1--z3--z5;
endfig;


% Letter W
beginfig(87);
pickup pencircle scaled 50;
x1 = x2 = leftEdge;
x4 = x5 = width;
x3 = .5[x1,x5];
y1 = y5 = capHeight;
y3 = barreduA;
y2 = y4 = baseLine;
 draw z1--z2--z3--z4--z5;

endfig;


% Letter X
beginfig(88);
pickup pencircle scaled 50;
x1  = x5 = leftEdge;
x2 = x3 = width;

z4:= .47[z1,z2];
z6:= .53[z1,z2];

y1 = y3 = capHeight;
y2 = y5 = baseLine;

draw z1--z2;
draw z3--z6;
draw z4--z5;

endfig;


% Letter Y
beginfig(89);
pickup pencircle scaled 50;
x1 = x2 = width/2;
x3 = width;
x4 = leftEdge;

y1 = baseLine;
y2 = capHeight*.25;
y3 = y4 = capHeight;

draw z1--z2--z3;
draw z2--z4;

endfig;


% Letter Z
beginfig(90);
pickup pencircle scaled 50;
x1 = x3 = leftEdge;
x2 = x4 = width;


y1 = y2 = capHeight;
y3 = y4 = baseLine;

draw z1--z2--z3--z4;

endfig;

end;