I've searched Stack Exchange for this question, but have only found Bezier curves which I don't think is what I'm looking for.
I have a real-world problem where I need to design a system of water-carrying pipes and want to minimize the maximum curvature so as to minimize the likelihood of kinking the pipes.
The problem is the described below. As shown in the picture, I have pipe-1 (red) that reaches point $(x_1,y_1)$ with slope $m_1$ and I need to connect it to pipe-2 (blue) at $(x_2,y_2)$ where the pipe it is connecting to there has a slope $m_2$. The pipe (green curve) that I am trying to fit between these two points has to come in tangent to pipe-1 and pipe-2 at each end. Any chance someone could help me determine the equation for the curve between these two pipes that would minimize the maximum curvature and reduce the chance my pipes are kinked?
Many thanks!


This path respects your constraints, is it acceptable?