Examples of small programs written in the Mathematica language.
Mandelbrot and Julia Sets
This creates a compiled function which computes membership in the Mandelbrot set.
This generates a density plot using the function.
Here is a compiled function that computes membership in a Julia set.
This generates a picture of an array of Julia sets.
Game of Life
Direct definition, operating on an array of black and white squares
Optimized definition, operating on a list of positions of black squares
Here are the initial coordinates of the glider gun structure
This runs 10 steps in the evolution of the glider gun
This displays the evolution in 3D
Integration over a Triangle
Weights for Finite Differences
Example: computing the weights for a 9-node second derivative symmetric approximation