Spaces:
Sleeping
Sleeping
| # Author: Liam Grinstead | |
| # Animated SVGs for Φᵢ, Kᵢⱼ, Φ_col symbolic fields | |
| def render_fields(agent): | |
| tier = agent.get("tier", "Tier_1") | |
| Φᵢ_svg = f""" | |
| <svg width="300" height="120"> | |
| <text x="10" y="30" font-size="20">Φᵢ Awareness Field</text> | |
| <circle cx="150" cy="70" r="20" fill="purple"> | |
| <animate attributeName="r" values="20;25;20" dur="2s" repeatCount="indefinite" /> | |
| </circle> | |
| <text x="130" y="115" font-size="12">{tier}</text> | |
| </svg> | |
| """ | |
| Kᵢⱼ_svg = f""" | |
| <svg width="300" height="120"> | |
| <text x="10" y="30" font-size="20">Kᵢⱼ Correlation Kernel</text> | |
| <line x1="50" y1="70" x2="250" y2="70" stroke="blue" stroke-width="2"> | |
| <animate attributeName="x1" values="50;60;50" dur="1.5s" repeatCount="indefinite" /> | |
| <animate attributeName="x2" values="250;240;250" dur="1.5s" repeatCount="indefinite" /> | |
| </line> | |
| <text x="100" y="100" font-size="12">Operators Coupled</text> | |
| </svg> | |
| """ | |
| Φ_col_svg = f""" | |
| <svg width="300" height="120"> | |
| <text x="10" y="30" font-size="20">Φ_col Coherence Field</text> | |
| <rect x="100" y="60" width="100" height="30" fill="green"> | |
| <animateTransform attributeName="transform" attributeType="XML" | |
| type="scale" values="1;1.1;1" begin="0s" dur="2s" repeatCount="indefinite"/> | |
| </rect> | |
| <text x="105" y="105" font-size="12">Collective Awareness</text> | |
| </svg> | |
| """ | |
| return { | |
| "Φᵢ": Φᵢ_svg, | |
| "Kᵢⱼ": Kᵢⱼ_svg, | |
| "Φ_col": Φ_col_svg | |
| } |