restructure: kebab-case docs, extract foreword, rewrite README

- Rename all docs to consistent kebab-case (11 .md files + 1 .html)
- Move generate_spiral.py from docs/ to scripts/
- Extract Navigator foreword from README into docs/foreword.md
- Rewrite README: technical content first, accurate project structure
- Update all internal links to match new filenames
This commit is contained in:
Scruff AI
2026-03-25 17:14:50 +07:00
parent 491714350d
commit 6227557769
15 changed files with 130 additions and 120 deletions
+45
View File
@@ -0,0 +1,45 @@
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import os
# Load data
script_dir = os.path.dirname(os.path.abspath(__file__))
df = pd.read_csv(os.path.join(script_dir, 'lattice-periodic-table.csv'))
# Golden angle
phi = (1 + np.sqrt(5)) / 2
golden_angle = np.pi * (3 - np.sqrt(5)) # ≈ 2.39996 radians
# Calculate positions
df['angle'] = df['AtomicNumber'] * golden_angle
df['radius'] = (df['AsymmetryValue'] - 13.2) * 10 # scale factor
df['x'] = df['radius'] * np.cos(df['angle'])
df['y'] = df['radius'] * np.sin(df['angle'])
# Color by stability
colors = {'Stable': '#00aa00', 'Metastable': '#ffaa00', 'Radioactive': '#aa0000'}
df['color'] = df['Stability'].map(colors)
# Size by valency
df['size'] = (df['ValencyLobes'] + 1) * 20
# Plot
fig, ax = plt.subplots(figsize=(16, 16))
scatter = ax.scatter(df['x'], df['y'], c=df['color'], s=df['size'], alpha=0.7)
# Add element symbols
for idx, row in df.iterrows():
ax.annotate(row['Symbol'], (row['x'], row['y']), fontsize=8, ha='center')
# Fibonacci spiral overlay
theta = np.linspace(0, 4*np.pi, 1000)
r = np.exp(theta / (2*np.pi) * np.log(phi))
ax.plot(r * np.cos(theta), r * np.sin(theta), 'k--', alpha=0.3, linewidth=1)
ax.set_aspect('equal')
ax.axis('off')
plt.title('Lattice Physics Periodic Table — Phi-Harmonic Spiral', fontsize=16)
plt.savefig(os.path.join(script_dir, 'lattice-periodic-spiral.png'), dpi=300, bbox_inches='tight')
plt.savefig(os.path.join(script_dir, 'lattice-periodic-spiral.svg'), format='svg')
print("Generated: lattice-periodic-spiral.png + .svg")