# Using math nodes to create geometry in geometry nodes

Using math nodes to create geometry in geometry nodes

I'm trying to create some geometry using math nodes in geometry nodes see image below of what I'm trying to create. Yes I know I could model a half circle and a line to get it but the goal is to use an equation to make it parametric.

I can create a sine wave.

But when I try and use greater than 0 node I get what looks to be the start of a square wave.

Attached Blend file below

• Does this question or this question answer your question? May 19 at 20:52
• I saw those. My main issue was with using the greater than node instead of maximum node. Still not fully sure why the greater than node didn't work but I'll have to look it up. May 19 at 20:55

The greater than Math node returns 1 (greater than) or 0 (smaller or equal).

You probably want the Maximum option instead of the Greater than:

note that clamping a sine wave will not give you half circles, for that you will need other formula:

$$\begin{cases} 0 & \texttt{if } M> 2r \\ \sqrt{r^{2}-\left ( M-r \right )^{2}} & \texttt{if } M \leq 2r \end{cases}$$ 

• $$\mathbf{M}=\operatorname{mod}\left(x+r,\ 2r+s\right)$$
• $$\mathbf{r}=\text{radius}$$
• $$\mathbf{s}=\text{spacing}$$

Or since you know the cirlce radius and the spacing between, you can put vertices in optimal positions:

• Wonderful! I know the rule that says not to sing the praises and thanks here, but this is just great! May 19 at 21:33
• I was just about to do y=sin(ax)+sin(y)) with a maximum node and call it a day hahah....then I saw yours WOW!!!....I'm going to try and work your solution out just to see if I can fully understand it. May 19 at 21:58
• @RickT I did the formula using desmos, take a look if you find it easier to understand with a graph: desmos.com/calculator/qcyponl18l May 19 at 22:07
• Will do, desmos is a great site! May 19 at 22:38