﻿<?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: Find Intersection Point of two lines in AS3</title>
	<atom:link href="http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/feed/" rel="self" type="application/rss+xml" />
	<link>http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/</link>
	<description>Scripting is fun like any other hobby</description>
	<lastBuildDate>Fri, 19 Mar 2010 13:48:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Calculating the Distance from a Point to a Line in AS3 &#124; Bacon and Games</title>
		<link>http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/comment-page-1/#comment-597</link>
		<dc:creator>Calculating the Distance from a Point to a Line in AS3 &#124; Bacon and Games</dc:creator>
		<pubDate>Thu, 04 Mar 2010 01:04:32 +0000</pubDate>
		<guid isPermaLink="false">http://keith-hair.com/blog/?p=22#comment-597</guid>
		<description>[...] again I&#8217;ve built on a handy function written by Keith Hair that finds the point of intersection between two lines. Using his lineIntersectLine() function and my getPerpDistanceFromLine() function you can calculate [...]</description>
		<content:encoded><![CDATA[<p>[...] again I&#8217;ve built on a handy function written by Keith Hair that finds the point of intersection between two lines. Using his lineIntersectLine() function and my getPerpDistanceFromLine() function you can calculate [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith H</title>
		<link>http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/comment-page-1/#comment-435</link>
		<dc:creator>Keith H</dc:creator>
		<pubDate>Sat, 09 Jan 2010 02:05:57 +0000</pubDate>
		<guid isPermaLink="false">http://keith-hair.com/blog/?p=22#comment-435</guid>
		<description>Thanks to Chris B-B for making it clear to me about a bug in the as_seg part, and preventing future headaches this might have caused me.</description>
		<content:encoded><![CDATA[<p>Thanks to Chris B-B for making it clear to me about a bug in the as_seg part, and preventing future headaches this might have caused me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith H</title>
		<link>http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/comment-page-1/#comment-309</link>
		<dc:creator>Keith H</dc:creator>
		<pubDate>Thu, 30 Jul 2009 22:31:08 +0000</pubDate>
		<guid isPermaLink="false">http://keith-hair.com/blog/?p=22#comment-309</guid>
		<description>Thanks Dennis and everyone else who have been pointing out the as_seg part of the function.
Since it&#039;s only comparing if the value is greater, the actual distance by using square root is not important.

	if(as_seg){
		if(Math.pow((ip.x - B.x) + (ip.y - B.y), 2) &gt; Math.pow((A.x - B.x) + (A.y - B.y), 2)){
			return null;
		}
		if(Math.pow((ip.x - A.x) + (ip.y - A.y), 2) &gt; Math.pow((A.x - B.x) + (A.y - B.y), 2)){
			return null;
		}	
 
		if(Math.pow((ip.x - F.x) + (ip.y - F.y), 2) &gt; Math.pow((E.x - F.x) + (E.y - F.y), 2)){
			return null;
		}
		if(Math.pow((ip.x - E.x) + (ip.y - E.y), 2) &gt; Math.pow((E.x - F.x) + (E.y - F.y), 2)){
			return null;
		}
	}</description>
		<content:encoded><![CDATA[<p>Thanks Dennis and everyone else who have been pointing out the as_seg part of the function.<br />
Since it&#8217;s only comparing if the value is greater, the actual distance by using square root is not important.</p>
<p>	if(as_seg){<br />
		if(Math.pow((ip.x &#8211; B.x) + (ip.y &#8211; B.y), 2) > Math.pow((A.x &#8211; B.x) + (A.y &#8211; B.y), 2)){<br />
			return null;<br />
		}<br />
		if(Math.pow((ip.x &#8211; A.x) + (ip.y &#8211; A.y), 2) > Math.pow((A.x &#8211; B.x) + (A.y &#8211; B.y), 2)){<br />
			return null;<br />
		}	</p>
<p>		if(Math.pow((ip.x &#8211; F.x) + (ip.y &#8211; F.y), 2) > Math.pow((E.x &#8211; F.x) + (E.y &#8211; F.y), 2)){<br />
			return null;<br />
		}<br />
		if(Math.pow((ip.x &#8211; E.x) + (ip.y &#8211; E.y), 2) > Math.pow((E.x &#8211; F.x) + (E.y &#8211; F.y), 2)){<br />
			return null;<br />
		}<br />
	}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis</title>
		<link>http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/comment-page-1/#comment-308</link>
		<dc:creator>Dennis</dc:creator>
		<pubDate>Thu, 30 Jul 2009 19:16:47 +0000</pubDate>
		<guid isPermaLink="false">http://keith-hair.com/blog/?p=22#comment-308</guid>
		<description>Hi there,
thanks for the great piece of code! Just wanted to suggest that you don&#039;t use Point.distance for the &quot;as_sec&quot; part - because I think calculating the distance always uses the square-root - which is calculated slowly. 

If you only want to check whether something is nearer than another, it&#039;s enough to compare (a^2 + b^2) for both distances.

Hope I made clear what I mean ;)
(if you want to reply, please also drop a short mail)

Cheers,
Dennis</description>
		<content:encoded><![CDATA[<p>Hi there,<br />
thanks for the great piece of code! Just wanted to suggest that you don&#8217;t use Point.distance for the &#8220;as_sec&#8221; part &#8211; because I think calculating the distance always uses the square-root &#8211; which is calculated slowly. </p>
<p>If you only want to check whether something is nearer than another, it&#8217;s enough to compare (a^2 + b^2) for both distances.</p>
<p>Hope I made clear what I mean <img src='http://keith-hair.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
(if you want to reply, please also drop a short mail)</p>
<p>Cheers,<br />
Dennis</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jerobiko</title>
		<link>http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/comment-page-1/#comment-291</link>
		<dc:creator>jerobiko</dc:creator>
		<pubDate>Sat, 04 Jul 2009 19:27:43 +0000</pubDate>
		<guid isPermaLink="false">http://keith-hair.com/blog/?p=22#comment-291</guid>
		<description>Thank you! It was quite useful :)</description>
		<content:encoded><![CDATA[<p>Thank you! It was quite useful <img src='http://keith-hair.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: takopus</title>
		<link>http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/comment-page-1/#comment-290</link>
		<dc:creator>takopus</dc:creator>
		<pubDate>Fri, 03 Jul 2009 11:05:59 +0000</pubDate>
		<guid isPermaLink="false">http://keith-hair.com/blog/?p=22#comment-290</guid>
		<description>Thank you!</description>
		<content:encoded><![CDATA[<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Controul &#62; A quick note on line and segment intersection (as3)</title>
		<link>http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/comment-page-1/#comment-217</link>
		<dc:creator>Controul &#62; A quick note on line and segment intersection (as3)</dc:creator>
		<pubDate>Sat, 09 May 2009 18:15:31 +0000</pubDate>
		<guid isPermaLink="false">http://keith-hair.com/blog/?p=22#comment-217</guid>
		<description>[...] intersections that have saved me more than a few hours of headbanging. In particular, his line intersection function is a marvelous paste-and-go solution, and I really feel like posting a small optimisation that [...]</description>
		<content:encoded><![CDATA[<p>[...] intersections that have saved me more than a few hours of headbanging. In particular, his line intersection function is a marvelous paste-and-go solution, and I really feel like posting a small optimisation that [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob McCardle</title>
		<link>http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/comment-page-1/#comment-215</link>
		<dc:creator>Rob McCardle</dc:creator>
		<pubDate>Fri, 08 May 2009 16:29:55 +0000</pubDate>
		<guid isPermaLink="false">http://keith-hair.com/blog/?p=22#comment-215</guid>
		<description>This was really useful, thanks a million</description>
		<content:encoded><![CDATA[<p>This was really useful, thanks a million</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Boyd</title>
		<link>http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/comment-page-1/#comment-198</link>
		<dc:creator>Robert Boyd</dc:creator>
		<pubDate>Thu, 09 Apr 2009 05:47:04 +0000</pubDate>
		<guid isPermaLink="false">http://keith-hair.com/blog/?p=22#comment-198</guid>
		<description>Thanks a million.</description>
		<content:encoded><![CDATA[<p>Thanks a million.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HIDIHO! &#187; concave shape triangulation: ear cutting algorithm</title>
		<link>http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/comment-page-1/#comment-189</link>
		<dc:creator>HIDIHO! &#187; concave shape triangulation: ear cutting algorithm</dc:creator>
		<pubDate>Thu, 05 Mar 2009 12:44:50 +0000</pubDate>
		<guid isPermaLink="false">http://keith-hair.com/blog/?p=22#comment-189</guid>
		<description>[...] the way:  the segment intersection function comes from Keith Hair&#8217;s blog (pretty nice job  ): http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/ I think something can be done to accelerate the &#8216;as_seg&#8217; section [...]</description>
		<content:encoded><![CDATA[<p>[...] the way:  the segment intersection function comes from Keith Hair&#8217;s blog (pretty nice job  ): <a href="http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/" rel="nofollow">http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/</a> I think something can be done to accelerate the &#8216;as_seg&#8217; section [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
