d-bl / GroundForge

Bobbin Lace Diagrams : threads from pairs
https://d-bl.github.io/GroundForge/
GNU General Public License v3.0
12 stars 7 forks source link

cluttered footsides #69

Closed jo-pol closed 7 years ago

jo-pol commented 7 years ago

The screenshots below shows an example of a pattern with a cluttered footside. The first row shows the normal result of the animation, the second row the footside pulled apart, the bottom left shows the animation interrupted at its first step.

The clutter is caused by the long jumps along the footside pulled together by the animation.

naamloos

The interrupted animation shows the result of the current implementation, but even then it is hard to see exactly where the straight vertical cut was made through the pattern. More deugging is required to show it clearly. The second image of #68 shows step by step my idea to cut the long jumps and adjacent parallel shorter jumps and reconnect them pair wise.

I suppose the long jumps are caused by cutting through osculating intersections, explained in a thesis fragment @veronika mailed me. The bottom right shows an attempt to follow an osculating intersection by adding some arrows and color to a pattern sheet downloaded from the pattern. The red line alternately follows the left-right-left pair at each stitch. At first sight and for this example it looks like that approach could cause deeper dents in the footside. Choosing cttc as stitches would show the osculating intersection in the thread diagram, a screenshot follows may follow later along with a pattern link.

jo-pol commented 7 years ago

pattern naamloos

jo-pol commented 7 years ago

Viewing the above diagram live through the link the dents in the footside don't seem that different between both methods.

Trying to let drizzle down the implications of the new approach. Following an osculating intersection shouldn't be too hard. Finding a start position such that it fits inside a certain matrix needs some backtracking and also has the problem of a user choosing a too small patch fit any of the pairs in the diagram above.

Let's say I figured out the path of the blue pair to become the right footside pair. I should have to figure out where it kisses the green pair, so I would have to follow two pairs from the starting node. Then I can drop blue nodes not involved in kissing green and need to adjust the nodes that are kissing. To avoid parallel pairs, subsequent green nodes kissing blue need to be merged.

naamloos

jo-pol commented 7 years ago

More twists between stitches (tttcttc) also makes clearer what happens and makes it easier to find a spot to pull. Start pulling when a pop-up confirms you grabbed a twist. One red footside section spans four adjacent blue sections. A footside section should span two sections. Looking at the image above, a footside section may need to span natural holes in the pattern.

pattern

naamloos

jo-pol commented 7 years ago

The osculating pairs are quite revealing. Each repeat these pairs return to the column they started at, meaning each pair that went into the footside returned into the patch. It might leave and return more frequently. A repeat equals the matrix height for checkerboard pattern and twice the matrix height for a brick-wall pattern.

Below the first example revisits the example at the start of this issue, along with two other complex patterns. Complex meaning an inner purple pair in the right diagram spanning more than two matrix rows.

Note that #68 explains the diagrams on the right which are the result of the Fringe class produced by the FringeDemo class. The purple pairs are bent outward manually.

To compare the pair diagrams on the left with the diagrams on the right, use the browser to set a break point. The second time at the break point reveals the diagram after a single iteration, being less distorted than at the end of the simulation.

Patterns: 1 2 3

naamloos

Inner purple pairs in the right diagrams spanning more than two matrix rows are quite rare. So far haven't found examples with deeper nesting of the purple pairs. Don't know whether I didn't look hard enough for both properties, it is a limitation imposed by the matrix heights or some other reason.

jo-pol commented 7 years ago

Developing a Mathematical Model for Bobbin Lace (arxiv) did not yet mint 'osculating' but theorem 3.4 states about these paths: 'has the same number of arcs crossing the cut in one direction as in the opposite direction'. That is more or less what I meant at the start of the previous message. Page 13 almost at the bottom reads: 'If a lace path has two or more consecutive horizontal steps, it can only be combined with another lace path via a transverse intersection. As described earlier, all intersections in the solution must be non-transverse.' It limits the number of columns touched by an osculating pair.

At first sight the maximum nesting would be half the repeat height. But I examined all patterns known to me with repeat heights of eight and only find a nesting level of two. I'm curious what makes the value smaller. It might be related to the divergence property in an old discussion or the size of the holes.

jo-pol commented 7 years ago

Another (or additional) approach to reduce the clutter is making the links along the borders less strong.

The crucial code change for a proof of concept:

function strength(link){ return link.border ? 20 : 50 }
...
    .force("link", d3.forceLink(args.links).strength(strength).distance(12).iterations(30))

Perhaps the strength should decrease toward the corners and the links along the footsides should provide information for the strength and/or length.

naamloos

jo-pol commented 7 years ago

fixed with https://github.com/d-bl/GroundForge/commit/0720376bed472cb74d55616ed0b3b30dcd0d16bb