Grasshopper

algorithmic modeling for Rhino

Hi all,

I reach the point where i desperately need your help...

(I am new on grasshopper so my action are not as optimize as they could be...yet)

I am trying to obtain a pattern based on the grey scale of an image.

It combine an IMAGE SAMPLER with a GRID

The IMAGE SAMPLER gives me radius and GRID gives me the point.

I put on each intersection a circle with the radius given by image sampler. (for this example, I replace the circle by a square, but the problem with radius is the same)

MY PROBLEM :

I didn't manage to choose or parameter the size of the radius,

at the end, i would only need 5 different radius : 0 (i'll delete the point), 5; 7,5; 10 and 12,5.

In the image below, I tried to divide the list of radius in 5 parts, but then couldn't reconnect it with the intersection points.

Views: 1846

Attachments:

Replies to This Discussion

Can you attach your .gh file please. Otherwise its really difficult to help. But it looks like it can be simplified a lot ;) (don't worry, we all started once)

Thanks, here the gh file with internalize data,

Hope you can help me!

Attachments:

You forgot to internalise the data input just below the image sampler. And maybe also send the image of the ship.

I'll try my best.

Indeed I forgot, hope it's good this time!

Attachments:

Ah ok, everything is opening fine now.

So let me just clarify a bit what exactly you are trying to achieve.

You have a lot of those larger than and smaller than components. So really from what I can tell is that you want to remap numbers into just a bunch of fixed sizes. Anything below a certain value should be discarded.

Also just looking at your definition I take it you want to spread the image over the whole area and not 144 smaller sections individually as it is now?

Is there a reason you are "drawing" the squares and not just placing and sizing some squares?

1_ yes exactly, I want to remap 4 specific number instead of a list of random sizes, and the too small one will be discarded

2_I spread indeed the image over the all grid, but the grasshopper file was too big and by repeating it 144 times, it becames smaller.... in fact, my image is 6906x 30800 so i have one big boat

3_I manage to do my square included in the circles this way... I didn't manage to draw a square whose size would be affected by the circle radius... I would rather have just a square, I found a plan B solution :)

1_ Ok, so that works now. I explain in the file how you do it. Its a concept you will be using a lot in GH.

2_ Right that makes sense. well you should be able to just plug in your points then and use the bigger image.

3_ Plan B's are always good and usually just as valid. A thousand roads lead to Rome and thats just as true in GH. There is usually so many different ways to solve something and there is no really right or wrong. Just some things that work faster, more effective or with less components.

And why do you have a 'Data' parameter with 92,365 points (internalized) that appear to be the same as the points coming from 'Intersect Curves'?

And why are there gaps in your 'CU' and 'CV' curve sets?

Ah, that might be kinda my fault. I dont have Panelling Tools installed, so I gues it didnt show the intersect curves component for me so I asked him to internalise the data.

Installing panelling tools now..

Ok, so here is a simplified version of what you have and are trying to achieve.

The key is that you remap the numbers right at the beginning to the number of distinct values you want and not the actual values yet. You can than use those to pick the actual values later on.

Also simplified the drawing of the rectangles somewhat ;)

Attachments:

The Image Sampler is missing from your file.  Have noticed this problem several times recently in other code posted to the forum.

Yeah, the Image Sampler is supposed to be at object index 19, but it's just missing in the file. At least this means the problem is with writing the GH file, not reading it. Unfortunately it means I cannot use that file to find out why it failed.

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service