ColorWall: Difference between revisions

imported>Mydiemho
 
(5 intermediate revisions by 2 users not shown)
Line 16:
<li>[https://openhatch.org/wiki/PyCon_intro_to_open_source#Goal_.232:_install_git Install git] if you have not already done so. </li>
<li> Clone source </li>
<codepre> git clone git@github.com:jesstess/ColorWall.git </codepre>
</ul>
 
Line 95:
<b>Check your understanding</b>: what would happen if you moved the <code>self.wall.draw()</code> to inside the inner <code>for</code> loop, just under <code>self.wall.set_pixel(x, y, hsv)</code> in <code>SaturationTest</code>? (Try it!)
 
<b>Tip</b>: you can run individual tests by passing their names as command line arguments (argument -e or --effects) to <code>run.py</code>. For example, if you only wanted to run <code>SaturationTest</code>, you could:
 
<pre>python run.py SaturationTest</pre>
 
<pre>python run.py -e SaturationTest</pre>
 
=== 4. Implement a new effect called <code>RainbowTest</code> ===
Line 108 ⟶ 107:
Test your new effect with
 
<pre>python run.py -e RainbowTest</pre>
 
 
=== 5. Play with the randomness in <code>Twinkle</code> ===
Line 127 ⟶ 125:
 
<pre>
python run.py -e Twinkle
</pre>
 
Line 143 ⟶ 141:
 
<pre>
python run.py -e Checkerboards
</pre>
 
Line 161 ⟶ 159:
 
What other patterns can you create by tweaking the math for this effect?
 
 
===2. Matrix ===
Line 168 ⟶ 165:
 
<pre>
python run.py -e Matrix
</pre>
 
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.
 
 
===3. Write more of your own effects! ===