# Uneven Rectangle Subdivision

**URL:** <https://discourse.mcneel.com/t/uneven-rectangle-subdivision/59356>\
**Category:** Grasshopper\
**Created:** [March 30, 2018, 3:01pm UTC](https://discourse.mcneel.com/t/uneven-rectangle-subdivision/59356 "2018-03-30T15:01:50Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![cokerone1214](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/cokerone1214/32/149798_2.png) [@cokerone1214](https://discourse.mcneel.com/u/cokerone1214)\
**Post date:** [March 30, 2018, 3:01pm UTC](https://discourse.mcneel.com/t/uneven-rectangle-subdivision/59356/1 "2018-03-30T15:01:50Z")

</div>

Hello guys!

Is there anyone who has this subdivision script cause i cant find the page on the site.

 ![16](https://global.discourse-cdn.com/mcneel/original/3X/2/9/2939d2c09af4b81e4666532b16fda1a67d74ab3d.jpg)

 ![03a](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/b/0/b0092a8dcddfceff35ba57548d64a2aeec9c3915.jpg)

> **[Uneven Subdivision 01\_Co-de-iT/////////////////////////](http://madeincalifornia.blogspot.com/2010/12/uneven-subdivision-01co-de-it.html)**
>
> computational design blog with grasshopper, rhinoscript and other forms of codes as resarch systems.

Thank you!!

---

<div class="post-metadata">

**Author:** ![HS\_Kim](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/hs_kim/32/473975_2.png) [@HS\_Kim](https://discourse.mcneel.com/u/HS_Kim)\
**Post date:** [March 30, 2018, 3:59pm UTC](https://discourse.mcneel.com/t/uneven-rectangle-subdivision/59356/2 "2018-03-30T15:59:23Z")

</div>

Didn’t you find the link of the download page in your reference? Visit here…  
[http://www.co-de-it.com/wordpress/code/grasshopper-code](http://www.co-de-it.com/wordpress/code/grasshopper-code)

---

<div class="post-metadata">

**Author:** ![cokerone1214](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/cokerone1214/32/149798_2.png) [@cokerone1214](https://discourse.mcneel.com/u/cokerone1214)\
**Post date:** [March 30, 2018, 4:00pm UTC](https://discourse.mcneel.com/t/uneven-rectangle-subdivision/59356/3 "2018-03-30T16:00:29Z")

</div>

Yes i visit the site but i cant find the specific post.

---

<div class="post-metadata">

**Author:** ![tim.stark](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/tim.stark/32/704108_2.png) [@tim.stark](https://discourse.mcneel.com/u/tim.stark)\
**Post date:** [March 30, 2018, 4:11pm UTC](https://discourse.mcneel.com/t/uneven-rectangle-subdivision/59356/4 "2018-03-30T16:11:49Z")

</div>

just scroll five times down and there it is … Called Uneven Subdivision. In the Picture is a green sruface with Grey brackground…

---

<div class="post-metadata">

**Author:** ![cokerone1214](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/cokerone1214/32/149798_2.png) [@cokerone1214](https://discourse.mcneel.com/u/cokerone1214)\
**Post date:** [March 30, 2018, 4:19pm UTC](https://discourse.mcneel.com/t/uneven-rectangle-subdivision/59356/5 "2018-03-30T16:19:38Z")

</div>

I think that the post you talking about is an uneven subdivision script too but different from what i am looking for.  
I think that maybe the post there isn’t anymore on the site so I hope someone have the script.

---

<div class="post-metadata">

**Author:** ![HS\_Kim](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/hs_kim/32/473975_2.png) [@HS\_Kim](https://discourse.mcneel.com/u/HS_Kim)\
**Post date:** [March 30, 2018, 4:32pm UTC](https://discourse.mcneel.com/t/uneven-rectangle-subdivision/59356/6 "2018-03-30T16:32:39Z")

</div>

Hey…  
It’s the same script… What you’ve seen is maybe something else added to it…

---

<div class="post-metadata">

**Author:** ![cokerone1214](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/cokerone1214/32/149798_2.png) [@cokerone1214](https://discourse.mcneel.com/u/cokerone1214)\
**Post date:** [March 30, 2018, 4:39pm UTC](https://discourse.mcneel.com/t/uneven-rectangle-subdivision/59356/7 "2018-03-30T16:39:33Z")

</div>

Yeah i agree with you that maybe there is something else added to this script but this one ( which is on the site ) create random rectangle subdivisions only in one axis. Either U or V. The one i am searching for creates a totally random subdivisions and i don’t have the knowledge to adjust anything to the first script in order to do what i want.

---

<div class="post-metadata">

**Author:** ![HS\_Kim](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/hs_kim/32/473975_2.png) [@HS\_Kim](https://discourse.mcneel.com/u/HS_Kim)\
**Post date:** [March 30, 2018, 5:00pm UTC](https://discourse.mcneel.com/t/uneven-rectangle-subdivision/59356/8 "2018-03-30T17:00:38Z")

</div>

Then, It’s the time of another Google for you. Good luck…😉  
And you might want to see other topics in this discourse including bellow…

> [@Subdivide given area into randomly sized blocks with no gaps](https://discourse.mcneel.com/t/subdivide-given-area-into-randomly-sized-blocks-with-no-gaps/58003):
>
> I have been struggling with this logic for a little while now, I am trying to create a definition to produce surfaces similar to the image attached. I have a feeling I might be approaching it from the wrong angle so would like to get another perspective if possible? [RandomMeshDivide.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/8/7/87f8ef2cca97b3af281095f4a24edc2f4f589a31.gh) (16.5 KB)

> [@Random parametric facade](https://discourse.mcneel.com/t/random-parametric-facade/57220):
>
> Hello guys! I am new to grasshopper and i am trying to understand its philosophy so i have stucked on something i trying to model. I have a curved wall in which i want to model a facade like in the photos below. I have spent three days trying to model it but the only way i thought is to use an image sampler ( i know that is a stupid way and possibly wrong but i am lacking in knowledge) I have watched a lot of tutuorials in order to adapt any technique to my current problem but i cant find an…

---

<div class="post-metadata">

**Author:** ![Joseph\_Oster](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joseph_oster/32/549124_2.png) [@Joseph\_Oster](https://discourse.mcneel.com/u/Joseph_Oster)\
**Post date:** [March 30, 2018, 5:30pm UTC](https://discourse.mcneel.com/t/uneven-rectangle-subdivision/59356/9 "2018-03-30T17:30:04Z")

</div>

![Uneven_Subdivision_2018Mar30a](https://global.discourse-cdn.com/mcneel/original/3X/d/1/d1094456e2c1f56b663b775a39fbc34224c4768a.png)  
[Uneven\_Subdivision\_2018Mar30a.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/7/3/73b72825cb3ffac028a85db05837b70acc4ac2f8.gh) (20.4 KB)

Getting uneven divisions in both directions is more complicated!

 ![Uneven_Subdivision_2018Mar30a2](https://global.discourse-cdn.com/mcneel/original/3X/4/c/4c1a8953b8a06f0d64206c1d22944a495bb83cb6.png)

---

<div class="post-metadata">

**Author:** ![cokerone1214](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/cokerone1214/32/149798_2.png) [@cokerone1214](https://discourse.mcneel.com/u/cokerone1214)\
**Post date:** [March 30, 2018, 5:44pm UTC](https://discourse.mcneel.com/t/uneven-rectangle-subdivision/59356/10 "2018-03-30T17:44:53Z")

</div>

Thank you guys!  
Yes I know this is why i was searching for the script i mentioned before.

---

<div class="post-metadata">

**Author:** ![Joseph\_Oster](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joseph_oster/32/549124_2.png) [@Joseph\_Oster](https://discourse.mcneel.com/u/Joseph_Oster)\
**Post date:** [March 30, 2018, 6:08pm UTC](https://discourse.mcneel.com/t/uneven-rectangle-subdivision/59356/11 "2018-03-30T18:08:46Z")

</div>

> [@cokerone1214](#):
>
> …this one ( which is on the site ) create random rectangle subdivisions only in one axis. Either U or V. The one i am searching for creates a totally random subdivisions and i don’t have the knowledge to adjust anything to the first script in order to do what i want.

 ![Uneven_Subdivision_2018Mar30b](https://global.discourse-cdn.com/mcneel/original/3X/1/f/1f3b00d0655e82068ff9117ccffa073cf56fd714.png)  
[Uneven\_Subdivision\_2018Mar30b.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/4/7/47ba2ddaa71dce123bb919ccc807cf6d7f2f1a2a.gh) (30.0 KB)

_P.S. re-posted wiih two_ Seed _sliders._

---

<div class="post-metadata">

**Author:** ![cokerone1214](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/cokerone1214/32/149798_2.png) [@cokerone1214](https://discourse.mcneel.com/u/cokerone1214)\
**Post date:** [March 30, 2018, 6:20pm UTC](https://discourse.mcneel.com/t/uneven-rectangle-subdivision/59356/12 "2018-03-30T18:20:43Z")

</div>

Thank you Joseph!  
It was very helpful!

---

<div class="post-metadata">

**Author:** ![Joseph\_Oster](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joseph_oster/32/549124_2.png) [@Joseph\_Oster](https://discourse.mcneel.com/u/Joseph_Oster)\
**Post date:** [March 30, 2018, 8:51pm UTC](https://discourse.mcneel.com/t/uneven-rectangle-subdivision/59356/13 "2018-03-30T20:51:23Z")

</div>

When I connected a gradient color preview and explored different ‘Seed’ settings, I noticed a sorted pattern, not random… due to a ReMap error.

 ![Uneven_Subdivision_2018Mar30c2](https://global.discourse-cdn.com/mcneel/original/3X/2/3/2302026122ddce673cd611c9cfccbb2fb606ddc7.png)  
[Uneven\_Subdivision\_2018Mar30b.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/4/7/47ba2ddaa71dce123bb919ccc807cf6d7f2f1a2a.gh) (30.0 KB)

So made a small change to fix it(?), and an off-by-one error.

 ![Uneven_Subdivision_2018Mar30c](https://global.discourse-cdn.com/mcneel/original/3X/e/3/e3a03afa6db74b09154819d9f298c64dbd45f2e6.png)  
[Uneven\_Subdivision\_2018Mar30c.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/b/8/b8ebd4e6885d7f5396d29d908497cb760aaaa40e.gh) (29.6 KB)

Later… I dropped something in versions ‘b’ and ‘c’ that I shouldn’t have., A Series of seed values so each subdivision has a unique sequence of random numbers. Remembered to internalize my surfaces this time!

 ![Uneven_Subdivision_2018Mar30d](https://global.discourse-cdn.com/mcneel/original/3X/6/5/656810414b1e954dc0a8ef5f7186567f2c13f962.png)  
[Uneven\_Subdivision\_2018Mar30d.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/8/2/824053adc30286cc3a25029b9ffa1ea56adfcda6.gh) (32.5 KB)

 ![Uneven_Subdivision_2018Mar30d3](https://global.discourse-cdn.com/mcneel/original/3X/9/8/98c3717392ffb7af25664b87a13f7cb7921f871f.png)

 ![Uneven_Subdivision_2018Mar30d2](https://global.discourse-cdn.com/mcneel/original/3X/2/f/2f5d4e450ca3658d6b9ee07a1336d785779c56e7.png)

---

<div class="post-metadata">

**Author:** ![cokerone1214](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/cokerone1214/32/149798_2.png) [@cokerone1214](https://discourse.mcneel.com/u/cokerone1214)\
**Post date:** [March 31, 2018, 6:29am UTC](https://discourse.mcneel.com/t/uneven-rectangle-subdivision/59356/14 "2018-03-31T06:29:09Z")

</div>

Thank you very much Joseph for your time! Perfect result… i will try to understand the logic behind your script.

---

<div class="post-metadata">

**Author:** ![Joseph\_Oster](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joseph_oster/32/549124_2.png) [@Joseph\_Oster](https://discourse.mcneel.com/u/Joseph_Oster)\
**Post date:** [March 31, 2018, 12:53pm UTC](https://discourse.mcneel.com/t/uneven-rectangle-subdivision/59356/15 "2018-03-31T12:53:17Z")

</div>

The issue of a unique seed for each subdivision vs. using the same seed for all is so interesting that I added a switch between the two states _(cyan group)_. When the same seed is re-used, edges are aligned across subdivisions, which takes some thinking to explain… It happens because the numbers are generated in random sequence and sorted, leaving gaps in shorter lists but using the same values.

 ![Uneven_Subdivision_2018Mar31a](https://global.discourse-cdn.com/mcneel/original/3X/d/5/d5099a7cb1d4c8fc8fd8eee8a310584e86a26cd0.png)

 ![Uneven_Subdivision_2018Mar31a2](https://global.discourse-cdn.com/mcneel/original/3X/8/7/87e82df6e08aa9f9a528e5479780f61a35f14084.png)  
[Uneven\_Subdivision\_2018Mar31a.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/8/1/81246545b748e205b99b1b50a0797b2e3118a1c6.gh) (37.7 KB)

The other error I made, effectively sorting the subdivisions by size, is also interesting and a valid objective. Subtle changes, critical differences!

---

<div class="post-metadata">

**Author:** ![kennedygeraldo1](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/kennedygeraldo1/32/432110_2.png) [@kennedygeraldo1](https://discourse.mcneel.com/u/kennedygeraldo1)\
**Post date:** [May 24, 2020, 8:07pm UTC](https://discourse.mcneel.com/t/uneven-rectangle-subdivision/59356/16 "2020-05-24T20:07:17Z")

</div>

Thanks Joseph 🙂 🙂
