Skip to content

frawst/thetriangle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

thetriangle

generate serpinski triangles using cool maths

Created by Justyn Chaykowski, github.com/frawst git:github.com/frawst/thetriangle

Contributors: frawst EclectickMedia

TODO

  • generating a random start point inside the triangle
  • Impliment parameter naming
  • Impliment paramater image sizing
  • Impliment parameter dot-count

Project Overview

Python Serpinski Triangle Generator utilizing randomly incrimented point placement within a pre-defined triangle determined by randomly selecting a vertex then translating half way towards that vertex from the current point. Begin with a 'random' point inside the triangle

Functionality

genPoint()

Utilizes a list of graphics.py points to generate pseudo-random points within a beginning triangle

dfc(pointx, pointy, originX, originY)

finds the distance between two points

rgbMap(val, limiter)

given a value ('val'), and the maximum for that value ('limiter'), will anchor/map that value to an RGB value (0-255)

About

generate serpinski triangles using cool maths

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages