Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Rui Maciel Newsgroups: alt.comp.programming,alt.games.programming,comp.programming Subject: Re: Calculating coordinate intersections? Followup-To: comp.programming Date: Thu, 21 Mar 2013 21:40:59 +0000 Organization: A noiseless patient Spider Lines: 16 Message-ID: References: <0001HW.CD6E31F4003565A0B04999BF@news.eternal-september.org> <969b668e-4ae1-4641-ba15-ac80e793a57f@y2g2000pbg.googlegroups.com> Reply-To: rui.maciel@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit Injection-Date: Thu, 21 Mar 2013 21:39:03 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="f9db22b05a10709939588f9f492c811f"; logging-data="10588"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19XfMaF/aGHcbVgEXhv1WvNjxzzCKRdXFg=" User-Agent: KNode/4.8.5 Cancel-Lock: sha1:gNrSvwhkOsNLbd90Eg8Mo8EmFS0= Xref: csiph.com comp.programming:3182 James Dow Allen wrote: > Some of the answers make this over-complicated. “Make things as simple as possible, but not simpler.” > Calculate the angle to the target. > Calculate the angle the gun is fired. > Subtract to get the angular error. Your suggestion is simpler, but has the downside of failing to actually work. Think about it for a moment, particularly the relation between the radius, the angle, and the tangent function. Rui Maciel