Background: I'm a Robotics Engineer and I am trying to develop a more flexible, modular, and robust program for our welding robots, which will minimize teaching time for new robots and also minimize the amount of damage team members can do if the mess up reprogramming a path. The robots I am working on need to weld along a changing curved path in 3D space. I have found several helpful answers on here but I am having a little trouble tying them together.
Problem: For the current portion of the program, I need to take three points in 3D space, and calculate the center of curvature. I plan to use this to parse up a path into regular segments, and then describe those regular segments as either circular arcs or straight lines in the same 3D space. For now, I need to find the center of the arc through the three points. I have found the equations to do this in 2D space, and they are pretty simple. However, I was never very good with matrix algebra and that is a BIG part of moving into the 3D space. Any hep on this project would be appreciated!
Hint:
Let's call your three points $a$, $b$, and $c$.
Let's call the center of the circle $p$.
First, let's assume that $a$, $b$, and $c$ are NOT the same line, 'co-linear'. That needs to be handled separately because $p$ cannot be not defined in that case.
We know that $p$ is equidistant from $a$, $b$, and $c$ - because that's the defining property of a circle.
So, we can use that. We just need to know the formula for distance in 3D:
$$\text{distance} = \sqrt{d_x^2 + d_y^2 + d_z^2}$$
So, let's plug it in for one of the distances, from $a$ to $p$:
$$\text{distance}_{ap} = \sqrt{(p_x-a_x)^2 + (p_y-a_y)^2 + (p_z-a_z)^2}$$
Can you plug it in for $p_b$ and $p_c$, then set the distances equal, and solve it? If you can't solve it by hand, you can plug it into a computer algebra solver like Wolfram Alpha.