# Geometry nodes maximum of two functions

I have created Geometry-Nodes which arranges the objects according to sine function.

What I have achieved is this:

What I want to achieve is something like this:

My idea is that there will be two sine functions, perpendicular to each other (sine along Z-axis) and will take the maximum of the Z-value of the two.

But what I am getting is something wierd:

My Geometry-Nodes arrangement:

SineX node group:

SineY node group:

What changes should I make?
Thank you.

My .blend file:

your problem is not with geometry nodes ;) it's just mathematics:

try this:

result:

Geometry nodes save the position information in x/y/z. You shifted with your calculation the x/y positions, so that never the same x1/y1 "meets" x2/y2. That's why your nodetree didn't work. You can check it out in the spreadsheet, which helps a lot in such cases.

My solution is not "perfect" - is just shows the way. Your "longscale" doesn't work now, but i am sure you will find out yourself - and that's how it should be - so you learn most. Have fun with Blender!

• You are welcome! Jul 20, 2021 at 6:38

I may be missing something, but, bar providing the user with options in the interface ( Size X,Y .. Frequency X,Y.. Amplitude.. etc.. ) can't the core of your tree be simplified ?

As the basis of this kind of result..

Or, if that's too regular..

• of course...i just used what exist...i didn't want to make it all "from ground on" ;) Jul 20, 2021 at 9:04
• @Chris I get that.. answer the question asked. But If I witness unnecessary suffering... :) Jul 20, 2021 at 9:07
• Well...it depends. Of course you can give the "optimal" answer which "might" give the one who questions a bad feeling because his "solution approach" was bad or worse. Sometimes they want to stick to their solution approach. And i can understand that. Because maybe they want to know what they did wrong. There are a lot of smart asses and even more nit picker out here - and some are really annoying me - but i try now to ignore them as best as i can ;) Jul 20, 2021 at 9:14
• @Chris If you ever feel I'm being one of those, let me know. I wouldn't take offence. Jul 20, 2021 at 9:43
• nope, you aren't ;) Jul 20, 2021 at 9:53