As of May 31, 2023, we have updated our Code of Conduct.

# Questions tagged [fractal]

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.

67 questions
Filter by
Sorted by
Tagged with
20k views

### Mandelbrot image in every language

I always used a Mandelbrot image as the 'graphical' version of Hello World in any graphical application I got my hands on. Now it's your guys' turn. Language must be capable of graphical output or ...
12k views

### Create an "H" from smaller "H"s

Challenge Create a function or program that, when given an integer size, does the following: If size is equal to 1, output ...
11k views

### Generate a mandelbrot fractal [closed]

Your task is to draw the mandelbrot set in ascii. It should look something like The complex number c lies in the mandelbrot set, when the sequence ...
3k views

### Help, I'm trapped in a Sierpinski triangle!

Drawing the Sierpinski triangle has been done to death. There's other interesting things we can do with it though. If we squint hard enough at the triangle, we can view upside-down triangles as nodes ...
10k views

### Draw the Devil's Staircase

The Devil's Staircase is a fractal-like function related to the Cantor set. Your task is to replicate this funky function — in ASCII art! Input A single integer ...
5k views

### Sierpinskified Code

Write a rectangular block of text that when arranged into a Sierpinski carpet, using same-sized blocks of spaces for the empty portions, creates a program that outputs the iteration number of the ...
5k views

### Computer Generated Textured Wall Paint

The paint on the walls in my room has a random, almost fractal-like, 3-dimensional texture: In this challenge you will write a program that generates random images that look like they could be part ...
18k views

### Draw A Sierpinski Triangle

The Sierpinsky Triangle is a fractal created by taking a triangle, decreasing the height and width by 1/2, creating 3 copies of the resulting triangle, and place them such each triangle touches the ...
2k views

### Computer Generated Cracked Soil

Write a program that takes in an integer from 0 to 65535 (216-1) and generates a unique 500×500 pixel image that looks as similar as possible to these 6 real life images of cracked soil: These ...
3k views

### Generate fractals from bit patterns in ASCII

Overview Write a program that prints out simple fractal patterns given a bit pattern encoding the fractal, plus the per-generation scale factor of the fractal and number of generations. Explanation ...
1k views

Introduction Similar to the Fibonacci Sequence, the Padovan Sequence (OEIS A000931) is a sequence of numbers that is produced by adding previous terms in the sequence. The initial values are defined ...
1k views

### Gasket Weaving - draw a Sierpiński knot

Given an integer N >= 2, produce an image showing a Sierpiński knot of degree N. For example, here are knots of degree 2, 3, 4 and 5: Click on the images to view full size (the higher the degree the ...
3k views

### The IHIH Pyramid

I find it fascinating how the letters "H" and "I" are very similar. "H" is a horizontal stroke surrounded by two vertical strokes; "I" is a vertical stroke surrounded by two horizontal strokes (...
4k views

### ASCII Art of the Day #2 - Flow Snakes

A Flow Snake, also known as a Gosper curve, is a fractal curve, growing exponentially in size with each order/iteration of a simple process. Below are the details about the construction and a few ...
3k views

### Draw the Hilbert curve using slashes

The Hilbert curve is a space filling fractal that can be represented as a Lindenmayer system with successive generations that look like this: Thanks to http://www.texample.net/tikz/examples/hilbert-...
3k views

### Generate TeX to typeset Sierpinski Triangle Fractal

Challenge Write code that outputs TeX (LaTeX) math-equation code (given below) that will typeset Sierpinski Triangle Fractal of 5 levels. Shortest code wins. Details TeX (and friends like LaTeX, ...
5k views

### Play the Chaos Game

The Chaos Game is a simple method to generate fractals. Given a starting point, a length ratio r and a set of 2D points, repeatedly do the following: From your set of points, pick one at random (...
5k views

Given three mutually tangent circles, we can always find two more circles which are tangent to all three of those. These two are called Apollonian circles. Note that one of the Apollonian circles ...
878 views

### Hilbertify an image

I like the Hilbert Curve. Your task for this challenge is to take an image (strictly a square image where all the sides are a power of two pixels wide) and unravel it line by line in a zig-zagging ...
1k views

### The Image of the Dragon

I saw a cool gif of the twin dragon curve made from a square, and wondered what would happen if we started from another base image. So I wrote a program to do this.                                    ...
1k views

### Map string to Hilbert curve

Let's map some strings to 2d space, fractal style. Your task is to compute a Hilbert curve and lay a string along it. Task The task is to take the single-line input string, and lay it out along a ...
5k views

### Sierpinski Carpets

Who doesn't love a good fractal? The Sierpinski Carpet is a classic example of a fractal. To complete this task, you will be required to generate a carpet of type $n$ and print the resulting image ...
798 views

### ASCII Cayley Graph

While doing some research for a different challenge I'm formulating, I came across a Cayley graph, specifically this one. Since I'm one of the top ascii-art challenge writers, of course I had to make ...
2k views

### ASCII Dragon's Curve

Introduction The Dragon's Curve is a fractal curve that notably appears on section title pages of the Jurassic Park novel. It can very simply be described as a process of folding a paper strip, as ...
697 views

### Binary tree fractal

Today's challenge is to draw a binary tree as beautiful ascii-art like this example: ...
1k views

### ASCII Hilbert Curve

Given an integer n output the nth iteration of the Hilbert Curve in ASCII using the characters ...
4k views

### Print a Cantor Set

The Challenge Build a N-Leveled Cantor Set. The Cantor ternary set is created by repeatedly deleting the open middle thirds of a set of line segments. The program receives one parameter ...
7k views

### Generate Newton fractals

You all know the Newton method to approximate the roots of a function, don't you? My goal in this task is to introduce you into an interesting aspect of this algorithm. Newton's algorithm converges ...
393 views

### It's factors all the way down!

This challenge is inspired by this fantastic animated diagram (thanks to flawr for posting it in chat). Given an input n, draw all of its prime factors as nested ...
3k views