I am working on a Geometry Node System that can turn every simple mesh into cardboard with the infamous wave curve between both flat borders. I use the sine function for that and have a complicated problem on what to put into it:
My first approach was index-based. By dividing the vertex index through the amount of vertices in each row and floor that number, I could get parallel ordered waves. However I got random flips per face which was not desired.
My second approach was position-based. At first I used the x position of each vertex to drive the offset. No more flips per face, in general it works great.
But now I want to flip the direction of the wave pattern and use YZ instead of X and things get very complicated.I tried to just sum up the Y and Z positions but this leads to weird distortions and lack of consistency in the frequency of the pattern on diagonals.
I am sure I have to use the vertex normal as a factor here and plug that somehow into the equation. I can read it out per vertex with the Field at Index Node, but all tries have failed so far. Maybe the community knows the answer.
Have a nice day Thomas