On 6/14/2015 11:26 PM, Mojca Miklavec wrote:

Your example uses just two colours, while TikZ uses five and I don't
know how to translate this "ball shading" to MP (I know or at least
knew how to do it in plain PostScript and could dig it up; I think it
uses function shading with predefined colours at predefined distances,
but it's all a single shading (a single function), not a composition
of multiple sections).

Ok, as I suppose you need it for you thesis ... a new beta ...

I didn't play with values for the circular one but here's a linear:

\startMPpage

    fill fullsquare scaled 50pt
        withshademethod "linear"
        withshadevector (0,1)
        withshadestep (
            withshadefraction .3
            withshadecolors (red,green)
        )
        withshadestep (
            withshadefraction .5
            withshadecolors (green,blue)
        )
        withshadestep (
            withshadefraction .7
            withshadecolors (blue,red)
        )
        withshadestep (
            withshadefraction 1
            withshadecolors (red,yellow)
        )
    ;

    fill fullsquare scaled 50pt shifted(60pt,0)
        withshademethod "linear"
        withshadevector (0,1)
        withshadecolors (red,green)
    ;

\stopMPpage

so the withshadestep is new

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to