in reply to Clockwise or Counter-clockwise
Two points could be (X1,Y1) and (X2,Y2). There are a *lot* of possible circles that can go through these two points. You need some more information.
Doing geometry with numbers is called "Computational Geometry". It is a challenging but fun kind of programming and is often the source of many bugs in ordinary applications. For example, say you decide to use a third point to help define your circle and compute a radius. If all the points lie on a straight line, the radius will be infinite. So you will need some extra code to check for this.
Since so many problems are often found in geometric code, many people strive to use only the most well-tested algorithms. Even then, lots of testing is required, and many times problems will be found later.
To evaluate clockwise and counter-clockwise, take a look at the atan2 function.
It should work perfectly the first time! - toma
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Clockwise or Counter-clockwise
by BrowserUk (Patriarch) on Feb 19, 2003 at 06:27 UTC | |
by mojotoad (Monsignor) on Feb 19, 2003 at 18:46 UTC |