Graphics Programs Reference
In-Depth Information
hold on; plot(d, light2(0, 0, d) + light2(0, 0, 10 - d));
hold off
2
1.8
1.6
1.4
1.2
1
0.8
0.6
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
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 ,wefind
exactly where the two curves intersect.
syms d; eqn = inline(char(light2(0, 0, d) + light2(0, 0, 10 -
d) - light2(5, 0, d) - light2(5, 0, 10 - d)))
eqn =
Inline function:
eqn(d) = 75/2/pi/(dˆ2+13)+75/2/pi/((-10+d)ˆ2+13)-
75/2/pi/((5-d)ˆ2+13)-75/2/pi/((-5+d)ˆ2+13)
fzero(eqn, [0 5])
ans =
1.4410
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:
light2(0, 0, 1.441) + light2(0, 0, 10 - 1.441)
ans =
0.9301
Search WWH ::




Custom Search