netherknight 0 Posted October 3, 2019 Hi, I'm running into a little issue where I'm trying to randomize colors over bunches of lines. Basically what I'm doing is making a small bunch of lines, say 6 close to each other. Then I copy that bunch over a distance around 500 times. (See attached file) After I divide all the lines into 3 groups with group by expression and I assign a different color to each group. However this splits up All the lines created, what I want is to randomize by initial bunch so each bundle of 6 lines has a mix of the three colors. What happens now that I want to avoid is the possibility of 1 "Bunch" being 99% one color which can happen working with this many lines. Doing the group split before copying and transforming will give me the exact same randomization thus giving you a repeating pattern. How would I best go about this? Randomized bunching issue.hip Share this post Link to post Share on other sites
konstantin magnus 1,188 Posted October 3, 2019 (edited) Hi Thomas, Use cylinder columns. Give your copies a copynum attribute. Within each bundle sort primitive numbers randomly. Assign primitive colors by their new primitive number divided by the total number of primitives. f@id = @primnum / float(@numprim -1); v@Cd = chramp('color', f@id); bundles.hipnc Edited October 3, 2019 by konstantin magnus Share this post Link to post Share on other sites
vicvvsh 161 Posted October 3, 2019 (edited) This is another example Randomized bunching issue_01.hipnc Edited October 3, 2019 by vicvvsh Share this post Link to post Share on other sites