i am working on a cellular automaton to simulate in 2D an earthen dam failure using python, the simulation is supposed to show step by step the process by setting 1. the cellular state. 2. defining a neighbour using von Neumann as the standard neighbour. 3. construct the evolution law 4. And Determine the cellular time
i Have tried Using scatter plot in python plotly but couldn't get the desired result, i would love to know if there is a better way to go about it. below is the code i am trying to evolve to realize the CA.
import plotly.graph_objects as go
import numpy as np
N = 100000
r = np.random.uniform(0, 1, N)
theta = np.random.uniform(0, 2*np.pi, N)
fig = go.Figure(data=go.Scattergl(
x = r * np.cos(theta), # non-uniform distribution
y = r + np.sin(theta), # zoom to see more points at the center
mode='markers',
marker=dict(
color=np.random.randn(N),
colorscale='ylorrd',
line_width=1
)
))
fig.show()
Below is the image of what i am trying to accomplish enter image description here