|
 |
>Anton Sherwood wrote:
>>
>> crackle solid metric 0.9, 1.0, 1.1
>>
> Shouldn't metric be always an integer? metric 1 looks like what I would
>expect anyway...
There is no reason why metric must be an integer, though using values other
than 1 or 2 can slow down the rendering. Metric 1 looks like it's broken,
and in fact it is:
VSub(dv, TPat->Vals.Crackle.cv[i], tv);
if ( UseSquare ) {
sum = VSumSqr(dv);
if ( Offset ) sum += Offset*Offset;
}
else if ( UseUnity ) {
sum = dv[X] + dv[Y] + dv[Z];
if ( Offset ) sum += Offset;
}
else {
sum = pow( fabs( dv[X] ), Metric ) +
pow( fabs( dv[Y] ), Metric ) +
pow( fabs( dv[Z] ), Metric );
if ( Offset ) sum += pow( Offset, Metric );
}
Note that in the metric=1 case (UseUnity) it doesn't take the absolute
values of the components of dv, whereas in the default case it does. The
default case is the correct one. This same fix must be made in the case
of the three minimum distance calculations before the loop.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
 |