\startcomponent 5-loops-broad-graph

\project proj_fingerlooping
\environment env_instrsheets

\setupMPinstance
 [metafun]
 [textstyle=sans]


\startMPinclusions

patternsize:= 20mm;

def lhl(expr ca,cb,sx,sy) =
    picture lefthandloop;
    lefthandloop := image (
        path p, q, r ;
        p := fullcircle scaled 4mm ;
        q := p shifted (0mm,10mm) ;
        r := center p .. (5mm,5mm) .. center q ;
        r := r cutbefore (p intersectionpoint r) cutafter (q
intersectionpoint r) ;

        draw r withpen pencircle scaled 0.2mm withcolor black ; % the connecting curve
        fill p withcolor ca;
        draw p withpen pencircle scaled 0.2mm withcolor black ; % upper shank
        fill q withcolor cb;
        draw q withpen pencircle scaled 0.2mm withcolor black ; % lower shank
        );
    draw lefthandloop shifted (sx*patternsize,sy*patternsize);
enddef;

path s, t, u ;

s := fullcircle scaled 4mm shifted (4mm,0mm);
t := s shifted (0mm,10mm) ;
u := center s .. (0mm,8mm) .. center t ;

u := u cutbefore (s intersectionpoint u) cutafter (t intersectionpoint u) ;



def lbl(expr sx,sy) =
    picture leftblank;
    leftblank := image (
        draw r withpen pencircle scaled 0.2mm withcolor .6white ; % the connecting curve
        fill p withcolor .8white;
        draw p withpen pencircle scaled 0.2mm withcolor .6white ; % upper shank
        fill q withcolor .8white;
        draw q withpen pencircle scaled 0.2mm withcolor .6white ; % lower shank
        );
    draw leftblank shifted (sx*patternsize,sy*patternsize);
enddef;

def rhl(expr ca,cb,sx,sy) =
    picture righthandloop;
    	righthandloop := image (
		draw u withpen pencircle scaled 0.2mm withcolor black ;
		fill s withcolor ca ;
		draw s withpen pencircle scaled 0.2mm withcolor black ;
		fill t withcolor cb ;
		draw t withpen pencircle scaled 0.2mm withcolor black ;
		);
    draw righthandloop shifted (sx*patternsize,sy*patternsize);
enddef;


def rbl(expr sx,sy) =
    picture rightblank;
    rightblank := image (

	path s, t, u ;

	s := fullcircle scaled 4mm shifted (4mm,0mm);
	t := s shifted (0mm,10mm) ;
	u := center s .. (0mm,8mm) .. center t ;

   	u := u cutbefore (s intersectionpoint u) cutafter (t intersectionpoint u) ;


    	draw u withpen pencircle scaled 0.2mm withcolor .6white ; % the connecting curve
    	fill s withcolor .8white;
    	draw s withpen pencircle scaled 0.2mm withcolor .6white ; % upper shank
    	fill t withcolor .8white;
    	draw t withpen pencircle scaled 0.2mm withcolor .6white ; % lower shank
        );
    draw rightblank shifted (sx*patternsize,sy*patternsize);
enddef;


picture grid ;
grid :=
	image (
		width := 9cm ;
		height := 7cm ;
		unit := cm ;
		draw vlingrid (0, width/unit, 1/10, width, height) withcolor .6white ; 
		draw hlingrid (0, height/unit, 1/10, height, width) withcolor .6white ;
		draw vlingrid (0, width/unit, 1/2, width, height) withcolor .4blue ; 
		draw hlingrid (0, height/unit, 1/2, height, width) withcolor .4blue ;
		draw vlingrid (0, width/unit, 1, width, height) withcolor .6red ;
		draw hlingrid (0, height/unit, 1, height, width ) withcolor .6red ;
	) ;

% first pickup arrow
picture pfirst ;
pfirst :=
	image (
	drawarrow (1.8cm,6.5cm) .. (1.8cm,6.0cm) .. (2.4cm,5.5cm) .. (2.8cm,5cm) .. (1.8cm,4.2cm) .. (0.8cm,2.0cm) .. (0.3cm,2.0cm)
			withpen pencircle scaled .6mm withcolor blue;
	) ;


% second pickup arrow
picture psecond ;
	psecond :=
		image (
		drawarrow (0.6cm,6.5cm) .. (1.0cm,5.6cm) .. (0.6cm,4.7cm)
				withpen pencircle scaled .6mm withcolor blue;
		drawarrow (0.6cm,4.3cm) .. (1.0cm,3.4cm) .. (0.6cm,2.5cm)
						withpen pencircle scaled .6mm withcolor blue;
		) ;


% arrow to go before action and result
picture btwarrow ;
	btwarrow :=
		image(
		drawarrow (3.5cm,3.5cm) ... (5cm,3.5cm) withpen pencircle scaled .6mm withcolor black;
%		label.top (btex you get etex,(3.5cm,3.5cm)) ;
		) ;


\stopMPinclusions



%\setupframed[offset=.5cm]

\starttext



%%%%% ==== Buffers === %%%%%%%

