I'm trying to implement the Sakoe & Chiba's global constraint for the Dynamic Time Warping algorithm but I'm stuck with a geometrical problem :
I'm trying to find the value of d given a, b and c.

I think I have to use Pythagore but I miss a value to use it...
For a start, notice that $$c = d\sin\arctan\left(\frac b a \right)$$ So $$d = c \sec\arctan\left(\frac b a \right) = c{\sqrt{1 + \left(\frac b a \right)^2}}$$
Alternatively, if you compare angles, you can see that two of the triangles are similar, so $$\dfrac{d}{c} = \frac{\sqrt{a^2 + b^2}}{a} $$