Hi all,

I have this MWE. Now I want to draw only the subpath of S between gong6 and gong7 with a red line which is narrower at the two ends and thicker in the middle part. How to achieve this?

Thanks!
Emanuel

\setuppapersize[A4,landscape]

\starttext

\startMPcode
numeric u; u=1cm;
%equiangular spiral
numeric a, k ;
a = 2.3; %scaling factor
k = 8.61722335;
path S;
S = right for t=1 upto 360: .. a ** (t/50.2) * dir (-k*t) endfor;
draw S;

z1 = 8 dir -14;
path A; A = origin -- z1 scaled 0.7u ; draw A;
pair AEndPoint; AEndPoint = point 1 of A;
pair gong[], times; numeric n; n = 0;
for i = 1 upto length(A):
 for j = 1 upto length(S):
   times := subpath (i-1,i) of A intersectiontimes subpath (j-1,j) of S;
   if xpart times > -1:
     gong[incr n] = 1/2[point xpart times of subpath (i-1,i) of A,
                     point ypart times of subpath (j-1,j) of S];
  fi
 endfor
endfor

dotlabel.rt ("$gong6$", gong6);
dotlabel.rt ("$gong7$", gong7);

%Now I want to draw only the subpath of S between gong6 and gong7 with a red line which is narrower at the two ends and thicker in the middle part

\stopMPcode

\stoptext