Computer-generated solar halos and sun dogs

Describes a technique for creating dot patterns that approximate solar phenomena such as sun dogs and solar halos. I extend the simulation to include energy considerations, smooth images and color. I present a summary of the basic process for creating the dot patterns. We start by imagining a perfectly hexagonal ice crystal, which may be thin compared with its radius (in which case we call it a plate) or long and skinny (a pencil). To create a solar display, we first find an orientation for the crystal. If there's not much wind, each crystal will tend to fall with one of its biggest faces parallel to the ground. Wind can cause the crystals to tumble as they fall, which we simulate by adding some amount of random rotation. Once we have rotated the crystal into the chosen orientation, we send a ray from the infinitely distant sun toward the crystal. If the ray hits the crystal, we follow its refractive path through the ice and find its outgoing direction as it leaves the crystal. To see that light, we must be looking in its direction back at the crystal, so we add some light from that direction into our image. I simply quantize the direction to the nearest pixel and color in that pixel. Then we pick a new orientation and trace a new ray, repeating the process over and over. The result is a cloud of dots. By following different paths through the crystals, constraining the possible orientations, and changing the crystal's length, we can simulate a wide variety of solar phenomena.