fractals

Calculate Mandelbrot set for greater precision

荒凉一梦 提交于 2019-12-03 20:46:11
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/calculate-mandelbrot-set-for-greater-precision

How to generate a Mandelbrot with T-SQL?

廉价感情. 提交于 2019-12-03 06:18:44
问题 Learning a little about T-SQL, and thought an interesting exercise would be to generate a Mandelbrot set with it. Turns out someone already has (and recently, it appears). I'll let someone else post it as an answer, but I'm curious what optimizations can be made. Alternately, what would you do to make the code more readable? I'll select the most readable (yet reasonably compact) version as the accepted answer (too bad we don't have rep bounties yet!) unless someone really comes along with a

Fractal Encryption

一世执手 提交于 2019-12-03 04:25:24
问题 I've heard that one can encrypt data using drawings of the Mandlebrot set, and that this encryption algorithm is quantum-safe (can't be broken with a quantum computer, unlike many commonly-used algorithms). I looked around on Google for more information but I've only come across some articles intended for a more non-technical audience. Does anyone have any sources on this that I could use to learn more about this fascinating subject? 回答1: Here's a general article outlining the process: http:/

Looping through a formula that describes a spiral to generate XY coordinates

前提是你 提交于 2019-12-03 02:46:44
I'm trying to generate a spiral galaxy in the form of xy (2D) coordinates -- but math is not my strong suit. I've gleaned the following from an excellent source on spirals: The radius r(t) and the angle t are proportional for the simpliest spiral, the spiral of Archimedes. Therefore the equation is: (3) Polar equation: r(t) = at [a is constant]. From this follows (2) Parameter form: x(t) = at cos(t), y(t) = at sin(t), (1) Central equation: x²+y² = a²[arc tan (y/x)]². This question sort of touched upon galaxy generation, but the responses were scattered and still overly complex for what I need

Code golf: the Mandelbrot set

百般思念 提交于 2019-12-03 01:53:49
问题 Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. Usual rules for the code golf. Here is an implementation in python as an example from PIL import Image im = Image.new("RGB", (300,300)) for i in xrange(300): print "i = ",i for j in xrange(300): x0 = float( 4.0*float(i-150)/300.0 -1.0) y0 = float( 4.0*float(j-150)/300.0 +0.0) x=0.0 y=0.0 iteration = 0 max_iteration =

How to generate a Mandelbrot with T-SQL?

旧巷老猫 提交于 2019-12-02 19:40:48
Learning a little about T-SQL, and thought an interesting exercise would be to generate a Mandelbrot set with it. Turns out someone already has (and recently, it appears). I'll let someone else post it as an answer, but I'm curious what optimizations can be made. Alternately, what would you do to make the code more readable? I'll select the most readable (yet reasonably compact) version as the accepted answer (too bad we don't have rep bounties yet!) unless someone really comes along with a great optimization. Bonus points to those answers that teach me a little something about T-SQL. -Adam

Fractal mountains using Sierpinski gasket in OpenGL

吃可爱长大的小学妹 提交于 2019-12-02 19:24:30
问题 I'm reading a book on OpenGL, "Interactive Computer Graphics" by Edward Angel. In it, he asks you to modify a Sierpinski gasket algorithm to yield fractal mountains. To do so, it says to find the midpoint of each side, then perturb this location before subdivision. He doesn't explain at all how to "perturb" the location, and looking online yielded no results. Can anyone explain what this means? Thanks! 回答1: Here's a thought: "perturb" the midpoint by displacing it in the direction

Fractal Encryption

非 Y 不嫁゛ 提交于 2019-12-02 18:44:47
I've heard that one can encrypt data using drawings of the Mandlebrot set, and that this encryption algorithm is quantum-safe (can't be broken with a quantum computer, unlike many commonly-used algorithms). I looked around on Google for more information but I've only come across some articles intended for a more non-technical audience. Does anyone have any sources on this that I could use to learn more about this fascinating subject? Jason Francis Here's a general article outlining the process: http://www.techbriefs.com/content/view/2579/32/ This is more in-depth, providing an algorithm and

Code golf: the Mandelbrot set

孤街醉人 提交于 2019-12-02 14:04:39
Usual rules for the code golf. Here is an implementation in python as an example from PIL import Image im = Image.new("RGB", (300,300)) for i in xrange(300): print "i = ",i for j in xrange(300): x0 = float( 4.0*float(i-150)/300.0 -1.0) y0 = float( 4.0*float(j-150)/300.0 +0.0) x=0.0 y=0.0 iteration = 0 max_iteration = 1000 while (x*x + y*y <= 4.0 and iteration < max_iteration): xtemp = x*x - y*y + x0 y = 2.0*x*y+y0 x = xtemp iteration += 1 if iteration == max_iteration: value = 255 else: value = iteration*10 % 255 print value im.putpixel( (i,j), (value, value, value)) im.save("image.png", "PNG"

Fractal mountains using Sierpinski gasket in OpenGL

此生再无相见时 提交于 2019-12-02 08:28:38
I'm reading a book on OpenGL, "Interactive Computer Graphics" by Edward Angel. In it, he asks you to modify a Sierpinski gasket algorithm to yield fractal mountains. To do so, it says to find the midpoint of each side, then perturb this location before subdivision. He doesn't explain at all how to "perturb" the location, and looking online yielded no results. Can anyone explain what this means? Thanks! Here's a thought: "perturb" the midpoint by displacing it in the direction perpendicular to the side and form a small hat-shaped segment. Go from this: ______ to this: __/\__ By "perturb" he