With the rapid development of medical imaging technology, computer graphics and visualization technologies, virtual endoscopy technology emerged. It mainly includes 2D medical image segmentation, 3D image reconstruction, path planning and virtual roaming. However, the path planning of virtual endoscopy has become one of the obstacles in this field due to the high irregularity of the nasopharyngeal anatomy structure. In this study, the nasopharynx including meatus nasi, pharyngeal canal, maxillary sinus, frontal sinus, sphenoid sinus, and ethmoid sinus is segmented and 3D reconstructed using MR images. The key technology of virtual endoscopy center path planning algorithm is implemented based on distance transform. Also, two improved algorithms of center path planning are proposed. One is the selection algorithm of branch path and the other is the extraction algorithm for complex path based on human-computer interaction. These two improved algorithms can not only allow the traditional path planning algorithm to handle multiple branching structure but make roaming path to start at any point. Our experimental results satisfied the needs of clinical practice.