Calculate Spline Tangent

There is one important thing - to calculate spline between two points you must have point locations and point tangents as well, they are input data for spline. Because of that you need a method to get tangent, maybe heuristic. You cant get tangents from alone points, there should be some conditions to get one.
When you add points at runtime you have info about the nearest existing point to it, right? And as I understand you are adding points outside of existing segments.