4
$\begingroup$

Can someone show me a picture of the nodes for the following equation?

$$ \left(x - x\left(\frac{z}a\right)\right)^2 + \left(y - y\left(\frac{z}a\right)\right)^2 = r^2 $$

$\endgroup$
7
  • 3
    $\begingroup$ Please take a closer look at the node Math (you can find it in the group "Utilities") and show us what progress you could make. ...I think the node is quite useful in this case. $\endgroup$
    – quellenform
    Commented Jul 26, 2022 at 17:59
  • $\begingroup$ maybe you should watch some beginner GN tutorials....e.g. from Erindale or Johnny Matthews. if you fail on this you will have problems with GN anyway because it is a lot of math... $\endgroup$
    – Chris
    Commented Jul 26, 2022 at 18:27
  • $\begingroup$ You can use a driver method if the expression is complex. $\endgroup$
    – X Y
    Commented Jul 26, 2022 at 19:07
  • 1
    $\begingroup$ No, don't use drivers in geometry nodes! It uses python, you'll lose performance a lot here $\endgroup$
    – Crantisz
    Commented Jul 26, 2022 at 19:50
  • 2
    $\begingroup$ Don't use geometry nodes for this. There is a built-in addon specifically for creating math surfaces. It performs much better and you simply have to give it the equation. $\endgroup$ Commented Jul 26, 2022 at 23:36

3 Answers 3

5
$\begingroup$

The following Cartesian Equation is of Implicit Type.

$$ \left(x - x\left(\frac{z}a\right)\right)^2 + \left(y - y\left(\frac{z}a\right)\right)^2 = r^2 $$

Quoting from What are Implicit Equations:

Let's say that $y$ is the dependent variable and $x$ is the independent variable. An explicit solution would be $y=f(x)$, i.e. $y$ is expressed in terms of $x$ only.

An implicit solution is when you have $f(x,y)=g(x,y)$ which means that $y$ and $x$ are mixed together. $y$ is not expressed in terms of $x$ only. You can have $x$ and $y$ on both sides of the equal sign or you can have $y$ on one side and $x,y$ on the other side. An example of implicit solution is $y=x(x+y)^2$

Thus you cannot directly use this type of equation from the Cartesian coordinate system in Geometry Nodes. Points in Euclidean space can be written in either Cartesian or the Polar Coordinate System (extended into Cylindrical and Spherical Coordinate System). In order for the equation to be usable in your case, it needs to be transformed into a form called Parametric Equations which operate on the 3D Polar Coordinate System. That is, it needs to be of the form: $$ x = x(u, v)$$ $$ y = y(u, v)$$ $$ z = z(u, v)$$

You may be able to simplify the original equation to: $$(x^2+y^2)(1−(z/a))^2=r^2$$ But note that the term $1−(z/a)$ is unbounded and thus this equation has infinite potential solutions for possible equations as long as they satisfy the original cartesian equation. Please see one solution I have prepared on the Math Stack Exchange. Here I have prepared one (1) of many possible sets of solutions from the family of circular base solutions.

$$x=r\cos{u}\sin{v}$$ $$y=r\sin{u}\sin{v}$$ $$z=a\pm\frac{a}{\sin{v}}$$

Note from the solution provided in the math link:

  • In the above results, for this particular form only, $z=z(v)$ only.
  • In general, $z=z(u,v)$ as long as it satisfies Eq. (6).
  • We can solve Eq. (6), as a quadratic equation because, we can also assume that $z=z(v)$ for illustrative purposes only.
  • In other words, there can be many other forms of solutions as long as they satisfy Eq. (6), for the same equations for $x=x(u,v)$ and $y=y(u,v)$, given by Eq. (3).

Now you are able to use these parametric equations in Geometry Nodes similarly solved as to Robin Bett's answer:

enter image description here

Here's the resulting graph for this particular set of solution:

enter image description here

One Possible Solution Here

$\endgroup$
4
  • 2
    $\begingroup$ Fantastic. You give every appearance of being a proper mathematician! ;) $\endgroup$
    – Robin Betts
    Commented Aug 2, 2022 at 11:22
  • 2
    $\begingroup$ hahaha thank you but it was also with the assistance of a PhD friend. I was really eager to know the solution so I had to do some digging ! :D $\endgroup$
    – Harry McKenzie
    Commented Aug 2, 2022 at 11:26
  • 1
    $\begingroup$ Wonderful! I, as a non-mathematician, can only judge what I see. What I see is wonderful! $\endgroup$
    – quellenform
    Commented Aug 4, 2022 at 23:44
  • 1
    $\begingroup$ @quellenform thank you! :) hey btw thanks also for the re-open vote! without it i couldnt have shared it XD $\endgroup$
    – Harry McKenzie
    Commented Aug 5, 2022 at 14:51
1
$\begingroup$

Although not as exact as the first solution I have made with better topology, it is also possible with Volume Cube node and fewer nodes using the original implicit equation:

$$ \left(x - x\left(\frac{z}a\right)\right)^2 + \left(y - y\left(\frac{z}a\right)\right)^2 = r^2 $$

enter image description here

enter image description here

enter image description here

$\endgroup$
0
$\begingroup$

If I understand you correctly, you just need a tree of nodes that embodies this particular formula? enter image description here All these nodes are actually one node - math node.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .