How can I plot this Cartesian Equation in Geometry Nodes?

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

• 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. Jul 26, 2022 at 17:59
• im.ge/i/Fh8Y8P Jul 26, 2022 at 18:00
• 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... Jul 26, 2022 at 18:27
• No, don't use drivers in geometry nodes! It uses python, you'll lose performance a lot here Jul 26, 2022 at 19:50
• 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. Jul 26, 2022 at 23:36

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:

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

One Possible Solution Here

• Fantastic. You give every appearance of being a proper mathematician! ;) Aug 2, 2022 at 11:22
• 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 Aug 2, 2022 at 11:26
• Wonderful! I, as a non-mathematician, can only judge what I see. What I see is wonderful! Aug 4, 2022 at 23:44
• @quellenform thank you! :) hey btw thanks also for the re-open vote! without it i couldnt have shared it XD Aug 5, 2022 at 14:51

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