Case Study: Canvas-019
Yunbroidery Stitch Algorithm Syntax Card
Module 1: Metadata Table
| Property / Item | Detailed Specifications & Parameters |
|---|---|
| Artwork ID | Canvas-019 |
| Perceptual Imagery | Step-Climbing Structure / Staircase Progression |
| Basic Structure | Bidirectional Diagonal Staircase Grid (4 Diagonal Lines Horizontal x 4 Diagonal Lines Vertical) |
| Thread Specification | DMC Stranded Cotton No. 25, 3 strands doubled over (equivalent to 6 strands in thickness) |
| Color Scheme | Gradient 3-tone Green Scheme: Dark Green (#0284c7 for Zone 1), Medium Green (#dc2626 for Zone 2), Light Green (#eab308 for Zone 3) |
| Stitching Direction | Diagonal traversal extending from Top-Left to Bottom-Right |
Module 2: Starting & Vector Operations
- Basic Geometry & Diagonal Vectors
- Grid System: Square grid system where each cell has dimension g (equivalent to 20px in SVG, or 2mm/grid unit in physical canvas).
- Stitch Geometry: Each diagonal stitch spans 2 horizontal grid units and 2 vertical grid units (spanning a 3×3 grid point array). The stitch length L is calculated as:
L = sqrt((2g)^2 + (2g)^2) = 2 * sqrt(2) * g approx 2.828 g
(Under a 6mm grid reference, the physical stitch length equals 10.1mm) - Vector Angle: The stitching progresses from top-left to bottom-right at an inclination angle theta = -45 deg (or directional vector at 135 deg / -45 deg).
- Phase 1: Basic Module & Translational Operations
- Phase 1 (Stitches 1 to 12, Fundamental Diagonal Group):
- Starting Point (Stitch 1): Initial coordinates (x_1, y_1) = (210, 70).
- Ending Point (Stitch 2): (x_2, y_2) = (250, 110). Displacement vector (dx, dy) = (+40, +40) (+2g, +2g).
- Sub-step 1-1 (Stitches 1-6): Consecutive downward translation along the y-axis with dy = +20 (+1g).
Stitch 1-2: (210,70) -> (250,110)
Stitch 3-4: (210,90) -> (250,130)
Stitch 5-6: (210,110) -> (250,150) - Sub-step 1-2 (Stitches 7-12): Consecutive leftward translation along the x-axis with dx = -20 (-1g).
Stitch 7-8: (190,110) -> (230,150)
Stitch 9-10: (170,110) -> (210,150)
Stitch 11-12: (150,110) -> (190,150)
- Phase 2 (Stitches 13 to 24, Composite Matrix Translation):
- Apply composite translation to stitches 1-12: translate downward by 3 grid units (dy = +60) and leftward by 3 grid units (dx = -60).
- Composite translation vector V_trans = (-60, +60).
- Example: Starting point of Stitch 13 = (210 – 60, 70 + 60) = (150, 130).
- Phase 3 (Stitches 25 to 36, Second Composite Translation):
- Re-apply composite translation vector V_trans = (-60, +60) to stitches 13-24.
- Starting point of Stitch 25 = (150 – 60, 130 + 60) = (90, 190).
- Phase 1 (Stitches 1 to 12, Fundamental Diagonal Group):
- Phase 2: Regional Operations & Staircase Layering
- Zone 1 (Stitches 1-36): Constructs the first diagonal staircase band (Dark green tone / Blue SVG rendering).
- Zone 2 (Stitches 37-72): Replicates Zone 1 structure offset by (dx, dy) = (+40, +40) toward bottom-right, creating the second tier (Medium green tone / Red SVG rendering).
- Zone 3 (Stitches 73-108): Replicates structure with an additional offset (+40, +40) to build the third tier (Light green tone / Yellow SVG rendering), filling the entire composition.
Module 3: Structural Mechanics & Topology
- Structural Backbone & Interlocking
- The structural foundation of Canvas-019 lies in the interlocking arrangement of 3×3 grid -45 deg diagonal stitches arranged in an orthogonal staircase array.
- Alternating Stitch Paths: 3 stitches extend vertically downward, followed by 3 stitches expanding horizontally to the left. This 90-degree turning path forms an interlocked structural backbone, preventing thread slack or displacement commonly seen in single-direction long stitches.
- Tension Balance Mechanism
- Bidirectional Force Cancellation: Embroidery thread exerts tension T_diag in the -45 deg direction. Through the zig-zag 3-vertical / 3-horizontal pattern, orthogonal components acting on fabric threads are resolved as:
F_x = T_diag * cos(45 deg)
F_y = T_diag * sin(45 deg) - Distortion Suppression: Equal magnitude forces along x and y axes (F_x = F_y) ensure strictly balanced warp and weft tension across the fabric, completely eliminating fabric puckering.
- Bidirectional Force Cancellation: Embroidery thread exerts tension T_diag in the -45 deg direction. Through the zig-zag 3-vertical / 3-horizontal pattern, orthogonal components acting on fabric threads are resolved as:
- Stress Distribution & Volumetric Support
- Volumetric Cushioning: Doubled-over 3-strand DMC thread (6 strands total) yields high linear thread density. The 2-unit diagonal span (10.1mm length) produces a dense, cushioned relief layer raised above the canvas surface.
- Backside Anchorage: On the reverse side, tight rectangular and step-like bridge lines (as seen in CV_019B) anchor into grid nodes, establishing a stable topological network that guarantees long-term structural integrity.
Module 4: Vector API & Dynamic Presentation Data
1.Renderable HTML/SVG Card Code
Canvas-019 (Stitches 1-108) – 2x Slow Motion (Blue/Red/Yellow Zones)⏸ Pause↻ Replay
Canvas-019 (Complete Set of 1-108 Pins) – 2x Slow Speed (Blue/Red/Yellow Zones)
2.Geometric Parameters & Specifications
- ViewBox Specification: 0 20 360 360 (Square canvas with 20px top padding).
- Grid System: Background renders 20px x 20px square cells, with 3px diameter grey dots (fill: #94a3b8) marking piercing nodes.
- Animation Control Mechanism:
- Utilizes CSS stroke-dasharray: 100 and stroke-dashoffset: 100.
- Single Stitch Duration: 0.7 seconds with cubic-bezier(0.4, 0, 0.2, 1) easing.
- Sequential Delay: Increments by 0.4 seconds per stitch for 108 stitches, delivering a smooth, slowed execution animation.
- Zone Color Allocation:
- Zone 1 (Stitches 1-36): #0284c7 (Royal blue representing dark green thread).
- Zone 2 (Stitches 37-72): #dc2626 (Bright red representing medium green thread).
- Zone 3 (Stitches 73-108): #eab308 (Amber yellow representing light green thread).
Module 5: Visual Gallery



| Front View (Physical Embroidery) | Back View (Physical Embroidery) | Design Manuscript |
|---|---|---|
| Front: Demonstrates 3-tone gradient staircase relief depth | Back: Displays tight, orthogonal anchorage network | Manuscript: Details stitch sequence 1-108 and block logic |



Module 6: Algorithm Extensions & Variant Syntax
- Physical Surface Coverage Ratio
- On standard canvas grids (such as 14-count Aida or 6mm grids), the bidirectional diagonal staircase grid achieves complete thread overlap.
- Thread diameter d_thread and grid size g fulfill 6 * d_strand approx 1.2mm, resulting in 100% surface coverage with zero exposed canvas fabric.
- Procedural Extension Parameters
- stepSequence: [3, 3] (3 stitches downward, 3 stitches leftward in alternating staircase mode).
- unitSpacing: 1g (Orthogonal shift distance between individual sub-step stitches).
- blockOffset: (-3g, +3g) (Composite vector offset when translating block 1-12 to 13-24).
- diagonalSpan: (2g, 2g) (Single stitch span across 2 horizontal and 2 vertical units at -45 deg).
- gapRatio: 0 (Zero gap seamless connection).
- Variant Matrix & Parametric Variations
- Canvas-019-V1 (Sawtooth Wave Variant): Adjust stepSequence to [4, 2] to create asymmetric diagonal wave ripples.
- Canvas-019-V2 (Cross-Hatch Variant): Rotate Zone 2 stitch vectors by 90 degrees to form a 90-degree crisscross grid.
- Canvas-019-V3 (Micro-Step Variant): Reduce stitch span to (1g, 1g) and stepSequence to [2, 2] for high-precision decorative borders.
