In this paper, we propose a new variational framework based on distance transform and gradient vector flow, to compute flight paths through tubular and non-tubular structures, for virtual endoscopy. The proposed framework propagates two wave fronts of different speeds from a point source voxel, which belongs to the medial curves of the anatomical structure. The first wave traverses the 3D structure with a moderate speed that is a function of the distance field to extract its topology, while the second wave propagates with a higher speed that is a function of the magnitude of the gradient vector flow to extract the flight paths. The motion of the fronts are governed by a nonlinear partial equation, whose solution is computed efficiently using the higher accuracy fast marching level set method (HAFMM). The framework is robust, fully automatic, and computes flight paths that are centered, connected, thin, and less sensitive to boundary noise. We have validated the robustness of the proposed method both quantitatively and qualitatively against synthetic and clinical datasets.