Skip to content

Analytical derivitives for SuperSimplex noise #260

Answered by mystise
tayloraswift asked this question in Q&A
Discussion options

You must be logged in to vote

Checkout the eval_D2C1 and eval_D3C1 functions from SuperSimplexNoise.java, those provide what appears to be dx, dy, dxdy, and all the other various derivatives.

Edit: I just realized that gives you the numerical derivatives, not the analytical ones. I have the analytical equations, but the derivatives aren't super helpful unfortunately.

    // Calculation of maximum value:
    // x => real_rel_coords[0], y => real_rel_coords[1]
    // a-h, components of gradient vectors for 4 closest points
    // One contribution: (a*x + b*y) * (2/3 - x^2 - y^2)^4
    // Limit per contribution: 0 <= x^2 + y^2 < 2/3
    // skew = ((1 / sqrt(2 + 1) - 1) / 2)
    // (a*x + b*y) * (2/3 - x^2 - y^2)^4 + (c*(…

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Razaekel
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #167 on July 03, 2021 17:10.