GollyGang / ready

A cross-platform implementation of various reaction-diffusion systems and PDEs.
GNU General Public License v3.0
755 stars 60 forks source link

Brush size idea #158

Open danwills opened 9 months ago

danwills commented 9 months ago

I think it'd be really great to extend the idea of brush size in Ready slightly so that in addition to being a fraction of the simulation-size as small/medium/large etc, that the size can be specified in a dialog as a floating-point percent of the sim size.

I'm mainly thinking about this for working-with 2d RDs! (and particularly, square ones) Have it show a "What Percent Size?" dialog, such that you could enter a float like 0.1 to get a brush that is set to be as large as 10% of the simulation-res kinda-thing.. or 0.5 to get something that will paint a circular area with a diameter about a half-as-wide (and as long, if square) as the image.

This could apply to 3d-sims as well I suppose (seems like a much more interesting question for 3d sims! Could perhaps just base it on the max of the 3 dimension-sizes? seems maybe reasonable?

Sometimes at the moment the largest brush is no way near half the screen, but just now I did want something half-the-screen or bigger.. and there's no brush that can be made that large at present.

Maybe this should stay how-it-is for sims that run on-a-mesh and other non-raster-cases? I can see that it would be harder to get a good size metric there.. nothing-like impossible though! I'm not suggesting that we remove the existing options anyway.

But for raster-based sims? Seems to me like being able to enter 0.5 and get a brush that is half the size of the (square) sim, would be very nice (and who cares if it's slow-to-paint that large! Let's fix the slowness later!)

Happy to look into adding this myself (assuming Tim agrees it's a good plan!) but if Tim Isn't down for adding it, and until I get time-to, I just wanted to add it to the repo, so that if anyone wants to jump on it they can. Would love to hear any thoughts!