Realtime image approximation using geometric primitives