%D
%D           file=logouvsq_mp,
%D        version=2006.07.20,
%D          title=UVSQ logo,
%D         author=Renaud Aubin,
%D      copyright=Public Domain
%C
%C Donated to the public domain.

\setupcolors[state=start]

\setupcolors[cmyk=yes,mpcmyk=no,conversion=no]  %% printer
%\setupcolors[cmyk=yes,mpcmyk=no,conversion=yes] %% printer
%\setupcolors[cmyk=yes,mpcmyk=yes,conversion=no] %% display
%\setupcolors[cmyk=yes,mpcmyk=yes,conversion=yes] %% display

% cmyk definitions
\definecolor[uvsqdarkgreen][c=.1,m=.0,y=.45,k=.4]
\definecolor[uvsqgreen][c=.76,m=.0,y=.91,k=.0]
\definecolor[uvsqblue][c=.87,m=.18,y=.0,k=.0]

\starttext

\startbuffer[uvsqlogo]
numeric u; u:= 1mm;

% width & height
numeric w; w:=85.8u;
numeric h; h:=51.2u;

% explicit ? ;)
path mainframe; mainframe:= (-.5w,-.5h)--(.5w,-.5h)--(.5w,.5h)--(-.5w,.5h)--cycle;

% blue line properties
numeric bluew; bluew:=.075h;

% green curve properties
numeric greenw; greenw:=.072h;

pair pts[];
pts[0] := (-.2625w,-.342h);
pts[1] := (-.305w,-.085h);
pts[2] := (-.13w,-.085h);
pts[3] := (-.025w,.2h);
pts[4] := (.01w,-.12h);
pts[5] := (.08w,-.11h);
pts[6] := (.123w,-.188h);
pts[7] := (.2625w,-.085h);
pts[8] := (.2625w,-.342h);

% sun properties
pair suncenter; suncenter := (-.184w,.125h);
pair raycenter; raycenter := (-.184w,.13h);
numeric sunradius; sunradius := 19.5u;
numeric sunw; sunw:=.7u;

% the blue bottom line
interim linecap:=squared;
drawoptions(withpen pencircle scaled bluew withcolor \MPcolor{uvsqblue});
draw (-.5w+.0375h,-.4625h)--(.5w-.0375h,-.4625h);

% sunrays
drawoptions(withpen pencircle scaled sunw withcolor \MPcolor{uvsqdarkgreen});
for i=-5 upto 12:
draw ((origin--(0,2h)) rotated (11.25i)) shifted raycenter;
endfor;
draw ((origin--(0,2h)) rotated (-65)) shifted raycenter;
draw ((origin--(0,2h)) rotated (-72)) shifted raycenter;
draw ((origin--(0,2h)) rotated (-80)) shifted raycenter;
draw ((origin--(0,2h)) rotated (-87)) shifted raycenter;
draw ((origin--(0,2h)) rotated (-95)) shifted raycenter;
draw ((origin--(0,2h)) rotated (-102)) shifted raycenter;

% white circle
drawoptions(withpen pencircle scaled 0u withcolor white);
fill fullcircle scaled sunradius shifted suncenter;

% sun
drawoptions(withpen pencircle scaled sunw withcolor \MPcolor{uvsqdarkgreen});
draw fullcircle scaled sunradius shifted suncenter;

% white circle
drawoptions(withpen pencircle scaled 0u withcolor white);
fill fullcircle scaled 30 shifted (-.05w,.03h);

% white curves ? ;)
interim linecap:=squared;
drawoptions(withpen pencircle scaled 2.5greenw withcolor white);
draw (-.5w+.036h,-.332h)--(xpart pts[0]-.036h, -.332h);
draw (.5w-.036h,-.332h)--(xpart pts[8]+.036h, -.332h);
interim linecap:=butt;
for i=0 upto 3:
draw pts[2i]..pts[2i+1]..pts[2i+2];
endfor;

% the green curve
interim linecap:=squared;
drawoptions(withpen pencircle scaled greenw withcolor \MPcolor{uvsqgreen});
draw (-.5w+.036h,-.342h)--(xpart pts[0]-.036h, ypart pts[0]);
draw (.5w-.036h,-.342h)--(xpart pts[8]+.036h, ypart pts[8]);
interim linecap:=rounded;
for i=0 upto 3:
draw pts[2i]..pts[2i+1]..pts[2i+2];
endfor;

setbounds currentpicture to mainframe;
clip currentpicture to mainframe;

\stopbuffer %% end of buffer[uvsqlogo]

\placefigure[here]{none}{\processMPbuffer[uvsqlogo]}

\stoptext
