Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color Code #49

Closed
jo-pol opened this issue Apr 3, 2016 · 14 comments
Closed

Color Code #49

jo-pol opened this issue Apr 3, 2016 · 14 comments

Comments

@jo-pol
Copy link
Collaborator

jo-pol commented Apr 3, 2016

The program quickly gives up applying the Belgian Color Code. Pins get in the way of recognizing a tc, ctc, or tctc. The pin position in the sequence of characters for a stitch is chosen to look good in the diagrams and may be counter-intuitive and breaking rules.

The program also happily mixes the closed (ct) method with the open method (tc) and marks both with the same color.

proposal

Figure out about more colors and add a checkbox or radio button to choose between the open (tc) and closed (ct) method.

@jo-pol jo-pol added bug scala-js This implies installing sbt and executing one of the toJS scripts. http://www.scala-js.org/ labels Apr 3, 2016
@jo-pol jo-pol added design and removed bug labels Oct 9, 2016
@jo-pol jo-pol self-assigned this Apr 24, 2017
@MAETempels
Copy link
Collaborator

MAETempels commented May 9, 2017

I noticed the following: url (Not sure if I add the link the correct way)

Matrix -5-5; 5-5- bricks.
I wish to enter a whole stitch, as I would make it in the lace: tctct. However, the result is a black stitch,
If I add the twists to the stitches before OR after, the stitch colors nicely red.
If I add the twists to the stitches before AND after, I get purple stitches, and black ones where I exept green.

For all of the following stitches: B,D: green expected, A,C: red expected
D1=c B1=c A2=tctct C2=tctct ==> B,D: black, A,C: black
D1=ct B1=ct A2=ctct C2=ctct ==> B,D: green, A,C: red
D1=tc B1=tc A2=tctc C2=tctc ==> B,D: green, A,C: red
D1=tct B1=tct A2=ctc C2=ctc ==> B,D: black, A,C: purple (!)

So, the twists that are already there are not taken into account in the desicion for the color.

@jo-pol
Copy link
Collaborator Author

jo-pol commented May 9, 2017

Thanks for your report. Fixed your link, you swapped the components. You can switch between write and preview to check.

@jo-pol
Copy link
Collaborator Author

jo-pol commented May 10, 2017

"as I would make it in the lace: tctct" The open method always end with a cross, the closed method always starts with a cross, this way you are mixing two methods.

The color coding algorithm doesn't "look" at the diagram for the colors, just at the stitch definitions. The current logic (after translating each t with lr, users could also enter 'rl', that would currently fail any logic.):

    if (stitch.endsWith("clrclrc") || stitch.contains("p")) ""
    else if (stitch.endsWith("lrclrc")) "red"
    else if (stitch.endsWith("clrc")) "purple"
    else if (stitch.endsWith("lrc")) "green"
    else if (stitch.startsWith("clrclrc")) ""
    else if (stitch.startsWith("clrclr")) "red"
    else if (stitch.startsWith("clrc")) "purple"
    else if (stitch.startsWith("clr")) "green"
    else ""

For the twist mark the algorithm actually counts the number of consecutive twists. If more than one, it renders a twist mark, whatever the color of preceding or next twist.

I'd like a broad discussion about the desired rules. We may have to choose for either the open or closed method and communicate that on the help page along with the rules that determine the colors. Of course in words that are more easily understood by non-programmers and non-mathematicians.

@MAETempels
Copy link
Collaborator

MAETempels commented May 10, 2017

"as I would make in the lace"
That is, as I switch from a cloth stitch to a halve stitch or whole stitch, I usualy do the twists when arriving at the whole or halve stitch. Example: I'm making a weaving pattern, and the first row consists of cloth-stitches and in the second row is one whole stitch in the middle of the row. 3rd row as first.

The coloring works fine when placing the twitst at the stiches above (closed) or below (open) the whole stitch. No need here to choose for either method.

