Questions tagged [fractals]

Fractals are shapes that are self-similar and are usually quite detailed. Well-known fractal sets include the Mandelbrot set, Julia sets, and Phoenix sets. Tree-like fractal drawings are also common.

Filter by
Sorted by
Tagged with
4 votes
2 answers
75 views

Multi-threaded Mandelbrot set generator slower than single thread

I am new to parallel programming. I have been playing around with multi-threading and for some reason, multi-threading the Mandelbrot set is slower than running a single thread. I have been trying to ...
user avatar
2 votes
1 answer
37 views

Recursion to generate fractal

I used recursion to generate fractal and got the desired result but I think my code can be better I started using MATLAB a few days ago and since than trying and learning new things. Now this code ...
user avatar
3 votes
2 answers
119 views

Interactive Mandelbrot set pictures

The purpose of this project is to generate an interactive Mandelbrot set. The user can specify the degree of magnification from the command-line and click on the produced picture to magnify the ...
user avatar
11 votes
3 answers
2k views

Chaos with Newton’s method

The following is the program 3.2.6. from the book Computer Science An Interdisciplinary Approach by Sedgewick & Wayne: ...
user avatar
2 votes
1 answer
370 views

Drawing dragon curves using Turtle graphics

This is exercise 3.2.23. from the book Computer Science An Interdisciplinary Approach by Sedgewick & Wayne: Write a recursive Turtle client that draws dragon fractal. The following is the data-...
user avatar
11 votes
1 answer
212 views

Generating colorful Mandelbrot and Mandelbar set wallpapers

The following is the program 3.2.6. from the book Computer Science An Interdisciplinary Approach by Sedgewick & Wayne: ...
user avatar
6 votes
2 answers
289 views

PHP Mandelbrot Set Generator

I need to get familiar with web programming, so I decided to write up a fairly simple PHP page that accepts GET requests and serves back an image of the Mandelbrot set... as a table of colored cells. ...
user avatar
2 votes
0 answers
30 views

Sierpinski Triangle in AEC

So, I've tried to extend my compiler so that it can target GNU Assembler. And I've made a simple program to demonstrate that. ...
user avatar
3 votes
0 answers
327 views

Making a fast Mandelbrot Fractal viewer

I'm making a Mandelbrot set viewer in JavaFX. It takes a while, like maybe 5 seconds to finish. Here's my code: ...
user avatar
2 votes
1 answer
200 views

A program that draws a spiral

To run this program the graphics.py module that is not in the standard library is needed and can be found here https://mcsp.wartburg.edu/zelle/python/ This amateur program is for the fun of graphics ...
user avatar
6 votes
2 answers
249 views

Mandelbrot rendering code in R

I'm trying out a new continuous histogram coloring method for Mandelbrot rendering in R, and since it requires three loops (three passes), each of them doubly nested, there should be a way to ...
user avatar
  • 163
7 votes
3 answers
630 views

Sierpinski turtle triangle

I am working through Programming Fundamentals with Python on Udacity. The assignment was to create a recursive triangle. I am happy with the output, but I am hoping for feedback on the actual ...
user avatar
5 votes
1 answer
161 views

Rust code of a tree fractal

I just picked up Rust recently and this is my first program (longer than 10 lines at least) so I'm looking for constructs that are more native and natural to Rust. I come from a c++/ python background....
user avatar
6 votes
0 answers
131 views

Julia set in Julia (and other fractals)

I've made the following to draw a series of zooming in images of a fractal. ...
user avatar
  • 3,512
4 votes
1 answer
275 views

Java Mandelbrot Set Viewer

I'm writing my own version of a Mandelbrot set generator, with pan and zoom functionality. (There's not yet a color overlay of sets generated with various beta values; the beta value is changed ...
user avatar
4 votes
2 answers
312 views

SIMD Mandelbrot calculation

I was messing around with GPU compute shaders the other day and created a Mandelbrot shader. Unfortunately, Metal doesn't support double-precision in compute shaders, so beyond a certain zoom level, I ...
user avatar
  • 11.5k
9 votes
1 answer
138 views

ASCII Mandelbrot Set "image" producer

