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.

Show your WorkFrom the old forum

Scatter Bias Node

5 replies Last reply

  1. Attached is a new node: scatter_bias.

    UPDATE - improved version attached in subsequent note.

    The standard scatter node is the simplest way of introducing randomness into patterns. It scatters a given number of points within a supplied boundary shape. It is simple, but gives you little control over the distribution of those points.

    Scatter_bias does the same thing, but provides a way of creating a biased distribution centered on a focus point. The node takes the following arguments:

    • Shape. All points will be generated inside this shape.
    • Amount. The number of points to be generated.
    • Focus. A point inside or outside the boundary shape, relative to the center of that shape. Points will be more likely to fall closer to the focus point.
    • Influence. A value from 0 to 100. At 100, the focus will exert maximum influence and all points will fall within a sharply defined circle around the focus (as permitted by the boundary). At 0, the points will land as they would with a normal scatter node.
    • Tightness. A value from 0 to 100. Tightness affects the radius of the circle around the focus at maximum influence, from 0 for a wide circle to 100 for a tight circle. Tighter circles will slightly degrade performance with a large number of points.
    • Seed. The random seed. Change to see different distributions.
    • Output. Either "Points" or "Preview". Points outputs the specified number of points. Preview generates some reference shapes useful when positioning the focus and tuning the other parameters:
    • It renders the points as small blue circles
    • It shows the outline of the boundary shape
    • It shows a red focus dot with white outline at the position of the focus
    • It shows a translucent pink circle showing the current tightness of the focus circle at maximum influence

    TIP: Don't forget to reset the output to "Points" after tuning the parameters. If fed into other nodes when in Preview mode, all the extra ellipses for the points, outline, focus, and circle of maximum influence will themselves be converted to points, resulting in about 13 times as many total points as specified.

    Scatter_bias is reasonably fast and can generate 10,000 points almost instantly. By playing with the parameters you can generate a wide variety of interesting distributions. The biased distributions can then be used to drive an unlimited number of effects. In animations you can move the focus and cause the influence and/or tightness to rise and fall to cause even more interesting effects.

    I strongly encourage you all to play with this node and share some the things you make using it. Suggestions for improvement or for other ways of introducing randomness into designs are always welcome. Scatter_bias will be included in the next rev of the Cartan Node Library and is free for use with no restrictions.

    Go forth and create!

    John

    Copy link
  2. UPDATE

    I just spotted and fixed a small bug in the scatter_bias node.

    If your supplied boundary shape is not centered, the focus is relative to the shape's centroid so that it will move with the shape. This works find in "Points" mode. But in "Preview" mode the focus was showing at the absolute position instead.

    Fixed.

    The updated version of the demo file is attached here.

    Sorry for the inconvenience.

    Copy link
  3. Gabriel,

    Excellent! This is a simple but clever use of the node.

    Aside: your technique of wiggling a resampled rectangle is ingenious. There are all sorts of ways of making irregular shapes; this is one of the simplest I've seen.

    I am attaching the screenshot you included in your zip file so everyone can more easily see it,

    Copy link
  4. Thank you for another great Node John!
    I fiddled with it and found it creating interesting results when combined with typography.
    But it feels like just scratching the surface of this node here.

    Copy link
  5. Jussi,

    That looks cool - and, as you say, only scratches the surface. These kind of effects - gradually increasing the influence or tightening the focus - work well in animations.

    I bet you could also use it to position shapes for some nice plots.

    Copy link

Know something that helps?

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

Sign in to reply