Grasshopper

algorithmic modeling for Rhino

Hi everyone!

I´m looking to do some work with wind and sounds on grasshopper trough the data obtained from Autodesk Vasari. At this moment of the beta the only info I´m able to retrieve are pictures as the linked on the post.

I´m trying to find an affordable way to draw those lines (vectors), as shown in the  attached picture. I´m guessing this should be possible trough grasshopper and picture sampler but I´m not sure if there is an easy computable way.Maybe I should use another software for this task.

Thank you for your time!

Views: 2700

Attachments:

Replies to This Discussion

Even if you got it to work, you'll be down to pixel accuracy.

The basic algorithm needed for this probably can't be done in GH directly without some custom scripting. You'd have to create geometry for every pixel, which means you'll have to deal with huge meshes. I took a small part of your image and it seems to work, but it's a pretty involved process to get it all set up right:

Attachments:

Hi David, Thank you for your time.

Even being a little bit down to pixel accuracy is not so problematic for the purposes of the work. I tried your simple yet fantastic approach on the whole picture and it seemed to work fine on the left half of the picture and created some "jagged  disconected" curves on the right side.

I´m not sure what kind of problem this could be. On the other hand I´m very curious why you used the expression if "If(x < 0.1, 0.0, 5)" maybe you can take a quick check, thanks a lot!

Attachments:

I blurred your image to avoid the strong aliasing of the pixels, without the blurring I got gaps in the final result.

You have to make sure that your sample grid is exactly the same as your pixel grid, otherwise you'll once again introduce aliasing artefacts. This probably means having a U and V count for the mesh which is one less than the pixel counts.

I used that expression to convert pixels that were near black to black. You posted a JPG image instead of a PNG and I was worried there'd be a lot of barely visible jpeg compression noise around the crisp pixels. Doing a preprocess in a pixel editor where you convert the image to a pure black and white one would remove the need to 'fix' the image in Grasshopper.

Incidentally it probably makes sense to enable the Interpolate option on the Image Sampler. It will fix the problem you're seeing with your file now as it avoids the aliasing moire patterns that occur when sampling with integer accuracy using a not completely correctly aligned grid.

Hi David, I finally managed to get the results I was looking for. I transformed the picture onto a true black and white .png and escalated it´s size to a power of two. The key was getting the same divisions as pixels as you mentioned.

Here I show you the vectors obtained. Now I´m onto the hardest part, making this vectors on a xy plane interact with some points in the same plane. But I´, wandering around atm. Maybe you know a topic on this forum .Thank you!

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service