<?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: Plotting a Sine Wave with the iPhone SDK</title>
	<atom:link href="http://trailsinthesand.com/plotting-a-sine-wave-with-the-iphone-sdk/feed/" rel="self" type="application/rss+xml" />
	<link>http://trailsinthesand.com/plotting-a-sine-wave-with-the-iphone-sdk/</link>
	<description></description>
	<pubDate>Mon, 22 Mar 2010 14:08:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Leo</title>
		<link>http://trailsinthesand.com/plotting-a-sine-wave-with-the-iphone-sdk/comment-page-1/#comment-120</link>
		<dc:creator>Leo</dc:creator>
		<pubDate>Fri, 18 Apr 2008 22:40:03 +0000</pubDate>
		<guid isPermaLink="false">http://trailsinthesand.com/plotting-a-sine-wave-with-the-iphone-sdk/#comment-120</guid>
		<description>We forgot to add ink to our pen... I added this line and it works as advertised!

CGContextSetRGBStrokeColor(ctx, 1.0, 0.0, 1.0, 1.0);</description>
		<content:encoded><![CDATA[<p>We forgot to add ink to our pen&#8230; I added this line and it works as advertised!</p>
<p>CGContextSetRGBStrokeColor(ctx, 1.0, 0.0, 1.0, 1.0);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leo</title>
		<link>http://trailsinthesand.com/plotting-a-sine-wave-with-the-iphone-sdk/comment-page-1/#comment-119</link>
		<dc:creator>Leo</dc:creator>
		<pubDate>Fri, 18 Apr 2008 22:29:10 +0000</pubDate>
		<guid isPermaLink="false">http://trailsinthesand.com/plotting-a-sine-wave-with-the-iphone-sdk/#comment-119</guid>
		<description>I have this exact code in my test app:

#define PI 3.14159
- (void)drawRect:(CGRect)rect 
{
	CGContextRef ctx = UIGraphicsGetCurrentContext();
    CGContextClearRect(ctx, rect);
    CGContextBeginPath(ctx);
		 
	int x;
	for(int y=rect.origin.y; y &lt; rect.size.height; y++)
	{
		x = ((rect.size.width/4) * sin(((y*4) % 360) * PI/180)) + rect.size.width/2;
 
		if(y == 0)
		{
			CGContextMoveToPoint(ctx, x, y);
		}
		else
		{
			CGContextAddLineToPoint(ctx, x, y);
		}
	}
	CGContextStrokePath(ctx);
}	

and nothing happens! Either I forgot something - or you did....</description>
		<content:encoded><![CDATA[<p>I have this exact code in my test app:</p>
<p>#define PI 3.14159<br />
- (void)drawRect:(CGRect)rect<br />
{<br />
	CGContextRef ctx = UIGraphicsGetCurrentContext();<br />
    CGContextClearRect(ctx, rect);<br />
    CGContextBeginPath(ctx);</p>
<p>	int x;<br />
	for(int y=rect.origin.y; y &lt; rect.size.height; y++)<br />
	{<br />
		x = ((rect.size.width/4) * sin(((y*4) % 360) * PI/180)) + rect.size.width/2;</p>
<p>		if(y == 0)<br />
		{<br />
			CGContextMoveToPoint(ctx, x, y);<br />
		}<br />
		else<br />
		{<br />
			CGContextAddLineToPoint(ctx, x, y);<br />
		}<br />
	}<br />
	CGContextStrokePath(ctx);<br />
}	</p>
<p>and nothing happens! Either I forgot something - or you did&#8230;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
