netherknight Posted October 3, 2019 Share 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 Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted October 3, 2019 Share 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 Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted October 3, 2019 Share Posted October 3, 2019 (edited) This is another example Randomized bunching issue_01.hipnc Edited October 3, 2019 by vicvvsh Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.