The course Laser Principle and Technology for undergraduates is a multi-physics subject with main contents of laser's basic principle, laser modulation techniques, Q-switching techniques, etc. . In order to help students understand the complex theory and to integrate the theory with the engineering practice, we developed a virtual simulation platform/software. This platform consists of three main modules (laser generation, laser propagation and laser controlling), which can be subdivided into eight secondary modules, including laser output characteristics, laser resonator, laser modulation, frequency conversion, et al. . Each module has its input and output parameters and can be modified by the user. The theoretical models and the algorithms are introduced in this article. The output characteristics of the relaxation oscillation process are presented as an example of the simulation results.