ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Cover page (Metafun)
@ 2015-08-14 16:53 Fabrice Couvreur
  0 siblings, 0 replies; only message in thread
From: Fabrice Couvreur @ 2015-08-14 16:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1469 bytes --]

Hi Hans,
To progress in the use of Metafun, I try to do the same cover page as
your document
'Metafun ". Without looking at the code (but using the definitions of your
colors), I managed to get the mosaic.
I would write the word "MATHÉMATIQUES" as you did with the word "CONTEXTEN".
Thank you,
Fabrice


\setuppagenumbering[location=]

\setupcolors
  [state=start]

\definecolor[maincolor][g=.6]
\definecolor[pagecolor][s=.6]
\definecolor[darkcolor][s=.2]
\definecolor[textcolor][r=.6]


\startMPinclusions
  color maincolor ; maincolor := \MPcolor{maincolor} ;
  color pagecolor ; pagecolor := \MPcolor{pagecolor} ;
  color darkcolor ; darkcolor := \MPcolor{darkcolor} ;
  color textcolor ; textcolor := \MPcolor{textcolor} ;
\stopMPinclusions

\startuseMPgraphic{CoverPage}
  path p ; p := OverlayBox xyscaled (1/2,1/7) ;
  fill OverlayBox withcolor pagecolor ;
  path q ; q := p enlarged -12pt randomized 12pt ;
  pair a ;
  for j=0 upto 6 :
     for i=0 upto 1 :
        a := (i*xpart urcorner p,j*ypart urcorner p) ;
        q := p enlarged -12pt randomized 12pt shifted a ;
        circular_shade
          (q, ceiling(uniformdeviate 4), maincolor, .5maincolor) ;
       draw q withpen pencircle scaled 8pt withcolor darkcolor ;
      endfor ;
    endfor ;
\stopuseMPgraphic

\defineoverlay[CoverPage][\useMPgraphic{CoverPage}]

\setupbackgrounds
  [rightpage]
  [background=CoverPage]

\starttext

\stoptext

[-- Attachment #1.2: Type: text/html, Size: 2836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-14 16:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-14 16:53 Cover page (Metafun) Fabrice Couvreur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).