<?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: How to Draw an Oval</title>
	<atom:link href="http://www.pixelwit.com/blog/2008/08/oval-tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pixelwit.com/blog/2008/08/oval-tutorial/</link>
	<description>Making Flash Go</description>
	<lastBuildDate>Fri, 03 Feb 2012 01:38:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Pixelwit</title>
		<link>http://www.pixelwit.com/blog/2008/08/oval-tutorial/comment-page-1/#comment-59321</link>
		<dc:creator>Pixelwit</dc:creator>
		<pubDate>Thu, 13 May 2010 09:31:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.pixelwit.com/blog/?p=376#comment-59321</guid>
		<description>Hello Erik. Sorry, but you&#039;re wrong.  ;)  An oval isn&#039;t a clearly defined geometric shape; it is a term loosely used to describe any shape resembling an egg (egg = ovum = oval).  I think it&#039;s pretty fair to say an ellipse resembles an egg and therefore meets the loose requirements of an oval.

While there may be a native Flash function for drawing ellipses, it cannot be customized to draw a more classical tapered egg shape like the functions in the above tutorial.

[cc lang=&quot;actionscript&quot;]// Change &quot;xRadius&quot; to &quot;xRadius1&quot; and add &quot;xRadius2&quot; argument.
function drawEgg(centerX, centerY, xRadius1, xRadius2, yRadius, sides) {
	this.moveTo(centerX,centerY+yRadius);
	var halfSides = sides/2;
	var pointRatio, radians, xSteps, ySteps, pointX, pointY;
	for (var i = 0; i&lt;=sides; i++) {
		pointRatio = i/sides+.25;
		radians = pointRatio*2*Math.PI;
		xSteps = Math.cos(radians);
		ySteps = Math.sin(radians);
		if (i&lt;halfSides) {
			pointX = centerX+xSteps*xRadius1;
		} else {
			pointX = centerX+xSteps*xRadius2;
		}
		pointY = centerY+ySteps*yRadius;
		this.lineTo(pointX,pointY);
	}
}
lineStyle(4);
//        X,   Y,  W1,  W2,  H, steps.
drawEgg(200, 200, 100, 200, 80, 100);
//[/cc]