Just the instruction: when changing from cloth to half or whole stitch: put the twists with the whole stitch (for the closed methode), or get black colors. I can live with that.
For the thead-diagram it doesn't matter.

Or,
else if (stitch.startsWith("lrclrclr)) "red"
else if (stitch.startsWith("lrclr")) "green"
:-) :-)

@jo-pol
Copy link
Collaborator Author

jo-pol commented May 10, 2017

From the four options you give, the following two make sense to me:

D1=ct B1=ct A2=ctct C2=ctct ==> B,D: green, A,C: red
D1=tc B1=tc A2=tctc C2=tctc ==> B,D: green, A,C: red

The first as closed method, the second as open. When learning the basics you get ct, ctc and ctct. Indeed an additional t for a ctct row after a ctc row, but just a c is very unorthodox. Possible in GroundForge, but I'd stick to the three basic stitches and only ad twists if required, not move twists to other stitches if that leaves you with a weird stitch.

@jo-pol jo-pol removed their assignment May 24, 2017
@jo-pol
Copy link
Collaborator Author

jo-pol commented Sep 7, 2017

See also https://www.mail-archive.com/[email protected]/msg51240.html
Brown for a turning stitch: cttc(tt)

@MAETempels
Copy link
Collaborator

To be complete:
Dieppe-stitch: ctpctt: orange
Plait: ctctctctct (lots): blue
Thick tread and tallies: yellow

In "Slag voor slag" cttpctt is called "gesloten speldslag". I learned that this one is coloured brown, including the twitst at the end. (Though I am good with brown for turning stitch.)
Can brown be distinguised enough from black on most screens?

@jo-pol
Copy link
Collaborator Author

jo-pol commented Sep 10, 2017

We can't apply the Belgian color code exactly. First of all we don't have gimps, picots nor tallies and pins are poorly supported. The official BCC would paint a plait just as ---, GroundfForge would paint it as >---< reduced to X, so that would be different.

So I'm thinking of the following rules:

  • just one c and both pairs twisted: green
  • more than two times c and always a t between: blue
  • ctc purple, unless both opening pairs or both closing pairs are twisted, then red
  • update cttc: turquoise
  • two c and at least one pair in between twisted more than once: brown
  • many unorthodox stitches would remain black, such as c with at most one pair twisted, clc or crc, plaits with an occasional twist dropped or repeated

@jo-pol jo-pol changed the title Belgian color code Color Code Sep 13, 2017
@jo-pol
Copy link
Collaborator Author

jo-pol commented Sep 13, 2017

Seeing you play with a lot of unorthodox stitches, you might want a stitch syntax like A1=B3=tct=red. The number of colors however will be fixed and have predefined values.

See also https://github.com/d-bl/GroundForge/wiki/Color-Code#tweak-colors

@MAETempels
Copy link
Collaborator

MAETempels commented Sep 13, 2017

The syntax would be nice, see issue #100. The color is a nice bonus.
tct=green :-)

@jo-pol
Copy link
Collaborator Author

jo-pol commented Sep 16, 2017

Still under construction: follow progress on #106

This was referenced Sep 17, 2017
@jo-pol jo-pol added User comments please and removed Thoughts please scala-js This implies installing sbt and executing one of the toJS scripts. http://www.scala-js.org/ labels Oct 27, 2018
@Cowboynoon
Copy link

Tallies come up yellow! Thank you! - And they don't render bad at all (example)

Other stitches with multiple "l" and "r" instructions might also be yellow since they effectively manipulate single threads in a stitch as tallies do. The two pair bias stitch for (example)

Pierre

@jo-pol
Copy link
Collaborator Author

jo-pol commented Nov 4, 2020

With #142 you will have a chance to make your own choices. But it needs a lot of water under the bridge.

@jo-pol
Copy link
Collaborator Author

jo-pol commented Nov 4, 2020

See #159

@jo-pol jo-pol closed this as completed Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants