The important thing to do are to encapsulate the data needed for the solution. Also, encapsulating the computation of the transfer (basis coefficients) is very convenient.
class RadObj
Members dealing with the meshing and hierarchy
bool Subdivide()
int GetNumChildren()
RadObj *GetChild(int)
Members dealing with getting geometric data needed for doing
the projection. Often corners are needed, which implies here that U
and V are in the range [0,1].
GetSample(UV, Point, Normal)
float GetArea()
Members needed for actually updating the radiance of the surface.
RadData holds the solution data and other parts of the future linear
system.
Spectrum GetRho()
RadData *RetRadData()
The RadData class holds the coefficients of the basis functions for
both the computed radiance and the emission. In the future it will
hold data necessary to represent the matrix.
class RadData
GetRadCoefficient(s)()
GetEmissionCoefficient(s)()
The ComputeProjection function computes the coefficients on the
reciever due to the environment. In the future, it will take a
specific source as well as the reciever.
ComputeProjection(Rec)
For an example of what I am using, see here. I don't recommend you use this, or even follow it closely, as it includes a lot more generality than you need now, and probably different generality than you would want after this class is over. The generality comes at a large cost in complexity, and I'm not even sure it's worth it for my code yet.
Read CW [10] pp 48-60.
First, intuitively. We have
| = | (10) | ||
| ci | = | (11) |
Unfortunately, we don't know L exactly, so why not substitute
for L? Doing this gives
| = | ![]() |
(12) | |
| = | ![]() |
(13) | |
| = | ![]() |
(14) |
The more correct way to derive this is to look at something called the
residual. What we want to do is minimize
,
but we can try to make the projection of
r onto our basis function be 0.
The choice of inner products (duals) determines the type of solution method you are doing. Delta function duals create a solution where the residual function is zero at the sample points. This is called point collocation. When the duals span the same space as the basis functions (e.g. piecewise constant) then the approach is called the Galerkin method.