The image command also makes it possible to explore a few typical problems, such as symmetry elements in periodic patterns, the growth of volcanic domes, or heat diffusion.
GEOD also provides standard image-processing functions that make it possible to modify colours or generate special graphic effects. These functions are called with the following syntax:
filter filterName ...
where filterName must be replaced by the identifier of the image-processing operation, followed by its parameters.
filter hue par1
where par1 is a number between 0 and 360.
One of the most useful operations is the one that generates a shaded view of the relief. For example,
filter relief 100 20
simulates the illumination of a DEM by a light source.
Figure 1 : Shaded representation of the relief of Mount Saint Helens. Compare this with the initial DEM view.
In this example, the parameter 100 controls the shading intensity, while the value 20 specifies the illumination direction, given by the deviation angle from north measured clockwise. The direction of the light source may also be indicated by the symbols N, NE, E, SE, S, SW, W, or NW.
GEOD also makes it possible to create periodic geometric patterns from an image by using Apple’s Core Image library. Although this feature is not especially useful in geological cartography, it provides a convenient way to explore the different kinds of two-dimensional symmetries and repetitions found in crystal structures. Available transformations include mirror reflections, glide reflections, and rotations of 30°, 60°, 90°, 120°, and 180°.
Figure 2 : Example of a periodic pattern produced by a filter reflect8 instruction from the map shown in figure 1. As an exercise, identify the symmetries and mirror planes in this pattern.
The available effects are: reflect4, reflect6, reflect8, reflect12, rotate4, rotate6, translate4, glideReflect, triangle, and kaleidoscope.
The syntax is:
filter name x x y y angle width
where name must be replaced by reflect4, reflect6, reflect8, reflect12, rotate4, rotate6, translate4, glideReflect, or triangle. The parameters x, y, angle, and width are used to define the motif to be repeated.
A final command produces a kaleidoscope:
filter kaleidoscope x x y y angle n
where n is the number of duplications of the motif.
Figure 3 : Example of a kaleidoscope generated in GEOD.
The parameters x, y, angle, and width of the Core Image graphic filters described above may also be specified as tables. This makes it possible in particular to create psychedelic animations.
The rotate command applies a rotation to the image. Its syntax is:
rotate angle0 angle1 xc yc zoom background
where:
The plasma instruction creates fractal images, either random or non-random. This command uses several arguments:
plasma alpha beta depth flag
where:
Figure 4 : Image calculated with the instruction plasma 1 0 9 1.
Figure 5 : Image calculated with the instruction plasma 1 0 9 0.
The blur instruction blurs a DEM by using the Deriche blur filter. Its syntax is:
blur sigma
where sigma controls the intensity of the blur.
The parameter sigma may be specified either as a numeric value or as a table.
Figure 6 : Effect of the blur command. On the left, the initial image. On the right, the image transformed by a blur instruction. This example provides a good approximation of the spinodal decomposition of a fluid.
The wave command simulates refraction through a liquid interface affected by waves. The resulting image gives the distorted view of an immersed object. Its syntax is:
wave speed amplitude Tx Ty
where speed controls the wave speed at the surface, amplitude depends on the refractive index of the liquid, and Tx and Ty are the x and y components of the wavelength.
Figure 7 : Effect of the wave command. On the left, the initial image. On the right, the image distorted by refraction through a wavy surface.
The denoise command removes noisy pixels from an image. Its syntax is:
denoise w n
where w is a numeric value, typically of the order of 0.5, controlling the width of the filter, and n indicates how many times the treatment is applied.
Figure 8 : Effect of the denoise command. On the left, the initial image, with a noisy background. On the right, the final image processed by a denoise 0.5 100 instruction.
The rotofrac command produces fractal animations from a nucleus, that is, a small noisy image placed at the centre of the animation. Each frame of the animation is derived from the previous one by a rotation and a dilation about the central point of the image. The resulting style of image is illustrated below. The syntax is:
rotofrac omega0 omega1 oscillate width height f background interpolate static
where:
Note also the presence of the keyword static, which must be inserted somewhere in the definition of the image. It may be placed before the rotofrac instruction. This command specifies that each frame is produced from the previous one.
Figure 9 : Example of a fractal image produced by a rotofrac instruction with pixel interpolation. The nucleus is at the centre of the image.
Figure 10 : Another example of a fractal image produced by the rotofrac instruction, but this time with non-interpolated pixels.
The mandelbrot command generates the classical Mandelbrot fractal image. Its syntax is:
mandelbrot iter
where iter is the number of iterations used to calculate the figure. This argument may be given either as a numeric value or as a table. In the latter case, an animation is produced showing the progressive construction of the Mandelbrot set.
Figure 11 : A Mandelbrot fractal image.
The erode command applies a morphological filter to the DEM. Its effect is to lower elevations progressively, in a way somewhat similar to natural erosion. Its syntax is:
erode kappa threshold
where kappa controls the intensity of elevation decrease, and threshold is the probability that a pixel is eroded at each step. A value of the order of 0.3 gives a result closer to natural erosion.
Figure 12 : Example of application of the erode command to the DEM of Mount Saint Helens.
To produce an animation with this instruction, the static instruction must also be used.
The dilate command plays a role opposite to erode. It tends to increase DEM elevations toward the maximum elevation. Its syntax is similar:
dilate kappa threshold
To produce an animation with this instruction, the static instruction must also be used.
The tree command generates a fractal figure made of a hierarchical network of lines. Its syntax is:
tree length depth level
where length gives the maximum length of an elementary line, depth is the deepest recursive level of the tree, and level is the elevation of the trunk. At each recursion step, the elevation of a branch is incremented by one unit.
Figure 13 : A tree created by the instruction tree 3 1000 1.
The volcano command makes it possible to create a small animation illustrating the evolution of an interferogram over an area affected by the growth of a volcanic dome.
The principle is simple:
This command also requires insertion of the keyword static.
An image may also store a temperature field over a region. GEOD then provides a function called diffusion, making it possible to study heat diffusion in a solid medium. Its syntax is:
diffusion kappa
where kappa is a numerical parameter equal to the product of diffusivity, in m²/s, and a time interval, which controls the integration step.
This command also requires insertion of the keyword static.
Figure 14 : Thermal field at t = 0 produced by a plutonic intrusion. Colour intensities represent temperatures.
Figure 15 : Thermal field calculated later and produced by heat diffusion. The black curve marks the boundary between the host rock and the pluton.