## How to create a matrix of objects randomly in the XYZ plane?

General discusson for Skatter for SketchUp

Moderator: jiminy-billy-bob

### How to create a matrix of objects randomly in the XYZ plane?

Hey Guys

Would any Master Jedis out there know how to create this (in the picture attachment) based on the following criteria?

1) a matrix of objects scattered on the XYZ Plane (not on a flat 2 dimensional surface, but 3 dimensions)
2) The objects must be scattered Randomly
2) The matrix of objects must be confined to a cube

I tried doing this in Skatter, but the objects can only be laid on the outer and inner surfaces. The objects can't seem to be positioned in a nice cubic grid format.

The picture attached explains the objective.

Thanks guys!
1

taydavid03

### Re: How to create a matrix of objects randomly in the XYZ pl

First thought to make it within a cube and in a cubic structure would be to fill the cube with arrays of your object then use one of the random select plugins to remove random entities.
Tig's Random Delete might be ideal.
https://sketchucation.com/pluginstore?pln=RandomDelete

Something like this.
2

Box

### Re: How to create a matrix of objects randomly in the XYZ pl

Hi Box,

That is a very very good idea, create the array within the cube then use random delete, thank you.

Apologies, just one more thing, how on earth do I create an array within a cube?

I have done pretty complex stuff but this is something I havent done before...

Thank you again my man!
1

taydavid03

### Re: How to create a matrix of objects randomly in the XYZ pl

Make an array along one axis, then the other then the other.
Here is a quick version, I haven't been accurate, just eyeballed it, but if you use a specific distance you will get a perfect cube.
2

Box

### Re: How to create a matrix of objects randomly in the XYZ pl

Box's solution is good if you want a regular 3D grid.
If what you want is pure randomness within a cube, here is a simple solution with Skatter:

Simply use the Random Translation. 'Min Z' should be 0 and 'Max Z' should be the height of the cube.

cube.png

Here is the file. Right-click on the little cubes group and click on 'Edit Skatter Group'.
cube.skp
2

jiminy-billy-bob
PluginStore Author

### Re: How to create a matrix of objects randomly in the XYZ pl

Sorry Jiminy, I didn't notice it was in the skater forum.
1

Box

### Re: How to create a matrix of objects randomly in the XYZ pl

No problem
Sometimes Skatter has no solution for a problem, it's nice to propose other ways of doing things.
1

jiminy-billy-bob
PluginStore Author

### Re: How to create a matrix of objects randomly in the XYZ pl

Thanks Box and Jiminy!

Jiminy, your instructions worked like magic.

I do have one more issue on this.

1) To increase number of objects within the cube, I would have to change "Spacing" under "Distribution" - I get this.

2) And if I wanted to organize the objects into grid format, I would select "Uniform" instead of "Random" under "Distribution >> Type" - I get this too.

3) But what functions do I have to key into Skatter to make the bottom part of the cube more dense with components, while the top part of the cube is more sparse?
- In other words, how to create a gentle falling effect, as if the components were floating downwards, with the bottom part being more dense, while the top part is more sparse
1

taydavid03

### Re: How to create a matrix of objects randomly in the XYZ pl

I'm afraid there is no built-in way to do this.

You can fake the effect by duplicating the Skatter setups (right-click > Duplicate Skatter Group) and changing the 'Max Z' value. Also make sure to click on 'New seed' at the bottom of the dialog each time you duplicate, otherwise they will overlap.

Here is an example with 4 setups:
cube2.skp

cube2.png
2

jiminy-billy-bob
PluginStore Author

2
TIG

TIG
Global Moderator

### Re: How to create a matrix of objects randomly in the XYZ pl

Hi Jiminy and TIG

You guys are the best!

Grazi!
1

taydavid03

### Re: How to create a matrix of objects randomly in the XYZ pl

... what a great and interesting contribution this is - so thank you all for the great ideas and approaches. In this context I remembered a video tutorial by Joseph Kim, which also fits (not exactly but somehow at least) here However, the "picture" shown in Kim´s video is so wonderful and worth being seen in any case...
0
never trust a skinny cook

HornOxx