<?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: Example 4-3: Varying Variables</title>
	<atom:link href="http://www.learningprocessing.com/examples/chapter-4/example-4-3/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>Thu, 09 Feb 2012 16:27:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: stani</title>
		<link>http://www.learningprocessing.com/examples/chapter-4/example-4-3/comment-page-1/#comment-20613</link>
		<dc:creator>stani</dc:creator>
		<pubDate>Sun, 09 Oct 2011 10:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/wp/?page_id=326#comment-20613</guid>
		<description>to vary speed:

// Declare and initialize two integer variables at the top of the code.int circleSize = 0;int circleX = mouseX;int circleY = mouseY;void setup() {  size(200,200);  smooth();}void draw() {  background(0);  stroke(255);  fill(175);  // Use the variables to specify the location of an ellipse.  ellipse(pmouseX,pmouseY,circleSize,circleSize);  circleSize++;     }
</description>
		<content:encoded><![CDATA[<p>to vary speed:</p>
<p>// Declare and initialize two integer variables at the top of the code.int circleSize = 0;int circleX = mouseX;int circleY = mouseY;void setup() {  size(200,200);  smooth();}void draw() {  background(0);  stroke(255);  fill(175);  // Use the variables to specify the location of an ellipse.  ellipse(pmouseX,pmouseY,circleSize,circleSize);  circleSize++;     }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stani</title>
		<link>http://www.learningprocessing.com/examples/chapter-4/example-4-3/comment-page-1/#comment-20614</link>
		<dc:creator>stani</dc:creator>
		<pubDate>Sun, 09 Oct 2011 10:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/wp/?page_id=326#comment-20614</guid>
		<description>// Declare and initialize two integer variables at the top of the code.
int circleSize = 0;
int circleX = 100;
int circleY = 100;

void setup() {
  size(200,200);
  background(0);
  smooth();
}

void draw() {
    //background(0);
}

void mouseMoved() {
  //background(0);
  ellipseMode(CENTER);
  stroke(255);
  fill(175);
  // Use the variables to specify the location of an ellipse.
  ellipse(circleX,circleY,circleSize,circleSize);
  circleSize++;
}</description>
		<content:encoded><![CDATA[<p>// Declare and initialize two integer variables at the top of the code.<br />
int circleSize = 0;<br />
int circleX = 100;<br />
int circleY = 100;</p>
<p>void setup() {<br />
  size(200,200);<br />
  background(0);<br />
  smooth();<br />
}</p>
<p>void draw() {<br />
    //background(0);<br />
}</p>
<p>void mouseMoved() {<br />
  //background(0);<br />
  ellipseMode(CENTER);<br />
  stroke(255);<br />
  fill(175);<br />
  // Use the variables to specify the location of an ellipse.<br />
  ellipse(circleX,circleY,circleSize,circleSize);<br />
  circleSize++;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stani</title>
		<link>http://www.learningprocessing.com/examples/chapter-4/example-4-3/comment-page-1/#comment-20612</link>
		<dc:creator>stani</dc:creator>
		<pubDate>Sun, 09 Oct 2011 09:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/wp/?page_id=326#comment-20612</guid>
		<description>here is my code:

// Declare and initialize two integer variables at the top of the code.float circleSize = 0;float circleX = 100;float circleY = 100;//float speed = 0.0;//float offset = 0.0;void setup() {  size(200,200);  smooth();}void draw() {  background(0);  stroke(255);  fill(175);  // Use the variables to specify the location of an ellipse.  ellipse(circleX,circleY,circleSize,circleSize);  circleSize++;  //speed+=offset;    }
</description>
		<content:encoded><![CDATA[<p>here is my code:</p>
<p>// Declare and initialize two integer variables at the top of the code.float circleSize = 0;float circleX = 100;float circleY = 100;//float speed = 0.0;//float offset = 0.0;void setup() {  size(200,200);  smooth();}void draw() {  background(0);  stroke(255);  fill(175);  // Use the variables to specify the location of an ellipse.  ellipse(circleX,circleY,circleSize,circleSize);  circleSize++;  //speed+=offset;    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabe</title>
		<link>http://www.learningprocessing.com/examples/chapter-4/example-4-3/comment-page-1/#comment-5661</link>
		<dc:creator>Gabe</dc:creator>
		<pubDate>Sun, 18 Oct 2009 17:42:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/wp/?page_id=326#comment-5661</guid>
		<description>Thanks. I&#039;m sure I&#039;ll have more questions in the hover chapters...:)</description>
		<content:encoded><![CDATA[<p>Thanks. I&#8217;m sure I&#8217;ll have more questions in the hover chapters&#8230;:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.learningprocessing.com/examples/chapter-4/example-4-3/comment-page-1/#comment-5660</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sun, 18 Oct 2009 15:49:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/wp/?page_id=326#comment-5660</guid>
		<description>In this case, you just want to define a variable for the size of the circle, instead of hardcoding the number 50 in, i.e.

&lt;pre&gt;
int circleW = 100;
int circleH = 100;
&lt;/pre&gt;

Then you use those variables when drawing the circle.

&lt;pre&gt;
  ellipse(circleX,circleY,circleW,circleH);
&lt;/pre&gt;

And then adjust the values however you like!

&lt;pre&gt;
  circleW = circleW + 1;  // Growing
  circleH = circleH - 1;  // Shrinking
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>In this case, you just want to define a variable for the size of the circle, instead of hardcoding the number 50 in, i.e.</p>
<pre>
int circleW = 100;
int circleH = 100;
</pre>
<p>Then you use those variables when drawing the circle.</p>
<pre>
  ellipse(circleX,circleY,circleW,circleH);
</pre>
<p>And then adjust the values however you like!</p>
<pre>
  circleW = circleW + 1;  // Growing
  circleH = circleH - 1;  // Shrinking
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabe</title>
		<link>http://www.learningprocessing.com/examples/chapter-4/example-4-3/comment-page-1/#comment-5652</link>
		<dc:creator>Gabe</dc:creator>
		<pubDate>Sun, 18 Oct 2009 06:31:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/wp/?page_id=326#comment-5652</guid>
		<description>so what is the solution to varying the speed at which the circle grows? I wound up using the abs() call as it was in the previous chapter.</description>
		<content:encoded><![CDATA[<p>so what is the solution to varying the speed at which the circle grows? I wound up using the abs() call as it was in the previous chapter.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