As an exercise, I decided to try implementing a Mandelbrot Set viewer that produces ASCII images. Small Example: ...
user avatar
2 votes
1 answer
41 views

Picking a random point along the edge of an area

I'm writing a Diffusion-limited aggregation simulation, and need to pick a random point along the edge of an area defined by a dimension pair of [width, height]. ...
user avatar
2 votes
1 answer
132 views

Mandelbrot Set generator

I want to reduce the big time it needed for my mandelbrot set generator to work. I'm working this for already a week. I tried to reduce the canvas size from 400 by 400 to 200 by 200 and the speed ...
user avatar
  • 173
37 votes
7 answers
7k views

Increase performance creating Mandelbrot set in python

I created a program in python that generates an image of the mandelbrot set. The only problem I have is that the program is quite slow, it takes about a quarter of an hour to generate the following ...
user avatar
  • 579
13 votes
2 answers
670 views

Sierpiński's carpet fractal animation for teaching Python 3

I am teaching programming (in this case - 1 on 1 tutoring of a teenager interested in programming) and this code will be a final stage of a progression toward program generating a nice image of ...
user avatar
15 votes
3 answers
2k views

Generating Julia set

So, I just wanted to post something on Rosetta Code, and I found this task of generating and plotting a Julia set: http://www.rosettacode.org/wiki/Julia_set. There was already one solution but it was ...
user avatar
  • 1,913
4 votes
1 answer
226 views

Sierpinski’s Gasket Triangle in JavaScript

I wrote the Sierpinski’s Gasket Triangle in JavaScript, but I feel the code can be better, especially from L32 to L47. Could you make it more organized? ...
user avatar
1 vote
2 answers
451 views

ASCII Mandelbrot

First of all, let me answer the question that a lot of you may have: The Mandelbrot set is the set of values of c in the complex plane for which the orbit of 0 under iteration of the quadratic map ...
user avatar
9 votes
2 answers
575 views

Speeding up Buddhabrot calculation in PyCuda

I've just started using PyCuda with Python 3, but I have some experience in high performance computing on CPU. I've tried to port one of my old models for generating the Buddhabrot to run on my GPU ...
user avatar
  • 1,492
4 votes
0 answers
248 views

Collatz fractal in Rust

