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: 1904

Replies to This Discussion

hi,

you can do something like this:

 For a set of lines...

you can build a function with two colors. LunchBox plugin is needed for bake...

Hope this helps,

Raul

Attachments:

Thanks Raul for your answers, but, I do not understand how your solution work.

For information, I am looking for a solution "list" that could do something like that 

the lines are colored by length from 0 to Lmax/2 blue and from Lmax*2 to Lmax red.

I dont understand what kind of elements you have. Some further information can be helpfull...

the idea is to create a canvas like the one above with 45000 lines. 

Idealy, I want the blue on a layers et the red on a other.

i think you can achieve that with a c# component. But you will need the FROM and TO Values to be able to decide which color to which line belongs.

Thanks for all your answers. I will trying to do what you suggest, but I didn't code.

first you need the conditions, your input. How will you sort your lines? Regarding X-, Y- or Z-Coo.

Do you always have 11xBlue and 11xRed?

Make a list with the borders of blue and red. Set the rule:

1) 0<= x <1

2) 1<= x <2

and so on

At the end we can speak about coding...

I don't care about the input...

I'have 45000 lines stacked and i tried to make a gradient with two colors.

I want only two lists of numbers with the lines in blue and a the other, lines in red. 

I don't really need visualisation, just the list are important here.

If it's not possible without input, i don't care about the design. 

senequier,

to make two lists with your lines implies to know how to sort the lines.

How do you want to decide which line will be blue and which one red?

Also, you may provide a small example (maybe with 10 lines) and a sketch with the expected result.

It is hard to understand what you want to do.

You dont care about input, visualisation and design. Its ok. But you need to meet some criteria to be able to split your liner in two groups.

Raul

Start again at the beginning!
Thank you for taking time to solve my problem.

I'm looking to realize a two-color gradient from same line thickness.
I would like a solution where I get two lists based on the number of desired lines.

Example, if I have a height of 100 lines, lines 1,2, 3 ... 50.52, 54.57 ... will be blue and 100.99, 98 ... 51.49, 47.43 ... will be red.

maybe the image is more helpful 

But if I chose a lot of lignes, to didn't see the lignes, visually.

More something like that!

Hopefully this is useful, it just uses stock components - currently set to the 42 line example - but if you change the "Duplicate data" number input and the "Series" Count input you can change this.

At the moment it just goes into the preview geometry component. However, if you download the (very useful) Human plugin or similar you'll be able to create these attributes and bake them into the rhino environment with these properties.

 

it's true it's works, but when you do with many lignes it's doesn't work anymore. ( the gradient change color too fast..)

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