# How to create position-cells from scratch?

The geometry proximity-node position output is quite mysterious to me, it is able to dynamically split space into position cells, as shown in the gif below. I would like to have a better understanding of how it is mathematically possible to achieve such a result.

In this gif example I'm using vertices with the geometry proximity node, however, these vertices are only but simple Location vectors after all! Could we replicate this behavior only using math nodes & 3 location vectors? thus the title, can we reproduce such position-cells from scratch?

Here's a setup, the goal is to reproduce the behavior of the gif

• If your geometry is really just a single point, then you use the Vector Math node with the operation Distance for that. But if you have a complex geometry, you can't just replace this node (at least not unless you are more precise about what you want to do). Sep 14, 2022 at 15:15
• Distance could be done indeed, I'm wondering what's the formula of this field of location cells
– Fox
Sep 14, 2022 at 20:56
• let me reformulate my question :-)
– Fox
Sep 14, 2022 at 20:58
• @quellenform here we go, sorry I hope that the question is much more clear now
– Fox
Sep 14, 2022 at 21:11
• "Could we replicate this behavior only using math nodes & 3 location vectors?" ...No, i don't think so. Hm... but wait... Sep 15, 2022 at 14:07

The node Geometry Proximity basically provides you with the position of the closest element of a certain domain at the output Position.

Since you only have three points here, you can also capture these nearest positions with Transfer Attribute.

However, you would first have to convert your objects, which in your case have no geometry, into points.

To do this, you must first retrieve these objects with Object Info and the option As Instance. Then you join these instances and convert them into points.

From these points you can then retrieve the position of the nearest one, and the result should be identical to Geometry Proximity:

And here's another variant that, with a little logic, comes up with the right vector:

(Blender 3.1+)

• thanks :-) so you believe it is not possible to get the same result with only math nodes & location vectors?
– Fox
Sep 15, 2022 at 14:07
• I don't think this is possible, because you always need the position of the nearest object. This would mean that you would somehow have to sort these three positions. Maybe it would work if you would compare with all three positions and filter out the lowest value with logic (switch, boolean, etc)? Sep 15, 2022 at 14:12
• I don't know either, i wonder what's the formula to achieve such cells from scratch
– Fox
Sep 15, 2022 at 14:15
• @DB3D But I don't quite understand the point: if you can solve this with Transfer Attribute anyway, why do you need vector math? Is this a hypothetical question? ;-) Sep 15, 2022 at 14:45
• woaw you did it! >why do you need vector math? I'm trying to understand how this data is calculated, I was trying to merge 3 position cells field the other day and it is very difficult to do with no understanding on how these are calculated!
– Fox
Sep 15, 2022 at 15:12