5
$\begingroup$

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.

img0

I can create a sine wave.

img1

img2

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

im3

Attached Blend file below

$\endgroup$
2
  • 1
    $\begingroup$ Does this question or this question answer your question? $\endgroup$ May 19 at 20:52
  • $\begingroup$ 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. $\endgroup$
    – Rick T
    May 19 at 20:55

1 Answer 1

7
$\begingroup$

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:

Maximum math node

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}$

Geo nodes half circle wave 1

half circle wave 1

Or since you know the cirlce radius and the spacing between, you can put vertices in optimal positions: Geo nodes half circle wave 2

half circle wave 2

$\endgroup$
4
  • 1
    $\begingroup$ Wonderful! I know the rule that says not to sing the praises and thanks here, but this is just great! $\endgroup$ May 19 at 21:33
  • $\begingroup$ 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. $\endgroup$
    – Rick T
    May 19 at 21:58
  • 1
    $\begingroup$ @RickT I did the formula using desmos, take a look if you find it easier to understand with a graph: desmos.com/calculator/qcyponl18l $\endgroup$
    – Hulifier
    May 19 at 22:07
  • $\begingroup$ Will do, desmos is a great site! $\endgroup$
    – Rick T
    May 19 at 22:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.