Anonymous user
Boston Python workshop/Saturday/ColorWall: Difference between revisions
Boston Python workshop/Saturday/ColorWall (view source)
Revision as of 19:36, 8 July 2012
, 11 years agono edit summary
imported>Jesstess No edit summary |
imported>Jesstess No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 118:
=== 6. Implement a new effect that involves randomness! ===
Remember to add your effect to the <code>Effect</code> list at the bottom of <code>effects.py</code>!▼
▲Remember to add your effect to the <code>Effect</code> list at the bottom of <code>effects.py</code>
==Bonus exercises==
===Checkerboard===
Find and change the colors used in the <code>Checkerboards</code> effect, and re-run the effect:
Line 146 ⟶ 145:
re-run the effect, and see what changed.
What other patterns can you create by tweaking the math for this effect?
=== Matrix ===
Find and change the color of the columns in the <code>Matrix</code> effect, and re-run the effect:
Line 155 ⟶ 158:
Each column that we see on the wall corresponds to a <code>Column</code> object. Add some randomness to the color used by each column (the variable whose value you changed above) using the <code>random.random</code> function, re-run the effect, and see what happens.
Write your own effects!▼
▲=== Write more of your own effects! ===
You have color, time, randomness, letters, and more at your disposal. Go nuts!
|