Home▸Refeeding Syndrome Risk Management▸Refeeding Electrolyte Trend Space: Phosphate, Potassium & Magnesium (3D)

Refeeding Electrolyte Trend Space: Phosphate, Potassium & Magnesium (3D)

Phosphate, potassium and magnesium plotted together as one trajectory through a 3D trend space — orbit the scene to see a divergent electrolyte visibly pull the path off the reference cube instead of comparing separate line charts.

Refeeding Syndrome Risk Management3DModerate60 FPS⇄ 2D version
3d-refeeding-electrolyte-trending-dashboard-simulator ↗ Open standalone

This 3D companion takes the same phosphate/potassium/magnesium physiology as the 2D trending dashboard and plots it as a single point moving through a 3D "electrolyte space" — phosphate on the X axis, potassium on Y, magnesium on Z, each normalized against its pre-feeding baseline. A translucent reference-range cube marks the zone all three coordinates should broadly stay within during an expected course; a tube trajectory traces the day-by-day path through that space, turning red and gaining a pulsing ring the moment the trend pattern is set to the concerning, divergent case. Because all three electrolytes share one geometric position instead of three separate line charts, a diverging electrolyte is immediately visible as the trajectory pulling off the diagonal toward its own axis, from whatever angle you orbit the scene to look at it.

⚙ Under the hood

3D refeeding-electrolyte trend space: phosphate, potassium and magnesium plotted as one Three.js trajectory with a reference-range cube, day-by-day tube path, and flagged-divergence ring, driven by drag-orbit camera controls and the same underlying trend model as the 2D dashboard.

refeeding syndromeelectrolyte trendingphosphatepotassiummagnesium3d trajectory

3D · Three.js r128 / WebGL · 60 FPS target · runs fully client-side, no install

Why plot three electrolytes as one 3D point instead of three 2D lines?

Because phosphate, potassium and magnesium respond to the same insulin-driven trigger through related but distinct pathways, their relationship to each other carries information a single-value chart cannot show. Placing all three on their own axis turns "are these three trajectories staying together or is one diverging" into a single geometric shape you can see from any angle, rather than something you reconstruct by comparing separate line slopes.

What does the reference-range cube represent?

It marks the broad zone where all three normalized electrolyte values are expected to sit during a typical, uncomplicated refeeding course. A trajectory that stays inside or near this cube through the week is consistent with the expected bounded dip-and-recovery pattern; one that exits it toward a single axis suggests that electrolyte is diverging from the other two.

How does the flagged trajectory differ from the expected one?

Setting the trend pattern to the concerning case makes the phosphate coordinate fall much more steeply than potassium and magnesium, pulling the trajectory off the diagonal toward the phosphate axis. The tube turns red and a pulsing ring appears at the current day's position, mirroring the same flag logic as the 2D dashboard but expressed as a 3D deviation instead of a line breaking away from its neighbors.

What did you find?

Add reproduction steps (optional)