I knew I wanted some randomness but I wanted it to change gradually across the flowing stream of color, not just be a bunch of arbitrarily chosen colors and lines. After minutes of research I decided to use 1-dimensional Perlin noise. Perlin noise provides a random but smooth range of values across some number of dimensions but the 1-dimensional version has pretty easy math and requires no cross products.
I coded up some quick functions to handle this (coming soon to https://github.com/denismm/dmmlib ) and then set up 5 independent grids - three 20-point grids for the R/G/B values and two 8-point grids for the upper and lower control points.
Then for each of the 100 vertical lines, I set the color to the RGB noise value for that position (massaged to be in the 0.5-1 range) and drew a spline from above the grid to below the grid, with control points 1/3 and 2/3 along the way moved left and right by the appropriate noise value.
For a last bit of flowiness, each line is a pointed stroke (like the pebble outlines) alternating pointing upwards and downwards.
When I get the noise code nicely encapsulated I'll do a post somewhere about it.
no subject
Date: 2021-01-06 02:51 pm (UTC)no subject
Date: 2021-01-07 11:48 am (UTC)no subject
Date: 2021-01-07 03:32 pm (UTC)I knew I wanted some randomness but I wanted it to change gradually across the flowing stream of color, not just be a bunch of arbitrarily chosen colors and lines. After minutes of research I decided to use 1-dimensional Perlin noise. Perlin noise provides a random but smooth range of values across some number of dimensions but the 1-dimensional version has pretty easy math and requires no cross products.
I coded up some quick functions to handle this (coming soon to https://github.com/denismm/dmmlib ) and then set up 5 independent grids - three 20-point grids for the R/G/B values and two 8-point grids for the upper and lower control points.
Then for each of the 100 vertical lines, I set the color to the RGB noise value for that position (massaged to be in the 0.5-1 range) and drew a spline from above the grid to below the grid, with control points 1/3 and 2/3 along the way moved left and right by the appropriate noise value.
For a last bit of flowiness, each line is a pointed stroke (like the pebble outlines) alternating pointing upwards and downwards.
When I get the noise code nicely encapsulated I'll do a post somewhere about it.