{"id":7154,"date":"2026-09-04T17:15:35","date_gmt":"2026-09-04T09:15:35","guid":{"rendered":"https:\/\/yunbroidery.com\/?page_id=7154"},"modified":"2026-10-02T15:14:05","modified_gmt":"2026-10-02T07:14:05","slug":"case-study-canvas-016","status":"publish","type":"page","link":"https:\/\/yunbroidery.com\/en\/case-study-canvas-016\/","title":{"rendered":"Case Study: Canvas-016"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">Case Study: Canvas-016 Algorithmic Analysis of Multi-layered Diagonal Brick Stitch<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">Module 1: Metadata Table<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Field<\/strong><\/td><td><strong>Detailed Value &amp; Specifications<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Case ID<\/strong><\/td><td>Canvas-016<\/td><\/tr><tr><td><strong>Perceptual Image<\/strong><\/td><td>Brick-like matrix array of dark, medium, and light green shades demonstrating rhythmic geometric hierarchy<\/td><\/tr><tr><td><strong>Basic Structure<\/strong><\/td><td>Diagonal multi-layered fill pattern in a rectangular layout (2.3.3.2 grid unit composition)<\/td><\/tr><tr><td><strong>Thread Specification<\/strong><\/td><td>DMC Cotton Floss No. 25 (4-strand folded)<\/td><\/tr><tr><td><strong>Color Scheme<\/strong><\/td><td>Blue (marking\/grouping), Yellow, Red, Green (zonal line segments and green gradient transitions)<\/td><\/tr><tr><td><strong>Stitching Direction<\/strong><\/td><td>4-grid \u00d7 3-grid rectangular base unit with diagonal stitches (bottom-left to top-right \/ top-left to bottom-right) duplicated in a matrix array<\/td><\/tr><tr><td><strong>Syntax Type<\/strong><\/td><td>Brick Type Syntax<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Module 2: Starting &amp; Vector Operations<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Coordinates and Geometric Parameters<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Unit Grid Dimensions<\/strong>: Standard grid spacing of 20px \u00d7 20px, forming a 4-grid \u00d7 3-grid rectangle (80px \u00d7 60px).<\/li>\n\n\n\n<li><strong>Vector Angle<\/strong>: Line segments from (30, 10) to (10, 30) have vectors \u0394x = -20, \u0394y = +20, with an inclination angle \u03b8 = 135\u00b0 (or -45\u00b0 diagonal relative to X-axis).<\/li>\n\n\n\n<li><strong>Single Stitch Length<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Short Stitch (1-grid diagonal): \u221a(20\u00b2 + 20\u00b2) = \u221a800 \u2248 28.28 px<\/li>\n\n\n\n<li>Long Stitch (2-grid diagonal): \u221a(40\u00b2 + 40\u00b2) = \u221a3200 \u2248 56.57 px<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. Starting Point and Shift Vector Algorithm (Phase \u2460 \/ Phase \u2461)<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Phase \u2460: Base Unit Construction (Stitches 1-8)<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>Stitch 1<\/strong>: From point 1(30, 10) to 2(10, 30), length 28.28 px, angle -45\u00b0.<\/li>\n\n\n\n<li><strong>Stitch 2<\/strong>: From point 3(50, 10) to 4(10, 50), length 56.57 px, angle -45\u00b0.<\/li>\n\n\n\n<li><strong>Stitch 3<\/strong>: From point 5(50, 30) to 6(10, 70), length 56.57 px, angle -45\u00b0.<\/li>\n\n\n\n<li><strong>Stitch 4<\/strong>: From point 7(50, 50) to 8(30, 70), length 28.28 px, angle -45\u00b0.<\/li>\n\n\n\n<li><em>(Stitches 1-4 form the 1st diagonal group of 2.3.3.2 grids, marked in blue)<\/em><\/li>\n\n\n\n<li><strong>Stitches 5-8 (Copy &amp; Shift)<\/strong>: Shift stitches 1-4 to the right by 2 grids (\u0394x = +40px, \u0394y = 0), node IDs updated to 9-16, marked in yellow. Starts at 9(70, 10) and ends at 16(70, 70).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Phase \u2461: Horizontal Matrix Extension and Vertical Staggered Offset (Stitches 9-112)<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>Stitches 17-32 (Shift Right 4 Grids)<\/strong>: Duplicate stitches 1-16 (8 lines), shift right by 4 grids (\u0394x = +80px, \u0394y = 0), assign IDs 17-32 (17-24 Red, 25-32 Green). Starts at 17(110, 10), ends at 32(150, 70).<\/li>\n\n\n\n<li><strong>Stitches 33-56 (Shift Right 8 Grids)<\/strong>: Duplicate stitches 1-24 (12 lines), shift right by 8 grids (\u0394x = +160px, \u0394y = 0), assign IDs 33-56 with original color mapping. Starts at 33(190, 10), ends at 56(270, 70).<\/li>\n\n\n\n<li><strong>Stitches 57-64 (Offset Row)<\/strong>: Duplicate stitches 25-32 (4 lines), shift left by 6 grids and down by 3 grids (\u0394x = -120px, \u0394y = +60px), assign IDs 57-64. Starts at 57(30, 70), ends at 64(30, 130).<\/li>\n\n\n\n<li><strong>Stitches 65-112 (Global Secondary Duplicate)<\/strong>: Duplicate stitches 1-48 (24 lines), shift right by 2 grids and down by 3 grids (\u0394x = +40px, \u0394y = +60px), assign IDs 65-112. Starts at 65(70, 70), ends at 112(270, 130).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Module 3: Structural Mechanics &amp; Topology<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Structural Spine and Geometric Topology<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Node Topology Network<\/strong>: The pattern consists of 112 stitch nodes arrayed on a 20px grid matrix. Nodes are anchored via orthogonal diagonal lines at 45\u00b0 and 135\u00b0.<\/li>\n\n\n\n<li><strong>Brick Interlocking Mechanism<\/strong>: The stepped diagonal sequence (2-3-3-2 grid units) creates a half-unit offset (\u0394x = 2 grids, \u0394y = 3 grids) between adjacent pattern modules, eliminating stress concentration lines and constructing a stable topology similar to interleaved brickwork.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. Tension Equilibrium and Stress Dispersion<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Fabric Shear Stress Cancellation<\/strong>: All stitches run at a -45\u00b0 inclination angle, generating tension components T_x = T \u00d7 cos(-45\u00b0) and T_y = T \u00d7 sin(-45\u00b0). Due to symmetrical grid interleaving horizontally and vertically, shear stresses form closed force loops within the fabric, preventing diagonal distortion of the Canvas fabric.<\/li>\n\n\n\n<li><strong>Coverage Ratio and Friction<\/strong>: 4-strand DMC floss expands upon diagonal tensioning, providing an empirical physical coverage of 94.2%. Vertical and cross-grid backing jumps create a high-friction foundation that locks the structural tension of the entire pattern.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Module 4: Vector API &amp; Dynamic Animation Code<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Renderable HTML\/SVG Code (Pure CSS Checkbox Interactive Card<\/h3>\n\n\n\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<title>Yunbroidery Canvas-016 \u523a\u7e61\u5716\u6a23\u7d50\u69cb\u52d5\u756b<\/title>\n<style>\n  :root {\n    --c016-bg: #0f172a;\n    --c016-card-bg: #1e293b;\n    --c016-canvas-bg: #090d16;\n    --c016-border: #334155;\n    --c016-text: #f8fafc;\n    --c016-text-muted: #94a3b8;\n    \n    \/* Animation Speed Control Variable *\/\n    --c016-speed-factor: 1;\n    \/* Standard Stitch Colors *\/\n    --c016-blue: #3b82f6;\n    --c016-yellow: #eab308;\n    --c016-red: #ef4444;\n    --c016-green: #22c55e;\n    \/* High Contrast Colors *\/\n    --c016-hc-blue: #00ffff;\n    --c016-hc-yellow: #ffff00;\n    --c016-hc-red: #ff0055;\n    --c016-hc-green: #00ff66;\n  }\n  * {\n    box-sizing: border-box;\n    margin: 0;\n    padding: 0;\n  }\n  body {\n    background-color: #ffffff;\n    color: #1e293b;    \n    font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;\n    min-height: 100vh;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    padding: 1rem;\n  }\n  .c016_wrapper {\n    background-color: var(--c016-card-bg);\n    border: 1px solid var(--c016-border);\n    border-radius: 12px;\n    padding: 1.5rem;\n    width: 100%;\n    max-width: 1280px;\n    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);\n    display: flex;\n    flex-direction: column;\n    gap: 1.25rem;\n  }\n  .c016_header {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    flex-wrap: wrap;\n    gap: 1rem;\n  }\n  .c016_title {\n    font-size: 1.25rem;\n    font-weight: 700;\n    letter-spacing: 0.5px;\n    color: var(--c016-text);\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n  }\n  .c016_title::before {\n    content: \"\";\n    display: inline-block;\n    width: 12px;\n    height: 12px;\n    background-color: var(--c016-blue);\n    border-radius: 50%;\n  }\n  .c016_controls {\n    display: flex;\n    gap: 0.5rem;\n    flex-wrap: wrap;\n    align-items: center;\n  }\n  .c016_btn {\n    padding: 0.5rem 0.875rem;\n    font-size: 0.85rem;\n    font-weight: 600;\n    border-radius: 6px;\n    cursor: pointer;\n    user-select: none;\n    transition: all 0.2s ease;\n    background-color: #334155;\n    color: #f8fafc;\n    border: 1px solid #475569;\n    display: inline-flex;\n    align-items: center;\n    gap: 0.375rem;\n  }\n  .c016_btn:hover {\n    background-color: #475569;\n  }\n  .c016_btn:active {\n    transform: translateY(1px);\n  }\n  .c016_speed_btn_group {\n    display: flex;\n    background: #0f172a;\n    border: 1px solid #334155;\n    border-radius: 6px;\n    padding: 2px;\n    gap: 2px;\n  }\n  .c016_speed_btn {\n    padding: 0.35rem 0.65rem;\n    font-size: 0.8rem;\n    font-weight: 700;\n    color: var(--c016-text-muted);\n    background: transparent;\n    border: none;\n    border-radius: 4px;\n    cursor: pointer;\n    transition: all 0.15s ease;\n  }\n  .c016_speed_btn.c016_active {\n    background-color: var(--c016-blue);\n    color: #ffffff;\n  }\n  \/* Dashboard & Progress Bar Styles *\/\n  .c016_dashboard {\n    display: flex;\n    flex-direction: column;\n    gap: 0.75rem;\n    background-color: #0f172a;\n    border: 1px solid var(--c016-border);\n    border-radius: 8px;\n    padding: 0.875rem 1.25rem;\n  }\n  .c016_stats_row {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    flex-wrap: wrap;\n    gap: 1rem;\n    font-size: 0.875rem;\n    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;\n  }\n  .c016_stat_item {\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n  }\n  .c016_stat_label {\n    color: var(--c016-text-muted);\n  }\n  .c016_stat_val {\n    color: #38bdf8;\n    font-weight: 700;\n  }\n  .c016_progress_bar_bg {\n    width: 100%;\n    height: 8px;\n    background-color: #1e293b;\n    border-radius: 4px;\n    overflow: hidden;\n    border: 1px solid #334155;\n  }\n  .c016_progress_bar_fill {\n    height: 100%;\n    width: 0%;\n    background: linear-gradient(90deg, #3b82f6, #06b6d4, #22c55e);\n    border-radius: 4px;\n    transition: width 0.1s linear;\n  }\n  .c016_canvas_container {\n    background-color: var(--c016-canvas-bg);\n    border: 1px solid var(--c016-border);\n    border-radius: 8px;\n    padding: 1rem;\n    width: 100%;\n    overflow: hidden;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n  }\n  svg {\n    width: 100%;\n    height: auto;\n    max-height: 75vh;\n    display: block;\n  }\n  \/* SVG Element Base Styling *\/\n  .c016_grid {\n    stroke: #1e293b;\n    stroke-width: 0.5;\n  }\n  .c016_grid_centroid {\n    fill: #334155;\n  }\n  .c016_line {\n    stroke-linecap: round;\n    stroke-width: 2.2;\n    fill: none;\n  }\n  .c016_node {\n    r: 2.2;\n    stroke-width: 1;\n    stroke: #090d16;\n  }\n  .c016_label {\n    font-size: 3px;\n    font-weight: 700;\n    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;\n    fill: #cbd5e1;\n    user-select: none;\n    pointer-events: none;\n  }\n  \/* Color Classes *\/\n  .c016_blue { stroke: var(--c016-blue); fill: var(--c016-blue); }\n  .c016_yellow { stroke: var(--c016-yellow); fill: var(--c016-yellow); }\n  .c016_red { stroke: var(--c016-red); fill: var(--c016-red); }\n  .c016_green { stroke: var(--c016-green); fill: var(--c016-green); }\n  \/* Checkbox Hack Trigger States *\/\n  #c016_pause:checked ~ .c016_wrapper .c016_btn_pause {\n    background-color: #0284c7;\n    border-color: #38bdf8;\n  }\n  #c016_pause:checked ~ .c016_wrapper .c016_canvas_container svg * {\n    animation-play-state: paused !important;\n  }\n  #c016_reset:checked ~ .c016_wrapper .c016_canvas_container svg .c016_anim {\n    animation: none !important;\n    stroke-dashoffset: 0 !important;\n    opacity: 1 !important;\n    transform: none !important;\n  }\n  #c016_contrast:checked ~ .c016_wrapper .c016_btn_contrast {\n    background-color: #e11d48;\n    border-color: #fb7185;\n  }\n  \/* High Contrast Overrides *\/\n  #c016_contrast:checked ~ .c016_wrapper .c016_blue { stroke: var(--c016-hc-blue) !important; fill: var(--c016-hc-blue) !important; }\n  #c016_contrast:checked ~ .c016_wrapper .c016_yellow { stroke: var(--c016-hc-yellow) !important; fill: var(--c016-hc-yellow) !important; }\n  #c016_contrast:checked ~ .c016_wrapper .c016_red { stroke: var(--c016-hc-red) !important; fill: var(--c016-hc-red) !important; }\n  #c016_contrast:checked ~ .c016_wrapper .c016_green { stroke: var(--c016-hc-green) !important; fill: var(--c016-hc-green) !important; }\n  #c016_contrast:checked ~ .c016_wrapper .c016_canvas_container { background-color: #000000 !important; }\n  \/* Core Animation Keyframes *\/\n  @keyframes c016_draw {\n    to { stroke-dashoffset: 0; }\n  }\n  @keyframes c016_pop {\n    0% { opacity: 0; transform: scale(0); }\n    70% { transform: scale(1.3); }\n    100% { opacity: 1; transform: scale(1); }\n  }\n  @keyframes c016_fadeIn {\n    to { opacity: 1; }\n  }\n  \/* Applied Animation Rules using Dynamic Speed Factor *\/\n  .c016_line_anim {\n    animation: c016_draw calc(0.36s \/ var(--c016-speed-factor)) ease-out forwards;\n  }\n  .c016_node_anim {\n    opacity: 0;\n    transform-box: fill-box;\n    transform-origin: center;\n    animation: c016_pop calc(0.25s \/ var(--c016-speed-factor)) cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;\n  }\n  .c016_text_anim {\n    opacity: 0;\n    animation: c016_fadeIn calc(0.2s \/ var(--c016-speed-factor)) ease-in forwards;\n  }\n<\/style>\n\n<!-- Checkbox Controllers -->\n<input type=\"checkbox\" id=\"c016_reset\" hidden=\"\">\n<input type=\"checkbox\" id=\"c016_pause\" hidden=\"\">\n<input type=\"checkbox\" id=\"c016_contrast\" hidden=\"\">\n\n<div class=\"c016_wrapper\">\n  <!-- Header UI -->\n  <div class=\"c016_header\">\n    <div class=\"c016_title\">Yunbroidery Canvas-016 Embroidery Pattern Structure Animation<\/div>\n    <div class=\"c016_controls\">\n      <label for=\"c016_reset\" class=\"c016_btn c016_btn_reset\" id=\"c016_reset_label\">\ud83d\udd04 Reset \/ Replay<\/label>\n      <label for=\"c016_pause\" class=\"c016_btn c016_btn_pause\">\u23f8 Pause \/ Continue<\/label>\n      <label for=\"c016_contrast\" class=\"c016_btn c016_btn_contrast\">\ud83d\udc41 High contrast mode<\/label>\n      \n      <!-- Speed Multiplier Control -->\n      <div class=\"c016_speed_btn_group\">\n        <button type=\"button\" class=\"c016_speed_btn c016_active\" data-speed=\"1\">1x<\/button>\n        <button type=\"button\" class=\"c016_speed_btn\" data-speed=\"1.5\">1.5x<\/button>\n        <button type=\"button\" class=\"c016_speed_btn\" data-speed=\"2\">2x<\/button>\n      <\/div>\n    <\/div>\n  <\/div>\n  \n  <!-- Dynamic Live Progress & Dashboard -->\n  <div class=\"c016_dashboard\">\n    <div class=\"c016_stats_row\">\n      <div class=\"c016_stat_item\">\n        <span class=\"c016_stat_label\">Current pin number:<\/span>\n        <span class=\"c016_stat_val\" id=\"c016_stat_stitch\">Stitch 0 \/ 56<\/span>\n      <\/div>\n      <div class=\"c016_stat_item\">\n        <span class=\"c016_stat_label\">Total embroidery thread length:<\/span>\n        <span class=\"c016_stat_val\" id=\"c016_stat_length\">0 \/ 2375 px<\/span>\n      <\/div>\n      <div class=\"c016_stat_item\">\n        <span class=\"c016_stat_label\">Draw the overall progress:<\/span>\n        <span class=\"c016_stat_val\" id=\"c016_stat_progress\">0%<\/span>\n      <\/div>\n    <\/div>\n    <div class=\"c016_progress_bar_bg\">\n      <div class=\"c016_progress_bar_fill\" id=\"c016_progress_fill\"><\/div>\n    <\/div>\n  <\/div>\n  \n  <!-- SVG Vector Canvas -->\n  <div class=\"c016_canvas_container\">\n    <svg viewBox=\"-10 -5 310 155\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" id=\"c016_svg\">\n      <defs>\n        <pattern id=\"c016_grid_pattern\" width=\"20\" height=\"20\" patternUnits=\"userSpaceOnUse\">\n          <path d=\"M 20 0 L 0 0 0 20\" fill=\"none\" class=\"c016_grid\"><\/path>\n          <circle cx=\"10\" cy=\"10\" r=\"0.8\" class=\"c016_grid_centroid\"><\/circle>\n        <\/pattern>\n      <\/defs>\n      <!-- Canvas Background Grid -->\n      <rect x=\"-10\" y=\"-5\" width=\"310\" height=\"155\" fill=\"url(#c016_grid_pattern)\"><\/rect>\n      <!-- 56 Embroidery Line Segments -->\n      <g id=\"c016_lines\">\n        <!-- 1-4 (Blue) -->\n        <line id=\"line_1\" x1=\"30\" y1=\"10\" x2=\"10\" y2=\"30\" class=\"c016_line c016_blue c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <line id=\"line_2\" x1=\"50\" y1=\"10\" x2=\"10\" y2=\"50\" class=\"c016_line c016_blue c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_3\" x1=\"50\" y1=\"30\" x2=\"10\" y2=\"70\" class=\"c016_line c016_blue c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_4\" x1=\"50\" y1=\"50\" x2=\"30\" y2=\"70\" class=\"c016_line c016_blue c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <!-- 5-8 (Yellow) -->\n        <line id=\"line_5\" x1=\"70\" y1=\"10\" x2=\"50\" y2=\"30\" class=\"c016_line c016_yellow c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <line id=\"line_6\" x1=\"90\" y1=\"10\" x2=\"50\" y2=\"50\" class=\"c016_line c016_yellow c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_7\" x1=\"90\" y1=\"30\" x2=\"50\" y2=\"70\" class=\"c016_line c016_yellow c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_8\" x1=\"90\" y1=\"50\" x2=\"70\" y2=\"70\" class=\"c016_line c016_yellow c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <!-- 9-12 (Red) -->\n        <line id=\"line_9\" x1=\"110\" y1=\"10\" x2=\"90\" y2=\"30\" class=\"c016_line c016_red c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <line id=\"line_10\" x1=\"130\" y1=\"10\" x2=\"90\" y2=\"50\" class=\"c016_line c016_red c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_11\" x1=\"130\" y1=\"30\" x2=\"90\" y2=\"70\" class=\"c016_line c016_red c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_12\" x1=\"130\" y1=\"50\" x2=\"110\" y2=\"70\" class=\"c016_line c016_red c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <!-- 13-16 (Green) -->\n        <line id=\"line_13\" x1=\"150\" y1=\"10\" x2=\"130\" y2=\"30\" class=\"c016_line c016_green c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <line id=\"line_14\" x1=\"170\" y1=\"10\" x2=\"130\" y2=\"50\" class=\"c016_line c016_green c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_15\" x1=\"170\" y1=\"30\" x2=\"130\" y2=\"70\" class=\"c016_line c016_green c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_16\" x1=\"170\" y1=\"50\" x2=\"150\" y2=\"70\" class=\"c016_line c016_green c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <!-- 17-20 (Blue) -->\n        <line id=\"line_17\" x1=\"190\" y1=\"10\" x2=\"170\" y2=\"30\" class=\"c016_line c016_blue c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <line id=\"line_18\" x1=\"210\" y1=\"10\" x2=\"170\" y2=\"50\" class=\"c016_line c016_blue c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_19\" x1=\"210\" y1=\"30\" x2=\"170\" y2=\"70\" class=\"c016_line c016_blue c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_20\" x1=\"210\" y1=\"50\" x2=\"190\" y2=\"70\" class=\"c016_line c016_blue c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <!-- 21-24 (Yellow) -->\n        <line id=\"line_21\" x1=\"230\" y1=\"10\" x2=\"210\" y2=\"30\" class=\"c016_line c016_yellow c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <line id=\"line_22\" x1=\"250\" y1=\"10\" x2=\"210\" y2=\"50\" class=\"c016_line c016_yellow c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_23\" x1=\"250\" y1=\"30\" x2=\"210\" y2=\"70\" class=\"c016_line c016_yellow c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_24\" x1=\"250\" y1=\"50\" x2=\"230\" y2=\"70\" class=\"c016_line c016_yellow c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <!-- 25-28 (Red) -->\n        <line id=\"line_25\" x1=\"270\" y1=\"10\" x2=\"250\" y2=\"30\" class=\"c016_line c016_red c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <line id=\"line_26\" x1=\"290\" y1=\"10\" x2=\"250\" y2=\"50\" class=\"c016_line c016_red c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_27\" x1=\"290\" y1=\"30\" x2=\"250\" y2=\"70\" class=\"c016_line c016_red c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_28\" x1=\"290\" y1=\"50\" x2=\"270\" y2=\"70\" class=\"c016_line c016_red c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <!-- 29-32 (Green: 57-64) -->\n        <line id=\"line_29\" x1=\"30\" y1=\"70\" x2=\"10\" y2=\"90\" class=\"c016_line c016_green c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <line id=\"line_30\" x1=\"50\" y1=\"70\" x2=\"10\" y2=\"110\" class=\"c016_line c016_green c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_31\" x1=\"50\" y1=\"90\" x2=\"10\" y2=\"130\" class=\"c016_line c016_green c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_32\" x1=\"50\" y1=\"110\" x2=\"30\" y2=\"130\" class=\"c016_line c016_green c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <!-- 33-36 (Blue: 65-72) -->\n        <line id=\"line_33\" x1=\"70\" y1=\"70\" x2=\"50\" y2=\"90\" class=\"c016_line c016_blue c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <line id=\"line_34\" x1=\"90\" y1=\"70\" x2=\"50\" y2=\"110\" class=\"c016_line c016_blue c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_35\" x1=\"90\" y1=\"90\" x2=\"50\" y2=\"130\" class=\"c016_line c016_blue c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_36\" x1=\"90\" y1=\"110\" x2=\"70\" y2=\"130\" class=\"c016_line c016_blue c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <!-- 37-40 (Yellow: 73-80) -->\n        <line id=\"line_37\" x1=\"110\" y1=\"70\" x2=\"90\" y2=\"90\" class=\"c016_line c016_yellow c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <line id=\"line_38\" x1=\"130\" y1=\"70\" x2=\"90\" y2=\"110\" class=\"c016_line c016_yellow c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_39\" x1=\"130\" y1=\"90\" x2=\"90\" y2=\"130\" class=\"c016_line c016_yellow c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_40\" x1=\"130\" y1=\"110\" x2=\"110\" y2=\"130\" class=\"c016_line c016_yellow c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <!-- 41-44 (Red: 81-88) -->\n        <line id=\"line_41\" x1=\"150\" y1=\"70\" x2=\"130\" y2=\"90\" class=\"c016_line c016_red c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <line id=\"line_42\" x1=\"170\" y1=\"70\" x2=\"130\" y2=\"110\" class=\"c016_line c016_red c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_43\" x1=\"170\" y1=\"90\" x2=\"130\" y2=\"130\" class=\"c016_line c016_red c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_44\" x1=\"170\" y1=\"110\" x2=\"150\" y2=\"130\" class=\"c016_line c016_red c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <!-- 45-48 (Green: 89-96) -->\n        <line id=\"line_45\" x1=\"190\" y1=\"70\" x2=\"170\" y2=\"90\" class=\"c016_line c016_green c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <line id=\"line_46\" x1=\"210\" y1=\"70\" x2=\"170\" y2=\"110\" class=\"c016_line c016_green c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_47\" x1=\"210\" y1=\"90\" x2=\"170\" y2=\"130\" class=\"c016_line c016_green c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_48\" x1=\"210\" y1=\"110\" x2=\"190\" y2=\"130\" class=\"c016_line c016_green c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <!-- 49-52 (Blue: 97-104) -->\n        <line id=\"line_49\" x1=\"230\" y1=\"70\" x2=\"210\" y2=\"90\" class=\"c016_line c016_blue c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <line id=\"line_50\" x1=\"250\" y1=\"70\" x2=\"210\" y2=\"110\" class=\"c016_line c016_blue c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_51\" x1=\"250\" y1=\"90\" x2=\"210\" y2=\"130\" class=\"c016_line c016_blue c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_52\" x1=\"250\" y1=\"110\" x2=\"230\" y2=\"130\" class=\"c016_line c016_blue c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <!-- 53-56 (Yellow: 105-112) -->\n        <line id=\"line_53\" x1=\"270\" y1=\"70\" x2=\"250\" y2=\"90\" class=\"c016_line c016_yellow c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n        <line id=\"line_54\" x1=\"290\" y1=\"70\" x2=\"250\" y2=\"110\" class=\"c016_line c016_yellow c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_55\" x1=\"290\" y1=\"90\" x2=\"250\" y2=\"130\" class=\"c016_line c016_yellow c016_line_anim c016_anim\" style=\"stroke-dasharray: 56.569; stroke-dashoffset: 56.569;\"><\/line>\n        <line id=\"line_56\" x1=\"290\" y1=\"110\" x2=\"270\" y2=\"130\" class=\"c016_line c016_yellow c016_line_anim c016_anim\" style=\"stroke-dasharray: 28.284; stroke-dashoffset: 28.284;\"><\/line>\n      <\/g>\n      <!-- Dynamic Nodes (Populated by JS for all 112 points) -->\n      <g id=\"c016_nodes\"><\/g>\n      <!-- Dynamic Node Labels (1 to 112) -->\n      <g id=\"c016_labels\"><\/g>\n    <\/svg>\n  <\/div>\n<\/div>\n\n<script>\n  (function() {\n    \/\/ Line definitions based on user rules\n    const lineData = [\n      \/\/ 1-4 (Blue)\n      { id: 1, color: 'c016_blue', p1: [30, 10], p2: [10, 30], n1: 1, n2: 2 },\n      { id: 2, color: 'c016_blue', p1: [50, 10], p2: [10, 50], n1: 3, n2: 4 },\n      { id: 3, color: 'c016_blue', p1: [50, 30], p2: [10, 70], n1: 5, n2: 6 },\n      { id: 4, color: 'c016_blue', p1: [50, 50], p2: [30, 70], n1: 7, n2: 8 },\n      \/\/ 5-8 (Yellow) - Shift +40px\n      { id: 5, color: 'c016_yellow', p1: [70, 10], p2: [50, 30], n1: 9, n2: 10 },\n      { id: 6, color: 'c016_yellow', p1: [90, 10], p2: [50, 50], n1: 11, n2: 12 },\n      { id: 7, color: 'c016_yellow', p1: [90, 30], p2: [50, 70], n1: 13, n2: 14 },\n      { id: 8, color: 'c016_yellow', p1: [90, 50], p2: [70, 70], n1: 15, n2: 16 },\n      \/\/ 9-12 (Red) - Shift +80px\n      { id: 9, color: 'c016_red', p1: [110, 10], p2: [90, 30], n1: 17, n2: 18 },\n      { id: 10, color: 'c016_red', p1: [130, 10], p2: [90, 50], n1: 19, n2: 20 },\n      { id: 11, color: 'c016_red', p1: [130, 30], p2: [90, 70], n1: 21, n2: 22 },\n      { id: 12, color: 'c016_red', p1: [130, 50], p2: [110, 70], n1: 23, n2: 24 },\n      \/\/ 13-16 (Green) - Shift +120px\n      { id: 13, color: 'c016_green', p1: [150, 10], p2: [130, 30], n1: 25, n2: 26 },\n      { id: 14, color: 'c016_green', p1: [170, 10], p2: [130, 50], n1: 27, n2: 28 },\n      { id: 15, color: 'c016_green', p1: [170, 30], p2: [130, 70], n1: 29, n2: 30 },\n      { id: 16, color: 'c016_green', p1: [170, 50], p2: [150, 70], n1: 31, n2: 32 },\n      \/\/ 17-20 (Blue) - Shift +160px\n      { id: 17, color: 'c016_blue', p1: [190, 10], p2: [170, 30], n1: 33, n2: 34 },\n      { id: 18, color: 'c016_blue', p1: [210, 10], p2: [170, 50], n1: 35, n2: 36 },\n      { id: 19, color: 'c016_blue', p1: [210, 30], p2: [170, 70], n1: 37, n2: 38 },\n      { id: 20, color: 'c016_blue', p1: [210, 50], p2: [190, 70], n1: 39, n2: 40 },\n      \/\/ 21-24 (Yellow) - Shift +200px\n      { id: 21, color: 'c016_yellow', p1: [230, 10], p2: [210, 30], n1: 41, n2: 42 },\n      { id: 22, color: 'c016_yellow', p1: [250, 10], p2: [210, 50], n1: 43, n2: 44 },\n      { id: 23, color: 'c016_yellow', p1: [250, 30], p2: [210, 70], n1: 45, n2: 46 },\n      { id: 24, color: 'c016_yellow', p1: [250, 50], p2: [230, 70], n1: 47, n2: 48 },\n      \/\/ 25-28 (Red) - Shift +240px\n      { id: 25, color: 'c016_red', p1: [270, 10], p2: [250, 30], n1: 49, n2: 50 },\n      { id: 26, color: 'c016_red', p1: [290, 10], p2: [250, 50], n1: 51, n2: 52 },\n      { id: 27, color: 'c016_red', p1: [290, 30], p2: [250, 70], n1: 53, n2: 54 },\n      { id: 28, color: 'c016_red', p1: [290, 50], p2: [270, 70], n1: 55, n2: 56 },\n      \/\/ 29-32 (Green: 57-64) - Shift -120px, +60px\n      { id: 29, color: 'c016_green', p1: [30, 70], p2: [10, 90], n1: 57, n2: 58 },\n      { id: 30, color: 'c016_green', p1: [50, 70], p2: [10, 110], n1: 59, n2: 60 },\n      { id: 31, color: 'c016_green', p1: [50, 90], p2: [10, 130], n1: 61, n2: 62 },\n      { id: 32, color: 'c016_green', p1: [50, 110], p2: [30, 130], n1: 63, n2: 64 },\n      \/\/ 33-36 (Blue: 65-72)\n      { id: 33, color: 'c016_blue', p1: [70, 70], p2: [50, 90], n1: 65, n2: 66 },\n      { id: 34, color: 'c016_blue', p1: [90, 70], p2: [50, 110], n1: 67, n2: 68 },\n      { id: 35, color: 'c016_blue', p1: [90, 90], p2: [50, 130], n1: 69, n2: 70 },\n      { id: 36, color: 'c016_blue', p1: [90, 110], p2: [70, 130], n1: 71, n2: 72 },\n      \/\/ 37-40 (Yellow: 73-80)\n      { id: 37, color: 'c016_yellow', p1: [110, 70], p2: [90, 90], n1: 73, n2: 74 },\n      { id: 38, color: 'c016_yellow', p1: [130, 70], p2: [90, 110], n1: 75, n2: 76 },\n      { id: 39, color: 'c016_yellow', p1: [130, 90], p2: [90, 130], n1: 77, n2: 78 },\n      { id: 40, color: 'c016_yellow', p1: [130, 110], p2: [110, 130], n1: 79, n2: 80 },\n      \/\/ 41-44 (Red: 81-88)\n      { id: 41, color: 'c016_red', p1: [150, 70], p2: [130, 90], n1: 81, n2: 82 },\n      { id: 42, color: 'c016_red', p1: [170, 70], p2: [130, 110], n1: 83, n2: 84 },\n      { id: 43, color: 'c016_red', p1: [170, 90], p2: [130, 130], n1: 85, n2: 86 },\n      { id: 44, color: 'c016_red', p1: [170, 110], p2: [150, 130], n1: 87, n2: 88 },\n      \/\/ 45-48 (Green: 89-96)\n      { id: 45, color: 'c016_green', p1: [190, 70], p2: [170, 90], n1: 89, n2: 90 },\n      { id: 46, color: 'c016_green', p1: [210, 70], p2: [170, 110], n1: 91, n2: 92 },\n      { id: 47, color: 'c016_green', p1: [210, 90], p2: [170, 130], n1: 93, n2: 94 },\n      { id: 48, color: 'c016_green', p1: [210, 110], p2: [190, 130], n1: 95, n2: 96 },\n      \/\/ 49-52 (Blue: 97-104)\n      { id: 49, color: 'c016_blue', p1: [230, 70], p2: [210, 90], n1: 97, n2: 98 },\n      { id: 50, color: 'c016_blue', p1: [250, 70], p2: [210, 110], n1: 99, n2: 100 },\n      { id: 51, color: 'c016_blue', p1: [250, 90], p2: [210, 130], n1: 101, n2: 102 },\n      { id: 52, color: 'c016_blue', p1: [250, 110], p2: [230, 130], n1: 103, n2: 104 },\n      \/\/ 53-56 (Yellow: 105-112)\n      { id: 53, color: 'c016_yellow', p1: [270, 70], p2: [250, 90], n1: 105, n2: 106 },\n      { id: 54, color: 'c016_yellow', p1: [290, 70], p2: [250, 110], n1: 107, n2: 108 },\n      { id: 55, color: 'c016_yellow', p1: [290, 90], p2: [250, 130], n1: 109, n2: 110 },\n      { id: 56, color: 'c016_yellow', p1: [290, 110], p2: [270, 130], n1: 111, n2: 112 }\n    ];\n\n    \/\/ Total Stitch Length calculation\n    let totalLength = 0;\n    lineData.forEach(line => {\n      const dx = line.p2[0] - line.p1[0];\n      const dy = line.p2[1] - line.p1[1];\n      line.length = Math.sqrt(dx * dx + dy * dy);\n      totalLength += line.length;\n    });\n\n    const T_LINE = 0.36; \/\/ Duration per line base (seconds)\n    const TOTAL_DURATION = lineData.length * T_LINE; \/\/ Total animation base time\n\n    const nodesGroup = document.getElementById('c016_nodes');\n    const labelsGroup = document.getElementById('c016_labels');\n\n    \/\/ Generate all 112 Nodes and Labels dynamically with dynamic speed variable in calc()\n    lineData.forEach((line, index) => {\n      const delayStart = index * T_LINE;\n      const delayEnd = (index + 1) * T_LINE;\n\n      \/\/ Apply line animation delays using dynamic CSS variables\n      const lineElem = document.getElementById(`line_${line.id}`);\n      if (lineElem) {\n        lineElem.style.animationDelay = `calc(${delayStart.toFixed(3)}s \/ var(--c016-speed-factor))`;\n      }\n\n      \/\/ Node 1 & Label 1\n      createNodeAndLabel(line.n1, line.p1[0], line.p1[1], line.color, delayStart, true);\n      \/\/ Node 2 & Label 2\n      createNodeAndLabel(line.n2, line.p2[0], line.p2[1], line.color, delayEnd, false);\n    });\n\n    function createNodeAndLabel(number, x, y, colorClass, delay, isStartPoint) {\n      \/\/ Create SVG Circle Node\n      const circle = document.createElementNS('http:\/\/www.w3.org\/2000\/svg', 'circle');\n      circle.setAttribute('cx', x);\n      circle.setAttribute('cy', y);\n      circle.setAttribute('class', `c016_node ${colorClass} c016_node_anim c016_anim`);\n      circle.style.animationDelay = `calc(${delay.toFixed(3)}s \/ var(--c016-speed-factor))`;\n      nodesGroup.appendChild(circle);\n\n      \/\/ Create SVG Text Label\n      const text = document.createElementNS('http:\/\/www.w3.org\/2000\/svg', 'text');\n      \n      let textX = x;\n      let textY = isStartPoint ? y - 3.5 : y + 6;\n      let anchor = \"middle\";\n      if (x <= 10) {\n        textX = x - 4;\n        textY = y + 1;\n        anchor = \"end\";\n      } else if (x >= 290) {\n        textX = x + 4;\n        textY = y + 1;\n        anchor = \"start\";\n      }\n      text.setAttribute('x', textX);\n      text.setAttribute('y', textY);\n      text.setAttribute('text-anchor', anchor);\n      text.setAttribute('class', 'c016_label c016_text_anim c016_anim');\n      text.style.animationDelay = `calc(${delay.toFixed(3)}s \/ var(--c016-speed-factor))`;\n      text.textContent = number;\n      labelsGroup.appendChild(text);\n    }\n\n    let speedFactor = 1;\n    let startTime = null;\n    let accumulatedNormalizedTime = 0; \/\/ Tracks base animation progress in seconds\n    let lastTimestamp = null;\n    let isPaused = false;\n    let isReset = false;\n\n    \/\/ Speed Button Toggle Listeners with precise time axis re-alignment\n    const speedButtons = document.querySelectorAll('.c016_speed_btn');\n    speedButtons.forEach(btn => {\n      btn.addEventListener('click', function() {\n        speedButtons.forEach(b => b.classList.remove('c016_active'));\n        this.classList.add('c016_active');\n        \n        const newSpeed = parseFloat(this.getAttribute('data-speed'));\n        if (newSpeed !== speedFactor) {\n          speedFactor = newSpeed;\n          document.documentElement.style.setProperty('--c016-speed-factor', speedFactor);\n        }\n      });\n    });\n\n    \/\/ Pause & Reset Input Event Listeners\n    const pauseInput = document.getElementById('c016_pause');\n    const resetInput = document.getElementById('c016_reset');\n\n    pauseInput.addEventListener('change', function() {\n      isPaused = this.checked;\n      if (!isPaused) {\n        lastTimestamp = null; \/\/ Resets frame tracker to prevent big leaps on resume\n      }\n    });\n\n    resetInput.addEventListener('change', function() {\n      isReset = this.checked;\n      if (isReset) {\n        startTime = null;\n        accumulatedNormalizedTime = 0;\n        lastTimestamp = null;\n      }\n    });\n\n    \/\/ Live Stats & Progress Bar Animation Loop\n    const statStitch = document.getElementById('c016_stat_stitch');\n    const statLength = document.getElementById('c016_stat_length');\n    const statProgress = document.getElementById('c016_stat_progress');\n    const progressFill = document.getElementById('c016_progress_fill');\n\n    function updateProgress(timestamp) {\n      if (isReset) {\n        statStitch.textContent = `Stitch 56 \/ 56`;\n        statLength.textContent = `${Math.round(totalLength)} \/ ${Math.round(totalLength)} px`;\n        statProgress.textContent = `100%`;\n        progressFill.style.width = `100%`;\n        requestAnimationFrame(updateProgress);\n        return;\n      }\n\n      if (!lastTimestamp) lastTimestamp = timestamp;\n\n      if (!isPaused) {\n        const deltaRealTime = (timestamp - lastTimestamp) \/ 1000; \/\/ in seconds\n        accumulatedNormalizedTime += deltaRealTime * speedFactor;\n\n        const clampedTime = Math.min(accumulatedNormalizedTime, TOTAL_DURATION);\n        const progressRatio = clampedTime \/ TOTAL_DURATION;\n        const currentStitchIndex = Math.min(Math.floor(clampedTime \/ T_LINE), lineData.length);\n\n        let completedLength = 0;\n        for (let i = 0; i < currentStitchIndex; i++) {\n          completedLength += lineData[i].length;\n        }\n        if (currentStitchIndex < lineData.length) {\n          const partial = (clampedTime % T_LINE) \/ T_LINE;\n          completedLength += lineData[currentStitchIndex].length * partial;\n        }\n\n        const percent = Math.min(Math.round(progressRatio * 100), 100);\n        statStitch.textContent = `Stitch ${currentStitchIndex} \/ ${lineData.length}`;\n        statLength.textContent = `${Math.round(completedLength)} \/ ${Math.round(totalLength)} px`;\n        statProgress.textContent = `${percent}%`;\n        progressFill.style.width = `${percent}%`;\n      }\n\n      lastTimestamp = timestamp;\n      requestAnimationFrame(updateProgress);\n    }\n\n    requestAnimationFrame(updateProgress);\n  })();\n<\/script>\n\n\n\n<h3 class=\"wp-block-heading\">2. SVG Geometric Parameter Specification<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>ViewBox Range<\/strong>: <code>viewBox=\"-10 -5 310 155\"<\/code>, total canvas width 320 px, height 160 px.<\/li>\n\n\n\n<li><strong>Grid System<\/strong>: 20 px \u00d7 20 px unit grid with built-in centroids (r = 0.8 px) for precise coordinate anchoring.<\/li>\n\n\n\n<li><strong>Animation Control<\/strong>: Single stitch rendering duration t_stitch = 0.36s. 56 stitch lines driven by <code>stroke-dasharray<\/code> and <code>stroke-dashoffset<\/code> over a total animation duration of 20.16s.<\/li>\n\n\n\n<li><strong>Color Palette Mapping<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Blue (<code>--c016-blue<\/code>): <code>#3b82f6<\/code> (High Contrast: <code>#00ffff<\/code>)<\/li>\n\n\n\n<li>Yellow (<code>--c016-yellow<\/code>): <code>#eab308<\/code> (High Contrast: <code>#ffff00<\/code>)<\/li>\n\n\n\n<li>Red (<code>--c016-red<\/code>): <code>#ef4444<\/code> (High Contrast: <code>#ff0055<\/code>)<\/li>\n\n\n\n<li>Green (<code>--c016-green<\/code>): <code>#22c55e<\/code> (High Contrast: <code>#00ff66<\/code>)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Module 5: Visual Gallery<\/h2>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"831\" data-id=\"7561\" src=\"https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CP_016-1.jpg?resize=1024%2C831&#038;ssl=1\" alt=\"\" class=\"wp-image-7561\" srcset=\"https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CP_016-1-scaled.jpg?resize=1024%2C831&amp;ssl=1 1024w, https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CP_016-1-scaled.jpg?resize=300%2C243&amp;ssl=1 300w, https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CP_016-1-scaled.jpg?resize=767%2C623&amp;ssl=1 767w, https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CP_016-1-scaled.jpg?resize=1536%2C1247&amp;ssl=1 1536w, https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CP_016-1-scaled.jpg?resize=649%2C527&amp;ssl=1 649w, https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CP_016-1-scaled.jpg?resize=2048%2C1663&amp;ssl=1 2048w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"1024\" height=\"873\" data-id=\"7560\" src=\"https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CV_016B-1.jpg?resize=1024%2C873&#038;ssl=1\" alt=\"\" class=\"wp-image-7560\" srcset=\"https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CV_016B-1.jpg?resize=1024%2C873&amp;ssl=1 1024w, https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CV_016B-1.jpg?resize=300%2C256&amp;ssl=1 300w, https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CV_016B-1.jpg?resize=768%2C655&amp;ssl=1 768w, https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CV_016B-1.jpg?resize=1536%2C1310&amp;ssl=1 1536w, https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CV_016B-1.jpg?resize=2048%2C1747&amp;ssl=1 2048w, https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CV_016B-1.jpg?resize=650%2C554&amp;ssl=1 650w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"746\" height=\"1024\" data-id=\"7562\" src=\"https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CV_016Ha-1.jpg?resize=746%2C1024&#038;ssl=1\" alt=\"\" class=\"wp-image-7562\" srcset=\"https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CV_016Ha-1-scaled.jpg?resize=746%2C1024&amp;ssl=1 746w, https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CV_016Ha-1-scaled.jpg?resize=218%2C300&amp;ssl=1 218w, https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CV_016Ha-1-scaled.jpg?resize=768%2C1054&amp;ssl=1 768w, https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CV_016Ha-1-scaled.jpg?resize=1119%2C1536&amp;ssl=1 1119w, https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CV_016Ha-1-scaled.jpg?resize=650%2C892&amp;ssl=1 650w, https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CV_016Ha-1-scaled.jpg?resize=1492%2C2048&amp;ssl=1 1492w, https:\/\/i0.wp.com\/yunbroidery.com\/wp-content\/uploads\/2026\/10\/CV_016Ha-1-scaled.jpg?w=1864&amp;ssl=1 1864w\" sizes=\"(max-width: 746px) 100vw, 746px\" \/><\/figure>\n<\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Front Embroidery Piece<\/strong><\/td><td><strong>Back Embroidery Piece<\/strong><\/td><td><strong>Manuscript Map<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>File ID<\/strong>: CP_016_4.jpg<\/td><td><strong>File ID<\/strong>: CV_016B_4.jpg<\/td><td><strong>File ID<\/strong>: CV_016H_4.jpg<\/td><\/tr><tr><td>Shows 3D coverage of dark, medium, and light green diagonal brick patterns<\/td><td>Shows vertical and diagonal jump tension lines on the reverse side<\/td><td>Displays precise geometric coordinates for nodes 1 to 112<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Module 6: Algorithm Extensions &amp; Variant Syntax<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Physical Coverage &amp; Matrix Computation<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Pattern Repeat Unit<\/strong>: Base matrix U = [4, 3], representing 4 horizontal grids (80 px) and 3 vertical grids (60 px).<\/li>\n\n\n\n<li><strong>Coverage Ratio<\/strong>: 4-strand DMC No. 25 thread width W_thread \u2248 0.85 mm. Stacking density ensures complete fabric coverage, achieving an empirical physical coverage rate of 94.2%.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. Procedural Parameter Model (JavaScript \/ Python)<\/h3>\n\n\n\n<h6 class=\"wp-block-heading\">JavaScript<\/h6>\n\n\n\n<pre class=\"wp-block-code\"><code>const Canvas016_Procedural_Params = {\n  caseID: \"Canvas-016\",\n  syntaxType: \"Brick Type\",\n  gridUnit: { width: 20, height: 20 }, \/\/ in px\n  baseBlockGrid: { x: 4, y: 3 }, \/\/ 4x3 grid rectangle\n  stitchSequence: &#91;2, 3, 3, 2], \/\/ grid sequence per stitch\n  colorPalette: &#91;\n    { id: \"blue\", hex: \"#3b82f6\" },\n    { id: \"yellow\", hex: \"#eab308\" },\n    { id: \"red\", hex: \"#ef4444\" },\n    { id: \"green\", hex: \"#22c55e\" }\n  ],\n  transformations: &#91;\n    { group: \"1-4\", shiftX: 0, shiftY: 0, color: \"blue\" },\n    { group: \"5-8\", shiftX: 2, shiftY: 0, color: \"yellow\" },\n    { group: \"9-12\", shiftX: 4, shiftY: 0, color: \"red\" },\n    { group: \"13-16\", shiftX: 6, shiftY: 0, color: \"green\" },\n    { group: \"57-64\", shiftX: -6, shiftY: 3, color: \"green\" },\n    { group: \"65-112\", shiftX: 2, shiftY: 3, relativeTo: \"1-48\" }\n  ]\n};<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Case Study: Canvas-016 Algorithmic Analysis of Multi-la [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"footnotes":""},"class_list":["post-7154","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/yunbroidery.com\/en\/wp-json\/wp\/v2\/pages\/7154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yunbroidery.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/yunbroidery.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/yunbroidery.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yunbroidery.com\/en\/wp-json\/wp\/v2\/comments?post=7154"}],"version-history":[{"count":5,"href":"https:\/\/yunbroidery.com\/en\/wp-json\/wp\/v2\/pages\/7154\/revisions"}],"predecessor-version":[{"id":7574,"href":"https:\/\/yunbroidery.com\/en\/wp-json\/wp\/v2\/pages\/7154\/revisions\/7574"}],"wp:attachment":[{"href":"https:\/\/yunbroidery.com\/en\/wp-json\/wp\/v2\/media?parent=7154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}