Skip to main content

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.

Filter by
Sorted by
Tagged with
19 votes
5 answers
3k views

Title courtesy of Greg Martin For this challenge, I'll define an arc of size \$k\$ as a single piece of a sine wave with a length of \$k\$ units and an height of \$\frac{k}{4}\$ units: And I'll ...
emanresu A's user avatar
  • 46.2k
16 votes
4 answers
1k views

Write a program that, for any \$n\$, generates a triangle made of hexagons as shown, \$2^n\$ to a side. The colors are to be determined as follows. We may give the triangle barycentric coordinates so ...
Akiva Weinberger's user avatar
20 votes
6 answers
1k views

I came across this picture the other day: (Credit to Josep M Batlle I Ferrer) Your job is to generate this picture. This graph is generated by repeatedly applying newton's method to the graph of: $$f(...
mousetail's user avatar
  • 14.4k
15 votes
7 answers
669 views

Given a positive integer N, output this doubling pattern of slash squares/rectangles. For N=1, the base is: ...
emanresu A's user avatar
  • 46.2k
23 votes
2 answers
2k views

The picture: Sick of the same old grid where the answer is simply a square pyramidal number? Accept the challenge and write a program that given a positive integer \$n\$ counts how many squares are in ...
Domenico's user avatar
  • 2,463
7 votes
1 answer
697 views

For a computer vision app I want to do a mapping of an image, in such a way that every pixel fit hilbert curve, instead of conventional layout. So task could be as follows: Task description Given ...
xakepp35's user avatar
  • 313
16 votes
9 answers
3k views

Introduction In geometry, the Peano curve is the first example of a space-filling curve to be discovered, by Giuseppe Peano in 1890. Peano's curve is a surjective, continuous function from the unit ...
Peiffap's user avatar
  • 287
81 votes
30 answers
13k views

Challenge Create a function or program that, when given an integer size, does the following: If size is equal to 1, output ...
Bazinga_9000's user avatar
32 votes
15 answers
3k views

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, ...
Vitaliy Kaurov's user avatar
21 votes
7 answers
2k views

The purpose of the challenge is to approximately plot the attractor of the logistic map as a function of its parameter r (also called bifurcation diagram), or a subregion of it. The appearance of the ...
Luis Mendo's user avatar
  • 107k
18 votes
1 answer
500 views

Your task: generate a Koch snowflake to the nth depth. You do not need to make a complete Koch snowflake, just one side of the starting triangle. Wikipedia on Koch flakes: https://en.wikipedia.org/...
sporkl's user avatar
  • 6,934
20 votes
9 answers
2k views

The Challenge For this challenge, you are supposed to determine if a given number is in the Cantor set. So first, let's define the Cantor set. First, start with the numbers between 0 and 1. Any ...
TheNumberOne's user avatar
  • 11.6k
34 votes
6 answers
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 ...
Andrew Li's user avatar
  • 1,071
27 votes
2 answers
1k views

Given an integer n output the nth iteration of the Hilbert Curve in ASCII using the characters ...
Bobas_Pett's user avatar
  • 1,045
22 votes
13 answers
9k views

You task for today: draw a dragon curve! In case you don't know what a Dragon Curve is, here is an introductory ViHart video (Really cool, please watch!) Your task: draw a dragon curve, iterated at ...
Alecto's user avatar
  • 1,622
17 votes
10 answers
5k views

A Hilbert Curve is a type of space-filling curve, and it basically maps a line to a plane. Each point in the line corresponds to just one point in the plane, and each point in the plane corresponds to ...
Alecto's user avatar
  • 1,622
45 votes
4 answers
2k views

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 ...
Calvin's Hobbies's user avatar
35 votes
1 answer
1k views

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 ...
trichoplax is on Codidact now's user avatar
27 votes
4 answers
1k views

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 ...
wizzwizz4's user avatar
  • 2,467
16 votes
6 answers
953 views

Background A fractal sequence is an integer sequences where you can remove the first occurrence of every integer and end up with the same sequence as before. A very simple such sequence is called ...
Martin Ender's user avatar
12 votes
2 answers
458 views

Challenge Winter is fast approaching with many places receiving the first layers of snow for the 15/16 season, so why don't we break out the snow machines and code ourselves some snow? Given a ...
Beta Decay's user avatar
  • 23.6k
26 votes
5 answers
2k views

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 ...
Fatalize's user avatar
  • 39.6k
9 votes
2 answers
798 views

Write the smallest program you can to create affine fractals. You may use any method you feel like that generates the same results as the rules below. You don't have to use any ideas from the ...
CJ Dennis's user avatar
  • 4,296
4 votes
1 answer
1k views

Iterated Function Systems An Iterated Function System (IFS) is a method of constructing self-similar fractals. Each fractal is defined recursively as the union of several copies of itself, with each ...
Uri Granta's user avatar
  • 2,999
14 votes
4 answers
1k views

Write a program or function that takes in a positive integer N (via stdin/command line/function arg) and prints or returns a string representation of a two dimensional random walk that is N steps long,...
Calvin's Hobbies's user avatar