Q: random placement of scaled/rotated panels on geometry?

   2002   2   0
User Avatar
Member
147 posts
Joined: March 2014
Offline
Hi all,

I'm looking into something that could be very simple to solve, or not simple at all ;-)

I want to randomly place a set of square-ish panels, on a underlying geometry shape.
But I want the defined shapes to be randomly sized and/or rotated as well, -and- in the end show no gaps.
It's like a mix of dart throwing and nurnies, or something. :-D

Is this possible in any way?

cheers for any tips!

rob
Apprentice Attribute / Houdini 17.0.381 / GTX 970 - driver 411.63
User Avatar
Member
2048 posts
Joined: Sept. 2015
Offline
I'm pretty sure there are numerous ways of doing this.

But I think one principle that will be of use is using relative references which this file I'm including illustrates.

In it there are two squares made up of 4 points each and their default numbering is 0,1,2 and 3

The square on the right has its left side related to points 2 and 3 in its Add Sop
2 being the bottom left and 3 being the upper left

The square on the left has its right side related to points 0 and 1 in its Add Sop
0 being the upper right and 1 being the lower right.

The first relative channel reference ties point 0 of the first square to point 3 of the second square.

The second relative channel reference ties the point 1 of the first square to point 2 of the second square.

Anytime you make a change to left squares point 0 or 1 the connected points in the right square will also change.

In this case changing those two points or moving the entire two squares at the object level ensures there never is a gap between the two and both sides always remain the same length.

Of course you can make this more “complicated” with additional nodes but hopefully this will give you an idea of the principle to work with.

Edited by BabaJ - July 20, 2016 12:53:34

Attachments:
Shared Points.hiplc (53.6 KB)

User Avatar
Member
147 posts
Joined: March 2014
Offline
Hi,

Thanks for that! Much appreciated :-)

Will have a look at it, and see if I can come up with something.

cheers!

rob
Apprentice Attribute / Houdini 17.0.381 / GTX 970 - driver 411.63
  • Quick Links