mandelbrot

Mandelbrot Set through shaders in GLSL with LOVE2d renders a circle, not a fractal

[亡魂溺海] 提交于 2019-12-23 01:52:21
问题 I'm trying to render a Mandelbrot Set using GLSL, but all I get is a full circle... I have checked the maths a lot, and I simply cannot find the error, so I thought maybe the problem was semantic. Is anyone able to see what's wrong? Also, could anyone give me insights on organization, structure, etc? I'm trying to learn proper coding, but it's hard to find material on styling. Obs.: The shader can be applied over any image The idea is simple (you may skip this): checkConvergence returns true

Calculate Mandelbrot set for greater precision

回眸只為那壹抹淺笑 提交于 2019-12-21 05:35:17
问题 Is there any practical way to perform calculations such as those involved in generating the Mandelbrot Set for values for precise that what double or long double can provide? I was thinking of possibly having two variables(either double or long), one storing the value similar to scientific notation and the other storing the negative log10 of the value, but I'm not sure if there would actually be a way to perform the calculation like this. 来源: https://stackoverflow.com/questions/43118611

Why is turtle lightening pixels?

為{幸葍}努か 提交于 2019-12-19 17:45:12
问题 My program for creating a Mandelbrot set has a bug: whenever the pen changes colors, and every 42nd pixel after that, is lighter. This is, rather coincidentally, a mandelbug (yes, I just learned that term), as it is inconsistent for many pixels near an "edge" (it might actually be blurred between the color it's supposed to be and the color the last, or next, pixel is supposed to be), but it's always the 42nd pixel after that one until the next color change. I am using OSX 10.6.8, PYTHON 2.7.

Which color gradient is used to color mandelbrot in wikipedia?

主宰稳场 提交于 2019-12-18 10:28:38
问题 At Wikipedia's Mandelbrot set page there are really beautiful generated images of the Mandelbrot set. I also just implemented my own Mandelbrot algorithm. Given n is the number of iterations used to calculate each pixel, I color them pretty simple from black to green to white like that (with C++ and Qt 5.0): QColor mapping(Qt::white); if (n <= MAX_ITERATIONS){ double quotient = (double) n / (double) MAX_ITERATIONS; double color = _clamp(0.f, 1.f, quotient); if (quotient > 0.5) { // Close to

How to render Mandelbrot Set faster?

我们两清 提交于 2019-12-18 07:22:42
问题 I'm currently drawing the Mandelbrot set pixel by pixel with PhotoImage and tkinter. I'm using basically the algorithm directly with no modifications. Are there methods to make the calculation faster? Maybe filling in large areas of color quickly, or precalcuating constants? Part of the code: ITERATIONS = 50 WIDTH, HEIGHT = 600, 600 CENTER = (-.5, 0) DIAMETER = 2.5 def mandel(c): z = 0 for i in range(ITERATIONS): z = z**2 + c if abs(z) > 2: return i return ITERATIONS root = Tk() canvas =

How to render Mandelbrot Set faster?

感情迁移 提交于 2019-12-18 07:22:09
问题 I'm currently drawing the Mandelbrot set pixel by pixel with PhotoImage and tkinter. I'm using basically the algorithm directly with no modifications. Are there methods to make the calculation faster? Maybe filling in large areas of color quickly, or precalcuating constants? Part of the code: ITERATIONS = 50 WIDTH, HEIGHT = 600, 600 CENTER = (-.5, 0) DIAMETER = 2.5 def mandel(c): z = 0 for i in range(ITERATIONS): z = z**2 + c if abs(z) > 2: return i return ITERATIONS root = Tk() canvas =

Multithreaded & SIMD vectorized Mandelbrot in R using Rcpp & OpenMP

▼魔方 西西 提交于 2019-12-17 06:16:24
问题 As an OpenMP & Rcpp performance test I wanted to check how fast I could calculate the Mandelbrot set in R using the most straightforward and simple Rcpp + OpenMP implementation. Currently what I did was: #include <Rcpp.h> #include <omp.h> // [[Rcpp::plugins(openmp)]] using namespace Rcpp; // [[Rcpp::export]] Rcpp::NumericMatrix mandelRcpp(const double x_min, const double x_max, const double y_min, const double y_max, const int res_x, const int res_y, const int nb_iter) { Rcpp::NumericMatrix

For all the creative people out there: coloring mandelbrot set… need ideas

本秂侑毒 提交于 2019-12-13 12:06:59
问题 Given max amount of iterations = 1000 give me some ideas on how to color (red, green, blue) it. All I can come up right now are lame 2 color gradients :( Is it actually possible to come up with something as beautiful as this? 回答1: 50 iterations is very, very coarse and you won't get much detail. The easiest way to get the spectrum is to use multiple two-color gradients. So, 50-41 iterations might be shades of blue, 41-30 might be blue-red, and 29-10 might be red-green, and 9-0 might be green

Color gradient for Mandelbrot Android application doesn't work

怎甘沉沦 提交于 2019-12-13 07:06:10
问题 I'm trying to to program the Mandelbrot set for Android. I try to draw it on a Canvas. It works, but I want to have a color gradient. This is my code: package de.turbofractal; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.view.View; public class FractalView extends View { private int n,g,xMax,yMax; private float zr,zrh,zr0,zi

How to fix my Pthreads code about Mandelbrot set?

[亡魂溺海] 提交于 2019-12-12 00:55:27
问题 I have the following Pthreads code about calculating and creating a picture of the Mandelbrot set. My code in C works just fine and it prints the resulting picture nicely. The point is that using the below code, I am able to compile the code and execute it. Afterwards, if I try to view the resulting .ppm file in Gimp, it simply cannot open it. I guess I'm doing something wrong in my code. If someone could help me I would be glad. // mandpthread.c // to compile: gcc mandpthread.c -o