The above code produces an oval like the image below.
&lt;img title=&quot;Oval Constructed with 2 Halves of Different Sized Ellipses&quot; src=&quot;http://www.pixelwit.com/blog/wp-content/uploads/2010/05/ellipse-egg-outline.png&quot;/&gt;</description>
		<content:encoded><![CDATA[<p>Hello Erik. Sorry, but you&#8217;re wrong.  <img src='http://www.pixelwit.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />   An oval isn&#8217;t a clearly defined geometric shape; it is a term loosely used to describe any shape resembling an egg (egg = ovum = oval).  I think it&#8217;s pretty fair to say an ellipse resembles an egg and therefore meets the loose requirements of an oval.</p>
<p>While there may be a native Flash function for drawing ellipses, it cannot be customized to draw a more classical tapered egg shape like the functions in the above tutorial.</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">// Change &quot;xRadius&quot; to &quot;xRadius1&quot; and add &quot;xRadius2&quot; argument.</span><br />
<span style="color: #000000; font-weight: bold;">function</span> drawEgg<span style="color: #66cc66;">&#40;</span>centerX, centerY, xRadius1, xRadius2, yRadius, sides<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">moveTo</span><span style="color: #66cc66;">&#40;</span>centerX,centerY+yRadius<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> halfSides = sides<span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span>;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> pointRatio, radians, xSteps, ySteps, pointX, pointY;<br />
&nbsp; &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i = <span style="color: #cc66cc;">0</span>; i<span style="color: #66cc66;">&lt;</span>=sides; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; pointRatio = i<span style="color: #66cc66;">/</span>sides+.25;<br />
&nbsp; &nbsp; &nbsp; &nbsp; radians = pointRatio<span style="color: #66cc66;">*</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">*</span><span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">PI</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; xSteps = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">cos</span><span style="color: #66cc66;">&#40;</span>radians<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; ySteps = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">sin</span><span style="color: #66cc66;">&#40;</span>radians<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&lt;</span>halfSides<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pointX = centerX+xSteps<span style="color: #66cc66;">*</span>xRadius1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pointX = centerX+xSteps<span style="color: #66cc66;">*</span>xRadius2;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; pointY = centerY+ySteps<span style="color: #66cc66;">*</span>yRadius;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span>pointX,pointY<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #0066CC;">lineStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">// &nbsp; &nbsp; &nbsp; &nbsp;X, &nbsp; Y, &nbsp;W1, &nbsp;W2, &nbsp;H, steps.</span><br />
drawEgg<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">200</span>, <span style="color: #cc66cc;">200</span>, <span style="color: #cc66cc;">100</span>, <span style="color: #cc66cc;">200</span>, <span style="color: #cc66cc;">80</span>, <span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">//</span></div></div>
<p>The above code produces an oval like the image below.<br />
<img title="Oval Constructed with 2 Halves of Different Sized Ellipses" src="http://www.pixelwit.com/blog/wp-content/uploads/2010/05/ellipse-egg-outline.png"/></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: erik van nieuwburg</title>
		<link>http://www.pixelwit.com/blog/2008/08/oval-tutorial/comment-page-1/#comment-57674</link>
		<dc:creator>erik van nieuwburg</dc:creator>
		<pubDate>Wed, 21 Apr 2010 14:38:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.pixelwit.com/blog/?p=376#comment-57674</guid>
		<description>Nice, but this is not an oval shape. This is an ellipse. And for ellipse drawing there is a native method in AS3 in the Graphics class.

Look here for more info : http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Graphics.html#drawEllipse%28%29</description>
		<content:encoded><![CDATA[<p>Nice, but this is not an oval shape. This is an ellipse. And for ellipse drawing there is a native method in AS3 in the Graphics class.</p>
<p>Look here for more info : <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Graphics.html#drawEllipse%28%29" rel="nofollow">http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Graphics.html#drawEllipse%28%29</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: farshad ali</title>
		<link>http://www.pixelwit.com/blog/2008/08/oval-tutorial/comment-page-1/#comment-26077</link>
		<dc:creator>farshad ali</dc:creator>
		<pubDate>Fri, 17 Oct 2008 07:57:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.pixelwit.com/blog/?p=376#comment-26077</guid>
		<description>Hi, you just saved me a lot of time, thanks!!

p.s. great tutorial</description>
		<content:encoded><![CDATA[<p>Hi, you just saved me a lot of time, thanks!!</p>
<p>p.s. great tutorial</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Animated Arc Drawing &#62;&#62; PiXELWiT</title>
		<link>http://www.pixelwit.com/blog/2008/08/oval-tutorial/comment-page-1/#comment-24456</link>
		<dc:creator>Animated Arc Drawing &#62;&#62; PiXELWiT</dc:creator>
		<pubDate>Tue, 09 Sep 2008 16:50:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.pixelwit.com/blog/?p=376#comment-24456</guid>
		<description>[...] A recent comment on my &lt;a title=&quot;How to Draw an Oval or Ellipse&quot; href=&quot;http://www.pixelwit.com/blog/2008/08/oval-tutorial/#comment-24419&quot;&gt;Oval Drawing Tutorial&lt;/a&gt; asks how to &quot;give the appearance that an oval is being drawn slowly&quot;.  Hmmm... this sounds like a job for my handy &lt;a title=&quot;Draw Arc Tutorial&quot; href=&quot;http://www.pixelwit.com/blog/2007/07/draw-an-arc-with-actionscript/&quot;&gt;Arc Drawing Function&lt;/a&gt;. [...]</description>
		<content:encoded><![CDATA[<p>[...] A recent comment on my <a title="How to Draw an Oval or Ellipse" href="http://www.pixelwit.com/blog/2008/08/oval-tutorial/#comment-24419">Oval Drawing Tutorial</a> asks how to &#8220;give the appearance that an oval is being drawn slowly&#8221;.  Hmmm&#8230; this sounds like a job for my handy <a title="Draw Arc Tutorial" href="http://www.pixelwit.com/blog/2007/07/draw-an-arc-with-actionscript/">Arc Drawing Function</a>. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Corporate Rel</title>
		<link>http://www.pixelwit.com/blog/2008/08/oval-tutorial/comment-page-1/#comment-24419</link>
		<dc:creator>Corporate Rel</dc:creator>
		<pubDate>Mon, 08 Sep 2008 17:43:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.pixelwit.com/blog/?p=376#comment-24419</guid>
		<description>Thank you so much this is VERY informative!!!

Question: How would I give the appearance that an oval is being drawn slowly?

Thanks!</description>
		<content:encoded><![CDATA[<p>Thank you so much this is VERY informative!!!</p>
<p>Question: How would I give the appearance that an oval is being drawn slowly?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

