Quellcode durchsuchen

fix: spread toolbox marks evenly, with none on the poles

The Fibonacci lattice put a mark on each pole, so others passed close by
as the sphere turned. Offsetting it by half a step keeps the front marks
at least about a chip apart through the whole turn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEPoSHwHCYMNpm2iKxY9hL
Claude vor 1 Monat
Ursprung
Commit
77e9b63430
1 geänderte Dateien mit 5 neuen und 2 gelöschten Zeilen
  1. 5 2
      components/cards/tech-sphere.tsx

+ 5 - 2
components/cards/tech-sphere.tsx

@@ -64,10 +64,13 @@ const STYLED = ICONS.map((icon) => {
   };
 });
 
-/** An even spread of `n` points over a sphere (Fibonacci lattice). */
+/**
+ * An even spread of `n` points over a sphere (Fibonacci lattice), offset by
+ * half a step so no mark sits on a pole, where others would pass too close.
+ */
 const lattice = (n: number) =>
   Array.from({ length: n }, (_, i) => {
-    const y = 1 - (i / (n - 1)) * 2;
+    const y = 1 - ((i + 0.5) / n) * 2;
     const r = Math.sqrt(1 - y * y);
     const a = i * Math.PI * (3 - Math.sqrt(5));