1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
input metafun ;
cmykcolors:=true ;% enable cmyk-specials in MetaFun
input latexmp ;
% - mode is set to 'normal' since MetaFun doesn't work in rerun-mode;
% please rerun manually
% - the file has to be converted in PDF using MPtoPDF in order
% to interpret the MP-specials generated by MetaFun
setupLaTeXMP(packages="helvet",
preamble="\renewcommand{\familydefault}{\sfdefault}",
textextlabel=enable,multicolor=enable) ;
beginfig(1);
save p,c ; pair p ; color c ;
for i=1 upto 100:
p:= (uniformdeviate 8cm, uniformdeviate 5cm) ;
label.urt("\bfseries\transparent{0.2}{MetaFun}",p) ;
endfor;
for i=1 upto 20:
c:= (uniformdeviate 1, uniformdeviate 1, uniformdeviate 1) ;
p:= (-50pt+uniformdeviate 100pt, -50pt+uniformdeviate 100pt) ;
label("\bfseries\Huge\color[rgb]{" &
(decimal redpart c) & "," & (decimal greenpart c) & "," &
(decimal bluepart c) & "}" &
"\transparent{0.4}{MetaFun}",(5cm,2.5cm)+p) ;
endfor;
label.top("two different greens: one in \textcolor[cmyk]{1,0,1,0}{cmyk} " &
"and one in \textcolor[rgb]{0,1,0}{rgb}", (5cm,2.5cm)) ;
endfig;
end
|