A set of points drawn from a uniform distribution on a two-dimensional domain typically display clustering: For computer graphics applications, it is often useful to obtain a sample of random points such that no one point is closer than some pre-determined distance from any other …
This article presents a Python script to map a spectrum of wavelengths to a representation of a colour. There is no unique way to do this, but the formulation used here is based on the CIE colour matching functions, , and . These model the …
It is well-known that Aphex Twin incorporated images in the spectrogram of the final few seconds of a couple of tracks from the Windowlicker EP. The title track has a spiral in the spectrogram at about the 6 minute mark. After reading in the file …
The diamond-square algorithm is a popular method for generating images which resemble terrain, clouds or plasma. Its description on Wikipedia is as good as any and will not be repeated here. In the code below, the image size is . Since plt.imshow interpolates quite well …
On Sunday my daughter and I planted some cress seeds. The packet claimed that it contained an average of 500 seeds, so here's an attempt to validate that claim using Python. We planted the seeds on kitchen towel, so there is a good contrast between …