Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: circle intersections...
Replies: 26   Last Post: Sep 1, 2013 10:49 PM

 Messages: [ Previous | Next ]
 Chris M. Thomasson Posts: 191 Registered: 8/29/13
Re: circle intersections...
Posted: Aug 29, 2013 7:07 PM

[cross-posted to {alt.math, sci.math}]

"Chris M. Thomasson" wrote in message
news:kvoe76\$155\$2@speranza.aioe.org...

I was wondering where I could find some programming
methods of clever circle intersection algorithms that use
a single square root operation. So far, all of the examples
I can find use more than one sqrt. Therefore, I have come
up with the following formula:

Solve[G=A-O,H=B-P,Q=-2*A^2+4*A*O-2*B^2+4*B*P-2*O^2-2*P^2,
J=sqrt[((-(C^2-F^2+G^2+H^2)^2)/(4*G^2+4*H^2)+C^2)/(G^2+H^2)],
K=(-G)*(F^2-C^2)/Q+A/2+O/2,L=(-H)*(F^2-C^2)/Q+B/2+P/2,M=K-H*J,
R=G*J+L, {G,H,Q,J,K,L,M,R}]

That discovers intersection(s) for circles c0(A, B, C) and c1(O, P, F)
where A, B, C, O, P and F are the respective x, y center and
radius components of circles c0 and c1. A point of intersection
is contained in M and R, which represent its x, y coordinates.

Here is a solve command for a concrete example:

Solve[A=200,B=500,C=200,O=300,P=500,F=200,G=A-O,H=B-P,
Q=-2*A^2+4*A*O-2*B^2+4*B*P-2*O^2-2*P^2,
J=sqrt[((-(C^2-F^2+G^2+H^2)^2)/(4*G^2+4*H^2)+C^2)/(G^2+H^2)],
K=(-G)*(F^2-C^2)/Q+A/2+O/2,L=(-H)*(F^2-C^2)/Q+B/2+P/2,
M=K-H*J,R=G*J+L, {A,B,C,O,P,F,G,H,Q,J,K,L,M,R}]

These examples work with Mathics Online (just copy and paste
them):

http://www.mathics.net

They should also work with Mathematica.

Anyway, I was wondering if somebody could help me find any
references to existing formulas that are equal to or better
than this one.

Also, I am looking for clever approximation techniques for
lengths of right triangles. Something like:

This is all for a fractal I created based on circle intersections; here

I think I could run the approximation throughout the iteration of
the fractal, then episodically run an actual sqrt in order and/or
correct a set of error levels in a set of heuristics.

I have implemented the formula and put it online here:

http://webpages.charter.net/appcore/fractal/ttr/circle_isect

Thanks.