Published

October 29, 2025

Modified

October 29, 2025

About

This page provides some supplemental information for the discussion about dynamic systems.

It shows a simulation of the Lorenz system. The code is drawn from Wikipedia contributors (2025).

It also provides a link to an excellent video about convolution, a core operation in many areas of psychology and neuroscience.

Lorenz System

Equations

\[\dot{x} = \sigma(y-x) \] \[\dot{y} = \rho x - y - xz \] \[\dot{z} = -\beta z + xy \]

Simulation

Quietly load required libraries.

Code
suppressPackageStartupMessages(library(deSolve))
suppressPackageStartupMessages(library(plotly))

Simulate n=10^{4} time points

Code
# parameters
prm <- list(sigma = 10, rho = 28, beta = 8/3)
# initial values
varini <- c(
  X = 1,
  Y = 1, 
  Z = 1
)

Lorenz <- function (t, vars, prm) {
  with(as.list(vars), {
    dX <- prm$sigma*(Y - X)
    dY <- X*(prm$rho - Z) - Y
    dZ <- X*Y - prm$beta*Z
    return(list(c(dX, dY, dZ)))
   })
}

times <- seq(from = 0, to = 100, by = 0.01)
# call ode solver
out <- ode(y = varini, times = times, func = Lorenz,
           parms = prm)

Plot data.

Code
# to assign color to points
gfill <- function (repArr, long) {
  rep(repArr, ceiling(long/length(repArr)))[1:long]
}

dout <- as.data.frame(out)

dout$color <- gfill(rainbow(10), nrow(dout))

# Graphics production with Plotly:
plot_ly(
  data=dout, x = ~X, y = ~Y, z = ~Z,
  type = 'scatter3d', mode = 'lines',
  opacity = 1, line = list(width = 6, color = ~color, reverscale = FALSE)
)

On convolution

Convolution is a fundamental operation in statistics, and it is a core operation found in Dynamic Field Theory and connectionist models. Here’s an excellent video to explain what convolution is about and how it works.

3Blue1Brown (2022)

References

3Blue1Brown. (2022). But what is a convolution? YouTube. Retrieved from https://www.youtube.com/watch?v=KuXjwB4LzSA
Wikipedia contributors. (2025, October 6). Lorenz system. Retrieved from https://en.wikipedia.org/wiki/Lorenz_system