-
Notifications
You must be signed in to change notification settings - Fork 7
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
Stitch fields #106
Stitch fields #106
Conversation
Please first read the intro of the pull request and review the color-code page. Would you mind to propose more examples (alias tests)? For that purpose you can edit the file StitchesSpec following the pull request procedure starting at step 2. You might also want to propose different rules for the default colors. Once it all works, it would be good to have one or two diagrams for the wiki page that demonstrate all colors and some twist marks. |
0c897a9
to
203960f
Compare
A sneak preview of a new formWhenever I push another commit to this issue you can download the latest version and try The form is born out of the need for tiling variations with another shift value than a half brick. At last the pennies dropped extending the current stitches form with more functionality. The new form is not yet fully functional but Marian, you might like to play with it and prefer it over the diagram link on the main page. A seasoned JavaScript developer might be able to update the prototype while you type in the definition field. For now you have to use the tab-key to leave the field or click somewhere else on the page to update the prototype. Once implemented, the go button will use #100 for the new tiling capabilities. For that purpose you can make the stitches field on the main page span multiple lines. Not sure the form will some day get integrated in the main page. Anyway I would appreciate feedback and advice from both of you. For example I'm in doubt about the 'prototype' caption. Veronika, when you read the help intro you might understand why Marian minted these diagrams 'draft pricking', so any suggestion? |
Thinking loud: To implement the go button I need to create a checker-matrix and thus need the lcm of shift value and corresponding matrix dimension. Matrix dimensions span 1-8, shift spans 0-7. A simple solution would be a table with 8x8 cells with the lcm values. Hm, the shift should get a sign, to reduce the size of the checker matrix.
|
- new tiling won't work at all - ID's are wrong, do they need a shift?
|
--B-C---, -E-5-O-K, 5-----5-, -------5 bricks: G3 seems to be in the upper-left corner. Also seems to shift 2 both rows & collumns.
abcabc --- abcghi |
-After some sleep: a new mainpage will give lots issues with existing examples.
|
I suppose you meant shift 2 columns for Generalized: a brick pattern |
Indeed I see a problem for unequal dimensions. In the following example with a horizontal tile of 2 rows by 3 columns, the smallest vertical tile I can find is 6 rows by 2 columns. A fun thing, though I don't see see a use case, are overlapping tiles. The table above for checker sizes also makes no sense. Here we have a checker matrix of 6 rows by 6 columns.
Layout hint: just copy-paste from a spreadsheet like Excel, the first line is interpreted as a header row, it can be empty. |
I was not quite awake when I gave the example for vertical - horizontal bricks. Given: a pattern with horizontal blocks. let r = number of blocks needed vertically to generate the pattern. The corresponding Vertical block has For the corresponding Checkers matrix the following holds: |
|
I have made a doc about the horizontal and vertical bricks, with neater pictures. With a small comment on the "fractions" mentioned. |
One more word. Suppose we have a horizontal brick with width w=9, and a shift of m=3, height h. As discussed before: A much smaller value! |
Closing the pull request as is has broken links and left the original subject |
* compiled the code for #106 * new convenience form * dressing up the new form * more functionality for the new form * fill the full prototype of the form * prototype diagram of new form completed * event handling and trimming * pattern variants in figure captions * preliminary implementation of go button - new tiling won't work at all - ID's are wrong, do they need a shift? * fixed ID's of new form with a shift * no tranlation for svg groups * one Paris variant was a typo, no need to shift tiles in two directions * restored shifting tiles in two directions * preparing for an overlapping slanted shift * images no longer linked, hide go-button, script cleanup, more examples - go button not shown when pattern not implemented - all links for get started images by numbers in their captions - split the algorithm into smaller pieces - added some examples with bricks shifted vertically and with another value than a half brick * first diagonal of overlapping tiles * completed overlapping tiles * checkers and bricks expressed with overlapping tiles TODO: recognize these to activate go-button * minor changes * convenience links to initialize checker/brick tiling * natural repeats indicated with N-links * re-enabled go button (as far as implemented by main page) * showed stitches section again, was in the way of debugging the go button * select stitches with pop-up * shorter 'go'-links * eliminated field-set with stitches * separated digits from letters, illustrating checker/bricks * did not save the svg source of the changed images * fixed typo's and omission reported by Monique D. * colored circles for chosen stitches * black if stitch defined but has no color * set default stitches * stitches in a field-set between the others * no color for dashes * fixed pattern match for turning stitch variant * adopted color values of the dynamic D3js diagrams * maintain color table in a single location * fix the build, the new form is not yet included * new patterns by just a different tiling * replaced go button with in-situ thread diagram * fixed last minute change, minimized code to cal D3js * reapplied shift to fix stitch ids * work in progress for custom footsides and moving JS code to scala * newProto no longer hurts the other demo links * config created once, selected stitch not yet applied in repeats * config does the tiling * config applies stitches in prototype, new tiling together with head/foot * resizable prototype view * fixed unit tests * completed previous commit, fixed natural version of small snow pattern * optional foot/head-side, choosing stitches shows thread diagram Signed-off-by: Joke Pol <[email protected]> * clean up Signed-off-by: jo pol <[email protected]> * clean up, fixed test, completed footside Signed-off-by: jo pol <[email protected]> * bolder arrows Signed-off-by: jo pol <[email protected]> * renames and re-activated color codes Signed-off-by: jo pol <[email protected]> * smaller arrow heads Signed-off-by: jo pol <[email protected]> * head/foot-sides another stitch color, dashes get white circles Signed-off-by: jo pol <[email protected]> * white circles changed to almost transparent Signed-off-by: jo pol <[email protected]> * smaller initial grid Signed-off-by: Joke Pol <[email protected]> * fall back to pair diagram if thread diagram fails Signed-off-by: Joke Pol <[email protected]> * thread diagrams apply cosen stitches in all repeats Signed-off-by: Joke Pol <[email protected]> * rezisable/scrollable thread diagram, rearranged forms Signed-off-by: jo pol <[email protected]> * fixed foot-side Signed-off-by: jo pol <[email protected]> * fix defaults for head/foot-sides Signed-off-by: jo pol <[email protected]> * nudge tile in diagonal directions Signed-off-by: jo pol <[email protected]> * corresponding colors in the form Signed-off-by: jo pol <[email protected]> * source of the images was not saved Signed-off-by: jo pol <[email protected]> * fixed tests, added link-button Signed-off-by: jo pol <[email protected]> * additional hints, demo's below the forms Signed-off-by: jo pol <[email protected]> * added pair diagram, marked patterns, moved page - comparing the pair diagram with the prototype to analyse bugs - demo's might move to a help page, for now it helps manual tests Signed-off-by: jo pol <[email protected]> * styling and two more foot sides Signed-off-by: jo pol <[email protected]> * renamed / split SVG classes and objects Signed-off-by: Joke Pol <[email protected]> * toggle thread colors, download, animation of pair diagram, hack-fix Signed-off-by: jo pol <[email protected]> * reset thread color with alt Signed-off-by: jo pol <[email protected]> * made more use of d3.select Signed-off-by: jo pol <[email protected]> * clear diagrams when prototype is set Signed-off-by: jo pol <[email protected]> * also reset scroll bars of pair diagram when clearing it Signed-off-by: jo pol <[email protected]> * reorganized and renamed functions Signed-off-by: jo pol <[email protected]> * visual check of the matrix Signed-off-by: jo pol <[email protected]> * introduced site-map, not yet linked anywhere Signed-off-by: jo pol <[email protected]> * fixed two foot sides Signed-off-by: jo pol <[email protected]> * miniatures on the sitemap Signed-off-by: jo pol <[email protected]> * consistent margins/links and applied a color scheme Signed-off-by: jo pol <[email protected]> * Error marks built into the prototype. Signed-off-by: jo pol <[email protected]> * fixed thread diagrams Signed-off-by: jo pol <[email protected]> * work in progress Signed-off-by: jo pol <[email protected]> * fixed pattern-sheet, adjusted error-marks, moved "under construction" Signed-off-by: jo pol <[email protected]> * figcaption padding Signed-off-by: jo pol <[email protected]> * nested figcaptions not clear on a small device, using fieldset Signed-off-by: jo pol <[email protected]> * moved workaround hint into "under construction" fieldset Signed-off-by: jo pol <[email protected]>
Objective
Progress
So far to be tested with docs/index.html in stitch-fields.zip
The latter should use plain English for the rules at the bottom of stitches.
Examples for both are available in StitchesSpec.