'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 (
{/* Desktop SVG - Original */}
);
}