Panel Gradient Pattern

Hello,
I’m trying create an effect with a group of panels where I can move points to generate a gradient of different panel sizes. I have experimented with point charges as shown below (this is an image from the attached script).


Currently the gradient is very rough when I move the points over the surface and I’m wondering if point charges were a bad choice for the effect I’m trying to create. Also, currently I’m having to add components to my code for each new point charge I add. Basically I’m moving the center points of panels due to the field generated of a point charge and then moving them again for the field from another point charge (see below). Then I’m using the normalized distances from the original points to the translated points to determine the size of each panel.

I think what I’ve done kind of works, but I’m hoping someone has a better solution or suggestions as I’m a little stuck.DiscreteGradient.gh (28.1 KB)
Thanks!

Hi @jared.parker,

Here’s an alternative driven by attractor points. No point charges are involved anymore.

The distances from each attractor point to each panel center point are calculated. From these distances the closest one is evaluated for each panel, and remapped to define a desired, new panel width.

Btw, you can add as many attractors as you want.

DiscreteGradient2.gh (28.9 KB)

1 Like

Thank you for the prompt response!
I started out with attractors, but I couldn’t figure out a way to combine the effects of one point making the surrounding panels larger based on proximity and another point making them smaller based on proximity. I was thinking of this as combining the effects of attractors and “repellers” with variable influence or “strength”. Ultimately that is what I’m after, but I don’t know if there is a way to do this and have it still be as smooth as what you have shown.
Any thoughts?

You could have been a little more precise in your first post. :wink:


Combining the effects of attraction and repulsion is as simple as defining another set of points, representing the repellers, doing the exact same operations in order to computer their influences, and adding the result to the attractor influences. All that remains now is to remap the combined influences to the desired panel aperture domain (i.e. min./max. panel width).

The result can be really fine-tuned by playing with the GraphMapper components and the minimum and maximum influence domains of the attractors and/or repellers.

DiscreteGradient3.gh (38.1 KB)

2 Likes

This is fantastic! I have a script I was working with where I was adding the values but I was doing it incorrectly. I’ve been looking at this problem for a while and I finally understand what I was doing wrong and how to proceed.
Thank you so much!

1 Like