% Loops: syntax for coloured 'color top, color bottom, loc x, loc y'; for blank only 'loc x, loc y'


%%% Basic setup for departed loops and reversed pickup %%%

\startbuffer[setup 5-loop basic]

%draw grid ; %grid for debugging arrows

		lhl	(yellow,red,0,3);
		lhl	(yellow,red,0,2);
		lhl	(yellow,red,0,1);
		lbl	(0,0);
		rbl	(1,3);
		rhl	(red,yellow,1,2);
		rhl	(red,yellow,1,1);
		rbl(1,0);
		

draw textext("La") shifted (-.8cm,6.5cm) ;
draw textext("Lb") shifted (-.8cm,4.5cm) ;
draw textext("Lc") shifted (-.8cm,2.5cm) ;
draw textext("Ld") shifted (-.8cm,0.5cm) ;

draw textext("Ra") shifted (3.2cm,6.5cm) ;
draw textext("Rb") shifted (3.2cm,4.5cm) ;
draw textext("Rc") shifted (3.2cm,2.5cm) ;
draw textext("Rd") shifted (3.2cm,0.5cm) ;

draw textext("left") shifted (0cm,-.8cm) ;
draw textext("right") shifted (2.5cm,-.8cm) ;
		
\stopbuffer





\startbuffer[1st step 5-loop broad]
% FIRST PICKUP (Ra picks up Lcl)


%draw grid ; %grid for debugging arrows

% pattern
		lhl	(yellow,red,0,3);
		lhl	(yellow,red,0,2);
		lhl	(yellow,red,0,1);
		lbl	(0,0);
		rbl	(1,3);
		rhl	(red,yellow,1,2);
		rhl	(red,yellow,1,1);
		rbl(1,0);


		draw textext("La") shifted (-.8cm,6.5cm) ;
		draw textext("Lb") shifted (-.8cm,4.5cm) ;
		draw textext("Lc") shifted (-.8cm,2.5cm) ;
		draw textext("Ld") shifted (-.8cm,0.5cm) ;

		draw textext("Ra") shifted (3.2cm,6.5cm) ;
		draw textext("Rb") shifted (3.2cm,4.5cm) ;
		draw textext("Rc") shifted (3.2cm,2.5cm) ;
		draw textext("Rd") shifted (3.2cm,0.5cm) ;


% pickup arrow
draw pfirst;

% AFTER first pickup

% Arrow to go between the figs
%drawarrow (3.5cm,3.5cm) ... (5cm,3.5cm) withpen pencircle scaled .6mm withcolor black;
draw btwarrow;

% pattern
		lhl	(yellow,red,3,3);
		lhl	(yellow,red,3,2);
		lbl	(3,1);
		lbl	(3,0);
		rhl	(red,yellow,4,3);
		rhl	(red,yellow,4,2);
		rhl	(red,yellow,4,1);
		rbl(4,0);
		
		
		
		currentpicture := currentpicture xsized 8cm ;
		

\stopbuffer

\startbuffer[2nd step 5-loop broad]

%draw grid ; %grid for debugging arrows


% pattern
		lhl	(yellow,red,0,3);
		lhl	(yellow,red,0,2);
		lbl	(0,1);
		lbl	(0,0);
		rhl	(red,yellow,1,3);
		rhl	(red,yellow,1,2);
		rhl	(red,yellow,1,1);
		rbl(1,0);
		
		
		
		draw textext("La") shifted (-.8cm,6.5cm) ;
		draw textext("Lb") shifted (-.8cm,4.5cm) ;
		draw textext("Lc") shifted (-.8cm,2.5cm) ;
		draw textext("Ld") shifted (-.8cm,0.5cm) ;

		draw textext("Ra") shifted (3.2cm,6.5cm) ;
		draw textext("Rb") shifted (3.2cm,4.5cm) ;
		draw textext("Rc") shifted (3.2cm,2.5cm) ;
		draw textext("Rd") shifted (3.2cm,0.5cm) ;



% arrows for shift down
draw psecond ;


draw btwarrow ; 

		% AFTER the shift, i.e. second movement

		% pattern
				lbl	(3,3);
				lhl	(yellow,red,3,2);
				lhl	(yellow,red,3,1);
				lbl	(3,0);
				rhl	(red,yellow,4,3);
				rhl	(red,yellow,4,2);
				rhl	(red,yellow,4,1);
				rbl(4,0);



				currentpicture := currentpicture xsized 8cm ;

\stopbuffer

\startbuffer[3rd step 5-loop broad]

%draw grid ; %grid for debugging arrows


% pattern
	lbl	(0,3);
	lhl	(yellow,red,0,2);
	lhl	(yellow,red,0,1);
	lbl	(0,0);
	rhl	(red,yellow,1,3);
	rhl	(red,yellow,1,2);
	rhl	(red,yellow,1,1);
	rbl(1,0);
		

	draw textext("La") shifted (-.8cm,6.5cm) ;
	draw textext("Lb") shifted (-.8cm,4.5cm) ;
	draw textext("Lc") shifted (-.8cm,2.5cm) ;
	draw textext("Ld") shifted (-.8cm,0.5cm) ;

	draw textext("Ra") shifted (3.2cm,6.5cm) ;
	draw textext("Rb") shifted (3.2cm,4.5cm) ;
	draw textext("Rc") shifted (3.2cm,2.5cm) ;
	draw textext("Rd") shifted (3.2cm,0.5cm) ;



