Subdivide given area into randomly sized blocks with no gaps

Apologies I should have been able to find these topics myself! Thanks, I will study these.

2 Likes

And this one (with gaps) quite recently ,but reuse old ones.

I finished a script I began some days ago. The idea is quite simple, take a grid with X pixels in width, Y in height try to put random rectangle with given size if not possible try less big rectangle. It gives that. The output is rectangles between in UV space (between 0 to 1). So this could be used for surface or whatever.
If output Count less than nx*ny augment tries.




grid_subdivision_LEGACY.gh (24.0 KB)

Playing withe the nice render with some smoothing.


16 Likes

Hello Laurent!

How did you achieve these nice smoothed corners?

Wow that is incredibly interesting. I’ve been meaning to make a move to c# and this is a fascinating case study. Thanks so much for in input!

See there I put the sript

It is classical Catmull Clark subdivision

Made this once to complete Colombo, Sri Lanka, where OSM had no data (green=OSM, red=script)
Rectangles were rotated to the nearest street, scaled, random reduced and culled if the proportions are over 4x1.

Following a part of the script. It requires Anemone.

uneven subd.gh (16.9 KB)

10 Likes

Such an elegant solution! and beautiful results too.

There’s also this old thread that might be relevant:

2 Likes

Here a version with tileable subdivision. The same logic as previous, I add some mesh output so could be used to make a single mesh or a big tile.



grid_subdivision_LEGACY.gh (38.7 KB)

Continuing to play with the subdivision script and mesh output, here on a torus.

17 Likes

Hey Laurent,t thanks for sharing this that script looks amazing, but when I load it I get the following error message:

  1. Error (CS1061): ‘Rhino.Geometry.Mesh’ does not contain a definition for ‘RebuildNormals’ and no extension method ‘RebuildNormals’ accepting a first argument of type ‘Rhino.Geometry.Mesh’ could be found (are you missing a using directive or an assembly reference?) (line 204)

do you know what this might refer to?

Hello
It is v6 command. I think you use rhinov5

True. Thanks for the reply

The function could be replaced by mesh.faces.compute normals then normals.compute normals … Or something like that.
Daniel Abalde work

1 Like

Mesh.Normals.ComputeNormals() for the vertex normals and Mesh.FaceNormals.ComputeFaceNormals() for the face normals respectively .

1 Like

Thank, not easy to answer correctly with a phone. I just think we must begin by normals of face then vertex.

1 Like

this is pretty interesting! is it possible to change the rectangular curve input ?

this is pretty interesting! is it possible to change the rectangular curve input ??

Great work

Was this illustration used for a Master plan presentation of sorts ?