Farbfetzen / fractalplotr

Make beautiful fractals with R
Other
0 stars 0 forks source link

Loop colors #21

Open Farbfetzen opened 5 years ago

Farbfetzen commented 5 years ago

This would be useful for zoom sequences. But make it optional!

Farbfetzen commented 5 years ago

Idea: make a palette whose begin and end are identical. Maybe colorRampPalette(c("blue", "yellow", "green", "yellow", "blue")). Then use this to generate a number of colors < max_iteration. Choose a color using mod: color_index <- n_steps %% length(color_palette) + 1.

Farbfetzen commented 4 years ago

The hsv function would make this easy because hue is circular. I could just go around and modulo 1 because hue is [0;1] in hsv().