Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

aitorfernandez/triangle-pattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Triangle Pattern

Triangle Pattern Sample 1

The pattern

This pattern is a small exercise to getting initial contact with p5js.

The starting point for the pattern is quite straightforward.

First, what it is needed to be done is setting random values for the rows and columns and then getting the size for the triangles using the number of rows and the height of the window.

Considering these three values, rows, columns and size, is enough to start drawing a triangle or an inverter triangle if the number of the column is odd or even.

Finally, a random value indicates if we draw one triangle or four smaller triangles.

Result

Triangle Pattern Sample 2

Triangle Pattern Sample 3

Triangle Pattern Sample 4

Releases

No releases published

Packages

No packages published