Scaling objects with an interior.

### 6.6.3 Scaling objects with an interior.

All the statements that can be put in an interior represent aspects of the matter that an object is made of. Scaling an object, changing its size, doesn't change its matter. Two pieces of the same quality steel, one twice as big as the other, both have the same density. The bigger piece is quite a bit heavier though.

So, in POV-Ray, if you design a lens from a glass with an ior of 1.5 and you scale it bigger, the focal distance of the lens will get longer as the ior stays the same. For light attenuation it means that an object will be "darker" after being scaled up. The light intensity decreases a certain amount per pov-unit. The object has become bigger, more pov-units, so more light is faded. The `fade_distance, fade_power` themselves have not been changed.

The same applies to media. Imagine media as a density of particles, you specify 100 particles per cubic pov-unit. If we scale a 1 cubic pov-unit object to be twice as big in every direction, we will have a total of 800 particles in the object. The object will look different, as we have more particles to look through. Yet the objects density is still 100 particles per cubic pov-unit. In media this "particle density" is set by the color after `emission`, `absorption`, or in the `scattering` statement

    #version 3.5;
    global_settings {assumed_gamma 1.0}
    camera {location <0, 0,-12.0> look_at 0 angle 30 }
    #declare Container_T= texture {
       pigment {rgbt <1,1,1,1>}
       finish {ambient 0 diffuse 0}
    }

    #declare Scale=2;

    box {                  //The reference
       <-1,-1,0>,<1,1,.3>
       hollow
       texture {Container_T}
       interior {
          media {
             intervals 1
             samples 1,1
             emission 1
          }
       }
       translate <-2.1,0,0>
    }

    box {                  //Object scaled twice as big
       <-1,-1,0>,<1,1,.3>  //looks different but same
       hollow                          //particle density
       texture {Container_T}
       interior {
          media {
             intervals 1
             samples 1,1
             emission 1
          }
       }
       scale Scale
       translate<0,0,12>
    }

    box {                  //Object scaled twice as big
       <-1,-1,0>,<1,1,.3>  //looks the same but particle
       hollow                          //density scaled down
       texture {Container_T}
       interior {
          media {
             intervals 1
             samples 1,1
             emission 1/Scale
          }
       }
       scale Scale
       translate<0,0,12>
       translate<4.2,0,0>
    }

The third object in the scene above, shows what to do, if you want to scale the object and want it to keep the same look as before. The interior feature has to be devided by the same amount, that the object was scaled by. This is only possible when the object is scaled uniform.

In general, the correct approach is to scale the media density proportionally to the change in container volume. For non-uniform scaling to get an unambiguous result, that can be explained in physical terms, we need to do:

    Density*sqrt(3)/vlength(Scale)

where Density is your original media density and Scale is the scaling vector applied to the container.

Note: the density modifiers inside the `density{}` statement are scaled along with the object.