Hi,

I have been playing about with envelopes to produce shaded paths as described in the new LuaMetFun manual, see page 105 therein. Using the code below I wanted to produce a shaded path, in this case a curve and then rotating it in 5 degree steps from 0 to 355 degrees to produce a kind of spiral. Here is the code:

\startMPpage

pair A,B; path p, psubPath, asPathEnvelope; A = (0cm,0cm);B = (5cm,0cm); p = A{dir 60} .. B; fill fullsquare scaled 12cm withcolor 0.5[blue,white]; for i = 0 step 5 until 355: psubPath := (subpath((0.1 * length p), (1 * length p) ) of p)rotated i; asPathEnvelope := envelope pensquare scaled 0.5mm of psubPath; fill asPathEnvelope rotated i yscaled 1 withshademethod "linear" withshadecolors (0.5[blue,white],white) ; endfor; \stopMPpage

I had expected to get a series of curves where the outer point of the curve was white, shading down to 0.5[blue,white] at the inner point of the curve.

I was expecting the shading to remain that way, however, as the curve is rotated round, the shading effect slowly changes until it is reversed, and as it

continues to be rotated it returns to it original shading. Although I quite like that effect, it's a nice feature, I would like to be able to produce the shading

the way I wanted. A while back Hans explained to me why this happened and how I could remedy it, but unfortunately my aged memory has failed me and I

cant remember how to do it. So I thought the youthful brains of the ConTeXt group may be able to help out, and it might be of interest in any case. I

attach a pdf of the spiral effect.

Best Wishes

Keith McKay