%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Some MetaPost figures by Anthony Phan. % file: stephanie.mp (designed for Stephanie Cupit) % last modification: February 28, 2000. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Licence? Feel-free-to-send-me-a-postcard % % Anthony Phan, % % D\'epartement de Math\'ematiques, % SP2MI, T\'el\'eport 2, % Boulevard Marie et Pierre Curie, % BP 30179, % F-86962 Futuroscope-Chasseneuil cedex. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Usual nibs (and only ones) pickup pencircle scaled 0.1pt; thin.nib:=savepen; pickup pencircle scaled 0.25pt; light.nib:=savepen; pickup pencircle scaled 0.50pt; rule.nib:=savepen; pickup pencircle scaled 1.00pt; heavy.nib:=savepen; pickup pencircle scaled 1.00pt; huge.nib:=savepen; % Remarque. --- Si au cours d'une figure % nous reprenons plusieurs fois le m\^eme % pinceau, \c a n'est justifi\'e que par % un certain soucis de clart\'e. % various units numeric u; u=1cm; numeric dir_width, dir_shift; dir_width=0.7u; dir_shift=0.15u; % u is for the scale of each picture, % dir_width and dir_shift are related % to the labelled_arrow command below. % A few personnal commands picture temp_picture; vardef over_label.@#(expr texte,z)= temp_picture:=thelabel.@#(texte,z); unfill bbox temp_picture; draw temp_picture; enddef; vardef over_dotlabel.@#(expr texte,z)= temp_picture:=thelabel.@#(texte,z); unfill bbox temp_picture; draw temp_picture; dotlabel("",z); enddef; % The origin is the point of confluence of every hashed pattern. def horizontal_lines(expr mystep)= for i=y.min+(-y.min)mod mystep step mystep until y.max: draw (x.min,i)..(x.max,i); endfor enddef; def vertical_lines(expr mystep)= for i=x.min+(-x.min) mod mystep step mystep until x.max: draw (i,y.min)..(i,y.max); endfor enddef; % myslope is delta y/delta x % my step is the x-distance between two ilnes. % initial points are chosen so that lines pass % thru the origin (see modulus) vardef double_slanted_lines(expr mystep,myslope)= save i_plus, i_minus; i_minus=(-x.min-y.min/myslope) mod mystep+x.min; i_plus=(-x.min+y.max/myslope) mod mystep+x.min; for i=0 step mystep until (1+1/myslope)*max(x.max-x.min,y.max-y.min): % droites inclin\'es \ draw (min(i+i_minus,x.max), min(y.max,max(y.min,y.min+myslope*(i+i_minus-x.max)))) .. (min(x.max,max(x.min,i+i_minus-(y.max-y.min)/myslope)), min(y.min+myslope*(i+i_minus-x.min),y.max)); % droites inclin\'es / draw (min(i+i_plus,x.max), max(y.min,min(y.max,y.max-myslope*(i+i_plus-x.max)))) .. (min(x.max,max(x.min,i+i_plus-(y.max-y.min)/myslope)), max(y.min,y.max-myslope*(i+i_plus-x.min))); endfor enddef; % WEIL CHAMBER. Its two arguments are unordered vectors. % If the order is reversed, nothing special should happen % (fingers crossed). vardef Weil_chamber(expr alpha,beta)= temp_picture:=nullpicture; save a,b,p,t; path p; numeric t[]; p=(x.min,y.min)--(x.max,y.min) --(x.max,y.max)--(x.min,y.max)--cycle; t1=xpart(p intersectiontimes ((0,0)..(0,0)+(x.max-x.min+y.max-y.min)*(unitvector beta rotated if alpha dotprod (beta rotated -90)>0: - fi 90))); t2=xpart(p intersectiontimes ((0,0)..(0,0)+(x.max-x.min+y.max-y.min)*(unitvector alpha rotated if beta dotprod (alpha rotated -90)>0: - fi 90))); if ( (t12) ) or ( (t2