Haskell-Things / Haskell-Things/ImplicitCAD
getImplicit does not produce desired results with an anisotropically scaled object.
- Dominant language
- JavaScript
- Stars
- 1.6k
- Forks
- 148
- PR merge metrics
- No merged PRs in 30d
Description
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 scaleVector = getImplicit (scale scaleVector obj) (scaleVector * p)
where
obj = Implicit.rect3 (V3 0 0 0) (V3 100 100 20)
p = V3 50 50 10
```
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).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.