Grasshopper

algorithmic modeling for Rhino

Hello,
I'm looking for a solution to a color gradient with just two colors. Let me explain I have 45000 elements aligned, I'd collect a gradient between two colors, in an overview, without nuance other than these two colors.

Views: 1944

Replies to This Discussion

Apologies, it appears I forgot to attach the definition last time.

 

Now that logic is set up, you can always add in new bits to the Merge component to get the effect you want - if different to your example posted. (This forum is for the GH logic, not to do your work for you after all.) Here is an example where there are a few 1s, then a few 2s and then the series. Adding more steps into the merge component before the Series will give you more control. (zooming in lets you add inputs.)

Just had a thought as I was writing this, it's a bit buggy (due to rounding errors in the duplication of the data), but graph mapper might give the control you're after visually - just change the curve of:

(Spacing between lines in both pictures =x/4)

Changing the curve in the graph mapper will edit the transition.

Attachments:

Many thanks,It's work fine.

And yes your right, really apologies for this, Did you know some this to learn step by step this wonderful software, for dummies like me.

I play with this definition, But I didn't find the way to bake the black lines on a different layer form the white ones. I didn't understand the logic behind the preview block...? Can you explain if it's possible to do it.

Thanks in advance.

Hello Senequier, Raul,

If I get this right you want something like this:

(Start from the center of the array and go up with a pattern 1,1,2,1,3,1,4,1,5,1,..... and down with the opposite pattern)

Attachments:

It's look like that, but actually, on your example it's less gradient than my exemple, I don't know why?

I don't know exactly if the pattern must be 1,1,2,1,3,1,4,1,5,1,..... I'm looking for something more fluid.

see attached...

Its not the ultimate pro code (naive and without any check) but it works for me...

you have to choose your lines, than input the value for "Val".

In your example with 42 lines Val=5

Let me know if it works.

Raul

Attachments:

Actually your first two images seem to have a different logic than the third one (the big gradient). 

In the 3rd image, the distance between the lines doesn't seem to change, only their width does...

take this one, the first has a bug...

Attachments:

I try your Gradient V2, He works fine when you do with 42 lignes but i didn't understand the logic behind the value. If I have 1000 lignes or 42000.

Really I think this is not the way for the solution.

I try to make something with illustrator... to explain what I'm looking for. 

All you need is to find/define the function for the behavior of your lines. With that function your problem is solved. It looks like a curve higher than ^2 (maybe asymptotic?)...

many thanks raul, I find my solution with Joe allberry just above.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service