Hello, I was wondering if there might be a more efficient means by which I can sort and color these spheres in Python to Grasshopper? At the moment, I have utilized various grouped Grasshopper sphere components with color swatches to differentiate between points created from a Python code component. However, it seems to come at a noticeable performance cost—would it make any computer performance difference to control the coloring in code?
To me, it’s not entirely clear, if this is the intended behavior as it would sort the same point into multiple lists. Also, never do a comparison of number of “==”. This time it might work, as you are using randint, but in the general case, this might fire back.
Uploading your script or posting it with the code formatting option instead of pasting a screenshot would keep other users from having look at your screenshots and type what you already typed…
Interesting, I was not aware that loops could be placed within lists. That seems as though it would serve to reduce the redundancy of having multiple lines of for loops in the code.