Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Fractal flame
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Rendering an image=== To increase the quality of the image, one can use [[supersampling]] to decrease the noise. This involves creating a histogram larger than the image so each pixel has multiple data points to pull from. For example, create a histogram with 300×300 cells in order to draw a 100×100 px image; each pixel would use a 3×3 group of histogram buckets to calculate its value. For each pixel ''(x,y)'' in the final image, do the following computations: <syntaxhighlight lang="cpp"> frequency_avg[x][y] := average_of_histogram_cells_frequency(x,y); color_avg[x][y] := average_of_histogram_cells_color(x,y); alpha[x][y] := log(frequency_avg[x][y]) / log(frequency_max); //frequency_max is the maximal number of iterations that hit a cell in the histogram. final_pixel_color[x][y] := color_avg[x][y] * alpha[x][y]^(1/gamma); //gamma is a value greater than 1. </syntaxhighlight> The algorithm above uses [[gamma correction]] to make the colors appear brighter. This is implemented in for example the Apophysis software. To increase the quality even more, one can use gamma correction on each individual color channel, but this is a very heavy computation, since the ''log'' function is slow. A simplified algorithm would be to let the brightness be linearly dependent on the frequency: <syntaxhighlight lang="cpp"> final_pixel_color[x][y] := color_avg[x][y] * frequency_avg[x][y]/frequency_max; </syntaxhighlight> but this would make some parts of the fractal lose detail, which is undesirable.<ref name="dravespdf" />
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)