| In recent years, 3D graphics simulation technic has beeing widely used in many fields, such as city planning, engineering design, medical science, education and so on. In the field of industrial control, 3D simulation technic simulates industrial control procedure, which could make debug and demonstration more easy. We research the LED lighting scene simulation technic based on OpenGL, used Visual C++6.0 as platform.Firstly , some 3D simulation technics were discussed. Based on the theory of 3D modeling and the characteristic of the system, Geometry-based modeling and rendering scheme was choosed to create the lighting scene and lamps models with the 3D modeling software of 3DMAX. Then some 3D graphics file formats were analysed. As 3ds format is popular and easy to get datum, it is choosed. C++ program was used to get datum from 3ds files, opengl was used to rending. The system simulated 256 kinds of lighting color with 5 kinds of variance model, static, gradual change, gradual bright , gradual dark, flicker.For realized interacting with lamps in 3D scene, some kinds of 3D picking technic was studied and compared. Thingking of the special characteristic of the system, the 3D picking method based on reading opengl depth-buffering was choosed to complete interaction. For the purpose of mading 3D divagation process more realistic, some collision-detection algorithms, for example space division method and bounding volumn boxes method, were introduced and compared. Then associating the actual demand of the system, we builded bounding sphere for every objects in the scene. We organized the bounding sphere by octree. The domain of the system's collision-detection was limited by passed through the octree.The simulating LED light control system based on opengl made lighting control result could demonstrate at computer without LED light and control components. So edit lighting scene until you satisfied, then form control date to control LED light, that made control process more easy and more visual. 3D scene also was simulated, so user can install lamps and demostrate in the scene. |