Previous:Increasing the Rainbow's Translucency   Main Index   Next:Animation

Using a Rainbow Arc

Currently our rainbow has a circular shape, even though most of it is hidden below the ground plane. You can easily create a rainbow arc by using the arc_angle keyword with an angle below 360 degrees.

If you use arc_angle 120 for example you'll get a rainbow arc that abruptly vanishes at the arc's ends. This does not look good. To avoid this the falloff_angle keyword can be used to specify a region where the arc smoothly blends into the background.

As explained in the rainbow's reference section (see "Rainbow") the arc extends from -arc_angle/2 to arc_angle/2 while the blending takes place from -arc_angle/2 to -falloff_angle/2 and falloff_angle/2 to arc_angle/2. This is the reason why the falloff_angle has to be smaller or equal to the arc_angle.

In the following examples we use an 120 degrees arc with a 45 degree falloff region on both sides of the arc (rainbow3.pov).

  rainbow {

    angle 42.5

    width 5

    arc_angle 120

    falloff_angle 30

    distance 1.0e7

    direction <-0.2, -0.2, 1>

    jitter 0.01

    color_map {

      [0.000  color r_violet1 transmit 0.98]

      [0.100  color r_violet2 transmit 0.96]

      [0.214  color r_indigo  transmit 0.94]

      [0.328  color r_blue    transmit 0.92]

      [0.442  color r_cyan    transmit 0.90]

      [0.556  color r_green   transmit 0.92]

      [0.670  color r_yellow  transmit 0.94]

      [0.784  color r_orange  transmit 0.96]

      [0.900  color r_red1    transmit 0.98]



The arc angles are measured against the rainbows up direction which can be specified using the up keyword. By default the up direction is the y-axis.

A rainbow arc.

We finally have a realistic looking rainbow arc.

Previous:Increasing the Rainbow's Translucency   Main Index   Next:Animation