# Search an import way for implicit equation in blender?

I have a question related to implicit equation in Blender.

I made a project developing about 100 parametric equitation/ or algebraic minimal surfaces, first with xyz math function, later I translated most of them to Geometry Nodes.(example in the Attachment & screenshot).

Now I would like to make the next step and build a collection of the implicit equations like:

$$x^2+y^2+z^2+sin(4x)+sin(4y)+sin(4z)-1 = 0$$

But I don’t find a way, neither any kind of addon, nor a helpful article in this forum or in the www.

So, maybe one of you have an idea how to import implicit equations to blender? I am happy about all hints and inspiring idea’s 😁✌️

• What does "implicit" mean in "implicit equations" exactly? For easy conversions, see How do i convert this equation into the node editor? Commented Sep 10, 2023 at 20:32
• There are addons for creating nodes from equations blendermarket.com/products/node-expressions?ref=165 Commented Sep 10, 2023 at 20:52
• Hi Markus, “ An implicit equation is an equation which relates the variables involved”, so y= … or z=… it includes the relation. Like you see in the example 0= …. Commented Sep 10, 2023 at 21:38
• Hi Tayio, the problem is not the translation of equitations to proper Nodes, I made this many times. My question is how to integrate „implicit equation“ properly into Geometry Nodes? Commented Sep 10, 2023 at 21:45
• As you say, it's a relation. So you take all but one variable as an input, and read the output as the remaining value. For example for $y = 2x$ (or $y - 2x = 0$) create a mesh line going from $x=0$ to $x=10$ for example, and then use the Set Position node to set the points' $y$ coordinate based on existing $x$ coordinate. Commented Sep 10, 2023 at 23:03

Here's one way to display:

$$x^2+y^2+z^2+sin(4x)+sin(4y)+sin(4z)-1 = 0$$

For a better visual Effect, with a strong PC you can Smooth (modifier) it out decently:

You can add a material connecting Texture Coordinate: Generated to Base Color:

• +1 that's an interesting approach! i didn't know you could plot implicit functions! i double checked and this is correct. snipboard.io/vROzVm.jpg. In the other 3d equation stuff we used Grid and set position. Commented Sep 11, 2023 at 8:50
• @HarryMcKenzie thanks for checking, because I didn't, and with those Vector Maths optimizations I was worried I could maybe get it wrong 😅 Commented Sep 11, 2023 at 8:57
• this volume cube node is so cool. like holy cow.. finally we can plot any type of equation! really exciting! can i add another +1 vote??? on a side note though, this seems like a workaround? is the topology it generates clean? because you mentioned we need strong pc specs to smooth it out? sorry i didn't try it. Commented Sep 11, 2023 at 9:09
• @HarryMcKenzie the topology isn't any good, it's remesh. In general plotting is just sampling in a grid, though it can be postprocessed and smoothed out in various ways… Commented Sep 11, 2023 at 9:25
• @MarkusvonBroady - sorry for my fault - works perfect your way ! 😀 i love it - thx so much ! ! Commented Sep 11, 2023 at 17:47

I know the original post was looking for a pure Geometry Nodes solution, but others may already have a point cloud or generated theirs using Python. In this example, we generate our point cloud by iterating over a set of values and using the OP's original equation to determine the positions of the points

$$x^2+y^2+z^2+sin(4x)+sin(4y)+sin(4z)-1 = 0$$

import bpy
import math as m
import bmesh

mesh = bpy.data.meshes.new("point-cloud-mesh")
obj = bpy.data.objects.new("point-cloud", mesh)

scene = bpy.context.scene

bpy.context.view_layer.objects.active = obj
obj.select_set(True)

bm = bmesh.new()

def get_range(start, end, decimal=0.01, step=1):
return [v * decimal for v in range(int(start / decimal), int(end / decimal) + 1, step)]

def equation(x, y, z):
return x**2 + y**2 + z**2 + m.sin(4*x) + m.sin(4*y) + m.sin(4*z) - 1

tolerance = 0.1

for x in get_range(-1, 1):
for y in get_range(-1, 1):
for z in get_range(-1, 1):
result = equation(x, y, z)
if abs(result) < tolerance:
v = bm.verts.new((x, y, z))

bm.to_mesh(mesh)
bm.free()


This creates the following point cloud:

Then you can easily convert this cloud into a real mesh with Points to Volume node as demonstrated in the following Geometry Nodes setup:

And optionally add a Smooth modifier with high iteration to get smoother result:

• Great Idea, but even i like the python way, - with your first answer you can adjust the math parameter more flexible only with drag and drop. Here, one have to change the script and run it again. But, this way opens also the possibility to work with complex numbers, that isn´t possible in GN Setup. so great again ! 😀 Commented May 22 at 13:46
• @smice yeah there are always pros and cons for different methods. the important thing is we know what is possible so we know how we can approach the problem at different angles and use the solution that best satisfies the requirements of our problem :D Commented May 22 at 13:59