The new NodeBox forum is live! Everything from support.nodebox.net moved here: sign in with the same email to pick up your old posts. Something not working? Write to forum-support@nodebox.net.

NodeBox 3From the old forum

Scaling a grid (or copies) of shapes in NB3

4 replies Last reply

  1. The tutorial shows how to build a grid of ellipses with different sizes. The variety in size is achieved by generating ellipses with varying width and height and then positioning them in a grid.

    However, I can't figure out how to achieve shape variety going the other way. Imagine I created a complex shape out of several components (like a polygon in the pattern tutorial), grouped them together and created a grid (or a series of copies). Now, I want to change the scale of each shape within the grid, so I connect the output of the translate node (with has the group and grid nodes as inputs) to a scale node. Next, I connect a random number generator to the scale port of the scale node. The amount of numbers generated is equal to the amount of shapes coming out of the translate node.

    What I get is that each shape in the grid is scaled relative to the same origin -- the grid center. How do I make each one scale relative to its own center?

    Relevant screenshots: http://d.pr/i/2Kar, http://d.pr/i/Oruw

    Thanks.

    Copy link
  2. Hey Alex,

    you can put the 'scale' node right after the 'group' node (and before the 'translate') in the chain; this should scale each geometry from its own center.
    I think you'd also have to connect the 'count' & 'random' nodes to the 'grid' (instead of the 'translate'), to avoid patching a 'circle' or feedback loop.

    Copy link
  3. Hi Alex,

    Can't you just connect the grid to the origin point port of the scale node in your original file? That should take the grid points as the center of the scaling for each of your shapes.

    best,

    Lucas

    Copy link
  4. Thanks, lucasnijs. I had missed the ability to feed Grid's output to the scale node's origin port. Now it works as expected.

    Copy link

Know something that helps?

Sign in with your email address to reply. No password needed.

Sign in to reply