I'm working on writing a code in Octave (C++) for a helical spring. I need to figure out the center line of this spring in an effort to find any trends between different spring platforms as the geometry changes throughout the manufacturing processes.
I have a file with the center line of the wire, which is made up of 2000 or so points. Since I learned that you need 3 points to make a circle, I'm figuring i will be able to approach it that way (but haven't figured out how) so....
Given 3 points in 3 Dimensional space, how could I find the center and the radius of a circle in a code friendly manor.
Thanks

Find (x,y,z) such that the distance to your three points are equal.
$(x-x_1)^2+ (y-y_1)^2 + (z - z_1)^2 = \\(x-x_2)^2+ (y-y_2)^2 + (z - z_2)^2 = \\(x-x_3)^2+ (y-y_3)^2 + (z - z_3)^2$
Multiply that out and we can turn that into a system of linear equations that should be easy enough to solve.
$2x_1 x + 2 y_1 y + 2 z_1 z = x_1^2 + y_1^2 + z_1^2\\ 2x_2 x + 2 y_2 y + 2 z_2 z = x_2^2 + y_2^2 + z_2^2\\ 2x_3 x + 2 y_3 y + 2 z_3 z = x_3^2 + y_3^2 + z_3^2$
Update
That system of equation determine a single point, that if you traveled nomal to the plane you would intersect at the circumcenter.
Lets call this point, $(x,y,z)$
I was trying to avoid finding the normal line, but here is the normal vector.
$N=(x_2-x_1,y_2-y_1, z_2-z_1)\times(x_3-x_1,y_3-y_1, z_3-z_1)\\ N_x = y_1z_2 - y_1z_3 + y_2z_3 - y_2 z_1 + y_3z_1-y_3z_2\\ N_y = x_1z_3 - x_1z_2 + x_2z_1 - x_2 z_3 + x_3z_2-x_3z_1\\ N_z = x_1y_2 - x_1y_3 + x_2y_3 - x_2 y_1 + x_3y_1-x_3y_2\\ $
Circumcenter = $(x,y,z) - \dfrac {N \cdot (x,y,z) - N\cdot (x_1, y_1,z_1)}{N_x^2+N_y^2+N_z^2} N$