<?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 4-6: Zoog shakes horizontally</title>
	<atom:link href="http://www.learningprocessing.com/exercises/chapter-4/exercise-4-6/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>Fri, 10 Feb 2012 19:58:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Berthalaban</title>
		<link>http://www.learningprocessing.com/exercises/chapter-4/exercise-4-6/comment-page-1/#comment-20714</link>
		<dc:creator>Berthalaban</dc:creator>
		<pubDate>Mon, 30 Jan 2012 05:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/?page_id=1207#comment-20714</guid>
		<description>Zoog would still shake horizontally if you wrote &#039;zoogX=random(5)&#039;

But the answer is &#039;=zoogX+random(-5,5)&#039;
because first, 
you would want zoog to start shaking in the middle of the canvas
(this is done by adding zoogX in the equation again)

and then second, 
you would want to control the boundary of the random number.
(from -5 to 5)

</description>
		<content:encoded><![CDATA[<p>Zoog would still shake horizontally if you wrote &#8216;zoogX=random(5)&#8217;</p>
<p>But the answer is &#8216;=zoogX+random(-5,5)&#8217;<br />
because first, <br />
you would want zoog to start shaking in the middle of the canvas<br />
(this is done by adding zoogX in the equation again)</p>
<p>and then second, <br />
you would want to control the boundary of the random number.<br />
(from -5 to 5)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stani</title>
		<link>http://www.learningprocessing.com/exercises/chapter-4/exercise-4-6/comment-page-1/#comment-20610</link>
		<dc:creator>stani</dc:creator>
		<pubDate>Fri, 07 Oct 2011 11:07:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/?page_id=1207#comment-20610</guid>
		<description>This is what I tried...obviously not correct :

zoogX = random(zoogY-zoogX);

</description>
		<content:encoded><![CDATA[<p>This is what I tried&#8230;obviously not correct :</p>
<p>zoogX = random(zoogY-zoogX);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.learningprocessing.com/exercises/chapter-4/exercise-4-6/comment-page-1/#comment-20429</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 18 Mar 2011 00:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/?page_id=1207#comment-20429</guid>
		<description>zoogX is the variable that controls the horizontal position of Zoog.  If you change zoogX by a random value (positive or negative) every frame, Zoog&#039;s horizontal location will appear to shake (randomly moving left and right).</description>
		<content:encoded><![CDATA[<p>zoogX is the variable that controls the horizontal position of Zoog.  If you change zoogX by a random value (positive or negative) every frame, Zoog&#8217;s horizontal location will appear to shake (randomly moving left and right).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: flor</title>
		<link>http://www.learningprocessing.com/exercises/chapter-4/exercise-4-6/comment-page-1/#comment-20418</link>
		<dc:creator>flor</dc:creator>
		<pubDate>Tue, 15 Mar 2011 15:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/?page_id=1207#comment-20418</guid>
		<description>Why the solution of this exercise is zoogX = zoogX + random(-5,5);?</description>
		<content:encoded><![CDATA[<p>Why the solution of this exercise is zoogX = zoogX + random(-5,5);?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Shiffman</title>
		<link>http://www.learningprocessing.com/exercises/chapter-4/exercise-4-6/comment-page-1/#comment-9354</link>
		<dc:creator>Daniel Shiffman</dc:creator>
		<pubDate>Mon, 15 Feb 2010 15:15:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/?page_id=1207#comment-9354</guid>
		<description>Thanks for the comment.  For some reason I made this example (and exercise) have Zoog&#039;s legs attached to the bottom of the window.   But there&#039;s no particular reason for this so your alternative is a good one!</description>
		<content:encoded><![CDATA[<p>Thanks for the comment.  For some reason I made this example (and exercise) have Zoog&#8217;s legs attached to the bottom of the window.   But there&#8217;s no particular reason for this so your alternative is a good one!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nuno Araujo</title>
		<link>http://www.learningprocessing.com/exercises/chapter-4/exercise-4-6/comment-page-1/#comment-9298</link>
		<dc:creator>Nuno Araujo</dc:creator>
		<pubDate>Fri, 12 Feb 2010 18:29:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/?page_id=1207#comment-9298</guid>
		<description>There&#039;s a small error on the code of the answer, in is legs...
It says:
 // Draw Zoog&#039;s legs
  stroke(150);
  line(zoogX-10,zoogY+50,zoogX-10,height);
  line(zoogX+10,zoogY+50,zoogX+10,height);

I belive it should be something like:
 line(zoogX-10,zoogY+50,zoogX-15,zoogY+65);
  line(zoogX+10,zoogY+50,zoogX+15,zoogY+65);

PS: Thanks for this exercises! :)</description>
		<content:encoded><![CDATA[<p>There&#8217;s a small error on the code of the answer, in is legs&#8230;<br />
It says:<br />
 // Draw Zoog&#8217;s legs<br />
  stroke(150);<br />
  line(zoogX-10,zoogY+50,zoogX-10,height);<br />
  line(zoogX+10,zoogY+50,zoogX+10,height);</p>
<p>I belive it should be something like:<br />
 line(zoogX-10,zoogY+50,zoogX-15,zoogY+65);<br />
  line(zoogX+10,zoogY+50,zoogX+15,zoogY+65);</p>
<p>PS: Thanks for this exercises! <img src='http://www.learningprocessing.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

