Skip to content
This repository has been archived by the owner on Jul 19, 2020. It is now read-only.

Consider whether the xyz component of homogeneous coordinates should always remain normalized #10

Open
vadixidav opened this issue Jun 24, 2020 · 0 comments

Comments

@vadixidav
Copy link
Member

Currently it is possible for coodinates to vary in XYZ component freely. This causes no issues with any algorithms, but it does force those algorithms to normalize the XYZ component often to get the direction a ray travels, or to get the magnitude of the component. If the XYZ component were kept at a length of 1.0 at all times, it would simplify several algorithms, such as Levenberg-Marquardt (and jacobians in general), computing residuals (dot product could always be done with no concern at all for normalizing), checking chirality, and many others. Based on how often normalization happens, this might be helpful. Unfortunately, this does have the downside that normalization must be done every time the coordinate is updated, which might be costly (square root and division may take a while).

If this were to be done, it may be possible for a point to fail conversion. Due to this, an option will need to be returned, meaning that the From impl will have to be removed, which causes some code churn.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant