Open RealET opened 3 years ago
I think that this is coming from the normalize s *
call in getImplicitShared ctx (Scale s symbObj)
. Without that function call and multiplication I'm getting -10
for both any non-zero scaling factors. This is because scale
works by point-wise division, and scaleVector * p
neatly counters this.
The normalize
function isn't used anywhere else in the code base, so if we want to remove it I think we can cut it out entirely.
@julialongtin Removing this function breaks several golden tests, so we will want to look at what the differences between the output are. It may just be noise down in the floating point calculations.
It appears that scale is not working properly in the context of getImplicit. When calling getImplict (scale vec obj), it treats the scale as uniform, rather than being allowed to have different values along each axis. It has the same effect as converting V3 x y z into V3 a a a where a = cbrt (x y z).
test code:
implicitTest (V3 1 1 1) returns -10, as expected. but implicitTest (V3 1 1 2) returns -12.5992, where I would have expected it to be -20. This is equivalent to the expected result if the scaleVector was V3 (cbrt 2) (cbrt 2) (cbrt 2).