08-21-2007, 06:00 PM
fn CutAdaptive st tt vt = (
for i in 0 to (voxels-1) do (
if (GetFuelByIndex i) > 0.0 then continue -- leave fire alone
if (GetSmokeByIndex i) > st then continue
if (GetTempByIndex i) > tt then continue
v = GetVelByIndex i
if (length v) > vt then continue
-- otherwise...
SetFuelByIndex i 0.0 -- clean unburnt fuel remains (fuel
for i in 0 to (voxels-1) do (
if (GetFuelByIndex i) > 0.0 then continue -- leave fire alone
if (GetSmokeByIndex i) > st then continue
if (GetTempByIndex i) > tt then continue
v = GetVelByIndex i
if (length v) > vt then continue
-- otherwise...
SetFuelByIndex i 0.0 -- clean unburnt fuel remains (fuel
<!-- w --><a class="postlink" href="http://www.cgfluids.com">http://www.cgfluids.com</a><!-- w -->

