sierpinski

module
v0.0.0-...-b96f2d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2021 License: MIT

README

MIT License LinkedIn GitHub go.mod Go version Go Report Card


Sierpiński triangle

The Sierpiński triangle is a fractal attractive fixed set with the overall shape of an equilateral triangle, subdivided recursively into smaller equilateral triangles.
It is constructed by following these steps:

  1. Take three points in a plane to form a triangle, you need not draw it.
  2. Randomly select any point inside the triangle and consider that your current position.
  3. Randomly select any one of the three vertex points.
  4. Move half the distance from your current position to the selected vertex.
  5. Plot the current position.
  6. Repeat from step 3.

License

Distributed under the MIT License. See LICENSE for more information.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL