Grasshopper

algorithmic modeling for Rhino

Not sure a succinct and accurate discussion title was achieved...

Originally I took a grid of points and used a function to affect vector lengths based on distance from 3 points and fed these vectors back into a line-SDL in the z direction from the original points to get a wavy field of points. Then I sorted this list into a bunch of tree branches (thanks to some help from David R and other generous folks) and drew an interpolate curve through them so I could eventually loft them. (Maybe Surface from Grid of Points would also work in this situation, but I can't seem to get it to work correctly). See file: WaveField_01.jpg

This approach affects all the points in the grid, so my next step was to isolate smaller subsets of points to have the wave affect in localized areas, which I was able to do. I used the inverse of this affect to get all the points that were not in these subsets. Then I ran the subsets through the vector manipulation functions, drew my lines again, got the endpoints of these lines, and then attempted to insert those manipulated subset points back into the inverse set to reconstitute my gird of points. I (attempted to) do this using the weave component and the boolean pattern that pulled them out in the first place. Then when I create branches and run Interpolate Curve through them it's clear that something has gone amiss. See file: WaveField_02.jpg

I am perplexed as how to fix this or get them back into the right order. Any thoughts? Ideas?

Views: 1899

Attachments:

Replies to This Discussion

Still can't figure out how to get these points back in order. Attached GHX file shows the problems. Any ideas welcome.
Attachments:
Hi Austin,

this is a tricky problem, involves copious amounts of bookkeeping or reverse engineering. Here's how I would attempt and solve this:

1) Bookkeeping: when you sort your points/lines and extract subsets, be sure you always perform the same actions on a list of increasing numbers. So, before you start to manipulate a list of 100 points, create a list of 100 integers (0, 1, 2, ..., 99) and make sure it gets mutilated in the exact same way as the pointlist.
Then, when all your points are modified, bring them all into the same list again and sort that list using the integer array as keys. This ought to put them back into the right order.

2) Reverse Engineering: since you know all your points are along well defined curves (lines in your case), you could project them all onto a line that spans the entire model. This will give you a list of curve parameters (floating point numbers). You can then sort your points once again, but this time using the parameters as keys. (See image: by sorting all the points using the curve parameters, you get the order in which they appear from left to right)

2b) If you need to do this thing on points which are in a grid (i.e. 2D sorting), you have to project onto a surface so you get uv parameters for every point. Then vastly multiply only the u (or only the v) values, since you want to give rows (or columns) a higher weighting. Finally add u and v together and this will give you another list of floating point numbers which can be used as a keys array in a sort operation.
Attachments:
Hi Austin,

i tried to manipulate some specific points of a grid of points and feed them back in to the base list.
maybe you can do it in a simpler way, but its working for me.

HPN
Attachments:

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