
I have created a canvas full of stars and want to randomly apply three colours from a palette (red, white and blue) to each of the stars.
Doing it manually is a lot of work because i have so many stars, is there a script that does this ?
Lazur wrote:If it's for a raster export as a final output format and not a printable pdf etc., I'd use the tweak tool to colour the stars to random luminance levels, then use a colormap filter to map 3 colours to the full luminance range.
That filter can be generated with an extension, so the goal can be achieved in minutes.
Moini wrote:You could just select one third of your stars, give them a color, repeat for the other two thirds, then distribute the stars randomly (if it doesn't matter where exactly they are).
Lazur wrote:Here is that filter.
You can edit the colours in the filter editor by the flood fill primitives.
JuliaFlowers2 wrote:1.) the stars form big colour clumps (its not random enough)
2.) there are strange glitches where two colours seemingly overlap. what can be done about that ?
Code: Select all
[img][/img]
Moini wrote:The re-arrangement can be done by using the random functionality of the Align-and-Distribute-Dialog.
Xav wrote:Here's another approach: use the Objects dialog (Object ‣ Objects…).
In practice there's a difference between "random" and "what humans perceive as random", so there's likely to be some clumping that you don't like. In that case you can hold Shift to de-select individual items on the canvas, and select others. That will lead to a non-contiguous block of selected entries in the Objects dialog, so you might want to group them all (at least temporarily) so that they get out of the way when you select the next third.
Lazur wrote:With the tweak toolyou can randomize the luminosity, resulting in different colour arrangement on the filtered results.
Although randomness mathematically means there are "clusters" here and there.
tylerdurden wrote:Seems like a "Random Select" extension could be handy. Maybe something simple ?
Lazur wrote:Press Shift+Ctrl+A for the panel, select th objects and click the bottom left icon -- of the distribute options.
what does "exchange position of selected objects - clockwise rotate" mean ?
Moini wrote:Lazur indeed pointed at the icon I meant, random arrangement.what does "exchange position of selected objects - clockwise rotate" mean ?
It exchanges the positions of the selected objects in a way that things that previously were in position 1 on an imaginary clock face are in position 2 after the click on the button. This is relevant when you select more than 2 objects. It swaps positions in a circular fashion, things move clockwise.
Moini wrote:So you had 'constellations' in your night sky? Smart way to solve the problem, I wouldn't have thought of this.
JuliaFlowers2 wrote:Is there a place on the internet where i can find detailed information about this particular subsection of the Arrange & Distribution Dialogue ?