browse OpenProcessing

Apple
Concentric Triangles
origami crane
browse all>

browse the portfolio of Matt Richard

Foot Sensor Data: Longboarding
Homage to Szpakowski
Sabrina
Wavy Gravy
see more>
Concentric Triangles

Concentric Triangles

uploaded by
Matt Richard
I wanted to make concentric triangles, so I figured the easiest way would be to create a triangle based on its center point and radius. I created a class that figures out the 6 coordinate points by using trigonometry and then simply inputs them into the standard triangle() command.


Right now the triangles rotate based on the x position of your mouse.


The background color and the stroke color are created randomly at the beginning. Although the color is generated randomly, it has a been restricted to more pastel colors.


Embed Code
Fave'd by 0 users
Sketch added to your favorites in your portfolio.
You must login/register to add this sketch to your favorites.

comments

source code

Comments

Jill Jackson
16 Sep 2008, 00:31
quick pointer: you can reduce code copying by having a for loop and an array. Instead of specifying t1, t2, t3... you can just make an array with 10 elements and use a for loop to create them
You need to login/register to comment.