% arrow for pickup
draw pfirst reflectedabout ((0,0cm),(0,7cm)) shifted (2.4cm,0cm);


draw btwarrow ; 

		% AFTER right-hand pickup

		% pattern
			lhl	(yellow,red,3,3);
			lhl	(yellow,red,3,2);
			lhl	(yellow,red,3,1);
			lbl	(3,0);
			rhl	(red,yellow,4,3);
			rhl	(red,yellow,4,2);
			rbl	(4,1);
			rbl(4,0);


			currentpicture := currentpicture xsized 8cm ;


\stopbuffer


\startbuffer[4th step 5-loop broad]

%draw grid ; %grid for debugging arrows


% pattern
lhl	(yellow,red,0,3);
lhl	(yellow,red,0,2);
lhl	(yellow,red,0,1);
lbl	(0,0);
rhl	(red,yellow,1,3);
rhl	(red,yellow,1,2);
rbl	(1,1);
rbl(1,0);
		

draw textext("La") shifted (-.8cm,6.5cm) ;
draw textext("Lb") shifted (-.8cm,4.5cm) ;
draw textext("Lc") shifted (-.8cm,2.5cm) ;
draw textext("Ld") shifted (-.8cm,0.5cm) ;

draw textext("Ra") shifted (3.2cm,6.5cm) ;
draw textext("Rb") shifted (3.2cm,4.5cm) ;
draw textext("Rc") shifted (3.2cm,2.5cm) ;
draw textext("Rd") shifted (3.2cm,0.5cm) ;




% arrow for pickup
draw psecond reflectedabout ((0,0cm),(0,7cm)) shifted (2.4cm,0cm);


draw btwarrow ; 

		% AFTER the shift (fourth movement)

		% pattern
			lhl	(yellow,red,3,3);
			lhl	(yellow,red,3,2);
			lhl	(yellow,red,3,1);
			lbl	(3,0);
			rbl	(4,3);
			rhl	(red,yellow,4,2);
			rhl	(red,yellow,4,1);
			rbl(4,0);



currentpicture := currentpicture xsized 8cm ;


\stopbuffer


% drawing the black rame around each graphic
\startbuffer[frame]
	draw (bbox currentpicture enlarged 4mm) withcolor black ;
\stopbuffer


%%%%% === End of Buffers === %%%%%%

\title[5-loop-broad-dep]{A Broad Lace of 5 Boes Departed}

First make a warp of 5 two-colour (departed, linked) loops. This pattern is traditionally done with monocolour loops, but it is easier to understand when the upper shank and lower shank of the loop are of different colours.



		Take three loops on the left hand, setting them on index, middle and ring finger. Make sure that you have the darker colour up on each finger.

		Then take the two remaining loops on the right hand and set them on middle and ring finger with the lighter colour up. Note that the index finger is unoccupied at this stage.

		\placefigure[here]
			[fig: 5 loop departed setup]
			{Starting position}
			{\processMPbuffer[setup 5-loop basic,frame]}



\strut %clear float, start from anew


\placefigure[left,high]
	[fig: 5lbd st1]
	{Through one and pickup reversed.}
	{\processMPbuffer[1st step 5-loop broad,frame]}

Put the unoccupied right index finger {\em Ra} from behind through the loop on the right middle finger {\em Rb} and hook from below the lower shank (=lighter thread) of the loop on left ring finger {\em Lc} and pull that loop through to right; the lighter colour ends up as the upper shank of the loop (={\em pickup reversed}). 

Tighten the braid by pulling your hands apart.


\strut


\placefigure[left,high]
	[fig: 5lbd st2]
	{Second step: shift down.}
	{\processMPbuffer[2nd step 5-loop broad, frame]}
	
Now left hand becomes the active hand. Shift the loops there down by one finger, from middle finger to ring finger and index finger to middle finger, leaving the index finger {\em La} unoccupied.

%Check that you still have darker colour up on the left-hand loops. 

\strut


\placefigure[left,high]
	[fig: 5lbd st3]
	{Third step: through one and pickup reversed.}
	{\processMPbuffer[3rd step 5-loop broad, frame]}
	
Put left index finger {\em La} through the loop on the left middle finger {\em Lb} and hook the lowermost shank on the right from below and pull it through to left ({\em pickup reversed}).

Tighten the braid by pulling your hands apart.

\strut			
			
\placefigure[left,high]
	[fig: 5lbd st4]
	{Fourth step: shift down.}
	{\processMPbuffer[4th step 5-loop broad, frame]}
	
Shift the loops on the right hand down by one finger to free up the right index finger {\em Ra}. Start from the beginning.
	
%\strut
\placefigure[margin,none]
	[]
	{}
	{\externalfigure[./photos/5-loops-broad-dep][height=\textheight]}



\stoptext
