# Updated Voronoi

**URL:** <https://discourse.processing.org/t/updated-voronoi/49010>\
**Category:** Gallery\
**Created:** [July 19, 2026, 3:28pm UTC](https://discourse.processing.org/t/updated-voronoi/49010 "2026-07-19T15:28:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![adaptinnovative](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@adaptinnovative](https://discourse.processing.org/u/adaptinnovative)\
**Post date:** [July 19, 2026, 3:28pm UTC](https://discourse.processing.org/t/updated-voronoi/49010/1 "2026-07-19T15:28:36Z")

</div>

I found this awesome post online  
[https://community.wolfram.com/groups/-/m/t/3765207](https://community.wolfram.com/groups/-/m/t/3765207)

> it had this code  
> ```VoronoiCells[pts\_List, ibds : (\_?MatrixQ | Automatic) : Automatic] /;  
> MatrixQ[pts, Internal`RealValuedNumericQ] &&  
> 2 \<= Last[Dimensions[pts]] \<= 3 :=  
> Module[{bds, dm, conn, adj, lc, pc, cpts, hpts, hns, hp, vcells},  
> If[ibds === Automatic,  
> bds = CoordinateBounds[pts, Scaled[0.1]],  
> bds = ibds];  
> dm = DelaunayMesh[pts];  
> conn = dm[“ConnectivityMatrix”[0, 1]];  
> adj = conn . Transpose[conn];  
> lc = conn[“MatrixColumns”]; pc = adj[“MatrixColumns”];  
> cpts = MeshCoordinates[dm];  
> vcells = Table[hpts = PropertyValue[{dm, {1, lc[[i]]}}, MeshCellCentroid];  
> hns = Transpose[Transpose[cpts[[DeleteCases[pc[[i]], i]]]] - cpts[[i]]];  
> hp = MapThread[HalfSpace, {hns, hpts}];  
> BoundaryDiscretizeGraphics[#, PlotRange → bds] & /@ hp,  
> {i, MeshCellCount[dm, 0]}];  
> AssociationThread[cpts, RegionIntersection @@@ vcells]]
> 
> BlockRandom[SeedRandom[“voronoi”];  
> pts = RandomReal[{-1, 1}, {32, 3}]];
> 
> lloyd = With[{maxit = 50,(\*maximum iterations\*)  
> tol = 0.005 (\*distance tolerance\*)},  
> FixedPointList[Function[pts,  
> RegionCentroid /@ Values[VoronoiCells[pts,  
> {{-1, 1}, {-1, 1}, {-1, 1}}]]],  
> pts, maxit,  
> SameTest → (Max[MapThread[EuclideanDistance,  
> {#1, #2}]] \< tol &)]];
> 
> frames = Function[pt, Show[MapIndexed[BoundaryMeshRegion[#,  
> MeshCellStyle → {1 → Black,  
> 2 → {Opacity[0.5],  
> ColorData[112] @@ #2}}] &,  
> Values[VoronoiCells[pt,  
> {{-1, 1}, {-1, 1}, {-1, 1}}]]],  
> Graphics3D[{PointSize[Large], Point[pt]}],  
> Axes → True, Boxed → True,  
> Method → {“RelieveDPZFighting” → True}]] /@ lloyd;
> 
> ListAnimate[frames] ```

and this image

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/0/7/072ff8b7ccda2cebeb920ea2fa280fe5f081a498.jpeg)

i converted it to [processing.org](http://processing.org) 1.51

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/3/c/3cf80d36df2cbaa93c475fc163b03e1658e0657b.png)

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [July 19, 2026, 4:07pm UTC](https://discourse.processing.org/t/updated-voronoi/49010/2 "2026-07-19T16:07:12Z")

</div>

> [@adaptinnovative](#):
>
> I found this awesome post online  
> [Online Technical Discussion Groups—Wolfram Community](https://community.wolfram.com/groups/-/m/t/3765207)

Response from link provided:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/d/4/d42f5deb83fda7c7c732df76374d720393157038.png)

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [July 19, 2026, 4:16pm UTC](https://discourse.processing.org/t/updated-voronoi/49010/3 "2026-07-19T16:16:34Z")

</div>

As @glv has pointed out the original post on Wolfram has been removed … I wonder why 🤔

I have never used Wolfram but I assume the code you posted is their math scripting language. What would be interesting is how you converted the code to Java. Did you use a contributed library or do it manually or whatever? 😄

---

<div class="post-metadata">

**Author:** ![adaptinnovative](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@adaptinnovative](https://discourse.processing.org/u/adaptinnovative)\
**Post date:** [July 20, 2026, 2:28pm UTC](https://discourse.processing.org/t/updated-voronoi/49010/5 "2026-07-20T14:28:51Z")

</div>

that is because it was under the 24 hr window for review

it is there now

[https://community.wolfram.com/groups/-/m/t/1561288](https://community.wolfram.com/groups/-/m/t/1561288)
