Illuminating a Room

Suppose we need to decide where to put light fixtures on the ceiling of a room measuring 10 meters by 4 meters by 3 meters high in order to best illuminate it.  For aesthetic reasons, we are asked to use a small number of incandescent bulbs.  We want the bulbs to total a maximum of 300 watts.  For a given number of bulbs, how should they be placed to maximize the intensity of the light in the darkest part of the room?  We also would like to see how much improvement there is in going from one 300 watt bulb to two 150 watt bulbs to three 100 watt bulbs, and so on.  To keep things simple, we assume that there is no furniture in the room and that the light reflected from the walls is insignificant compared with the direct light from the bulbs.

One 300 Watt Bulb

If there is only one bulb, then we want to put the bulb in the center of the ceiling.  Let's picture how well the floor is illuminated.  We introduce coordinates x running from 0 to 10 in the long direction of the room, and y running from 0 to 4 in the short direction.  The intensity at a given point, measured in watts per square meter, is the power of the bulb, 300, divided by 4π times the square of the distance from the bulb.  Since the bulb is 3 meters above the point (5, 2) on the floor, at a point (x, y) on the floor, we can express the intensity as follows.

illum[x_,  y_]  =  
      300/(4  Pi ((x  -  5)^2  +  (y  -  2)^2  +  3^2))

We can make a contour plot of this expression over the entire floor.  We use the PlotRange option to adjust the shading of the plot so that black represents zero intensity and white represents the maximum intensity of 25/(3π), which occurs directly below the bulb.

ContourPlot[illum[x, y],  {x,  0,  10},  {y,  0,  4},  
      AspectRatio  ->  Automatic,  PlotRange  ->  {0, 25/(3  Pi)}];

The darkest parts of the floor are the corners.  Let us find the intensity of the light at the corners, and at the center of the room.

illum[0, 0]  // Nillum[5, 2]  // N

The center of the room, at floor level, is about 4 times as bright as the corners when there is only one bulb on the ceiling.  Our objective is to light the room more uniformly using more bulbs with the same total amount of power.

Two 150 Watt Bulbs

In this case we need to decide where to put the two bulbs.  Common sense tells us to arrange the bulbs symmetrically along a line down the center of the room in the long direction; that is, along the line y = 2.  Define a function that gives the intensity of light at a point (x, y) on the floor due to a 150 watt bulb at a position (d, 2) on the ceiling.

light[d_,  x_,  y_]  =  
      150/(4  Pi ((x  -  d)^2  +  (y  -  2)^2  +  3^2))

Let's get an idea of the illumination pattern if we put one light at d = 3 and the other at d = 7.  We use the same values for PlotRange so that the shading is comparable to the graph in the previous section, but increase the value of Contours from its default of 10 so that the number of contours drawn is about the same in the reduced range that the intensities occupy this time.

ContourPlot[light[3,  x,  y]  +  light[7,  x,  y], 
       {x,  0,  10},  {y,  0,  4},   AspectRatio  ->  Automatic,  
      PlotRange  ->  {0,  25/(3  Pi)},  Contours  ->  20];

The floor is more evenly lit than with one bulb, but it looks like the bulbs are closer together than they should be.  If we move the bulbs further apart, the center of the room will get dimmer but the corners will get brigher.  Let's try changing the location of the lights to d = 2 and d = 8.

ContourPlot[light[2,  x,  y]  +  light[8,  x,  y], 
       {x,  0,  10},  {y,  0,  4},   AspectRatio  ->  Automatic,  
      PlotRange  ->  {0,  25/(3  Pi)},  Contours  ->  30];

This is an improvement.  The corners are still the darkest spots of the room, though the light intensity along the walls toward the middle of the room (near x = 5) is diminishing as we move the bulbs further apart.  Still, to better illuminate the darkest spots we should keep moving the bulbs apart.  Let's try lights at d = 1 and d = 9.

ContourPlot[light[1,  x,  y]  +  light[9,  x,  y], 
       {x,  0,  10},  {y,  0,  4},  AspectRatio  ->  Automatic,  
      PlotRange  ->  {0,  25/(3  Pi)},  Contours  ->  30];

