Real algebraic varieties with prescribed tangent cones