https://github.com/micahbrun/continuous-complex-valued-cellular-automata
Continuous Complex-Valued Cellular Automata: Inspired by Lenia and quantum mechanics, this cellular automaton evolves according to the Schrödinger equation, with a convolutional Hamiltonian. This project uses SFML for visualisation.
https://github.com/micahbrun/continuous-complex-valued-cellular-automata
cellular-automata cellularautomata convolution eigen opencv quantum-mechanics sfml
Last synced: 4 months ago
JSON representation
Continuous Complex-Valued Cellular Automata: Inspired by Lenia and quantum mechanics, this cellular automaton evolves according to the Schrödinger equation, with a convolutional Hamiltonian. This project uses SFML for visualisation.
- Host: GitHub
- URL: https://github.com/micahbrun/continuous-complex-valued-cellular-automata
- Owner: MicahBrun
- Created: 2023-11-28T20:40:29.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-04T21:55:34.000Z (over 2 years ago)
- Last Synced: 2024-01-04T22:51:29.429Z (over 2 years ago)
- Topics: cellular-automata, cellularautomata, convolution, eigen, opencv, quantum-mechanics, sfml
- Language: C++
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Continuous Complex-Valued Cellular Automata
Inspired by Lenia and quantum mechanics, this cellular automaton evolves according to the Schrödinger equation, with a convolutional Hamiltonian.
The kernel and initial state are defined within the relevant funtions inside main.cpp.
https://github.com/MicahBrun/ContinuousComplexValuedCellularAutomata/assets/55516590/c8526b67-51bc-4f8e-9663-20c422b3e83e
## Visualisation
SFML is used for the visualisation of the system at a certain time. The system is made up of a 2-D grid where each point stores a complex value. In the visualisation, the complex number is converted into a colour. The hue of the colour corresponds to the phase of the complex number; the brightness is proportional to the arctangent of the magnitude.
## Theory
The system transforms according to:
$$i \frac{\partial \psi}{\partial t} = h * \psi$$
Where $h*\psi$ represents the convolution of the functions $h$ and $\psi$. $h$ is a real valued function while $\psi$ may be complex valued.
From this we can derive that:
$$\psi(t + \Delta t) = \mathrm{exp}(-i \Delta t ~ h *) \psi(t) $$
In the frequency domain, making use of the convolution theorem, this becomes:
$$\tilde{\psi}(t + \Delta t) = \mathrm{exp}(-i \Delta t ~ \tilde{h}) \tilde{\psi}(t) $$
Where $\tilde{f}$ represents the Fourier transform of a function.
## Installation
Ensure you have the following dependency installed before running the project:
- [OpenCV](https://opencv.org/)