Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting normal when using spherical coordinates #57

Open
oveddan opened this issue Dec 18, 2016 · 1 comment
Open

Getting normal when using spherical coordinates #57

oveddan opened this issue Dec 18, 2016 · 1 comment

Comments

@oveddan
Copy link

oveddan commented Dec 18, 2016

Lets say you have a function that evaluates a location in spherical coordinates, and gives you the offset from a sphere surface that the point exists on.

In my case it's a noise function that takes three angles and returns the "height" - essentially the offset from the standard position that the point would exist on in the sphere.

How would you compute normal of that point using this noise function?

@oveddan
Copy link
Author

oveddan commented Dec 18, 2016

Figured it out - just sample the changed point at that offset from the sphere, and use those as the dx/dy

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

No branches or pull requests

1 participant