Skip to content

Zynthoil/Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Some of my (very) small coding projects


Mandelbrot Set

Generated Mandelbrot Set

Generates a Mandelbrot Set in either ascii, pixels or coloured pixels. Uses recursive function.

The ascii geneation is slightly warped (characters are taller than they are wide).

Quite inefficient, but works and isn't too complex (unlike the numbers used! (see what I did there?)).


Sierpinski Carpet

Generated Sierpinski Carpet

Generates a Sierpinski Carpet with the chaos game. Essentially:

  • Pick a random starting point (don't place this one though).
  • Pick a random corner or edge midpoint.
  • Place a point 2/3 of the distance from the point to the chosen corner/edge.
  • Repeat with the new point.

I could of course generate this much faster normally, but I though the chaos game approach was interesting.


Sierpinski Triangle

Generated Sierpinski Triangle

I made this after making the Sierpinski Carpet, which was a good start due to its rectangular nature.

Generates a Sierpinski Triangle with the chaos game. Essentially:

  • Choose initial starting point as the center of the screen (I didn't want to try generated a random point within the bounds of the triangle).
  • Pick a random corner.
  • Place a point 1/2 of the distance from the point to the chosen corner.
  • Repeat with the new point.

I also made some changes with this one to make a GIF of the generation. Currently only works at small scales, as the GIF is made by storing all iterations images in a list, which is demanding on the RAM.


Burning Ship

Generated Burning Ship

A very easy modification to the Mandelbrot Set, just using a slightly different recursive function. While making this, I also added the ability to zoom in on specific points so that I could generated images of more interesting regions (not in this repo as the files are too large).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published