
Re: circle intersections...
Posted:
Aug 29, 2013 7:07 PM


[crossposted 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=AO,H=BP,Q=2*A^2+4*A*O2*B^2+4*B*P2*O^22*P^2, J=sqrt[(((C^2F^2+G^2+H^2)^2)/(4*G^2+4*H^2)+C^2)/(G^2+H^2)], K=(G)*(F^2C^2)/Q+A/2+O/2,L=(H)*(F^2C^2)/Q+B/2+P/2,M=KH*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=AO,H=BP, Q=2*A^2+4*A*O2*B^2+4*B*P2*O^22*P^2, J=sqrt[(((C^2F^2+G^2+H^2)^2)/(4*G^2+4*H^2)+C^2)/(G^2+H^2)], K=(G)*(F^2C^2)/Q+A/2+O/2,L=(H)*(F^2C^2)/Q+B/2+P/2, M=KH*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:
http://forums.parallax.com/showthread.php/147522Dogleghypotenuseapproximation
This is all for a fractal I created based on circle intersections; here is a link:
https://plus.google.com/101799841244447089430/posts
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.

