# Voronoi Dynamo

**URL:** <https://forum.dynamobim.com/t/voronoi-dynamo/114071>\
**Category:** Uncategorized\
**Tags:** revit, geometry, dynamo\
**Created:** [March 3, 2026, 1:41am UTC](https://forum.dynamobim.com/t/voronoi-dynamo/114071 "2026-03-03T01:41:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![n-nomi](https://avatars.discourse-cdn.com/v4/letter/n/8491ac/32.png) [@n-nomi](https://forum.dynamobim.com/u/n-nomi)\
**Post date:** [March 3, 2026, 1:41am UTC](https://forum.dynamobim.com/t/voronoi-dynamo/114071/1 "2026-03-03T01:41:45Z")

</div>

Isn’t “Voronoi.ByParameterOnSurface“ different from the original definition of Voronoi?

Is there a way to create a Voronoi diagram without using Voronoi.ByParameterOnSurface?

I am trying to create a model using random points placed on a surface as seed points.

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [March 3, 2026, 7:16am UTC](https://forum.dynamobim.com/t/voronoi-dynamo/114071/2 "2026-03-03T07:16:12Z")

</div>

You can use Python but the result is almost exactly the same

 ![alt_voronoi](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/7/5724c46d82dede5c21b8dd45971a4efaf1599ca6.png)

```auto
import numpy as np
from scipy.spatial import Voronoi

points = list(zip(*IN[0]))

vor = Voronoi(points)

# Code from Scipy
# https://github.com/scipy/scipy/blob/main/scipy/spatial/_plotutils.py#L138

center = vor.points.mean(axis=0)
ptp_bound = np.ptp(vor.points, axis=0)

finite_segments = []
infinite_segments = []
for pointidx, simplex in zip(vor.ridge_points, vor.ridge_vertices):
    simplex = np.asarray(simplex)
    if np.all(simplex >= 0):
        finite_segments.append(vor.vertices[simplex])
    else:
        i = simplex[simplex >= 0][0] # finite end Voronoi vertex

        t = vor.points[pointidx[1]] - vor.points[pointidx[0]] # tangent
        t /= np.linalg.norm(t)
        n = np.array([-t[1], t[0]]) # normal

        midpoint = vor.points[pointidx].mean(axis=0)
        direction = np.sign(np.dot(midpoint - center, n)) * n
        if (vor.furthest_site):
            direction = -direction
        aspect_factor = abs(ptp_bound.max() / ptp_bound.min())
        far_point = vor.vertices[i] + direction * ptp_bound.max() * aspect_factor

        infinite_segments.append([vor.vertices[i], far_point])

OUT = finite_segments

```

p.s. they probably both use the same library from [qhull.org](http://www.qhull.org/)

---

<div class="post-metadata">

**Author:** ![n-nomi](https://avatars.discourse-cdn.com/v4/letter/n/8491ac/32.png) [@n-nomi](https://forum.dynamobim.com/u/n-nomi)\
**Post date:** [March 3, 2026, 7:45am UTC](https://forum.dynamobim.com/t/voronoi-dynamo/114071/3 "2026-03-03T07:45:15Z")

</div>

Thank you for the advice.

Will the line segments generated using this node be perpendicular bisectors of each generating point?

When using “Voronoi.ByParameterOnSurface“, there are some places that do not seem to be perpendicular bisectors.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/d/1dab41f80625d5a8e0b95c972a776b7335d0110c.png)

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [March 3, 2026, 9:00am UTC](https://forum.dynamobim.com/t/voronoi-dynamo/114071/4 "2026-03-03T09:00:05Z")

</div>

I’m not sure, from the Qhull documentation

> Qhull computes the Voronoi diagram via the Delaunay triangulation. Each Voronoi vertex is the circumcenter of a facet of the Delaunay triangulation

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [March 3, 2026, 9:21am UTC](https://forum.dynamobim.com/t/voronoi-dynamo/114071/5 "2026-03-03T09:21:16Z")

</div>

It’s always been by UVs @n-nomi - just convert the points to UV using `Surface.UVParameterAtPoint`.

The Dynamo team is tracking a bug for handling of edge conditions, but it’s been a lower priority for quite awhile now.
