import * as THREE from "three";
import React, { useEffect, useMemo, useRef } from "react";
import { useThree } from "@react-three/fiber";
import { useHeatMapStore } from "../../../store/simulation/useHeatMapStore";
import * as CONSTANTS from "../../../types/world/worldConstants";

const RADIUS = 0.0025; 
const OPACITY = 0.8; 
const GROWTH_RATE = 20.0;

const BakedHeatMap = () => {
    const { bakedPoints, setBakedPoints } = useHeatMapStore();
    const materialRef = useRef<THREE.ShaderMaterial>(null);
    const { scene } = useThree();
    const height = CONSTANTS.gridConfig.size;
    const width = CONSTANTS.gridConfig.size;

    useEffect(() => {
        setBakedPoints(
       [
    {
        "x": -13.413516772698177,
        "y": -12.63518978091868
    },
    {
        "x": 1.2354600621530758,
        "y": -2.3794652653900545
    },
    {
        "x": -13.225694033239861,
        "y": -12.101580580058034
    },
    {
        "x": 1.2354600621530758,
        "y": -2.3794652653900545
    },
    {
        "x": -12.888130645282253,
        "y": -11.142555111621942
    },
    {
        "x": 1.210370162741053,
        "y": -2.475026515226926
    },
    {
        "x": -12.555481133729455,
        "y": -10.197490080807574
    },
    {
        "x": 0.9559415090496732,
        "y": -3.4440825869716267
    },
    {
        "x": -12.383927083805611,
        "y": -9.710101018605767
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -12.383927083805611,
        "y": -9.710101018605767
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -12.383927083805611,
        "y": -9.710101018605767
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -12.383927083805611,
        "y": -9.710101018605767
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -12.383927083805611,
        "y": -9.710101018605767
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -12.383927083805611,
        "y": -9.710101018605767
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -12.100303635174932,
        "y": -9.921482578958297
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -11.287280770279391,
        "y": -10.514299803030816
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -10.432216979471804,
        "y": -11.137771251077492
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -9.610507972857294,
        "y": -11.736921992501212
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -8.799222336305547,
        "y": -12.328472513103492
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -7.938251969118708,
        "y": -12.956250752956533
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -7.119322527856856,
        "y": -13.553374768825984
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -6.303520097608656,
        "y": -14.148218718452775
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -6.016877420882665,
        "y": -14.357224791042444
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -6.016877420882665,
        "y": -14.357224791042444
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -6.016877420882665,
        "y": -14.357224791042444
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -6.016877420882665,
        "y": -14.357224791042444
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -6.016877420882665,
        "y": -14.357224791042444
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -6.016877420882665,
        "y": -14.357224791042444
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -6.016877420882665,
        "y": -14.357224791042444
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -6.016877420882665,
        "y": -14.357224791042444
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -6.016877420882665,
        "y": -14.357224791042444
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -6.583101456687219,
        "y": -13.944361419540684
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -7.441639704195337,
        "y": -13.31835656454409
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -8.261264036792117,
        "y": -12.720725867288431
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -9.131267991358921,
        "y": -12.0863607693958
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -10.00231428294753,
        "y": -11.451235649409702
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -10.868148889491817,
        "y": -10.819910639843762
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -11.72356012597334,
        "y": -10.196185851099262
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -12.428874833553657,
        "y": -9.68190424218165
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -12.428874833553657,
        "y": -9.68190424218165
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -12.428874833553657,
        "y": -9.68190424218165
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -12.428874833553657,
        "y": -9.68190424218165
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -12.428874833553657,
        "y": -9.68190424218165
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -11.62256584063161,
        "y": -10.269826033274414
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -10.810932758405928,
        "y": -10.861629894574516
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -10.002426687206839,
        "y": -11.451153689622524
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -9.193225724659879,
        "y": -12.041184166066177
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -8.332602803146976,
        "y": -12.668709065221396
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -7.514368253220055,
        "y": -13.265326399704636
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -6.6996081599807225,
        "y": -13.859410327247394
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -6.018267203552524,
        "y": -14.356211428270027
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -6.018267203552524,
        "y": -14.356211428270027
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -6.018267203552524,
        "y": -14.356211428270027
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -6.018267203552524,
        "y": -14.356211428270027
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -6.018267203552524,
        "y": -14.356211428270027
    },
    {
        "x": 0.8462621642760604,
        "y": -3.8618241952999606
    },
    {
        "x": -6.018267203552524,
        "y": -14.356211428270027
    },
    {
        "x": 0.748157502042881,
        "y": -3.3581772904694653
    },
    {
        "x": -6.018267203552524,
        "y": -14.356211428270027
    },
    {
        "x": 0.5538246288769718,
        "y": -2.3717984332277235
    },
    {
        "x": -6.018267203552524,
        "y": -14.356211428270027
    },
    {
        "x": 0.3480212952786336,
        "y": -1.3271987538005532
    },
    {
        "x": -6.018267203552524,
        "y": -14.356211428270027
    },
    {
        "x": 0.15418713778504578,
        "y": -0.34335123666066325
    },
    {
        "x": -6.018267203552524,
        "y": -14.356211428270027
    },
    {
        "x": -0.05560592118567087,
        "y": 0.721499163549888
    },
    {
        "x": -6.8016447823442565,
        "y": -13.785010122978775
    },
    {
        "x": -0.05560592118567087,
        "y": 0.721499163549888
    },
    {
        "x": -7.659835584178438,
        "y": -13.159258608680005
    },
    {
        "x": -0.05560592118567087,
        "y": 0.721499163549888
    },
    {
        "x": -8.474595677417774,
        "y": -12.565174681137243
    },
    {
        "x": -0.05560592118567087,
        "y": 0.721499163549888
    },
    {
        "x": -9.284144085625726,
        "y": -11.974890864005205
    },
    {
        "x": -0.05560592118567087,
        "y": 0.721499163549888
    },
    {
        "x": -10.094387385168607,
        "y": -11.384100365486958
    },
    {
        "x": -0.05560592118567087,
        "y": 0.721499163549888
    },
    {
        "x": -11.017203081384155,
        "y": -10.711227482100908
    },
    {
        "x": 0.11037596255095145,
        "y": -0.12097806706866165
    },
    {
        "x": -11.835437631311077,
        "y": -10.114610147617668
    },
    {
        "x": 0.30620498273072855,
        "y": -1.1149509446002424
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.5003716173371331,
        "y": -2.1004860217975563
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.7067567858875449,
        "y": -3.148038931348791
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.8582832306188413,
        "y": -3.9171444303878467
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.8582832306188413,
        "y": -3.9171444303878467
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.8582832306188413,
        "y": -3.9171444303878467
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.8582832306188413,
        "y": -3.9171444303878467
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.8582832306188413,
        "y": -3.9171444303878467
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.8582832306188413,
        "y": -3.9171444303878467
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.8582832306188413,
        "y": -3.9171444303878467
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.8582832306188413,
        "y": -3.9171444303878467
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.8582832306188413,
        "y": -3.9171444303878467
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.8582832306188413,
        "y": -3.9171444303878467
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.8582832306188413,
        "y": -3.9171444303878467
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.8582832306188413,
        "y": -3.9171444303878467
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.8582832306188413,
        "y": -3.9171444303878467
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.8582832306188413,
        "y": -3.9171444303878467
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.8582832306188413,
        "y": -3.9171444303878467
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.8582832306188413,
        "y": -3.9171444303878467
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.8582832306188413,
        "y": -3.9171444303878467
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.6311680840414016,
        "y": -2.764371998766924
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.4116056103355533,
        "y": -1.6499348045910875
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": 0.21105232232801752,
        "y": -0.6319828759327826
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.005831004398717088,
        "y": 0.46885572376653073
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    },
    {
        "x": -12.414977006803309,
        "y": -9.692037869943572
    },
    {
        "x": -0.045763052202884125,
        "y": 0.6715395365395231
    }
]
    );
    },[]);

    const pointTexture = useMemo(() => {
        if (bakedPoints.length === 0) return null;

        const data = new Float32Array(bakedPoints.length * 4);
        bakedPoints.forEach((p, i) => {
            const index = i * 4;
            // normalize coordinates between 0-1
            data[index] = (p.x + width / 2) / width;
            data[index + 1] = (p.y + height / 2) / height;
            data[index + 2] = 0.3; // fixed strength for baked points
            data[index + 3] = 0.0;
        });

        const texture = new THREE.DataTexture(data, bakedPoints.length, 1, THREE.RGBAFormat, THREE.FloatType);
        texture.needsUpdate = true;
        return texture;
    }, [bakedPoints, width, height]);

    /** Uniforms for shader */
    const uniformsRef = useRef({
        u_points: { value: null as THREE.DataTexture | null },
        u_count: { value: 0 },
        u_radius: { value: RADIUS },
        u_opacity: { value: OPACITY },
        u_growthRate: { value: GROWTH_RATE },
    });

    useEffect(() => {
        uniformsRef.current.u_points.value = pointTexture;
        uniformsRef.current.u_count.value = bakedPoints.length;
    }, [pointTexture, bakedPoints.length]);

    return (
        <mesh rotation={[Math.PI / 2, 0, 0]} position={[0, 0.025, 0]}>
            <planeGeometry args={[width, height]} />
            <shaderMaterial
                ref={materialRef}
                transparent
                depthWrite={false}
                blending={THREE.AdditiveBlending}
                uniforms={uniformsRef.current}
                side={THREE.DoubleSide}
                vertexShader={`
          varying vec2 vUv;
          void main() {
            vUv = uv;
            gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
          }
        `}
                fragmentShader={`
          precision highp float;
          uniform sampler2D u_points;
          uniform int u_count;
          uniform float u_radius;
          uniform float u_opacity;
          uniform float u_growthRate;
          varying vec2 vUv;

          float gauss(float dist, float radius) {
            return exp(-pow(dist / radius, 2.0));
          }

          void main() {
            float intensity = 0.0;

            for (int i = 0; i < 10000; i++) {
              if (i >= u_count) break;
              float fi = float(i) + 0.5;
              float u = fi / float(u_count);

              vec4 point = texture2D(u_points, vec2(u, 0.5));
              vec2 pos = point.rg;
              float strength = point.b;

              float d = distance(vUv, pos);
              intensity += strength * gauss(d, u_radius);
            }

            // Normalize intensity to [0, 1]
            float normalized = clamp(intensity / max(u_growthRate, 0.0001), 0.0, 1.0);

            // Heatmap color gradient (Blue → Green → Yellow → Red)
            vec3 color = vec3(0.0);
            if (normalized < 0.33) {
              color = mix(vec3(0.0, 0.0, 1.0), vec3(0.0, 1.0, 0.0), normalized / 0.33);
            } else if (normalized < 0.66) {
              color = mix(vec3(0.0, 1.0, 0.0), vec3(1.0, 1.0, 0.0), (normalized - 0.33) / 0.33);
            } else {
              color = mix(vec3(1.0, 1.0, 0.0), vec3(1.0, 0.0, 0.0), (normalized - 0.66) / 0.34);
            }

            gl_FragColor = vec4(color, normalized * u_opacity);
          }
        `}
            />
        </mesh>
    );
};

export default BakedHeatMap;
