| |
| | [No title] |
 | | For completeness, here are stable expressions for the circumradius and circumcenter of a triangle, in R^2 and in R^3. |
 | | */ /* */ /*****************************************************************************/ void tricircumcenter(a, b, c, circumcenter, xi, eta) double a[2]; double b[2]; double c[2]; double circumcenter[2]; double *xi; double *eta; { double xba, yba, xca, yca; double balength, calength; double denominator; double xcirca, ycirca; /* Use coordinates relative to point `a' of the triangle. |
 | | */ /* */ /*****************************************************************************/ void tricircumcenter3d(a, b, c, circumcenter, xi, eta) double a[3]; double b[3]; double c[3]; double circumcenter[3]; double *xi; double *eta; { double xba, yba, zba, xca, yca, zca; double balength, calength; double xcrossbc, ycrossbc, zcrossbc; double denominator; double xcirca, ycirca, zcirca; /* Use coordinates relative to point `a' of the triangle. |
| www.ics.uci.edu /~eppstein/junkyard/circumcenter.html (2857 words) |
|