Motivated by interpolation problems arising in image analysis, computer vision, shape reconstruction and signal processing, we develop an algorithm to simulate curve straightening flows under which curves in $\rn$ of fixed length and prescribed boundary conditions to first order evolve to {\em elasticae}, i.e., to (stable) critical points of the elastic energy $E$ given by the integral of the square of the curvature function. We also consider variations in which the length $L$ is allowed to vary and the flows seek to minimize the scale-invariant elastic energy $E_{inv}$, or the free elastic energy $E_\lambda$. $E_{inv}$ is given by the product of $L$ and the elastic energy $E$, and $E_\lambda$ is the energy functional obtained by adding a term $\lambda$-proportional to the length of the curve to $E$. Details of the implementations, experimental results, and applications to edge completion problems are also discussed.