algorithmic modeling for Rhino
https://naeimdesigntechnologies.wordpress.com/2017/01/29/3d-voronoi...
I made a custom tool to build 3D Voronoi, it might be useful as a start point
I have a quite similar thingy (Note: C# code only).
The only tricky part is to ensure that you have no intersection events between the prox pairs (either in 2d [likely] or 3d [most unlikely]).
This is bad in the sense that there's some pairs NOT yielding neighbor -| "cells" (see pair intersection events).
These are good since are intersection free meaning that ALL pairs yield neighbor cells that have at least one edge vertical or horizontal (but has this any real-life meaning? he he):
And these are also a clean run on 3d (but pair intersections in 3d are rather extremely unlikely):
The above are sampled in a DataTree of "paired cells" (based on connectivity data) meaning that you can create "doors"/openings between the cells/walls/whatever and put rats inside (avoid at any cost putting humans unless they are lobotomized).
I'll give you some hints in order to achieve always a pair that has shared a vertical/horizontal BrepFace.
1. Create a 3d grid and randomly eliminate points. On each point make a box (with offset each other etc etc). Then randomly do the yellow lines (in X or in XY or in XYZ). Do not bother if the segments have equal lengths. Get the pairs of points (at end/start). Compute the big box (white).
2. With "help" boxes off this is the situation:
3. Do a Voronoi using the pair of points as above and the big box:
See that "equal" length lines means nothing with regard the "random" appearance of the cells.
If the deployment of the boxes (as in 1) is "flat" (meaning: no stacks in Z) then we have just a juicy Voronoi rectangular pepperoni pizza.
best
Hello,Naeim!
Thank you for answering my question!
I have just started studying, so I can not understand the details. However, I will refer to the program you attached.
Thank you!
2 steps
first step is to organise points (cells ) in pairs, then check if the angle between them is close to orthogonality(0,90,180,270) within 20 degrees deviation, if so, then the point location is adjusted (once for each pair) so it become right angle. If not, then the connection left as its (diagonal). That happens only once(chosen logic) for each pairs.
second step: is to trim the spheres to build the voronoi.
Hello,Peter!
Thank you for answering my question!
I have just started studying, so I can not understand the details.
Could you give me a program if you like?
Hi Tomohiro
Well ... get the C# (actually 2: step 1 and 2) ... but if you are not familiar with coding matters this wouldn't be helpful to you (at all). Why? because it's a "black box" and you can't do anything to improve it or to add new feature/capabilities etc etc.
In any case:
1. Whilst the 2nd C# is disabled (that does the Voronoi thingies) try to understand the logic: why the (help) boxes are used and what the variables present do. If you can't do that ... the Cell creation would remain a mystery to you.
2. Before going to step 2 ask any question related with step 1.
But if you are after some sort of housing/tower/etc using "similar" cells ... well that's another animal, it's rather complex and requires several lines of code more.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by