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

analytical derivatives for noise functions #73

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

flo-bit
Copy link

@flo-bit flo-bit commented Feb 14, 2025

Aims to solve #57

Disclaimer: I heavily used AI to help me write this, my maths are not good enough otherwise ^^ I did write lots of tests though to check if stuff actually works and it all seems to work fine.

There is one small thing where I had to adjust the tests compared to the normal version though: in 3D and 4D comparing the analytical derivative to the finite difference derivative only works if we don't cross the boundary of our simplex shape, but I think that makes sense as the derivative is not continuous across the border (someone please correct me if I'm wrong). I adjusted the tests here to check a smaller area (and stay in one simplex shape).

Any feedback welcome, I would like to do some more (visual) testing in the coming days, which is why I opened this as a draft PR for now, so that I could get some feedback on the tests, etc I wrote already while doing that.

@jwagner
Copy link
Owner

jwagner commented Feb 15, 2025

Hey Flo,

Thanks a lot for the PR. I don't have time to do a review right now. But I'll try to get to it. It's a pretty cool feature after all. Do you have any additional notes or references on how you arrived at the analytic derivatives? It's been a while since I've worked on this as well and I'll probably struggle to review it without seeing it derived (no pun not intended :P) in smaller steps.

Anyways really cool stuff. :)

@flo-bit
Copy link
Author

flo-bit commented Mar 8, 2025

Sorry, missed that comment before, I'll try to write something up over the next days, as well as create a visual demo using that for "fake" erosion with fbm layers

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

Successfully merging this pull request may close these issues.

2 participants