Skip to content

Instantly share code, notes, and snippets.

@BrianMartell
Created December 14, 2025 04:12
Show Gist options
  • Select an option

  • Save BrianMartell/b3fb9b7faa366c487184dd740f737a7a to your computer and use it in GitHub Desktop.

Select an option

Save BrianMartell/b3fb9b7faa366c487184dd740f737a7a to your computer and use it in GitHub Desktop.
PUH- BrianMartell puh_gravity_jacobian_shear_simulation.py- Updated Py Code
import numpy as np
import matplotlib.pyplot as plt
# PUH v11: Gravity Jacobian Shear Sim — Fold Distortion
x = np.linspace(-10, 10, 1000) # Coordinate
m_knot = 1 # Toy mass (knot)
# Jacobian J(φ) = 1 - 2 G m / r (toy 1D shear)
r = np.abs(x) + 1e-6 # Avoid singularity
J = 1 - 2 * 6.6743e-11 * m_knot * 1.989e30 / (r * 1.496e11)**2 # G M / (c^2 r) normalized
# Curvature toy R ~ d²J/dx²
dJ_dx = np.gradient(J, x)
R = np.gradient(dJ_dx, x)
plt.figure(figsize=(10,6))
plt.subplot(1,2,1)
plt.plot(x, J, label='Jacobian J(φ)', color='cyan', lw=2)
plt.axvline(0, color='red', ls=':', label='Knot at x=0')
plt.xlabel('Coordinate x'); plt.ylabel('J(φ)')
plt.title('PUH v11: Shear Distortion')
plt.subplot(1,2,2)
plt.plot(x, R, label='Curvature R ~ d²J/dx²', color='gold', lw=2)
plt.xlabel('Coordinate x'); plt.ylabel('R')
plt.title('Emergent Curvature')
plt.tight_layout()
plt.savefig('puh_gravity_jacobian_shear_simulation.png', dpi=300)
plt.show()
print("J min at knot ~0.999 — shear curves geodesics.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment