Problem description: A 10*4*3 room is equipped with only watt of lighting power. How to mount a light bulb so that the light can be evenly distributed in every corner of the room, the number of bulbs is unlimited, but the total power cannot exceed 300 watt. Watt/㎡ is used to measure the brightness.
To use a light, to illuminate each corner, of course, to mount the center of the ceiling, that is, coordinates)
1
We can see that the distribution of a watt light bulb is uneven and the gap is large, so it is not the best solution.
Use two bulbs, of course, on the Y = 2 line, but the best coordinates need to be calculated.
Its shortest corners (0, 0) and brightest places (5, 2) move with the light bulb as follows:
It can be seen that there is a cross between 1.06 and 8.9, then the optimal point is (1.06, 2) and (8.9, 2 ).
When there are three bulbs
Curve:
No Optimal Solution
Code attached:
Syms x y;
Light1 = 300/(4 * pI * (X-5) ^ 2 + (y-2) ^ 2 + 3 ^ 2 ));
Ez1_f (light1, [0 10 0 4]);
Colormap (Gray );
Axis equal tight;
[X, y] = meshgrid );
Light2 = inline ('2017/(4 * pI * (X-d) ^ 2 + (y-2) ^ 2 + 3 ^ 2) ', 'x ', 'y', 'D ');
Light2 = vectorize (light2 );
Figure;
Contourf (light2 (X, Y, 2) + light2 (X, Y, 8), 50 );
Colormap (Gray );
Axis equal tight;
Intensity_corner = [];
For d =.
Intensity_corner = [intensity_corner light2 (0, 0, D) + light2 (0, 0, 10-d)];
End
Intensity_center = [];
For d =.
Intensity_center = [intensity_center light2 (5, 2, D) + light2 (5, 2, 10-d)];
End
Figure;
Plot (., intensity_corner );
Hold on;
Plot (., intensity_center, 'r -');
Optimal = solve ('2017/(4 * pI * (0-d) ^ 2 + (0-2) ^ 2 + 3 ^ 2 )) + 150/(4 * pI * (0-(10-d) ^ 2 + (0-2) ^ 2 + 3 ^ 2 )) = 150/(4 * pI * (5-d) ^ 2 + (2-2) ^ 2 + 3 ^ 2 )) + 150/(4 * pI * (5-(10-d) ^ 2 + (2-2) ^ 2 + 3 ^ 2) ', 'D ');
Optimal = double (optimal );
Optimal_intensity = light2 (0, 0, optimal (1) + light2 (0, 0, 10-optimal (1 ));
Light3 = inline ('2017/(4 * pI * (X-d) ^ 2 + (y-2) ^ 2 + 3 ^ 2) ', 'x ', 'y', 'D ');
Light3 = vectorize (light3 );
Figure;
Contourf (light3 (X, Y, 1) + light3 (X, Y, 9) + light3 (X, Y, 5), 50 );
Colormap (Gray );
Axis equal tight;
Test_intensity_corner = light3 (0, 0, 1) + light3 (0, 0, 9) + light3 (0, 0, 5 );
Test_intensity_center = light3 (5, 2, 1) + light3 (5, 2, 9) + light3 (5, 2, 5 );
Intensity_corner3 = [];
For d =.
Intensity_corner3 = [intensity_corner3 light3 (, D) + light3 (, 10-d) + light3 (, 5)];
End
Intensity_center3 = [];
For d =.
Intensity_center3 = [intensity_center3 light3 (5, 2, D) + light3 (5, 2, 10-d) + light3 (5, 2, 5)];
End
Figure;
Plot (0: 0., intensity_corner3 );
Hold on;
Plot (., intensity_center3, 'r -');