Among the many fractals, there is Collatz Fractal based on a complex extension of: $$f(x) = \left\{ \begin{array}{ll} \frac{x}{2} \space \text{if even} \\ 3x + 1 \space \text{if odd} \end{array} \...
user avatar
  • 5,599
9 votes
1 answer
349 views

Sierpinski triangle html canvas Implementation

I wrote my Sierpinski Triangle fractal animation using HTML canvas with JavaScript: JsFiddle What do you think about it? How I can optimize it, if you see a need for that? Code: ...
user avatar
  • 315
5 votes
1 answer
296 views

Interactive Mandelbrot Set generator

The purpose of this project is to generate an interactive Mandelbrot Set with smooth coloring. The user can interact with the W, A, S, D keys to move around and with + and - to zoom in and out. It ...
user avatar
  • 71
5 votes
2 answers
655 views

Solving Sierpinski Triangle in Haskell

I am a Haskell beginner with a background in C++ and Python. I have been teaching myself Haskell for about half a year on and off and recently I started doing Hackerrank problems to improve my Haskell ...
user avatar
  • 317
1 vote
0 answers
360 views

GLSL Simplex Noise with derivatives

I recently made 2d simplex noise based coherent noise in GLSL. [Here] is the shader toy. I wanted to make an implementation of simplex noise on the gpu in order to get better performance than the CPU ...
user avatar
  • 621
18 votes
2 answers
4k views

Julia Fractal Drawing in C++

I'd like a code review for this program written to draw Julia fractals. I'm specifically looking for feedback on: Style: I haven't written much C++ before, so I'm interested in knowing better or more ...
user avatar
  • 183
4 votes
0 answers
68 views

Sierpinski Carpet using Seesaw

I decided to write a Sierpinski Carpet generator. This has been something I wanted to try since watching the Coding Train this summer. A screenshot of it in action with some experimental coloring: ...
user avatar
4 votes
2 answers
1k views

Python the Dragon's Curve with turtle

I'm kind of new to Python, and I'm trying to improve (especially) my object oriented programming, and getting to know Python syntax better. I'd love to know if there is something to improve, (...
user avatar
  • 407
2 votes
0 answers
218 views

Fractal renderer in WPF

This was made mostly for fun, but also to practice. I'm generally looking for feedback on how to make the code run faster, any obvious mistakes I'm making in regards to using WPF, which I'm not at ...
user avatar
  • 121
1 vote
0 answers
79 views

A Processing sketch to generate and draw the Mandelbrot and Julia sets

I have used my limited knowledge of processing and made a sketch to generate the Mandelbrot set and various Julia sets. I've tried to make it efficient as possible. It's also interactive, and ...
user avatar
4 votes
1 answer
1k views

OpenGL 3 Mandelbrot Set

I've written a short program to learn about computing with drawing using OpenGL 3. To do so, I created a program to create two triangles, which form a quad, and pass all the arguments for computing ...
user avatar
  • 279
8 votes
3 answers
2k views

Mandelbrot fractal

This is a code that outputs a .ppm file with the mandelbrot fractal. How can I optimize this? ...
user avatar
1 vote
3 answers
965 views

Interactive Mandelbrot Set in Processing

I have created an interactive rendering of the Mandelbrot set in Processing. The image allows zooming (left and right mouse buttons) and translating (arrow keys) and prevents loss of quality by ...
user avatar
16 votes
1 answer
1k views

Barnsley's Fern

I recently watched the Numberphile video entitled 'Chaos Game', and in that they showed how Sierpinski's triangle could be made from random numbers. But at the end of the video, they showed how this ...
user avatar
11 votes
1 answer
1k views

Drawing Fractals with MS Excel VBA

I've made Excel VBA code that draws and fills a fractal pattern. I know there's a few more ways to optimize the code, just glad it works right now. ...
user avatar
  • 111
10 votes
2 answers
1k views

Mandelbrot Fractal Drawer in C++

As an exercise to learn how OpenGL and image creation worked, as well as to satisfy a curiosity I've developed for Chaos Theory, I decided to create a mandelbrot fractal drawer in C++, which can ...
user avatar
7 votes
2 answers
2k views

Drawing fractals with Turtle

So, I have my code here: ...
user avatar
7 votes
1 answer
857 views

Python fractal tree using SVG

I made a simple program to generate fractal tree using PATH object of SVG. Any suggestions? ...
user avatar
  • 273
4 votes
0 answers
529 views

Python Code For Drawing a Fractal Tree using pyglet

So I've just finished doing a coding challenge that involved drawing a fractal tree. Instead of doing it recursively(which is what I did initially but it proved to be to slow for branches greater than ...
user avatar
8 votes
2 answers
456 views

Object-oriented fractal tree

I made an object oriented fractal tree in javascript using the p5 library, it consists of three files: Fraternal Tree.js branch.js flower.js Here is the github repo with the source code. All the ...
user avatar
6 votes
0 answers
1k views

Plotting the Mandelbrot set at different zoom levels [closed]

I'm interested in making an animated movie of a zoom in on a part of the Mandelbrot set. My code works well for a few zooms, but upon trying to zoom in quite far, I find that the fractal becomes "...
user avatar
  • 329
6 votes
1 answer
115 views

Optimizing rendering with a lot of transformations and save/restore

I have implemented a renderer for shapes described with a L-System grammar. Implementation of that is not important. Basically you feed it an angle and some rules, and it spits out a string of ...
user avatar
6 votes
1 answer
358 views

Drawing a Koch snowflake in Android

Here's my attempt to draw Koch snowflake. My initial state is a line instead of an equilateral triangle so that I am able to fit maximum detail in a mobile phone window. My thought process was: ...
user avatar
  • 301
5 votes
1 answer
2k views

Function for plotting Julia Set

The Julia set is the set of complex numbers z that do not diverge under the following iteration: $$ z = z^2 + c $$ Where c is a constant complex number. Different values of z reach infinity at ...
user avatar
2 votes
2 answers
2k views

Generating fractals and space filling curves, using a general function for L-systems

An L-system is a rewriting system that can be used to generate fractals and space filling curves, because of its recursive nature. Some L-systems for mathematical curves can be found here. An ...
user avatar