Grasshopper

algorithmic modeling for Rhino

Multiple Attractors Scaled by Independent Percentage Values

Hi there,

I'm trying to put together a site analysis visualisation based on visitor numbers to 18 different locations within a parkland site. I figured one way to do this would be to create a grid of points within the bounds of the site boundary and use each location as an attractor point controlling a variable at each point in the grid (radius of a circle/height of a cube/colour based on a gradient etc.).This would be based on proximity to the attractor points with the effect of each attractor point essentially scaled by the percentage associated with it. For example a location with 88% visitor rates would have a more dramatic effect than a location with 26% visitor rates.

I've had a bit of a play around but can't seem to get beyond the point of what is shown in basic point attractor tutorials online. I'm definitely a novice.

Here's how I figured it would be done:

1) Create a grid of source points within a boundary curve.

2) Select 18 pre-defined attractor points.

2) Measure the distance between the source points and the attractor points.

3) Invert this data so that variables increase with proximity rather than decrease.

4) Give each of the attractor points a strength value from 1-100% based on the visitor rates.

5) Use the scaled data to control a variable at each of the source points.

6) Create some way to control the drop-off rate of the effect from each point.

It is at step 3 that I get completely lost.

I hope my description is clear. Any help would be greatly appreciated,

Adam

Views: 1619

Replies to This Discussion

Get this as a starting point and we talk later

Attachments:

Thanks for that! I've had a bit of play with it and it seems like it does pretty much everything except the different strength values for each attractor point. I'll be honest though, while I can move the attractor points and get this to work, it is a bit beyond my skill level to comprehend exactly what is going on. I'm going to have to dig into it a bit more deeply to try and work it out. It's definitely a good learning exercise...thank you.

Well ... visualizing the "effect" per attractor is not that simple: If I was you I would opt for some DataTree that contains the "contributing percentages" (so to speak) per attractor.

If you don't like the numerical mode ... another way (maybe closer to what you want) is to present the vertical  "bars" (as it is delivered) divided according to each attractor influence.

But that could be a nightmare to interpret: Imagine 30 attractors and a vertical bar proportionally divided into 30 smallish segments > ????.

On the other hand you can "magnify" a given bar (a slider could control the branch/index etc) and then and only then the "percentages" would be visible.

That said David's solution is excellent (as usual) but ... well ... personally I prefer something more "direct" than using colors. 

PS: Text Dots (only doable via code) is rather the best way to correlate a given percentage with the corresponding attractor.

Yeah...I think I will initially be trying to adapt David's solution and apply it to the site as it seems quite close to a usable outcome at this point and not too steep a learning curve viewed from my current skill level (as long as I find a way to resolve the error messages). That said, I do find the potential of the vertical bar visualisation very engaging. The site is quite steep so it would be interesting to see any correlations between the topography of the site and the topography created by the vertical bars. I imagine in some places one would be almost the inverse of the other. I'll definitely be returning to this once I get David's 2D solution going. Thanks again!

OK, do that and if at some later time you need the "vertical bar" thingy drop a word (and provide some topo data in order to test the whole approach on a real-life basis).

Again: text dots would been available via C# ... not GH native components.

Attachments:

Cheers for the reply! It is very close to what I need and I think it is a fantastic starting point for me to build on. It is a very large site so I will need to scale the square grid up to approximately S=10, Ex=150, Ey=100. I threw in some number sliders to do this and it seems that increasing the values even slightly triggers a series of errors. Increasing the S anywhere beyond 1 triggers it. Increasing either the Ex or Ey values above 33 triggers it. Any idea what is going on? Refer to attached image.

Attachments:

The bezier graph has a limited x-range at which point it drops to zero. If the distance to all points is larger than the graph range, the sum total will be zero. You need to either adjust the graph X range to cater the to the maximum possible distance from each sample point to each measurement point, or you need to use a graph that doesn't go to zero at the extreme. Either adjust the Y-range, or drag the rightmost grip up a bit, or use a different function like Gaussian.

Excellent. That seems to have done the trick. Many thanks!

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service