Grasshopper

algorithmic modeling for Rhino

Hi I have been working on grasshopper substrate for a while and I still can't figure out how the substrate actually works. I only have a general idea which is that it starts from random points,the lines form at intersecting pattern and that the line forms more at denser places. Does any of you know a more specific algorithm behind the component?

In addition to the question I would also like to know the angle in the substrate component. I rotate the angle 90* of the substrate but I can't figure out why the lines form at weird angles instead of forming symmetrical lines. Here is my grasshopper file and the image of 0* angle and 90* angle

Views: 2360

Attachments:

Replies to This Discussion

Substrate is loosely based on the Jared Tarbell algorithm of the same name, except of course his version works in pixels while mine works on double-precision line geometry. Also Jared's algorithms grows in time, meaning the diagram is changed in more than one place at once. My algorithm works one line at a time.

The component takes a list of angles, you only supplied one, but it's possible to provide more. Each angle will result in a seeding line at that angle. This is the first step of the algorithm.

Once the seedlines have been inserted, one is picked at random and a perpendicular line is created from a random point along that line. This perpendicular line is then rotated with a random angle from 0.0 to Deviation. If you want all your lines to be perpendicular to each other, make sure the deviation is zero.

This new line is then 'shot' into the diagram until it intersects another line or the boundary.

Repeat until the required number of lines have been inserted.

I attached a modified file which shows the options a bit more clearly.

---------------------------------------------------------

The component does not give control over exactly where the seed-lines are positioned. Nor does it allow you to weigh the probability of randomly picked lines/randomly picked points for the diagram growth. All lines are equally likely to be picked, which means that already dense areas tend to get more dense over time.

Attachments:

Hi David, I'm trying to use different geometry like triangle as boundary, is there anyway to work it out or show your original code?

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service