Hello everyone,
I’m working on a project to design architectural floor plans based on electric field line simulations. As shown in the attached image, there are field lines generated by multiple charge points, and I’m trying to extract organic and smooth boundary lines (like the green/purple lines) that delineate the influence regions of each charge.
I’ve been attempting to generate these boundaries using Grasshopper Python scripts, but I’ve encountered several issues and am struggling to find a viable solution.
[Target Outcome Image]
(Please upload the image file you attached here.)
[Methods I’ve Tried and Their Problems]
-
Method: Back-tracing Grid Mapping + Mesh Vertex Colors (Colored Mesh Output)
-
Description: I generated a grid over the entire work area. For each grid point (or cell), I back-traced against the electric field vector to find the nearest positive charge, assigning it as the ‘owner’ of that point. The mesh vertices were then colored according to their owner ID.
-
Problem: While the influence regions of each charge were visually differentiated, the boundaries appeared blurry and blended due to color interpolation across mesh vertices. I couldn’t achieve sharp, clear boundary lines. This method ultimately served more as a visualization than as an extraction of the actual boundary lines.
-
-
Method: Tracing Null Points (where the vector sum of forces is zero) / Separatrices
-
Description: Theoretically, the boundary lines where electric field flow changes direction (separatrices) often pass through null points where the net vector sum of forces is zero. I attempted to find and trace these lines to define the boundaries.
-
Problem: With multiple charges, precisely locating “null points” where the vector sum is exactly zero proved extremely difficult in a computational simulation environment. This method was also prone to noise, and the traced separatrices did not consistently form clean, continuous curves, making it hard to achieve the desired outcome. While theoretically sound, practical implementation for stable and smooth results was challenging.
-
[Desired Outcome]
I’m looking to obtain sharp, smooth, organically flowing region boundary lines (NURBS Curves) that follow the electric field lines, similar to the green/purple lines in the attached image. Computational efficiency is also a key consideration.
Are there any effective approaches or ideas within Grasshopper (including Python or plugins) that could help me extract these types of boundaries, overcoming the problems I’ve faced so far? Any methodological advice would be greatly appreciated.
Thank you.







