Spectrometer virtual experiment platform construction method based on Cinema 4D and unreal engine
By constructing a spectrometer virtual experiment platform based on Cinema 4D and Unreal Engine, the problems of low simulation and poor operability in spectrometer experimental teaching were solved, realizing highly realistic virtual experiments and improving students' operational ability and experimental results.
Patent Information
- Application Number
- CN202511887737.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-15
- Publication Date
- 2026-03-17
AI Technical Summary
In spectrometer experiment teaching, there are problems such as the difficulty of offline experiment preparation, low simulation of teaching resources, poor sense of operation, and difficulty in cultivating students' experimental operation ability.
A virtual experiment platform for spectrometers based on Cinema 4D and Unreal Engine was constructed. Through refined 3D modeling and interactive operation, virtual experiments of the spectrometer were realized, including the construction of model relationships such as spectrometer adjustment, prism refractive index measurement, and grating diffraction.
It improves the simulation and operability, allowing students to freely observe and operate the instruments, effectively training their reading skills. The simulation is highly accurate and conforms to real experimental phenomena, realizing virtual experiments based on scientific principles.
Smart Images

Figure CN121683264A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of virtual simulation technology, specifically to a method for constructing a spectrometer virtual experimental platform based on Cinema 4D and Unreal Engine. Background Technology
[0002] A spectrometer, also known as an optical goniometer, is a commonly used high-precision optical instrument in university physics experiments. It is one of the important instruments in physics experiments, often used to measure the refractive index of materials, the wavelength of light, and to perform spectral observations. Compared with other physics experimental instruments, the spectrometer has more adjustment components and is more complex to operate, making it difficult for students to master its adjustment methods in a short time. Therefore, the adjustment of the spectrometer has always been a difficult point in optical experiments in university physics. Our research has found the following problems in the current teaching of spectrometer experiments: 1. Students face difficulties in preparing for offline experiments, resulting in poor experimental teaching effectiveness.
[0003] 2. Existing teaching resources have low simulation accuracy and lack vividness and intuitiveness.
[0004] 3. Existing simulation software has a low level of user-friendliness, making it difficult to cultivate students' experimental operation skills.
[0005] Therefore, the present invention provides a spectrometer virtual experimental platform and implementation method based on free-viewpoint fully interactive operation. Summary of the Invention
[0006] The purpose of this invention is to address the shortcomings of existing technologies by providing a method for constructing a spectrometer virtual experimental platform based on Cinema 4D and Unreal Engine.
[0007] The technical solution of this invention to solve the above problems is: a method for constructing a spectrometer virtual experimental platform based on Cinema 4D and Unreal Engine, specifically including the following steps: S1. Experimental Equipment Modeling: Using Cinema 4D, virtual models of various instruments required for the experiment are built according to their actual size. The virtual instrument models mainly include: spectrometer, optical components, power supply, mercury lamp, and virtual experimental environment. Optical components include double-sided mirrors, prisms, and gratings. S2. Building a virtual experimental platform: Using the visual blueprints of Unreal Engine software to complete the construction of the imaging calculation model and the light propagation model; S3. Constructing Model Relationships: Constructing model relationships for spectrometer adjustment, prism refractive index measurement, and grating diffraction.
[0008] Furthermore, the spectrometer in S1 includes a slit module, a collimator, a telescope, a stage, and a base. The telescope is connected to one side of the base via a first arm, and the collimator is connected to the other side of the base via a second arm. The stage is located at the center of the base. The outer end of the telescope is connected to an eyepiece, and the outer end of the collimator is connected to a slit device. The collimator is fixed to the base and cannot rotate, while the telescope and the stage can rotate around the central axis of the spectrometer. A vernier scale is provided on the base, and the vernier scale is coaxially arranged with the stage.
[0009] Furthermore, the specific method for constructing the model relationship for spectrometer adjustment in S3 is as follows: Once the spectrometer is properly adjusted, the collimator can emit parallel light, which, after passing through the optical elements on the stage, is received by the telescope and converges onto the reticle inside the telescope; the following conditions must be met: ① The optical axes of the telescope and the collimator are perpendicular to the central axis of the spectrometer; ② The collimator can emit parallel light, which, after passing through the optical elements on the stage, can be received by the telescope.
[0010] Furthermore, the specific method for constructing the measurement model relationship for the refractive index of a prism in S3 is as follows: Based on the experimental principle of measuring the refractive index of a prism using the minimum deflection angle method, the deflection angle produced along the exit direction after the light ray undergoes two refractions by the prism under test is: When the incident and outgoing rays are symmetrical in their optical paths, that is... When the deflection angle is smallest, it is denoted as . It can be proven that the refractive index n of a prism is related to the prism's apex angle. A Minimum deviation angle The following relationship exists: (1) Therefore, as long as it is measured A and The refractive index can then be obtained from equation (1). By measuring the apex angle of the prism and the minimum angle of deflection of the light rays, the refractive index of the prism can be calculated.
[0011] Furthermore, the specific method for constructing the measurement model relationship for grating diffraction in S3 is as follows: A transmission grating is known to be made by etching a large number of parallel, equally wide, and equally spaced grooves on an optical glass plate. Let the width of the light-transmitting slit be *a*, and the width of the opaque portion be *b*. Then, (a+b) = d is called the grating constant of the transmission grating. When a wavelength is... When parallel light rays strike a transmission grating perpendicularly, the light rays passing through each slit will diffract in all directions. After being converged by a lens, they interfere with each other, forming a series of bright fringes at varying intervals, separated by fairly wide dark areas, on the focal plane of the lens. According to the grating diffraction theory, the positions of the bright fringes in the diffraction spectrum are determined by the following formula: (2) In the formula, The wavelength of the incident light; The order of the bright fringes (i.e., spectral lines); for The diffraction angle of the bright fringes; Let be the grating constant; Equation (2) is called the grating equation; The grating equation (2) is obtained under the condition that the incident light is perpendicular to the grating surface; if the angle between the incident light and the normal to the grating is... When the grating equation is , then the grating equation is: (3) In the formula, "+" indicates that the incident light and the diffracted light are on the same side of the grating normal; "" indicates that the incident light and the diffracted light are on opposite sides of the grating normal; If the light incident perpendicularly onto the grating is not monochromatic light, but polychromatic light composed of several different wavelengths, then according to equation (2), when At that time, the diffraction angle of light of any wavelength When all are 0, that is, at the center, spectral lines of various wavelengths overlap, appearing as bright polychromatic spectral lines; when At that time, due to the different wavelengths of light, the diffraction angles of each diffraction angle within the same order of the spectrum will differ. They are also different, so the polychromatic light is decomposed into monochromatic light, which is symmetrically distributed on both sides of the central bright stripe. Level spectral Each level of stripe is arranged in order of wavelength to form a set of colored stripes; Based on the actual experimental setup of the spectrometer, the grating constant was measured to be... Then, through simulation using Unreal Engine, the grating constant can be measured using a virtual experimental platform.
[0012] The present invention has the following beneficial effects: It offers high freedom of movement; students can freely observe the instrument from any angle, mastering the structural features and details of its components; it provides a strong sense of operation; based on actual experimental operations and readings, it achieves full interaction of components, effectively training reading skills; it allows students to operate all components of the virtual experimental platform as if operating a real instrument, offering high operational flexibility and closely resembling reality; it boasts high simulation fidelity; the virtual experiment is designed based on scientifically accurate physical principles, and the spectrometer is meticulously and modularly modeled using Cinema 4D, achieving precise reproduction of the spectrometer; based on the calculation model, the imaging coordinates are derived, achieving real-time calculation output of experimental phenomena, and conforming to real experimental phenomena. Attached Figure Description
[0013] Figure 1 This is a schematic diagram of the spectrometer. Figure 2 The optical path diagram for leveling the spectrometer; Figure 3 This is a front view of the virtual experimental platform. Figure 4 This is a top view of the virtual experimental platform; In the diagram: 1-slit module, 2-column tube, 3-telescope, 4-stage, 5-base, 6-first arm, 7-second arm, 8-eyepiece, 9-reticle, 10-vernier. Detailed Implementation
[0014] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0015] As shown in the figure, a method for constructing a spectrometer virtual experimental platform based on Cinema 4D and Unreal Engine includes the following steps: S1. Experimental Equipment Modeling: Using Cinema 4D, virtual models of various instruments required for the experiment are built according to their actual size. The virtual instrument models mainly include: spectrometer, optical components, power supply, mercury lamp, and virtual experimental environment. Optical components include double-sided mirrors, prisms, and gratings. S2. Building a Virtual Experimental Platform: Using the visual blueprints of Unreal Engine software, the imaging calculation model and the ray propagation model are constructed. These models form the core of the virtual experimental platform's blueprint calculations. The virtual experimental platform provides users with different observation perspectives, adjustment and evaluation functions, data recording, and user instructions for experimental training and mastering the experimental principles related to spectrometers. S3. Constructing Model Relationships: Constructing model relationships for spectrometer adjustment, prism refractive index measurement, and grating diffraction.
[0016] The spectrometer S1 includes a slit module, a collimator, a telescope, a stage, and a base. The telescope is connected to one side of the base via a first arm, and the collimator is connected to the other side of the base via a second arm. The stage is located at the center of the base. An eyepiece is connected to the outer end of the telescope, and a slit device is connected to the outer end of the collimator. The collimator is fixed to the base and cannot rotate, while the telescope and stage can rotate around the central axis of the spectrometer. A vernier scale is provided on the base, and the vernier scale is coaxially arranged with the stage.
[0017] The specific method for constructing the model relationship for spectrometer adjustment in S3 is as follows: Once the spectrometer is properly adjusted, the collimator emits parallel light, which, after passing through the optical elements on the stage, is received by the telescope and converges onto the reticle inside the telescope. This requires the following conditions to be met: ① The optical axes of the telescope and the collimator are perpendicular to the central axis of the spectrometer; ② The collimator emits parallel light, which, after passing through the optical elements on the stage, is received by the telescope. The specific method for constructing the measurement model relationship for the refractive index of a prism is as follows: Based on the experimental principle of measuring the refractive index of a prism using the minimum deflection angle method, the deflection angle produced along the exit direction after the light ray undergoes two refractions by the prism under test is: When the incident and outgoing rays are symmetrical in their optical paths, that is... When the deflection angle is smallest, it is denoted as . It can be proven that the refractive index n of a prism is related to the prism's apex angle. A Minimum deviation angle The following relationship exists: (1) Therefore, as long as it is measured A and The refractive index can then be obtained from equation (1). By measuring the apex angle of the prism and the minimum angle of deflection of the light rays, the refractive index of the prism can be calculated.
[0018] The specific method for constructing the measurement model relationship for grating diffraction is as follows: A transmission grating is known to be made by etching a large number of parallel, equally wide, and equally spaced grooves on an optical glass plate. Let the width of the light-transmitting slit be *a*, and the width of the opaque portion be *b*. Then, (a+b) = d is called the grating constant of the transmission grating. When a wavelength is... When parallel light rays strike a transmission grating perpendicularly, the light rays passing through each slit will diffract in all directions. After being converged by a lens, they interfere with each other, forming a series of bright fringes at varying intervals, separated by fairly wide dark areas, on the focal plane of the lens. According to the theory of grating diffraction, the positions of the bright fringes in the diffraction spectrum are determined by the following formula: (2) In the formula, The wavelength of the incident light; The order of the bright fringes (i.e., spectral lines); for The diffraction angle of the bright fringes; Let be the grating constant. Equation (2) is called the grating equation.
[0019] The grating equation (2) is obtained under the condition that the incident light is perpendicular to the grating surface. If the angle between the incident light and the normal to the grating is... When, the grating equation is (3) In the formula, "+" indicates that the incident light and the diffracted light are on the same side of the grating normal; "" indicates that the incident light and the diffracted light are on opposite sides of the grating normal.
[0020] If the light incident perpendicularly onto the grating is not monochromatic light, but polychromatic light composed of several different wavelengths, then according to equation (2), when At that time, the diffraction angle of light of any wavelength When all are 0, that is, at the center, spectral lines of various wavelengths overlap, appearing as bright polychromatic spectral lines; when At that time, due to the different wavelengths of light, the diffraction angles of each diffraction angle within the same order of the spectrum will differ. They are also different, so the polychromatic light is decomposed into monochromatic light, which is symmetrically distributed on both sides of the central bright stripe. Level spectral Each level of stripe is arranged in order of wavelength to form a set of colored stripes.
[0021] Based on the actual experimental setup of the spectrometer, we measured the grating constant to be: Then, simulations were performed using Unreal Engine, enabling the measurement of the grating constant using a virtual experimental platform.
[0022] In one implementation, a simulation experiment is conducted on the constructed spectrometer virtual experimental platform, the experimental data is processed, and the experimental results of the real experiment and the simulation experiment are compared and analyzed to verify the accuracy of the spectrometer virtual experimental platform.
[0023] S401. Conduct a simulated spectrometer adjustment experiment: Open the platform and enter the virtual laboratory. Level the spectrometer so that it meets the following requirements: ① The optical axes of the telescope and collimator are perpendicular to the central axis of the spectrometer; ② The collimator can emit parallel light, which can be received by the telescope after passing through the optical elements on the stage.
[0024] S402. Conduct a real prism refractive index measurement experiment: (1) Adjust the spectrometer to the working state; (2) Place the prism on the stage, with its vertex A close to the center of the stage, and its three sides perpendicular to the lines connecting the three leveling screws under the stage.
[0025] (3) Rotate the telescope and observe the slit image reflected by prism A through the eyepiece, with the slit image located on the central vertical line of the crosshairs. Record the readings of the left vernier on the vernier scale at this time. and right vernier reading ; (4) Rotate the telescope again to observe surface B of the prism. When the image of the slit is located on the central vertical line of the crosshairs, record the reading of the left vernier on the vernier scale at this time. and right vernier reading .
[0026] (5) Calculate the vertex angle and substitute the data into the formula: (4) The apex angle of the prism can then be calculated. Repeat the measurement 3-5 times and calculate the average value of the apex angle A.
[0027] (6) Place the sodium lamp in front of the collimator, rotate the stage so that the light enters from one optical surface (AC surface) of the prism, and use your eye to find the image of the slit in the direction of the outgoing light (AB surface). Slowly rotate the stage (i.e. change the incident angle) and observe the direction of movement of the slit image. You will find that the deflection angle first decreases and then increases. The critical position where the slit image is about to move in the opposite direction is the position of the minimum deflection angle.
[0028] (7) Fix the stage, then rotate the telescope so that the green spectral line is on the center vertical line of the eyepiece aperture, and record the reading of the left vernier on the vernier scale at this time. and right vernier reading .
[0029] (8) Remove the prism, rotate the telescope to align it with the collimator, then fine-tune the telescope so that the central crosshair on the reticle is aligned with the slit image on the collimator. Record the reading on the left vernier scale at this time. and right vernier reading .
[0030] (9) Substitute the data from the data recording paper into the formula: (5) The minimum deviation angle is obtained by performing calculations.
[0031] (10) The apex angle of the prism measured above and minimum deviation angle Substitute into the formula (1) Calculate the refractive index of the prism for the green spectral lines of the mercury lamp. .
[0032] (11) Experimental data processing: The actual experimental results are shown in Table 1 and Table 2.
[0033]
[0034] (12) The final measurement result of the refractive index of the prism for green light is as follows: The uncertainty can be denoted as: .
[0035] S403. Conduct a simulated prism refractive index measurement experiment: (1) Adjust the spectrometer to the working state; (2) After the spectrometer is adjusted, we click the "prism" button, place the prism, and rotate the prism to align the apex of the prism to be measured with the optical axis of the collimator. (3) To determine the apex angle of the prism, rotate the telescope and observe the slit image reflected from face A of the prism in the eyepiece, with the slit image located on the central vertical line of the crosshairs. Record the readings of the left vernier on the vernier scale at this time. and right vernier reading ; (4) Rotate the telescope again to observe surface B of the prism. When the image of the slit is located on the central vertical line of the crosshairs, record the reading of the left vernier on the vernier scale at this time. and right vernier reading Enter the measured data into the data record table and substitute it into the formula: (4) The apex angle of the prism can then be calculated.
[0036] (5) Rotate the prism to the position shown in the figure, and rotate the telescope to find the refracted spectral lines until you can see the green spectral line to be measured in the telescope.
[0037] (6) Slightly rotate the stage left and right. The green spectral line will move to the left or right. The telescope should track the rotation of the spectral line until the spectral line begins to move in the opposite direction when the stage continues to rotate. The turning point of this reverse movement is the direction in which the light is emitted with the minimum deviation angle.
[0038] (7) Fix the stage, then rotate the telescope so that the green spectral line is on the center vertical line of the eyepiece aperture, and record the reading of the left vernier on the vernier scale at this time. and right vernier reading .
[0039] (8) Remove the prism, rotate the telescope to align it with the collimator, then fine-tune the telescope so that the central crosshair on the reticle is aligned with the slit image on the collimator. Record the reading on the left vernier scale at this time. and right vernier reading .
[0040] (9) Substitute the data from the data recording paper into the formula: (5) The minimum deviation angle is obtained by performing calculations.
[0041] (10) The apex angle of the prism measured above and minimum deviation angle Substitute into the formula (1) Calculate the refractive index of the prism for the green spectral lines of the mercury lamp. .
[0042] (11) Experimental data processing: The simulation experimental data results are shown in Tables 3 and 4.
[0043]
[0044] (12) The final measurement result of the refractive index of the prism for green light is as follows: The uncertainty can be denoted as: The results meet the accuracy requirements of the experiment. Multiple comparisons of the relative errors between the actual and simulation results show that the relative error of the simulation results is significantly smaller than that of the actual experiment, which indirectly demonstrates the accuracy of the simulation experiment.
[0045] From the above practical operation, the following conclusions can be drawn: This simulation experimental platform allows operators to change parameters and visually output simulation results. In real experiments, spectrometers have many control components and are complex to operate, making related experiments a persistent challenge in university physics experiments. When students study independently before class, paper textbooks are no longer sufficient to satisfy their curiosity, resulting in poor pre-study effectiveness. In experimental teaching, teachers typically demonstrate using actual instruments, but due to students' limited perspectives, the actual teaching effect is not ideal. This spectrometer virtual experimental platform, however, completes the construction of a virtual instrument based on the real instrument. The details of the virtual instrument construction are highly matched to the real instrument. It supports fully interactive operation based on a free-viewpoint. Users can freely change their observation perspective to operate the instrument, or choose a fixed perspective for fine observation and adjustment. The platform provides real-time adjustment evaluation based on instrument status, allowing evaluation of whether the spectrometer has been adjusted to a standard state based on the current component status parameters. The platform realizes the output of experimental phenomena based on computational models, generating phenomena consistent with the spectrometer imaging principle in real time through numerical calculations. The platform provides simulation experiment projects based on teaching needs. Currently, the spectrometer virtual experiment platform can carry out simulation experiments such as spectrometer adjustment, prism refractive index measurement, and grating diffraction.
[0046] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments for application in other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A spectrometer virtual experiment platform construction method based on Cinema 4D and Unreal Engine, characterized by: Specifically comprising the following steps: S1, experimental equipment modeling: using Cinema 4D, according to the real size of the various instruments required for the experiment to build virtual models, instrument virtual model mainly includes: spectrometer, optical elements, power, mercury lamp and virtual experimental environment, optical elements include double mirror, prism, grating; S2, build a virtual experiment platform: using the visual blueprint of Unreal Engine software to complete the construction of imaging calculation model and light propagation model; S3, build model relationship: for the adjustment of spectrometer, measurement of prism refractive index and grating diffraction, the construction of model relationship.
2. The method according to claim 1, wherein the method is based on Cinema 4D and Unreal Engine. The spectrometer in S1 includes slit module, collimator, telescope, stage, base, the telescope is connected to one side of the base through the first arm, the collimator is connected to the other side of the base through the second arm, the stage is arranged at the center of the base, the outer end of the telescope is connected to the eyepiece, and the outer end of the collimator is connected to the slit device; The collimator is fixed on the base and cannot rotate, while the telescope and the stage can rotate around the central axis of the spectrometer; The base is provided with a vernier scale, and the vernier scale is coaxially arranged with the stage.
3. The method according to claim 1, wherein the method is based on Cinema 4D and Unreal Engine. The model relationship construction method for the adjustment of spectrometer in S3 is specifically: After the spectrometer is adjusted, the collimator can emit parallel light, which is received by the telescope after passing through the optical elements on the stage, and is converged on the graticule in the telescope; The following conditions are met: ① the optical axis of the telescope and the collimator is perpendicular to the central axis of the spectrometer; ② the collimator can emit parallel light, which is received by the telescope after passing through the optical elements on the stage.
4. The method according to claim 1, wherein the method is based on Cinema 4D and Unreal Engine. The model relationship construction method for measuring the refractive index of the prism in S3 is specifically: According to the experimental principle of measuring the refractive index of a triangular prism by using the minimum deviation angle method, the deviation angle produced along the exit direction after the light is refracted twice by the triangular prism to be measured is When the incident light and the exit light are in the light path symmetry, that is , the deviation angle is minimum, denoted as It can be proved that the refractive index n of the triangular prism and the top angle A of the triangular prism and the minimum deviation angle have the following relationship: (1) Therefore, as long as the minimum deviation angle is measured A and the refractive index of the prism can be calculated from the formula (1) the apex angle of the prism and the minimum deviation angle of the light are measured, and thus the refractive index of the prism can be calculated.
5. The method according to claim 1, wherein the method is based on Cinema 4D and Unreal Engine. The model relationship construction method for measuring the diffraction of grating in S3 is specifically: It is known that a transmission grating is made by engraving a large number of parallel, equal-width, and equal-interval scratches on an optical glass sheet. The width of the light-transmitting slit is a, and the width of the light-non-transmitting part is b. Then, (a+b)=d is called the grating constant of the transmission grating. When parallel light with a wavelength of is vertically irradiated onto the transmission grating, the light transmitted through each slit will be diffracted in various directions. After converging through a lens, the light will interfere with each other and form a series of bright fringes separated by relatively wide dark regions and having different intervals on the focal plane of the lens. According to the grating diffraction theory, the position of the bright fringes in the diffraction spectrum is determined by the following formula: (2) wherein is the wavelength of the incident light; is the order of the bright fringe (i.e., the spectral line); is is the diffraction angle of the order bright fringe; is the grating constant; equation (2) is called the grating equation; The grating equation (2) is obtained under the condition that the incident light is perpendicular to the grating surface; if the angle between the incident light and the normal of the grating is then the grating equation is: (3) where "+" indicates that the incident light and the diffracted light are on the same side of the grating normal; " indicates that the incident light and the diffracted light are on the opposite sides of the grating normal. If the light incident perpendicularly onto the grating is not monochromatic light, but polychromatic light composed of several different wavelengths, then according to equation (2), when At that time, the diffraction angle of light of any wavelength When all are 0, that is, at the center, spectral lines of various wavelengths overlap, appearing as bright polychromatic spectral lines; when At that time, due to the different wavelengths of light, the diffraction angles of each diffraction angle within the same order of the spectrum will differ. They are also different, so the polychromatic light is decomposed into monochromatic light, which is symmetrically distributed on both sides of the central bright stripe. Level spectral Each level of stripe is arranged in order of wavelength to form a set of colored stripes; According to the real experimental device of the spectrometer, the grating constant is measured as And then, the grating constant is measured by using the virtual experimental platform through the simulation of the unreal engine.