<?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-5: Using System Variables</title>
	<atom:link href="http://www.learningprocessing.com/examples/chapter-4/example-4-5/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: Daniel Shiffman</title>
		<link>http://www.learningprocessing.com/examples/chapter-4/example-4-5/comment-page-1/#comment-7099</link>
		<dc:creator>Daniel Shiffman</dc:creator>
		<pubDate>Sat, 28 Nov 2009 02:20:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/wp/?page_id=330#comment-7099</guid>
		<description>Yes, absolutely you could reverse the direction.  take a look at this example which does this: http://www.learningprocessing.com/examples/chapter-5/example-5-7/  But here I&#039;m just demonstrating the use of frameCount as a built-in variable which is very limiting in terms of what you can do.  A better demonstration of frameCount might be to show how you can use it for timing, i.e. how something might appear after a given number of frames.

&lt;pre&gt;
if (frameCount &gt; 100) {
  rect(10,10,50,50);
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Yes, absolutely you could reverse the direction.  take a look at this example which does this: <a href="http://www.learningprocessing.com/examples/chapter-5/example-5-7/" rel="nofollow">http://www.learningprocessing.com/examples/chapter-5/example-5-7/</a>  But here I&#8217;m just demonstrating the use of frameCount as a built-in variable which is very limiting in terms of what you can do.  A better demonstration of frameCount might be to show how you can use it for timing, i.e. how something might appear after a given number of frames.</p>
<pre>
if (frameCount > 100) {
  rect(10,10,50,50);
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.learningprocessing.com/examples/chapter-4/example-4-5/comment-page-1/#comment-7084</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Fri, 27 Nov 2009 14:46:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/wp/?page_id=330#comment-7084</guid>
		<description>Well, this must be the reason why the fill disappears after 510 frames, right? the resulting number isn&#039;t allowed as a value for &quot;fill&quot; and the result thus is an equivalent for &quot;noFill&quot;... (?)

it would be interesting, though, if there&#039;s a (simple) way to reverse the direction of the fill&#039;s change after frame 510 so it goes back gradually to black from white instead of jumping to black and beginning from the start. like some &quot;soft&quot; oscilllation...?</description>
		<content:encoded><![CDATA[<p>Well, this must be the reason why the fill disappears after 510 frames, right? the resulting number isn&#8217;t allowed as a value for &#8220;fill&#8221; and the result thus is an equivalent for &#8220;noFill&#8221;&#8230; (?)</p>
<p>it would be interesting, though, if there&#8217;s a (simple) way to reverse the direction of the fill&#8217;s change after frame 510 so it goes back gradually to black from white instead of jumping to black and beginning from the start. like some &#8220;soft&#8221; oscilllation&#8230;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.learningprocessing.com/examples/chapter-4/example-4-5/comment-page-1/#comment-6408</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 02 Nov 2009 18:25:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/wp/?page_id=330#comment-6408</guid>
		<description>frameCount starts at 0 and increments each time through draw().  This isn&#039;t the best example b/c after 510 frames, frameCount / 2 is greater than 255 and grayscale values only range between 0 and 255.  This code should make it a bit more clear:

fill(frameCount % 255);

The modulus operator will cycle the fill() value back to zero every 255 frames.</description>
		<content:encoded><![CDATA[<p>frameCount starts at 0 and increments each time through draw().  This isn&#8217;t the best example b/c after 510 frames, frameCount / 2 is greater than 255 and grayscale values only range between 0 and 255.  This code should make it a bit more clear:</p>
<p>fill(frameCount % 255);</p>
<p>The modulus operator will cycle the fill() value back to zero every 255 frames.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raúl</title>
		<link>http://www.learningprocessing.com/examples/chapter-4/example-4-5/comment-page-1/#comment-6366</link>
		<dc:creator>Raúl</dc:creator>
		<pubDate>Mon, 02 Nov 2009 02:58:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningprocessing.com/wp/?page_id=330#comment-6366</guid>
		<description>How exactly is frameCount used to color the rectangle?</description>
		<content:encoded><![CDATA[<p>How exactly is frameCount used to color the rectangle?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

