Open pkulijing opened 1 year ago
Try out https://github.com/foxglove/studio. We do some more intelligent math when you are viewing things centered around certain coordinate frames that are far away from others. There’s a chance it may help for your use case.
Large coordinate values are not handled correctly
A cube put at (0, 0) with the camera targeted on it is correctly rendered After changing its coordinates to large values, its shape is obviously distorted:
Reproducing code: https://codesandbox.io/s/objective-darkness-t02fi7?file=/index.js
After a fast glance of the code, I think the reason is the limit of single-precision floating point. Worldview uses float to render shapes, which can preserve roughly 6~7 decimal digits. Thus in the above case, some dm-level and all cm level information is lost, resulting in the distortion. Data pre-processing is needed for such large values, i.e. use the value after mod calculation instead of the raw values (7018.084 instead of 837018.084).