Re: [Algorithms] algorithm for calculating a circle out of three points
Brought to you by:
vexxed72
|
From: Stephen J B. <sj...@li...> - 2002-05-29 12:57:42
|
On Tue, 28 May 2002, Christian Henning wrote: > To be honest I don't want implement an algo. for solving a set of linear > equations. In case there is no other way, how to solve the equations? You don't have to solve the equations in realtime. Do that on paper (or with MathCAD or something) - symbolically - and you'll wind up with four horrible expressions relating the (x,y,z) of the center of the circle plus it's radius to the nine numbers that represent the coordinates of the points. That'll turn into four lines of C code (which you'll then want to optimise to eliminate common sub-expressions, things you've already computed, etc, etc). An algorithm for solving an arbitary set of equations would be relatively nasty - but you don't have an arbitary set - you have a very fixed set. ---- Steve Baker (817)619-2657 (Vox/Vox-Mail) L3Com/Link Simulation & Training (817)619-2466 (Fax) Work: sj...@li... http://www.link.com Home: sjb...@ai... http://www.sjbaker.org |