<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Exercise 6-8: Nested for loop</title>
	<atom:link href="http://www.learningprocessing.com/exercises/chapter-6/exercise-6-8/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.learningprocessing.com</link>
	<description>A Beginner's Guide to Programming Images, Animation, and Interaction by Daniel Shiffman</description>
	<lastBuildDate>Mon, 22 Mar 2010 14:53:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: ps</title>
		<link>http://www.learningprocessing.com/exercises/chapter-6/exercise-6-8/comment-page-1/#comment-7177</link>
		<dc:creator>ps</dc:creator>
		<pubDate>Tue, 01 Dec 2009 01:57:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/?page_id=966#comment-7177</guid>
		<description>Thank you!</description>
		<content:encoded><![CDATA[<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Shiffman</title>
		<link>http://www.learningprocessing.com/exercises/chapter-6/exercise-6-8/comment-page-1/#comment-7148</link>
		<dc:creator>Daniel Shiffman</dc:creator>
		<pubDate>Mon, 30 Nov 2009 02:01:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/?page_id=966#comment-7148</guid>
		<description>Here&#039;s how it looks with a while loop.  Note the difference regarding where you increment x and y.
&lt;pre&gt;
int x = 0;
while (x &lt; width) {
  int y = 0;
  while (y &lt; height) {
    noStroke();
    fill(random(255));
    rect(x,y,10,10);
    y += 10;
  }
  x += 10;
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Here&#8217;s how it looks with a while loop.  Note the difference regarding where you increment x and y.</p>
<pre>
int x = 0;
while (x &lt; width) {
  int y = 0;
  while (y &lt; height) {
    noStroke();
    fill(random(255));
    rect(x,y,10,10);
    y += 10;
  }
  x += 10;
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: ps</title>
		<link>http://www.learningprocessing.com/exercises/chapter-6/exercise-6-8/comment-page-1/#comment-7142</link>
		<dc:creator>ps</dc:creator>
		<pubDate>Sun, 29 Nov 2009 22:00:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/?page_id=966#comment-7142</guid>
		<description>I was able to complete first half of ex. 6-8. I cannot figure out how to re-create the same pattern using a &quot;while&quot; loop. This is one of the many attempts I&#039;ve made:

size(200,200);
background(255);

int r = 0;
int g = 0;
int b = 0;

int x = 0;
int y = 0;

while (x&lt;width)  {
  while(y&lt;height)  {
    rect(x,y,10,10);
    x+=10;
    y+=10;
  }
  println(&quot;x = &quot;+x);
  println(&quot;y = &quot;+y);
}

//  r = int(random(255));
//  g = int(random(255));
//  b = int(random(255));
//  fill(r,g,b);

Thanks!</description>
		<content:encoded><![CDATA[<p>I was able to complete first half of ex. 6-8. I cannot figure out how to re-create the same pattern using a &#8220;while&#8221; loop. This is one of the many attempts I&#8217;ve made:</p>
<p>size(200,200);<br />
background(255);</p>
<p>int r = 0;<br />
int g = 0;<br />
int b = 0;</p>
<p>int x = 0;<br />
int y = 0;</p>
<p>while (x&lt;width)  {<br />
  while(y&lt;height)  {<br />
    rect(x,y,10,10);<br />
    x+=10;<br />
    y+=10;<br />
  }<br />
  println(&quot;x = &quot;+x);<br />
  println(&quot;y = &quot;+y);<br />
}</p>
<p>//  r = int(random(255));<br />
//  g = int(random(255));<br />
//  b = int(random(255));<br />
//  fill(r,g,b);</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.learningprocessing.com/exercises/chapter-6/exercise-6-8/comment-page-1/#comment-5337</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 06 Oct 2009 17:25:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/?page_id=966#comment-5337</guid>
		<description>You just need to use 3 arguments to fill(), i.e.

&lt;pre&gt;
fill(random(255),random(255),random(255));
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>You just need to use 3 arguments to fill(), i.e.</p>
<pre>
fill(random(255),random(255),random(255));
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: ww</title>
		<link>http://www.learningprocessing.com/exercises/chapter-6/exercise-6-8/comment-page-1/#comment-5264</link>
		<dc:creator>ww</dc:creator>
		<pubDate>Fri, 02 Oct 2009 08:52:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/?page_id=966#comment-5264</guid>
		<description>What should I do if i want to use random r,g,b to color them? I was told fill(random(r,g,b)); is not applicable..</description>
		<content:encoded><![CDATA[<p>What should I do if i want to use random r,g,b to color them? I was told fill(random(r,g,b)); is not applicable..</p>
]]></content:encoded>
	</item>
</channel>
</rss>
