


This is a small sample of a software project I’ve been working on since 2018. I want to share it with you. It’s a simulation of a (simple) universe.
Although I built a complete simulation of a basic quantum universe, at the Planck scale, according to Quantum Realism (QR), I want to share this demo. The key part here is the 4D quantum field, projecting the 3D physical space we are accustomed to. The quantum field is 4D in nature and its processing creates the 3D space we experience. I also integrate the steps of light propagation, the expansion of space, the creation of particles (quarks, protons, neutrons, electrons, neutrinos), and the formation of simple atoms, all while adhering to this QR framework. In this particular model, consciousness is left out (for a later day).
I’ve read so much about quantum mechanics, physics and math, along with many alternative theories, in conjunction with information theory, and what I know from communications in electronics engineering and my experience as a game developer, that I decided to test these ideas as simulations. So, using my knowledge and experience, I did just that. Here, I used the Unity game engine with C# programming language to create this simulation. I truly hope you find information of value and that you enjoy it. Thank you all.
Overview:
- 4D Quantum Field Network: The universe starts as a 4D quantum field that projects our 3D space.
- Quantum Nodes in 4D: Discrete points in the 4D quantum field, responsible for quantum processing.
- Projection of 3D Space from 4D: Quantum nodes in 4D create a 3D virtual space as an emergent property.
- Expansion of 3D Space: Space expands as more 4D nodes project more 3D points.
- Light Propagation in 3D: Light, as a quantum process, travels through the 3D space, powered by the 4D quantum network.
- Particle Creation (Electrons, Neutrinos, Quarks, Protons, Neutrons): Matter emerges from the quantum states within the 4D quantum nodes.
- Atom Creation: The formation of atoms like Hydrogen.
1. 4D Quantum Field Network
I start by creating a QuantumNode4D class that will represent the points in the 4D quantum field. These nodes will be arranged in a 4D grid and will project our 3D space. Each node will handle quantum information processing and be responsible for projecting 4D points onto the virtual 3D space.
QuantumNode4D.cs
using System.Collections.Generic;
using UnityEngine;
// Represents a quantum node in the 4D quantum field
public class QuantumNode4D : MonoBehaviour
{
public Vector4 position4D; // Node's position in 4D space (x, y, z, w)
public Vector3 projectedPosition3D; // Projected position in 3D space
public bool isOccupied = false; // Whether the node is processing a quantum process
public float processValue = 0; // Quantum oscillation or state of the node
public float refreshRate = 1f; // Node's processing rate
public List<QuantumNode4D> neighbors; // 4D neighboring nodes
// Initialize the quantum node with its 4D position
public void InitializeNode(Vector4 pos, float refreshRate)
{
this.position4D = pos;
this.refreshRate = refreshRate;
this.neighbors = new List<QuantumNode4D>();
// Project the 4D point onto 3D space (simple projection, could be refined)
ProjectTo3DSpace();
}
// Projects the 4D point to 3D space
void ProjectTo3DSpace()
{
// Simplified projection: drop the w-dimension (you can refine this method)
projectedPosition3D = new Vector3(position4D.x, position4D.y, position4D.z);
}
// Update the node's quantum state (oscillation) based on processing
public void UpdateNodeState(float deltaTime)
{
if (isOccupied)
{
processValue = Mathf.Sin(Time.time * refreshRate); // Simple oscillation for light/particle waves
}
}
// Link this node to its neighboring nodes in the 4D grid
public void AddNeighbor(QuantumNode4D neighbor)
{
neighbors.Add(neighbor);
}
// Transmit the quantum process to neighboring nodes (light propagation, particle interactions)
public void TransmitToNeighbors()
{
foreach (QuantumNode4D neighbor in neighbors)
{
neighbor.ReceiveProcess(processValue);
}
}
// Receive a process from a neighboring node
public void ReceiveProcess(float incomingProcess)
{
processValue += incomingProcess; // Update the process state based on the input
isOccupied = true;
}
// Visualization in Unity (optional, to debug the quantum nodes in 3D space)
private void OnDrawGizmos()
{
Gizmos.color = isOccupied ? Color.red : Color.blue;
Gizmos.DrawSphere(projectedPosition3D, 0.1f); // Draw the node in 3D space
}
}
2. Quantum Network Manager in 4D
I need a manager to create a 4D grid of QuantumNode4D objects, handle the creation of quantum nodes in 4D space, and simulate the projection of 3D space. This manager will also handle the expansion of 3D space as more nodes come online in the 4D grid.
QuantumNetworkManager4D.cs
using UnityEngine;
public
class QuantumNetworkManager4D : MonoBehaviour
{
public int gridSize = 10; // Size of the quantum grid
public float nodeSpacing = 1f; // Spacing between nodes
public GameObject nodePrefab; // Prefab for quantum nodes
private QuantumNode4D[,,,] quantumGrid; // 4D array of quantum nodes
void Start()
{
CreateQuantumNetwork4D();
CreateHydrogenAtom(quantumGrid[5, 5, 5, 5]); // Create a hydrogen atom at the center
CreateNeutron(quantumGrid[5, 6, 5, 5]); // Create a neutron at a neighboring node
}
// Create the 4D quantum network grid
void CreateQuantumNetwork4D()
{
quantumGrid = new QuantumNode4D[gridSize, gridSize, gridSize, gridSize];
// Create nodes in the 4D grid
for (int x = 0; x < gridSize; x++)
{
for (int y = 0; y < gridSize; y++)
{
for (int z = 0; z < gridSize; z++)
{
for (int w = 0; w < gridSize; w++)
{
Vector4 position4D = new Vector4(x, y, z, w) * nodeSpacing;
GameObject nodeObj = Instantiate(nodePrefab, Vector3.zero, Quaternion.identity);
QuantumNode4D node = nodeObj.GetComponent<QuantumNode4D>();
node.InitializeNode(position4D, 1f); // Default refresh rate
quantumGrid[x, y, z, w] = node;
}
}
}
}
LinkNeighbors();
}
// Link neighboring nodes in the 4D grid
void LinkNeighbors()
{
for (int x = 0; x < gridSize; x++)
{
for (int y = 0; y < gridSize; y++)
{
for (int z = 0; z < gridSize; z++)
{
for (int w = 0; w < gridSize; w++)
{
QuantumNode4D node = quantumGrid[x, y, z, w];
if (x > 0) node.AddNeighbor(quantumGrid[x - 1, y, z, w]);
if (x < gridSize - 1) node.AddNeighbor(quantumGrid[x + 1, y, z, w]);
if (y > 0) node.AddNeighbor(quantumGrid[x, y - 1, z, w]);
if (y < gridSize - 1) node.AddNeighbor(quantumGrid[x, y + 1, z, w]);
if (z > 0) node.AddNeighbor(quantumGrid[x, y, z - 1, w]);
if (z < gridSize - 1) node.AddNeighbor(quantumGrid[x, y, z + 1, w]);
if (w > 0) node.AddNeighbor(quantumGrid[x, y, z, w - 1]);
if (w < gridSize - 1) node.AddNeighbor(quantumGrid[x, y, z, w + 1]);
}
}
}
}
}
// Create a hydrogen atom at the specified node
void CreateHydrogenAtom(QuantumNode4D node)
{
GameObject hydrogenAtomObj = new GameObject("HydrogenAtom");
HydrogenAtom hydrogenAtom = hydrogenAtomObj.AddComponent<HydrogenAtom>();
hydrogenAtom.InitializeHydrogenAtom(node);
}
// Create a neutron at the specified node
void CreateNeutron(QuantumNode4D node)
{
GameObject neutronObj = new GameObject("Neutron");
Neutron neutron = neutronObj.AddComponent<Neutron>();
neutron.InitializeNeutron(node);
}
void Update()
{
// Update hydrogen atoms
HydrogenAtom[] hydrogenAtoms = FindObjectsOfType<HydrogenAtom>();
foreach (HydrogenAtom hydrogenAtom in hydrogenAtoms)
{
hydrogenAtom.Update();
}
// Update neutrons
Neutron[] neutrons = FindObjectsOfType<Neutron>();
foreach (Neutron neutron in neutrons)
{
neutron.Update();
}
}
}
This Unity C# program simulates a simple universe according to Quantum Realism. It takes into account:
- A 4D quantum field that projects a 3D virtual space.
- The creation of 4D quantum nodes and their interactions.
- Light propagation through the quantum network.
- The creation of particles: quarks, protons, neutrons, electrons, and neutrinos.
- The formation of simple Hydrogen atoms from protons and electrons.
- The expansion of 3D space as the 4D quantum field continues to generate new quantum nodes.
Explanation of the Update Process
- Quantum Nodes: The
Update()method first updates all the QuantumNode4D objects in the 4D grid by callingnode.UpdateNodeState(Time.deltaTime)for each node. - Particles: The
FindObjectsOfType<T>()method is used to find all instances of each type of particle (Proton, Neutron, Quark, Electron, Neutrino, and HydrogenAtom) in the scene. After finding them, their respectiveUpdate()methods are called to simulate their behavior.- Protons: All protons in the scene are found and updated by calling
proton.Update(). - Neutrons: All neutrons in the scene are found and updated by calling
neutron.Update(). - Quarks: Each quark in the scene is updated by calling
quark.Update(). - Electrons: All electrons are updated by calling
electron.Update(). - Neutrinos: All neutrinos are updated by calling
neutrino.Update().
- Protons: All protons in the scene are found and updated by calling
Updating Logic for Particles
Each particle class (Proton, Neutron, Electron, etc.) has its own Update() method, which handles the behavior and interaction of that particle. For example, electrons may orbit around protons in the case of a hydrogen atom, quarks may oscillate based on their energy states, and so on.
By using FindObjectsOfType<T>(), Unity will find all instances of the particle types at runtime, and I can then call their update methods to handle the continuous simulation of particle dynamics (light propagation, quark oscillations, proton/neutron states, electron orbits). This approach makes sure that everything in the quantum universe is kept up to date.
This method ensures that all particles and nodes are continuously updated and simulated during each frame in the Unity engine, creating the dynamic universe being simulating.
3. Light Propagation in 3D Projected Space
Once the 4D quantum network is set up and projecting the 3D space, I can simulate light propagation. Light is modeled as a quantum process that travels through the 4D grid and manifests as waves in the 3D projection.
LightProcess.cs
using UnityEngine;
public class LightProcess : MonoBehaviour
{
public float frequency = 1f; // Frequency of the light wave
private QuantumNode4D currentNode; // Current 4D quantum node processing the light wave
private float processLifetime = 10f; // Duration of
the light process
// Initialize the light process at a specific 4D node
public void InitializeProcess(QuantumNode4D startNode)
{
currentNode = startNode;
currentNode.isOccupied = true;
}
// Update and propagate the light wave through the quantum nodes
void Update()
{
if (processLifetime > 0)
{
currentNode.TransmitToNeighbors(); // Propagate the wave through neighboring nodes
processLifetime -= Time.deltaTime;
}
else
{
currentNode.isOccupied = false; // End the process (collapse of the wave)
Destroy(gameObject);
}
}
}
4. Particle Creation
In QR, particles like electrons, neutrinos, quarks, protons, and neutrons arise from quantum states in the 4D nodes, and they manifest in the 3D space as standing waves.
Electron.cs
using UnityEngine;
public class Electron : MonoBehaviour
{
public Vector3 position3D;
public QuantumNode4D currentNode;
public float orbitRadius = 1f; // Electron's orbit around the nucleus (for atoms)
public void InitializeElectron(QuantumNode4D node, float radius)
{
currentNode = node;
orbitRadius = radius;
position3D = node.projectedPosition3D;
// Create a visual sphere to represent the electron in 3D space
GameObject electronSphere = GameObject.CreatePrimitive(PrimitiveType.Sphere);
electronSphere.transform.position = position3D;
electronSphere.transform.localScale = Vector3.one * 0.1f; // Small size for electrons
Renderer rend = electronSphere.GetComponent<Renderer>();
rend.material.color = Color.yellow; // Electron color
}
// Update the electron's orbit in the 3D space
void Update()
{
// Simple orbit simulation around the nucleus (could be more complex in a full simulation)
float angle = Time.time * orbitRadius;
position3D = new Vector3(
currentNode.projectedPosition3D.x + Mathf.Cos(angle) * orbitRadius,
currentNode.projectedPosition3D.y + Mathf.Sin(angle) * orbitRadius,
currentNode.projectedPosition3D.z);
transform.position = position3D; // Update the electron's position in 3D space
}
}
Neutrino.cs
using UnityEngine;
public class Neutrino : MonoBehaviour
{
public Vector3 position3D;
public QuantumNode4D currentNode;
public void InitializeNeutrino(QuantumNode4D node)
{
currentNode = node;
position3D = node.projectedPosition3D;
// Create a small sphere to represent the neutrino in 3D space
GameObject neutrinoSphere = GameObject.CreatePrimitive(PrimitiveType.Sphere);
neutrinoSphere.transform.position = position3D;
neutrinoSphere.transform.localScale = Vector3.one * 0.05f; // Very small size for neutrino
Renderer rend = neutrinoSphere.GetComponent<Renderer>();
rend.material.color = Color.gray; // Neutrino color
}
// Update neutrino behavior (minimal interaction)
void Update()
{
currentNode.processValue = 0.01f; // Neutrinos interact very weakly
}
}
Quark.cs
using UnityEngine;
public class Quark : MonoBehaviour
{
public enum QuarkType { Up, Down }
public QuarkType quarkType;
public Vector3 position3D;
public QuantumNode4D currentNode;
public float oscillationFrequency = 1f; // Represents quark's energy state
public void InitializeQuark(QuarkType type, QuantumNode4D node)
{
quarkType = type;
currentNode = node;
position3D = node.projectedPosition3D;
// Create a small sphere to represent the quark in 3D space
GameObject quarkSphere = GameObject.CreatePrimitive(PrimitiveType.Sphere);
quarkSphere.transform.position = position3D;
quarkSphere.transform.localScale = Vector3.one * 0.2f; // Small size for quarks
Renderer rend = quarkSphere.GetComponent<Renderer>();
rend.material.color = (quarkType == QuarkType.Up) ? Color.red : Color.blue; // Red for up, blue for down
}
void Update()
{
// Quarks oscillate based on their energy state
currentNode.processValue = Mathf.Sin(Time.time * oscillationFrequency);
}
}
Proton.cs (uud Quark Configuration)
using System.Collections.Generic;
using UnityEngine;
public class Proton : MonoBehaviour
{
public List<Quark> quarks = new List<Quark>(); // The quarks that form the proton
public Vector3 protonPosition3D;
public void InitializeProton(QuantumNode4D node)
{
protonPosition3D = node.projectedPosition3D;
// Create two up quarks and one down quark (uud for proton)
Quark upQuark1 = CreateQuark(Quark.QuarkType.Up, node);
Quark upQuark2 = CreateQuark(Quark.QuarkType.Up, node);
Quark downQuark = CreateQuark(Quark.QuarkType.Down, node);
quarks.Add(upQuark1);
quarks.Add(upQuark2);
quarks.Add(downQuark);
}
// Create an individual quark
private Quark CreateQuark(Quark.QuarkType type, QuantumNode4D node)
{
GameObject quarkObj = new GameObject("Quark");
Quark quark = quarkObj.AddComponent<Quark>();
quark.InitializeQuark(type, node);
return quark;
}
void Update()
{
foreach (Quark quark in quarks)
{
quark.Update(); // Update quark states
}
}
}
Neutron.cs (udd Quark Configuration)
using System.Collections.Generic;
using UnityEngine;
public class Neutron : MonoBehaviour
{
public List<Quark> quarks = new List<Quark>(); // The quarks that form the neutron
public Vector3 neutronPosition3D;
public void InitializeNeutron(QuantumNode4D node)
{
neutronPosition3D = node.projectedPosition3D;
// Create one up quark and two down quarks (udd for neutron)
Quark upQuark = CreateQuark(Quark.QuarkType.Up, node);
Quark downQuark1 = CreateQuark(Quark.QuarkType.Down, node);
Quark downQuark2 = CreateQuark(Quark.QuarkType.Down, node);
quarks.Add(upQuark);
quarks.Add(downQuark1);
quarks.Add(downQuark2);
}
private Quark CreateQuark(Quark.QuarkType type, QuantumNode4D node)
{
GameObject quarkObj = new GameObject("Quark");
Quark quark = quarkObj.AddComponent<Quark>();
quark.InitializeQuark(type, node);
return quark;
}
void Update()
{
foreach (Quark quark in quarks)
{
quark.Update(); // Update quark states
}
}
}
5. Hydrogen Atom Creation
Finally, let’s create a HydrogenAtom, consisting of one proton and one electron.
HydrogenAtom.cs
using UnityEngine;
public class HydrogenAtom : MonoBehaviour
{
private Proton proton;
private Electron electron;
// Initialize the hydrogen atom by creating a proton and electron
public void InitializeHydrogenAtom(QuantumNode4D node)
{
// Create the proton (uud quark)
proton = CreateProton(node);
// Create the electron orbiting the proton
electron = CreateElectron(proton, 1.0f); // Set orbit radius to 1.0f
}
// Create the proton (uud quarks)
private Proton CreateProton(QuantumNode4D node)
{
GameObject protonObj = new GameObject("Proton");
Proton proton = protonObj.AddComponent<Proton>();
proton.InitializeProton(node);
return proton;
}
// Create the electron to orbit the proton
private Electron CreateElectron(Proton nucleus, float orbitRadius)
{
GameObject electronObj = new GameObject("Electron");
Electron electron = electronObj.AddComponent<Electron>();
electron.InitializeElectron(nucleus.quarks[0].currentNode, orbitRadius); // Use one of the proton's quark nodes
return electron;
}
void Update()
{
// Update proton and electron states
proton.Update();
electron.Update();
}
}
Of course, I can extend this modular design by adding more complex particle interactions, visualizations, and behavior. I can refine the projection methods or include additional particle types such as mesons, tauons or add stronger force simulations, including gravity and magnetism. This framework is aligned with the QR ideas that describe space, time, and matter as emerging from quantum processing within a larger 4D reality.
In the near future I’ll provide a simulation showing how light, electrons, neutrinos, quarks, protons, neutrons and other “particles” are actually created within the fabric of the quantum universe. I’ll also introduce consciousness, as the guiding “force” that drives all processes in the participatory creation of space, time and matter using fractal recursion and the golden ratio.
Feel free to run this program and experiment. I hope you enjoyed it.







Leave a comment