Skip to main content

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
6 votes
1 answer
167 views

Mandelbrot Set image generator in Rust

I'm learning Rust, and as-is tradition, I'm starting out with a Mandelbrot Set explorer as my first project (although, it just produces images so far). When run, it just creates and writes an image to ...
Carcigenicate's user avatar
8 votes
4 answers
2k views

Plotting the Mandelbrot set efficiently

This is my Mandelbrot set program - it includes Smooth Coloring, perodicity checks, and my approach to biomorphs. I know of Edge Detection, but I couldn't find a simple explanation that I can ...
iogamesplayer's user avatar
0 votes
2 answers
145 views

Improving performance of mandelbrot set calculation

I am making a hobby OS, and I thought about adding a command for interactively rendering the Mandelbrot set. The "interactive" part is not really important, but I wanted to check if the ...
trxgnyp1's user avatar
  • 111
8 votes
3 answers
2k views

Newton Fractal writen in C

The code has no errors, it is just slow. It takes 1.19s to start. How can I reduce runtime without using threads or multiple processes? I have tried compiler optimization ...
mehdi mirzaie's user avatar
4 votes
1 answer
197 views

Creating an image of the Mandelbrot set in Rust

I'm in the process of familiarizing myself with Rust. In order to get some practice, I decided to make a program that generates images of the Mandelbrot set. The function I use to generate the image ...
Colin's user avatar
  • 107
1 vote
0 answers
786 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 ...
Ξένη Γήινος's user avatar
5 votes
0 answers
132 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 ...
Ξένη Γήινος's user avatar
4 votes
2 answers
402 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 ...
Niralana's user avatar
1 vote
1 answer
507 views

C# PRNG class based on xoshiro256**

Background I'm creating a (probably bad) map-generation utility in C# to generate fractal terrain and similar. Nothing I do probably needs special treatment, but I thought it best to start with a good ...
MichaelS's user avatar
  • 176
2 votes
1 answer
76 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 ...
Abdul Azeem's user avatar
3 votes
2 answers
183 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 ...
Khashayar Baghizadeh's 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: ...
Khashayar Baghizadeh's user avatar
2 votes
1 answer
1k 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-...
Khashayar Baghizadeh's user avatar
11 votes
1 answer
350 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: ...
Khashayar Baghizadeh's user avatar
7 votes
2 answers
552 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. ...
Carcigenicate's user avatar
2 votes
0 answers
38 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. ...
FlatAssembler's user avatar
3 votes
0 answers
459 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: ...
bychtromae's user avatar
2 votes
1 answer
312 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 ...
Progrmming is fun's user avatar
7 votes
2 answers
426 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 ...
Yuriy S's user avatar
  • 215
7 votes
3 answers
846 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 ...
Brett Horstketter's user avatar
5 votes
1 answer
261 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....
user6115433's user avatar
6 votes
0 answers
143 views

Julia set in Julia (and other fractals)

I've made the following to draw a series of zooming in images of a fractal. ...
Oscar Smith's user avatar
  • 3,597
4 votes
1 answer
502 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 ...
Pull Nointer's user avatar
4 votes
2 answers
610 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 ...
user1118321's user avatar
  • 11.8k
9 votes
1 answer
189 views

ASCII Mandelbrot Set "image" producer

As an exercise, I decided to try implementing a Mandelbrot Set viewer that produces ASCII images. Small Example: ...
Carcigenicate's user avatar
2 votes
1 answer
62 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]. ...
Carcigenicate's user avatar
2 votes
1 answer
183 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 ...
MMJM's user avatar
  • 173
39 votes
7 answers
8k 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 ...
Ian's user avatar
  • 599
13 votes
2 answers
796 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 ...
reducing activity's 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 ...
Georgy's user avatar
  • 1,939
4 votes
1 answer
365 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? ...
Zeyad Etman's user avatar
1 vote
2 answers
596 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 ...
ChubakBidpaa's user avatar
9 votes
2 answers
654 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 ...
maxb's user avatar
  • 1,522
4 votes
0 answers
292 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} \...
Dair's user avatar
  • 6,008
9 votes
1 answer
412 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: ...
Tomek's user avatar
  • 315
5 votes
1 answer
371 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 ...
NeVada's user avatar
  • 71
5 votes
2 answers
827 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 ...
dhu's user avatar
  • 327
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 ...
jgunter's user avatar
  • 183
4 votes
0 answers
114 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: ...
Carcigenicate's 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, (...
sheldonzy's user avatar
  • 461
2 votes
0 answers
294 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 ...
Torn's user avatar
  • 121
9 votes
2 answers
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 ...
theoden8's user avatar
  • 329
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? ...
C. Cretan's user avatar
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 ...
Light Drake's 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 ...
George Willcox's user avatar
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. ...
Shae's user avatar
  • 111
10 votes
2 answers
2k 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 ...
James Balajan's user avatar
7 votes
2 answers
2k views

Drawing fractals with Turtle

So, I have my code here: ...
thomastaylor's user avatar
7 votes
1 answer
1k views

Python fractal tree using SVG

I made a simple program to generate fractal tree using PATH object of SVG. Any suggestions? ...
lukassz's user avatar
  • 273
4 votes
0 answers
630 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 ...
Luis Averhoff's user avatar