<scene>

  <!--
      Test scene that illuminates a rectangle from a triangular
      luminaire positioned along the surface normal.  An
      analytic solution is available but I don't have it handy.
      The answer computed by my renderer is L_r = 0.1622.

      I recommend checking this by having your program spit out
      the number when it notices the image has only one pixel. 
    -->

  <image>
    1 1
  </image>

  <sampler type="JitteredSampler">
    <numSamplesU>1000</numSamplesU>
    <numSamplesV>1000</numSamplesV>
  </sampler>

  <!--sampler type="IndependentSampler">
    <numSamples>1000000</numSamples>
  </sampler-->

  <renderer type="DirectOnlyRenderer">
    <!--directIlluminator type="ProjSolidAngleIlluminator" /-->
    <directIlluminator type="LuminairesIlluminator" />
  </renderer>

  <camera>
    <eye>0 1 0</eye>
    <target>0 0 0</target>
    <up>0 0 1</up>
    <yFOV>0.1</yFOV>
  </camera>

  <material name="grey" type="Homogeneous">
    <brdf type="Lambertian">
      <reflectance>0.5 0.5 0.5</reflectance>
    </brdf>
  </material>

  <surface type="Triangle">
    <material ref="grey" />
    <v0>0 0 5</v0>
    <v1>4.330 0 -2.5</v1>
    <v2>-4.330 0 -2.5</v2>
  </surface>

  <surface type="Triangle">
    <material type="LambertianEmitter">
      <radiance>20 20 20</radiance>
    </material>
    <v0>0 5 1</v0>
    <v1>-0.8660 5 -0.5</v1>
    <v2>0.8660 5 -0.5</v2>
  </surface>

</scene>