Looking along the long walls, the room is now darker toward the middle than at the corners.  This indicates that we have spread the lights too far apart.

We could proceed with further contour plots, but instead let's be systematic about finding the best position for the lights.  In general, we can put one light at x = d and the other symmetrically at x = 10 - d for d between 0 and 5.  Let's define two functions giving the intensity at (x, 0) due to bulbs at d and 10 - d.

\(corner[d_]\  = \ light[d, \ 0, \ 0]\  + \ light[10\  - \ d, \ 0, \ 0]; 
    
middle[d_]\  = \ light[d, \ 5, \ 0]\  + \ light[10\  - \ d, \ 5, \ 0]; 
    \)

Now we can graph the intensity at (0, 0) as a function of d.

graph1  =  
      Plot[corner[d],  {d,  0,  5},   
        AxesLabel  ->  {"d",  "intensity"},  
        PlotRange  ->  {0,  1.1}];

As expected, the smaller d is, the brighter the corners are.  In contrast, the graph for the intensity at (5, 0) should grow as d increases toward 5.

graph2  =  
      Plot[middle[d],  {d,  0,  5},   
        AxesLabel  ->  {"d",  "intensity"},  
        PlotRange  ->  {0,  1.9}];

We are after the value of d for which the lowest of the two numbers on the above graphs (corresponding to the darkest point in the room) is as high as possible.  We can find this value by showing both curves on one graph.

Show[graph1,  graph2,  PlotRange  ->  {0,  1.9}];

The optimal value of d is at the point of intersection, near 1.4, with minimum intensity a little under 1.  To get the optimum value of d, we find exactly where the two curves intersect.

Solve[corner[d]  ==  middle[d],  d]  // N

So the lights should be placed about 1.44 meters from the short walls.  For this configuration, the approximate intensity at the darkest spots on the floor is as follows.

{corner[1.44097],  middle[1.44097]}

The darkest spots in the room have intensity around 0.93, as opposed to 0.63 for a single bulb.  This represents an improvement of about 50%.

Three 100 Watt Bulbs

We redefine the intensity function for 100 watt bulbs.

light[d_,  x_,  y_]  =  
      100/(4  Pi ((x  -  d)^2  +  (y  -  2)^2  +  3^2))

Assume we put one bulb at the center of the room and place the other two symmetrically as before.  Here we show the illumination of the floor when the off-center bulbs are one meter from the short walls.

ContourPlot[
      light[1,  x,  y]  +  light[5,  x,  y]  +  light[9,  x,  y], 
       {x,  0,  10},  {y,  0,  4},  AspectRatio  ->  Automatic,  
      PlotRange  ->  {0,  25/(3  Pi)},  Contours  ->  30];

It looks like we should put the bulbs even closer to the walls.  (This may not please everyone's aesthetics!)  Let d be the distance of the bulbs from the short wall, and define an intensity function along the long walls as before.

intensity[d_,  x_]  =  
      light[d,  x,  0]  +  light[5,  x,  0]  +  
        light[10  -  d,  x,  0];

Next, we plot the intensity at various points on the long wall as a function of d.

Plot[Evaluate[Table[intensity[d,  x],  {x,  0,  5,  0.5}]], 
       {d,  0,  5},  AxesLabel  ->  {"d",  "intensity"},  
      PlotRange  ->  {0,  1.9}];

We know that for d near 5, the intensity will be increasing as x increases from 0 to 5, so on the right side of the graph, the bottom curve corresponds to x = 0 and the top curve to x = 5.  Notice that the x = 0 curve is the lowest one for all d, and it rises as d decreases.  Thus d = 0 maximizes the intensity of the darkest spots in the room, which are the corners (corresponding to x = 0).  There the intensity is as follows.

intensity[0,  0]  // N

This is surprising; we do worse than with two bulbs.  In going from two bulbs to three, with a decrease in wattage per bulb, we are forced to move wattage away from the ends of the room and bring it back to the center.  We could probably improve on the two bulb scenario if we used brighter bulbs at the ends of the room and a dimmer  bulb in the center, or if we used four 75 watt bulbs.  But our results so far indicate that the amount to be gained in going to more than two bulbs is likely to be small compared with the amount we gained by going from one bulb to two.