How do I find a Bézier curve that fulfills a given width and height? I am building a software application that works with vector graphics and I need to use Bézier curves to draw a heart shape, like this one here which I created in MS Paint:

The only information given are its width and height, and the requirement is to find the coordinates for each curve so that they touch the boundaries of these dimensions.
 A: What's the degree of the Bézier curve? I take it that each half of the triangle is a separate Bézier segment?
Assuming a cubic Bézier curve, you can read its formula on Wikipedia:
$$B(t) = (1-t)^3P_0 + 3(1-t)^2tP_1 + 3(1-t)t^2P_2 + t^2P_3$$
Important for us is its derivative with respect to $t$, given there as:
$$B'(t) = 3(1-t)^2(P_1-P_0) + 6(1-t)t(P_2-P_1) + 3t^3(P_3-P_2)$$
How can you use that? Well, suppose you want to control the width, by requiring that for some unknown parameter $t$, the $x$ position is equal to $w$ while the $y$ direction is vertical. You write that as
\begin{align*}
(1-t)^3x_0 + 3(1-t)^2tx_1 + 3(1-t)t^2x_2 + t^2x_3 &= w \\
3(1-t)^2(x_1-x_0) + 6(1-t)t(x_2-x_1) + 3t^2(x_3-x_2) &= 0
\end{align*}
You (almost) don't care what parameter $t$ that is, as long as it satisfies both equations simultaneously. The existence of a simultaneous solution of two polynomial equations can be checked using resultants. Doing the computation in this case gives you a polynomial with two factors. One expresses the situation that the line is purely vertical. The other reads like this:
\begin{align*}
w^2 x_0^2 - 6 w^2 x_0 x_1 + 9 w^2 x_1^2 - 4 w x_1^3 + 6 w^2 x_0 x_2 - 18 w^2 x_1 x_2 + 6 w x_0 x_1 x_2 + 6 w x_1^2 x_2 + 9 w^2 x_2^2 - 12 w x_0 x_2^2 + 6 w x_1 x_2^2 - 3 x_1^2 x_2^2 - 4 w x_2^3 + 4 x_0 x_2^3 - 2 w^2 x_0 x_3 - 2 w x_0^2 x_3 + 6 w^2 x_1 x_3 + 6 w x_0 x_1 x_3 - 12 w x_1^2 x_3 + 4 x_1^3 x_3 - 6 w^2 x_2 x_3 + 6 w x_0 x_2 x_3 + 6 w x_1 x_2 x_3 - 6 x_0 x_1 x_2 x_3 + w^2 x_3^2 - 2 w x_0 x_3^2 + x_0^2 x_3^2 = 0
\end{align*}
This is at worst cubic in its variables, though many occur only quadratic. Which means that if you have placed three of your control points, then there are two or three possible choices for the $x$ coordinate of the fourth if you want to satisfy this requirement. You'll still have to check whether the point in question corresponds to some $t\in[0,1]$.
If all you want is some nice pictures, I'd rather try tweaking this manually, or perhaps use some iterative optimization. The above equation isn't well suited for interactive design tools. One easy solution would be splitting the shape into six Bézier segments, with the connecting points in the extremal positions. Then you can easily control the slope at these points using the control points.
