Newsgroups: sci.math
From: dret@dgp.toronto.edu (George Drettakis)
Subject: Properties of Illumination Functions?
Organization: CSRI, University of Toronto
Date: 17 Dec 92 03:52:53 GMT

I sent this to sci.math.research, but I have a suspicion the big
black net hole ate it. I apologize if you see this twice.
-----------------------

I have the following problem in computer graphics. Assume a rectangular 
area in the plane z=d, with -xa1 < x1 < xa1 and -ya1 < y1 < ya1.
This area is assumed to be a diffuse rectangular light source,
with the surface normal 0, 0, -1.
Assume also the receiving plane z=0, and the function I(x,y) defined on 
this plane. The function I(x,y) expresses the illumination at this point:

                       ya1    xa1
                        /      /
                       |      |                 1
        I(x, y) :=     |      |   ----------------------------- dx1 dy1
                       |      |            2           2    2 2
                      /      /    ((x - x1)  + (y - y1)  + d )
                    - ya1  - xa1

The analytic solution to this integral is as follows:


             (y - ya1) w1          (y + ya1) w3          (x - xa1) w4
I(x,y)= - ------------------- + ------------------- - -------------------
           2           2 1/2     2           2 1/2     2           2 1/2
         (d + (y - ya1) )      (d + (y + ya1) )      (d + (x - xa1) )

                  (x + xa1) w2
            + -------------------
                2           2 1/2
              (d + (x + xa1) )


where, wi is the angle (in radians) formed by the two consecutive vertices
of the source and the receiving point.
(In the figure w1 is the angle < v1 P v2 )

 source:      v1
     ---------- +
    /        /   +
   /   +    /     +
  /        /       + <-angle w1
 ----------+        +
-ya1     v2   +      +
        +ya1     +    +
                __+___+________________________________
               /    + + P=(x,y,0)  receiver plane     /
              /                                      /
             /                                      /
            /______________________________________/


Each w i is usually expressed as an arccos or an arctan.
As an example of the difficulty of these expressions, for xa1=ya1=1,
w1 is:

                                      2          2
                                  d + y  - 2 y + x
w1=arccos(-----------------------------------------------------------------)
                2              2       1/2       2              2       1/2
          (d + y  - 2 y + 2 + x  - 2 x)    (d + y  - 2 y + 2 + x  + 2 x)



What I want to show is that the function I(x,y) has only one maximum, and is
(radially around 0, 0, 0 ) decreasing everywhere else.
Ideally I want to show this for more general sources, but just the rectangle
is a good start.

I have some ideas, but before I spend more time on this, I would like to
know whether this class of functions is well known, and whether there are
easy ways to prove its properties, or whether I am missing the obvious.
Derivative analysis seems to be inconclusive, due to the complexity of
the expressions. (The partials result in very high-degree equations).

Pointers to books, papers etc. are particularily welcome.
I apologize beforehand if this is a well known problem with well known
solutions. I dont read this group often.

Thanks,

George Drettakis                          Dynamic Graphics Project
Ph.D. Student                             Dept. of Computer Science
e-mail dret@dgp.toronto.edu               Sandford Fleming Bldg.
Phone +1 (416) 978-5473                   10, Kings College Rd.
FAX   +1 (416) 978-5184                   Toronto, Ontario CANADA M5S 1A1 
Newsgroups: sci.math