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
1 vote
0 answers
68 views

Python fractal tree generators

I wrote the scripts several days ago, they do exactly what I intended, but the performance is not very good, I am still stuck on for loops and don't know how to vectorize things, I wrote both scripts ...
5 votes
0 answers
60 views

A Python script that creates n-flakes

I have written a simple Python script that generates n-flakes using matplotlib. Wikipedia article on N-flake. I wrote two functions, one function generates pentaflake, the other generates hexaflake, I ...
4 votes
2 answers
118 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 ...
2 votes
1 answer
43 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 ...
3 votes
2 answers
131 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 ...
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: ...
2 votes
1 answer
448 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-...
11 votes
1 answer
234 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: ...
6 votes
2 answers
332 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. ...
2 votes
0 answers
31 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. ...
3 votes
0 answers
348 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: ...
2 votes
1 answer
214 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 ...
6 votes
2 answers
275 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 ...
  • 163
7 votes
3 answers
653 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 ...
5 votes
1 answer
176 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....
6 votes
0 answers
135 views

Julia set in Julia (and other fractals)

I've made the following to draw a series of zooming in images of a fractal. ...
  • 3,512
4 votes
1 answer
311 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 ...
4 votes
2 answers
359 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 ...
  • 11.5k
9 votes
1 answer
146 views

ASCII Mandelbrot Set "image" producer

As an exercise, I decided to try implementing a Mandelbrot Set viewer that produces ASCII images. Small Example: ...
2 votes
1 answer
48 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]. ...
2 votes
1 answer
135 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 ...
  • 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 ...
  • 579
13 votes
2 answers
682 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 ...
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 ...
  • 1,913
4 votes
1 answer
239 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? ...
1 vote
2 answers
465 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 ...
9 votes
2 answers
596 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 ...
  • 1,492
4 votes
0 answers
258 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} \...
  • 5,754
9 votes
1 answer
360 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: ...
  • 315
5 votes
1 answer
316 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 ...
  • 71
5 votes
2 answers
675 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 ...
  • 327
1 vote
0 answers
390 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 ...
  • 611
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 ...
  • 183
4 votes
0 answers
71 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: ...
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, (...
  • 407
2 votes
0 answers
225 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 ...
  • 121
1 vote
0 answers
82 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 ...
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 ...
  • 279
9 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? ...
1 vote
3 answers
1k 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 ...
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 ...
11 votes
1 answer
2k 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. ...
  • 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 ...
7 votes
2 answers
2k views

Drawing fractals with Turtle

So, I have my code here: ...
7 votes
1 answer
883 views

Python fractal tree using SVG

I made a simple program to generate fractal tree using PATH object of SVG. Any suggestions? ...
  • 273
4 votes
0 answers
547 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 ...
8 votes
2 answers
462 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 ...
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 "...
  • 329
6 votes
1 answer
117 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 ...
6 votes
1 answer
363 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: ...
  • 301