Given Basis Bi, we find the set of duals ~Bi such that = delta_ij. The ~Bi's must span the same space as the Bi's, perhaps. [ Otherwise, you introduce extra degrees of freedom into the c's. ] Consider: B1 = x, B2 = 1-x on 0..1. If we want to span the same space, we might choose duals: ~B1 = a1x + b1, ~B2 = a2x + b2 Must find the coeffs: Int x(a1x + b1) dx = 1 Int (1-x)(a1x + b1) dx = 0 for cartesian product of bases and duals. Programming ass't: use MC RT'er to compute a radiosity solution. Will have a mesh associated with every surface, and radiosity values assocated with each mesh element. How do we implement that? First step is to pick a set of basis functions. Most common basis for radiosity is piecewise constant. Nice for computing, sampling over it is the same as sampling over a pixel. Bad for display, 'cause you'll see the mesh cell boundaries. So, another that gets used is piecewise linear. You fit a bilinear function to each patch. Bilinear interpolation. This is nice 'cause you throw it into the display HW and get Gouraud shading. It's nice 'cause it's continuous at cell edges. So you get a smooth gradation over a wall, say. It has a few problems, which you'll find out what they are when you try it. Some people have done higher-order polynomial bases. Advantage is that if you look at the light on the wall, it's pretty smooth and looks polynomial, so it might be good. Bad thing is that for higher-order ones, you have one big cell with polynomials of degree 3 or 4 in it. Bad because if you have shadows that fall across the cell, you have a discontinuity, so you'll get Gibbs' phenomenon and will ring at shadow boundaries. Of course, you can smooth it out with a filter. Expensive representations for the cornell box are okay. For a tree with a zillion polys and 4th degree poly on each, that's big. Small surfaces are tough. Non-polynomail bases are things like the Harr basis (wavelet) which lets you represent piecewise-constant quadtrees. If you go to higher-order or different types of wavelets, it gets more expensive, and you don't have good edge continuity. Not obvious that higher-order or differnet bases are a win at all. Just do PW linear for ass't. Can do higher-order or weird ones if you're eager to do so. Now let's talk about meshes. The mesh is associated with the geometry. Idea is to chop it up into smaller regions that you can represent with your basis f'ns. If you have a wall coming in, you might chop it up into a bunch of little rectangles. A wall with a window in it (negative poly), either you come up with a mesh that'll fit this sort of topology, or split it up into 4 object, and then mesh the four objects. The meshes should be subdividable. Don't create static ones, create quadtrees. Want some sort of hierarchy. When you're at a mesh element, it's important to be able to map back from the elt to the real world (object space). Want to get things like positions of corners, normals and area of surface, etc. Position and normal from mesh elt. Two main ways of representing a mesh for a polygon. One way is to store the corners of the poly for the cell, then when you subdivide, store the points for however you end up subdividing it. You end up storing 3-D data in your mesh, so it can't be shared. Alternatively, you might store the mesh in (u,v)-space and store a mapping into the 3D object space. Advantage is that the mesh-space is simple. Disadvantage is that you need to map both ways. Need to talk about how the program should work. Got a MC RTer. Gonna get a model in, create some fixed-sized mesh. For each elt, Ei, you're going to find the projection of the radiance f'n onto that elt by integrating against the dual. For each Ei, compute <~Bi,L>. Given a pt or a normal, it computes the radiance/irradiance at that point. Computing the inner product, unless eval'ing at corners, you're integrating over the mesh element. You need to do that numerically, not analytically. This will look a lot like the averaging over a pixel code. If you're doing a linear basis w/paramters at the corners, you just need to evaluate this thing once at each corner. Want as good an estimate as you can get for L. Ass't has you use a coarse mesh and a fine mesh. Ex for PW constant: Ei is mesh elt i. have basis Bi=1, x (from) Ei. Int Bi ~Bi dx = 1 If Ai is area Ei, Int_Ei 1 ~Bi dx = 1 -> ~Bi = 1/A Int ~Bi(x) L(x) dx = Int 1/Ai L(x) dx = 1/Ai 1/n Sum_j=1^n L(xn) In world of diffuse: 1/Ai Int_E Int_delta rho(xi) L(x') d(imega) dA [ or some such scribble ]