Skip to content

General Relativity, Special Relativity, and Quantum Mechanics reproduced as a Hexagonal Cellular Automata using WebGL 2.0 Compute Vertex and Fragment Shaders

Notifications You must be signed in to change notification settings

churchofthought/Grautamaton

Repository files navigation

Grautamaton (WORK IN PROGRESS - NOT COMPLETED)

General Relativity and Quantum Mechanics reproduced as a Hexagonal Cellular Automata

Usability and Versatility

Grautamaton is a supercharged, performance driven, highly configurable Cellular Automata framework, supporting both square and hexagonal lattices.

Performance

Cutting edge WebGL 2.0 Compute is used: OpenGL ES 3.1.0. Rendering is done using the most performance optimized vertex and fragment shaders. World updates are done using compute shaders. Bitwise operations are used to pack the world into the minimum bits required. Shader Storage Buffer Objects (SSBOs) are used instead of jerry-rigging textures or images or samplers. This delivers better performance and versatility.

Standards and Syntax

Grautmaton uses ES2019 syntax and the mjs module system for extremely concise and elegant code structure and code content. Metaprogramming via JS templates is used in the GLSL shaders to allow for shorter and syntactically sweeter shader codes.

Design Principles

  1. Fundamental particle is a Beable.

  2. Beables travel at the speed of light, 1 cell per second.

  3. Beables appear to travel in straight lines at C, from interaction to interaction. essentially from perspective of observers

  4. When a beable is emitted, a pilot wave is first released ahead of the beable, by at least 1 time step.

  5. Beables follow their pilot waves randomly but always choosing further and further outer rings, so as to appear to have been traveling in a straight line at C if and when they finally collide.

  6. Randomness is generated by the formula, P(n) = (time mod n) where time is the global clock of the universe. The universe starts at t=0 and increases every clock tick. Alternative formulas with other random variants like prime(time) can be used, where prime(n) yields the nth prime number.

  7. Pilot waves can self-interfere to form interference patterns such as the double slit experiment.

  8. Complimentarity: beables can only do 1 action per second, either interaction/collision, or movement.

  9. Rest mass is an emergent macroscopic concept. It is a measure of the total amount of beables bouncing or interacting inside of an object. A ray of light is a bunch of beebles moving in one direction with no bouncing, therefore we deduce the standard knowledge that the photon has no rest mass.

  10. Time is also related to the amount of bouncing/interaction inside of an object. A ray of light, again, has no internal bouncing or interaction, so it is eternal, ie. infinitely dilated time. This is the common explanation for why photon state cannot change, and that "photons do not experience time." In the same vain, as a space ship goes faster and faster, more time ticks will be dedicated to net movement of beables, so the ships internal beebles have less time to bounce and interact, thus making time slower inside the ship. Time Dilation (or local time inside an object) and Rest Mass are really the same thing.

WebGL 2.0 Compute

must be enabled by running Chrome with necessary flags as so:

"C:\Program Files (x86)\Google\Chrome Beta\Application\chrome.exe" --use-cmd-decoder=passthrough --enable-webgl2-compute-context --use-angle=gl

Demo GIF

Demo GIF

About

General Relativity, Special Relativity, and Quantum Mechanics reproduced as a Hexagonal Cellular Automata using WebGL 2.0 Compute Vertex and Fragment Shaders

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published