# Geometry Nodes: Random Array Using Curves

## Trying to make a all purpose Curve (Rotation - Scale - Random objects - etc)...

Issue - When Instancing on points i don't know how to make Sure the Stacks Stick Together When Using a Random Scale Value.

Things to keep in consideration:

1. Must Work by Using a Spline
2. Must Follow the Spline, Total Length, Position and Distance
3. Must Respect The Rotation Value
4. Preferably Working on 3 Axis instead of 2 Axis (XYZ instead of "Length" and "Height").

Currently all of this is Still a WIP so some things might Change...

## End Product How i wanted it to Look

Reason why i don't use the Cube:

1. Don't know How to make it work with "Object Info"
2. Uses 2 Axis and Needed it to work on 3 Axis.

• A good direction for solution is: Set the origin of your book instance - Bottom/Center. Instead of resampling the curve use the accumulated random Book scale values to position the instancer's points on the Curve using the Spline Factor value. Imagine the following scenario: Stack the books in a line. Find their positions on the line. Map the positions from the line to the Curve. Reposition the books and align their rotations with the Spline normal. Commented Nov 2, 2023 at 9:37
• Maybe helpful: blender.stackexchange.com/questions/271450/… Commented Nov 2, 2023 at 9:42

Here is a Geometry Node set up for arranging an array of randomized by scale blocks on a Curve:

Restrictions: *- works best on 2D curve in XY plane.

• works best on convex open and closed shapes.
• requires manual adjustments on some parameters.*

You need the following Objects:

1. An Instance object. The Instance object must be oriented along the +Y axis with origin at its base (see the screenshot) In this case a "Book":

2. A Curve object - along which the randomly scaled instances will be placed. It should reside in the XY plane. I am starting with a default Bezier Circle.

3. A Plane Object to hold the Geometry Nodes Modifier with the following set up:

Short description of the nodes

The Instance >> Rescale X Dimension to 1

Rescales the Instance object so its X dimension (thickness) is equal to 1. The Transform Geometry Node could be used additionally for translation and rotation of the original object if needed.

The Points >> Randomize Size

Generates points based on the Count number in the Curve to Points node, initially equally spaced on the Curve. A Random Value node generates random size value for each point using the Min and Max parameters, the Seed can be used for variation.

Reposition the Points along the curve based on size

The radii are turned into diameters and summed up sequentially using the Accumulate Field node, Leading values are then subtracted by the radius of each point to get the distance along the curve where the points are supposed to be placed. Plugging these values into the Sample Curve node returns the Position and the Normal vectors, which are then used to set the new position of the points and their rotation.

Instance on Points + Scale Tweak (optional)

The Instance object is duplicated on each point with additional settings for Scale in case a gap between the instances is required.

Note! The number of instances and shape of the Curves should be adjusted manually. Adding extra amount of points will overlap at the end of the Curve. In case the the objects are pointing inwards instead out - try Curve Edit - Segment > Switch Direction.

Here is an example with an open Curve: