The Julia fractal is a popular model for chaotic behaviour, in which a small perturbation causes a drastic change to the value of a dynamic system.
One popular way to model the Julia set is the number of iterations needed for a process to reach a certain absolute value starting from some given complex number
Each point (x,y) in the 2D image is mapped to a particular value of z and the brightness/intensity of each point corresponds to the number of iterations taken by the above process
Different fractal patterns can be generated by changing the initial conditions such as the value of the constant c and the threshold value of the fractal generating process described above.
The Barnsley Fern uses a set of four affine transformations (an affine transformation is a transformation on an affine space, ie. a space which does not have a particular reference point or origin from which distance is measured, but rather distance is measured as the difference of two points) on the 2D Euclidian plane.
The four transformations are to be applied with differing probabilites, hence the use of the randint() function to generate an integer between 1 and 100 from an uniform distribution.
The initial start point is considered to be the point (0,0) in 2D Euclidean space