'use client'; import React from 'react'; // Isometric grid configuration - true 2:1 isometric projection const CELL_WIDTH = 120; const CELL_HEIGHT = 60; // Half of width for 2:1 isometric // Convert grid coordinates to isometric screen coordinates // Using standard isometric projection where x goes right-down, y goes right-up function gridToScreen(col: number, row: number): { x: number; y: number } { return { x: (col - row) * (CELL_WIDTH / 2), y: (col + row) * (CELL_HEIGHT / 2), }; } // Grid layout (10 columns x 8 rows) // Energy flow: Solar/Wind (left) → Substations (center) → Transmission → City (right) const GRID = { cols: 10, rows: 8, }; // Infrastructure positions - precisely on grid intersections const INFRASTRUCTURE = { // Solar panels (two groups) solar: [ // Group 1 - bottom-left { col: 0, row: 5 }, { col: 1, row: 5 }, { col: 0, row: 6 }, { col: 1, row: 6 }, // Group 2 - middle-bottom { col: 2, row: 7 }, { col: 3, row: 7 }, { col: 2, row: 8 }, { col: 3, row: 8 }, ], // Wind turbines (two groups) wind: [ // Group 1 - top-left { col: 0, row: 1 }, { col: 1, row: 2 }, { col: 2, row: 1 }, // Group 2 - top-center { col: 3, row: 0 }, { col: 4, row: 1 }, { col: 5, row: 0 }, ], // Substations substations: [ { col: 3, row: 3, type: 'collection' }, // Main collection substation { col: 6, row: 4, type: 'distribution' }, // Distribution substation (right) { col: 5, row: 7, type: 'distribution' }, // Distribution substation (bottom-left) ], // Transmission towers (along the routes) towers: [ { col: 4, row: 3 }, { col: 5, row: 4 }, { col: 4, row: 5 }, { col: 5, row: 6 }, ], // City/Buildings (right side) city: [ { col: 8, row: 3, type: 'tall' }, { col: 9, row: 4, type: 'medium' }, { col: 8, row: 5, type: 'small' }, { col: 9, row: 5, type: 'medium' }, ], // City 2 (bottom-left area) city2: [ { col: 6, row: 8, type: 'medium' }, { col: 7, row: 7, type: 'tall' }, { col: 7, row: 8, type: 'small' }, ], // Trees (decorative, scattered around) trees: [ { col: 0, row: 3 }, { col: 2, row: 6 }, { col: 3, row: 1 }, { col: 6, row: 2 }, { col: 6, row: 6 }, ], }; // Power line connections - grid-aligned paths only (no diagonals) // Each group meets at a collection point, then flows to main substation const POWER_LINES = [ // === WIND GROUP 1 (top-left) - meet at (1,1) then to substation === // Turbine at (0,1) → collection point (1,1) { from: { col: 0, row: 1 }, to: { col: 1, row: 1 } }, // Turbine at (1,2) → up to (1,1) { from: { col: 1, row: 2 }, to: { col: 1, row: 1 } }, // Turbine at (2,1) → left to (1,1) { from: { col: 2, row: 1 }, to: { col: 1, row: 1 } }, // Collection point (1,1) → down to (1,3) → right to substation (3,3) { from: { col: 1, row: 1 }, to: { col: 1, row: 3 } }, { from: { col: 1, row: 3 }, to: { col: 3, row: 3 } }, // === WIND GROUP 2 (top-center) - meet at (4,1) then to substation === // Turbine at (3,0) → right to (4,0) → down to (4,1) { from: { col: 3, row: 0 }, to: { col: 4, row: 0 } }, { from: { col: 4, row: 0 }, to: { col: 4, row: 1 } }, // Turbine at (4,1) is the collection point // Turbine at (5,0) → down to (5,1) → left to (4,1) { from: { col: 5, row: 0 }, to: { col: 5, row: 1 } }, { from: { col: 5, row: 1 }, to: { col: 4, row: 1 } }, // Collection point (4,1) → down to (4,3) → left to substation (3,3) { from: { col: 4, row: 1 }, to: { col: 4, row: 3 } }, { from: { col: 4, row: 3 }, to: { col: 3, row: 3 } }, // === SOLAR GROUP 1 (bottom-left) - meet at (1,5) then to substation === // Panels at (0,5), (1,5), (0,6), (1,6) → collection at (1,5) { from: { col: 0, row: 5 }, to: { col: 1, row: 5 } }, { from: { col: 0, row: 6 }, to: { col: 0, row: 5 } }, { from: { col: 1, row: 6 }, to: { col: 1, row: 5 } }, // Collection point (1,5) → up to (1,3) → right to substation (3,3) { from: { col: 1, row: 5 }, to: { col: 1, row: 3 } }, // === SOLAR GROUP 2 (middle-bottom) - meet at (3,7) then to substation === // Panels at (2,7), (3,7), (2,8), (3,8) → collection at (3,7) { from: { col: 2, row: 7 }, to: { col: 3, row: 7 } }, { from: { col: 2, row: 8 }, to: { col: 2, row: 7 } }, { from: { col: 3, row: 8 }, to: { col: 3, row: 7 } }, // Collection point (3,7) → up to (3,3) substation { from: { col: 3, row: 7 }, to: { col: 3, row: 5 } }, { from: { col: 3, row: 5 }, to: { col: 3, row: 3 } }, // === MAIN TRANSMISSION: Substation (3,3) → Towers → Distribution → City === // Substation to first tower { from: { col: 3, row: 3 }, to: { col: 4, row: 3 } }, // First tower to second tower (grid-aligned) { from: { col: 4, row: 3 }, to: { col: 5, row: 3 } }, { from: { col: 5, row: 3 }, to: { col: 5, row: 4 } }, // Second tower to distribution substation (right) { from: { col: 5, row: 4 }, to: { col: 6, row: 4 } }, // Distribution to city 1 (grid-aligned) { from: { col: 6, row: 4 }, to: { col: 7, row: 4 } }, { from: { col: 7, row: 4 }, to: { col: 8, row: 4 } }, // Branch to buildings (city 1) { from: { col: 8, row: 4 }, to: { col: 8, row: 3 } }, { from: { col: 8, row: 4 }, to: { col: 8, row: 5 } }, { from: { col: 8, row: 3 }, to: { col: 9, row: 3 } }, { from: { col: 9, row: 3 }, to: { col: 9, row: 4 } }, { from: { col: 8, row: 5 }, to: { col: 9, row: 5 } }, // === SECOND ROUTE: Substation (3,3) → Towers → Distribution (5,7) → City 2 === // Branch from main substation down { from: { col: 3, row: 3 }, to: { col: 3, row: 5 } }, { from: { col: 3, row: 5 }, to: { col: 4, row: 5 } }, // Tower at (4,5) to tower at (5,6) { from: { col: 4, row: 5 }, to: { col: 5, row: 5 } }, { from: { col: 5, row: 5 }, to: { col: 5, row: 6 } }, // Tower to distribution substation (bottom-left) { from: { col: 5, row: 6 }, to: { col: 5, row: 7 } }, // Distribution to city 2 { from: { col: 5, row: 7 }, to: { col: 6, row: 7 } }, { from: { col: 6, row: 7 }, to: { col: 6, row: 8 } }, { from: { col: 6, row: 7 }, to: { col: 7, row: 7 } }, { from: { col: 7, row: 7 }, to: { col: 7, row: 8 } }, ]; export default function HeroIllustration() { return (
{/* Electric energy flow gradient */} {/* Wind flow gradient */} {/* Sun ray gradient */} {/* Glow filter */} {/* Soft glow for nodes */} {/* Sun glow filter */} {/* Main scene container - positioned to the right */} {/* === ISOMETRIC GRID === */} {/* Horizontal grid lines (going from top-left to bottom-right) */} {[...Array(GRID.rows + 1)].map((_, row) => { const start = gridToScreen(0, row); const end = gridToScreen(GRID.cols, row); return ( ); })} {/* Vertical grid lines (going from top-right to bottom-left) */} {[...Array(GRID.cols + 1)].map((_, col) => { const start = gridToScreen(col, 0); const end = gridToScreen(col, GRID.rows); return ( ); })} {/* Grid intersection nodes */} {[...Array(GRID.cols + 1)].map((_, col) => [...Array(GRID.rows + 1)].map((_, row) => { const pos = gridToScreen(col, row); return ( ); }) )} {/* === POWER LINES (Base cables) === */} {POWER_LINES.map((line, i) => { const from = gridToScreen(line.from.col, line.from.row); const to = gridToScreen(line.to.col, line.to.row); return ( ); })} {/* === ANIMATED ENERGY FLOW === */} {POWER_LINES.map((line, i) => { const from = gridToScreen(line.from.col, line.from.row); const to = gridToScreen(line.to.col, line.to.row); const length = Math.sqrt( Math.pow(to.x - from.x, 2) + Math.pow(to.y - from.y, 2) ); return ( ); })} {/* === SOLAR PANELS === */} {INFRASTRUCTURE.solar.map((panel, i) => { const pos = gridToScreen(panel.col, panel.row); return ( {/* Panel base */} {/* Panel surface (tilted) */} {/* Panel grid lines */} {/* Connection glow */} ); })} {/* === WIND TURBINES === */} {INFRASTRUCTURE.wind.map((turbine, i) => { const pos = gridToScreen(turbine.col, turbine.row); return ( {/* Base */} {/* Tower */} {/* Nacelle */} {/* Blades */} {[0, 120, 240].map((angle, j) => ( ))} {/* Connection glow */} ); })} {/* === SUBSTATIONS === */} {INFRASTRUCTURE.substations.map((sub, i) => { const pos = gridToScreen(sub.col, sub.row); const isCollection = sub.type === 'collection'; return ( {/* Base platform */} {/* Building */} {/* Equipment */} {/* Insulators */} {/* Connection glow */} ); })} {/* === TRANSMISSION TOWERS === */} {INFRASTRUCTURE.towers.map((tower, i) => { const pos = gridToScreen(tower.col, tower.row); return ( {/* Base */} {/* Tower legs */} {/* Cross braces */} {/* Cross arms */} {/* Insulators */} {/* Connection glow */} ); })} {/* === CITY BUILDINGS === */} {INFRASTRUCTURE.city.map((building, i) => { const pos = gridToScreen(building.col, building.row); const heights = { tall: 70, medium: 45, small: 30 }; const height = heights[building.type as keyof typeof heights]; return ( {/* Base */} {/* Building front */} {/* Building side */} {/* Windows */} {[...Array(Math.floor(height / 15))].map((_, w) => ( ))} {/* Connection glow */} ); })} {/* === CITY 2 BUILDINGS (bottom-left) === */} {INFRASTRUCTURE.city2.map((building, i) => { const pos = gridToScreen(building.col, building.row); const heights = { tall: 70, medium: 45, small: 30 }; const height = heights[building.type as keyof typeof heights]; return ( {/* Base */} {/* Building front */} {/* Building side */} {/* Windows */} {[...Array(Math.floor(height / 15))].map((_, w) => ( ))} {/* Connection glow */} ); })} {/* === TREES === */} {INFRASTRUCTURE.trees.map((tree, i) => { const pos = gridToScreen(tree.col, tree.row); return ( {/* Trunk */} {/* Foliage - layered circles for tree crown */} ); })} {/* === ABSTRACT WIND EFFECTS === */} {INFRASTRUCTURE.wind.map((turbine, i) => { const pos = gridToScreen(turbine.col, turbine.row); return ( {/* Wind swoosh lines - curved paths flowing toward turbine */} {[0, 1, 2].map((j) => ( ))} {/* Additional wind particles */} {[0, 1, 2, 3].map((j) => ( ))} ); })} {/* === SCHEMATIC SUN RAYS === */} {/* Simple downward rays above each solar panel */} {INFRASTRUCTURE.solar.map((panel, i) => { const pos = gridToScreen(panel.col, panel.row); return ( {/* Three short schematic rays coming down to panel */} {[-8, 0, 8].map((offset, j) => ( ))} ); })} {/* === ENERGY PARTICLES === */} {POWER_LINES.map((line, i) => { const from = gridToScreen(line.from.col, line.from.row); const to = gridToScreen(line.to.col, line.to.row); return ( ); })} {/* Desktop SVG - Original */} {/* Electric energy flow gradient */} {/* Wind flow gradient */} {/* Sun ray gradient */} {/* Glow filter */} {/* Soft glow for nodes */} {/* Sun glow filter */} {/* Main scene container - positioned to the right */} {/* === ISOMETRIC GRID === */} {/* Horizontal grid lines (going from top-left to bottom-right) */} {[...Array(GRID.rows + 1)].map((_, row) => { const start = gridToScreen(0, row); const end = gridToScreen(GRID.cols, row); return ( ); })} {/* Vertical grid lines (going from top-right to bottom-left) */} {[...Array(GRID.cols + 1)].map((_, col) => { const start = gridToScreen(col, 0); const end = gridToScreen(col, GRID.rows); return ( ); })} {/* Grid intersection nodes */} {[...Array(GRID.cols + 1)].map((_, col) => [...Array(GRID.rows + 1)].map((_, row) => { const pos = gridToScreen(col, row); return ( ); }) )} {/* === POWER LINES (Base cables) === */} {POWER_LINES.map((line, i) => { const from = gridToScreen(line.from.col, line.from.row); const to = gridToScreen(line.to.col, line.to.row); return ( ); })} {/* === ANIMATED ENERGY FLOW === */} {POWER_LINES.map((line, i) => { const from = gridToScreen(line.from.col, line.from.row); const to = gridToScreen(line.to.col, line.to.row); const length = Math.sqrt( Math.pow(to.x - from.x, 2) + Math.pow(to.y - from.y, 2) ); return ( ); })} {/* === SOLAR PANELS === */} {INFRASTRUCTURE.solar.map((panel, i) => { const pos = gridToScreen(panel.col, panel.row); return ( {/* Panel base */} {/* Panel surface (tilted) */} {/* Panel grid lines */} {/* Connection glow */} ); })} {/* === WIND TURBINES === */} {INFRASTRUCTURE.wind.map((turbine, i) => { const pos = gridToScreen(turbine.col, turbine.row); return ( {/* Base */} {/* Tower */} {/* Nacelle */} {/* Blades */} {[0, 120, 240].map((angle, j) => ( ))} {/* Connection glow */} ); })} {/* === SUBSTATIONS === */} {INFRASTRUCTURE.substations.map((sub, i) => { const pos = gridToScreen(sub.col, sub.row); const isCollection = sub.type === 'collection'; return ( {/* Base platform */} {/* Building */} {/* Equipment */} {/* Insulators */} {/* Connection glow */} ); })} {/* === TRANSMISSION TOWERS === */} {INFRASTRUCTURE.towers.map((tower, i) => { const pos = gridToScreen(tower.col, tower.row); return ( {/* Base */} {/* Tower legs */} {/* Cross braces */} {/* Cross arms */} {/* Insulators */} {/* Connection glow */} ); })} {/* === CITY BUILDINGS === */} {INFRASTRUCTURE.city.map((building, i) => { const pos = gridToScreen(building.col, building.row); const heights = { tall: 70, medium: 45, small: 30 }; const height = heights[building.type as keyof typeof heights]; return ( {/* Base */} {/* Building front */} {/* Building side */} {/* Windows */} {[...Array(Math.floor(height / 15))].map((_, w) => ( ))} {/* Connection glow */} ); })} {/* === CITY 2 BUILDINGS (bottom-left) === */} {INFRASTRUCTURE.city2.map((building, i) => { const pos = gridToScreen(building.col, building.row); const heights = { tall: 70, medium: 45, small: 30 }; const height = heights[building.type as keyof typeof heights]; return ( {/* Base */} {/* Building front */} {/* Building side */} {/* Windows */} {[...Array(Math.floor(height / 15))].map((_, w) => ( ))} {/* Connection glow */} ); })} {/* === TREES === */} {INFRASTRUCTURE.trees.map((tree, i) => { const pos = gridToScreen(tree.col, tree.row); return ( {/* Trunk */} {/* Foliage - layered circles for tree crown */} ); })} {/* === ABSTRACT WIND EFFECTS === */} {INFRASTRUCTURE.wind.map((turbine, i) => { const pos = gridToScreen(turbine.col, turbine.row); return ( {/* Wind swoosh lines - curved paths flowing toward turbine */} {[0, 1, 2].map((j) => ( ))} {/* Additional wind particles */} {[0, 1, 2, 3].map((j) => ( ))} ); })} {/* === SCHEMATIC SUN RAYS === */} {/* Simple downward rays above each solar panel */} {INFRASTRUCTURE.solar.map((panel, i) => { const pos = gridToScreen(panel.col, panel.row); return ( {/* Three short schematic rays coming down to panel */} {[-8, 0, 8].map((offset, j) => ( ))} ); })} {/* === ENERGY PARTICLES === */} {POWER_LINES.map((line, i) => { const from = gridToScreen(line.from.col, line.from.row); const to = gridToScreen(line.to.col, line.to.row); return ( ); })}
); }