I don't have the data you show for those curves. However, an orthogonal projection of a point onto a curve in space is not that difficult. Well, it is possible to do, at least. ;-)
The point is that an orthogonal projection for a point onto a curve merely requires finding the point on said curve that lies at a minimal distance. To project one curve onto another is merely the act of doing the above many times. In fact, I've posted a simple utility on the file exchange which does exactly that for you. It will take me more time to create some data for this, than it will to show how to use the utility though. Oh well.
So, first a couple of curves. Lets see, I'll just create two elliptical arcs in the plane.
t1 = linspace(-.5,2,30)';
xy1 = [cos(t1),sin(t1)]*[-1 2;-2 1] + [.3 .3];
t2 = linspace(0.75,2.75,100)';
xy2 = [cos(t2),sin(t2)]*.6 + [-1 1.6];
Yes, easier to hack up some data than it is to actually find that black body curve online, and I'm just too lazy to think today.
Now, for any point on the red line, I'll project it onto the curve in black. The orthogonal line of projection will be in blue here.
[xyproj,distance] = distance2curve(xy1,xy2,'spline');
As you can see, there can easily be a discontinuous jump for that projection, but what can you expect given two nonlinear arcs? I doubt you care to know what the distance for that projection was, but the second output argument tells you that information.
A spline interpolant was used for the black curve, so I solve the equations to find the actual minimal distance to a curved arc of a spline in the code. Not that difficult, but you need to understand splines.
Find distance2curve on the file exchange for free download, here: