|
5 | 5 | "id": "73620923-8165-4d80-a81a-cb768294cc6f", |
6 | 6 | "metadata": {}, |
7 | 7 | "source": [ |
8 | | - "Week 3 Assignment: Knitting Pattern Calculator Project Report\n", |
9 | | - "\n", |
10 | 8 | "1. Project Overview\n", |
11 | 9 | "Knitting a custom sweater from the top down requires translating physical body measurements into a discrete grid of stitches and rows based on a individual knitting gauge. Manual conversion often leads to structural math errors. Furthermore, knitters wanting to incorporate multi-colored intarsia or stranded motifs (\"alpha patterns\") must manually map those pixel charts onto their specific garment dimensions, which is a slow and error-prone process.\n", |
12 | 10 | "\n", |
|
20 | 18 | "source": [ |
21 | 19 | "2. Software Architecture\n", |
22 | 20 | "The software uses the standard Python src/ layout to isolate core business and graphical logic from the presentation layer.\n", |
| 21 | + "\n", |
| 22 | + "Stitch and Row Allocation: The engine converts user dimensions (in centimeters) to absolute integers. \n", |
| 23 | + "It uses ceiling rounding (math.ceil) since a knitter cannot execute a partial stitch. The underlying formula is:\n", |
| 24 | + "stitches = [{width (cm)} * {stitch gauge} / 10)]\n", |
| 25 | + "\n", |
| 26 | + "Grid Canvas Representation: The backend models the fabric as a two-dimensional grid (nested lists or arrays). Unoccupied background fabric is initialized to 0.\n", |
| 27 | + "Alpha Pattern Integration: The system reads pixel-based assets representing the alpha design. It maps these coordinates directly onto the sweater grid, reassigning target cells from background 0 to specific integer color IDs (e.g., 1, 2, 3). This acts as the layout for the color chart." |
| 28 | + ] |
| 29 | + }, |
| 30 | + { |
| 31 | + "cell_type": "code", |
| 32 | + "execution_count": null, |
| 33 | + "id": "cc4d6fcd-c5f0-4b80-b409-8c4fc66b0922", |
| 34 | + "metadata": {}, |
| 35 | + "outputs": [], |
| 36 | + "source": [ |
| 37 | + "Current layout:\n", |
23 | 38 | "knitting_pattern/\n", |
24 | 39 | "├── src/\n", |
25 | 40 | "│ ├── knitting_pattern/\n", |
|
29 | 44 | "│ │ └── image_engine.py # Visualization logic, plotting chart and recognizing alpha patterns\n", |
30 | 45 | "│ └── tests/\n", |
31 | 46 | "│ ├── test_image_engine.py\n", |
32 | | - "│ └── test_math_engine.py \n", |
33 | | - "Stitch and Row Allocation: The engine converts user dimensions (in centimeters) to absolute integers. \n", |
34 | | - "It uses ceiling rounding (math.ceil) since a knitter cannot execute a partial stitch. The underlying formula is:\n", |
35 | | - "stitches = [{width (cm)} * {stitch gauge} / 10)]\n", |
36 | | - "\n", |
37 | | - "Grid Canvas Representation: The backend models the fabric as a two-dimensional grid (nested lists or arrays). Unoccupied background fabric is initialized to 0.\n", |
38 | | - "Alpha Pattern Integration: The system reads pixel-based assets representing the alpha design. It maps these coordinates directly onto the sweater grid, reassigning target cells from background 0 to specific integer color IDs (e.g., 1, 2, 3). This acts as the layout for the color chart." |
| 47 | + "│ └── test_math_engine.py " |
39 | 48 | ] |
40 | 49 | }, |
41 | 50 | { |
|
71 | 80 | "\n", |
72 | 81 | "Solution: Expand the mathematical backend to calculate complex raglan lines and set-in sleeve caps. This requires developing dynamic decrease formulas to scale diagonal stitch lines across the grid canvas while maintaining the integrity of the centered alpha patterns." |
73 | 82 | ] |
| 83 | + }, |
| 84 | + { |
| 85 | + "cell_type": "markdown", |
| 86 | + "id": "e66e80a0-6441-43dd-b2bc-04f0bb39cc53", |
| 87 | + "metadata": {}, |
| 88 | + "source": [ |
| 89 | + "Things to implement before Friday:\n", |
| 90 | + "1. manual pixel editor in case the pixel converter isnt perfect (still in developement - prototype exists)\n", |
| 91 | + "2. sleeves (DONE)\n", |
| 92 | + "3. multiple alpha patterns on one thing - to edit them you click on the sidepanel on one of the alpha patterns and edit like normal. (DONE)\n", |
| 93 | + "5. Be able to copy an alpha pattern for continuous 'stripe' or to make a repeating pattern (maybe through the multiple alpha pattern added or have like a choice to make a vertical or horizontal repeating pattern from one alpha pattern? maybe even a hexagonal grid, square grid? offset vertical stripes over some parts of the sweater? (DONE)\n", |
| 94 | + "6. make more unit tests that have good coverage (see julians comments) (no progress)\n", |
| 95 | + "7. have the whole pattern in one pdf; so be able to have separate 'projects' at once: front panel, back panel, and sleeves. so we can design alpha patterns and fit for each aspect of the sweater and then put everything in one pdf pattern with the title of the project that we chose and the rest of the instructions. (DONE)\n", |
| 96 | + "8. save JSON file of current session so you don't loose progress and can import the JSON file to start back on (DONE)\n", |
| 97 | + "9. README file update to include the instructions of download and use. (no progress)" |
| 98 | + ] |
74 | 99 | } |
75 | 100 | ], |
76 | 101 | "metadata": { |
|
0 commit comments