Latexluv opened this issue on Jun 04, 2010 · 182 posts
Sentinelle posted Sun, 20 June 2010 at 2:50 PM
Quote - ...
The compound interest approach:We are trying to find a formula for a scenario in which a volume is modeled with n slices each with thickness x, and there is an infinite number of them, and each has continuous opacity k. Each slice takes away some light via opacity, and the rest goes to the next slice.
Transmittance (or transparency) is 1 - opacity.
So if we let the unknown continuous opacity be represented by k, we are asking for:
lim as n->infinity of (1 - k/n)^nx
The answer is e^(-kx)
This is exponential decay.
We can get the same answer via differential equations. Starting with the premise that the change in the amount of light transmitted is a decrease that is directly proportional to the amount passing reaching each slice:
dy/dx = -ky
The answer is again y = e^-kx.
Since k is some arbitrary constant, the negation can be absorbed without loss of generality, so the function is e^kx.
Now the question becomes how to figure out what value to use for k.
This is pretty easy.
Assuming you measured the ratio of light entering and leaving a sample of known thickness, X, and you find the effective transparency is T, then
e^kX = T
Take the log of both sides:
kX = ln(T)
Then divide by X
k = ln(T) / X
An example. Suppose you are simulating a material that is 90% transparent at 2 mm.
k = ln(.9)/2
...
Now the interesting thing about e^kx is it is the same as (e^k)^x.Which means that e^(ln(.9)/2) can be used as a new base, T (note I'm changing what I mean by "T" now), and you can just use T^x.
You can more directly get to the base T by simply taking the measured transparency and raise it to the power 1/D, where D is the depth of the sample.
.9 ^ (1/2) gives the same answer directly.
...
The final opacity is just the complement of the transmittance, so 1 - T^x is the formula.
It's pretty easy to figure out the value of k you say? I beg to differ. Thanks BB for the detailed explanation on how you derived the final opacity via calculus. I actually had to reference my good old pre-calculus and calculus books to understand all the math involved. Your examples surely helped (thank you). This is sheer brilliance BB. I was able to follow your logic but again, on my own I would not have been able to come up with the final opacity.