A method for generating a verification model by arbitrary order ray tracing
By establishing a standard orthogonal local coordinate system and a local-global spatial mapping for each reflection point, the problem of poor adaptability of complex optical system modeling in existing technologies is solved, realizing efficient and accurate modeling of arbitrary order ray reflection scenarios, which is suitable for rapid design and verification of optical simulation platforms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DONGXIN ELECTROMAGNETIC TECH (CHENGDU) CO LTD
- Filing Date
- 2026-04-15
- Publication Date
- 2026-06-23
Smart Images

Figure CN122021081B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electromagnetic wave processing, and in particular to a method for generating and validating models using arbitrary-order ray tracing. Background Technology
[0002] Current ray tracing modeling and verification of optical reflection systems mainly rely on three types of techniques: fixed-order prefabricated models, universal coordinate system modeling, and simplified mesh generation methods. Fixed-order prefabricated model techniques (such as the TracePro basic module in traditional optical simulation) pre-define fixed model parameters for a finite number of reflection orders. However, the ray reflection order of complex optical systems (such as multi-faceted reflective laser devices) can be flexibly adjusted as needed. Prefabricated models cannot adapt to reflection scenarios of arbitrary orders, resulting in extremely low model reusability. For example, in the design of a multi-order reflection optical antenna, model reconstruction time increased by more than 8 times after order adjustment, significantly reducing design efficiency. Universal coordinate system modeling methods (such as the Zemax global coordinate system modeling algorithm) complete the modeling and calculation of all reflection points through a single global coordinate system. Their adaptability to multi-order reflection points is poor; the matching error between the normal vector and the reflection direction increases exponentially with the order. In a 5th-order reflection scenario, the model's fit to the actual ray trajectory is less than 70%, severely reducing the accuracy of ray tracing verification. Simplified mesh generation methods (such as simplified meshing tools for optical modeling) sacrifice the orthogonality and spatial continuity of the local coordinate system by directly stitching together basic mesh cells. This results in mesh breaks and overlaps in the generated model, making it impossible to accurately represent the local scattering characteristics of reflection points. In optical simulations, the calculation error of the reflection field is ≥12%. The root causes of these defects are: the conflict between the fixed modeling order and the requirement for arbitrary order in the reflection system; the inadequacy of the universal coordinate system's adaptability to the local characteristics of reflection points; and the contradiction between the simplification of mesh generation and the requirement for spatial continuity in the model. Therefore, how to achieve standardized, accurate, and efficient generation of reflection system models for arbitrary order ray reflection scenarios, and solve the problems of poor model adaptability, low accuracy, and insufficient reusability in existing technologies, is an urgent problem to be solved in the field of optical ray tracing and modeling. Summary of the Invention
[0003] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method for generating verification models by ray tracing of arbitrary order, thus solving the deficiencies of the prior art.
[0004] The objective of this invention is achieved through the following technical solution: a method for generating and validating a verification model using arbitrary-order ray tracing, the method comprising:
[0005] Step 1: Input and determine the coordinates of the incident point. The coordinates of the reflection point of the i-th reflection and the coordinates of the exit point of the ray after the most recent reflection. Where i = 1, 2, ..., N;
[0006] Step 2: Calculate the incident direction of the i-th reflection. and reflection direction And calculate the reflection point of the i-th reflection. Normal vector on ;
[0007] Step 3: Establish the local coordinate system for the i-th reflection with the reflection point as the origin;
[0008] Step 4: Generate a model or mesh of the reflection system based on the local coordinate system of the reflection system.
[0009] The incident direction for calculating the i-th reflection is... and reflection direction include:
[0010] Calculation of incident direction vector: based on the reflection point of the i-th reflection. and adjacent reflection points The spatial coordinate relationship is determined by the vector normalization formula. The incident direction unit vector of the i-th reflection is calculated. This is a vector normalization operation;
[0011] Calculation of reflection direction vector: based on the reflection point of the i-th reflection. With the next level of reflection point The spatial coordinate relationship of the exit point is calculated using the vector normalization formula. Obtain the unit vector of the reflection direction for the i-th reflection.
[0012] The reflection point of the i-th reflection is calculated. Normal vector on include:
[0013] Based on the obtained incident direction unit vector and the unit vector of the reflection direction By combining vector interpolation with normalization, and through the formula... The normal unit vector representing the normal direction of the reflecting surface at the reflection point is calculated, and the normal vector is then normalized. A unit vector representing the reflection point. The normal direction of the reflecting surface.
[0014] Step three specifically includes the following:
[0015] Determine the origin of the coordinate system: using the reflection point of the i-th reflection. It serves as the origin of the local coordinate system and as the reference point for local spatial modeling.
[0016] Calculate the horizontal axis unit vector: based on the incident direction unit vector With the normal unit vector The dot product operation is performed using the formula. The x-axis unit vector of the local coordinate system of reflection is calculated, where · represents the dot product of three-dimensional vectors;
[0017] Calculate the vertical axis unit vector: based on the normal unit vector unit vector with horizontal axis The cross product operation is performed using the formula... =norm( The vertical unit vector of the local coordinate system of reflection is calculated, where × is the three-dimensional vector cross product operation, and normalization is performed to ensure that the vertical vector is a unit vector;
[0018] Determine the unit normal vector: The unit normal vector at the reflection point... Through formula Directly used as the unit vector of the normal axis of the local reflection coordinate system ;
[0019] Unit vector on the horizontal axis Vertical axis unit vector Normal axis unit vector Composed of reflection points The standard orthogonal reflection local three-dimensional rectangular coordinate system with the origin as the origin.
[0020] Step four specifically includes the following:
[0021] Define the basic modeling cell: Set the basic modeling cell , These are the normalized coordinates of the basic cell in the local reflection coordinate system;
[0022] Local-Global Space Mapping: By using the mapping transformation formula between the local coordinate system and the global space, the basic modeling cells in the local coordinate system of each reflection point are transformed to the global three-dimensional space, generating local modeling units at each reflection point;
[0023] Local unit stitching and fusion: All local modeling units generated at the reflection points are stitched and fused according to spatial continuity constraints. Let the set of local modeling unit nodes at the i-th reflection point be . The set of nodes in the overall model or mesh of the reflection system is = And satisfy , ε is the spatial continuity threshold set according to the modeling accuracy requirements, and Q and Q′ represent the corresponding sampling points on two different units, respectively.
[0024] Generate the overall model or mesh: based on the stitched and merged global node set. According to the mesh topology rules of optical modeling, generate an overall verification model or mesh of the reflection system that is adapted to any N-order reflection scene, and complete the construction of the arbitrary order ray tracing verification model.
[0025] The present invention has the following advantages:
[0026] 1. Strong Modeling Adaptability and High Accuracy: This invention accurately describes the local propagation and reflection characteristics of rays at different reflection points by establishing a dedicated standard orthogonal local coordinate system for each reflection point. Utilizing standardized vector calculation and coordinate mapping rules, it effectively overcomes the poor adaptability and low fitting degree of traditional fixed-order modeling and general coordinate system modeling in multi-order reflection scenarios, significantly improving the accuracy of the ray tracing verification model. This method can adapt to ray reflection scenarios of any positive integer order, providing high-fidelity model support for the design of various complex optical reflection systems and ray tracing simulations.
[0027] 2. Excellent modeling efficiency and ease of engineering implementation: By breaking down arbitrary-order reflection modeling into standardized steps of coordinate input, vector calculation, coordinate system establishment, and model generation, the complex multi-order reflection modeling problem is transformed into a sequential, locally standardized calculation, significantly reducing modeling complexity and manual design costs. Combined with the scaling and splicing mechanism of basic modeling cells, repetitive modeling work in different-order reflection scenarios is avoided, significantly improving modeling efficiency while ensuring modeling accuracy. This invention features a clear process and standardized logic, making it easy to implement in engineering through programming. It can be quickly integrated into existing optical simulation platforms, supporting large-scale reflection system modeling and ray tracing verification, and is suitable for rapid design and optimization evaluation in engineering practice.
[0028] 3. Standardized Model Generation and Clear Physical Mechanism: Normalized vector operations are used to construct the reflection direction, normal vector, and local coordinate system. Through strict local-global spatial mapping and spatial continuity constraints, the spatial geometric characteristics of ray reflection and the physical structure of the reflection system are fully reproduced. The generated model combines standardization, reproducibility, and transparency of physical meaning. Furthermore, the flexible selection of two-dimensional surface elements and three-dimensional volume elements allows for accurate characterization of the structural characteristics of different types of reflection systems, providing a reliable modeling tool for studying the ray propagation laws and analyzing the scattering characteristics of optical reflection systems.
[0029] 4. High scalability and compatibility with existing optical simulation systems: The framework of this invention is highly open and can be easily integrated into the mesh generation and ray tracing modules of existing optical simulation software (such as TracePro and Zemax). The modeling scale coefficient and spatial continuity threshold can be flexibly adjusted according to actual needs, demonstrating good compatibility and scalability. Its established standardized modeling mechanism for arbitrary-order reflection also lays the foundation for the subsequent introduction of complex reflecting surfaces, multiple scattering, ray attenuation, and other factors, making it adaptable to a wider range of optical engineering simulation and verification scenarios, such as lidar, optical antennas, and multi-faceted reflective laser devices. Attached Figure Description
[0030] Figure 1 This is a schematic diagram of the spatial locations of the entire ray path, including incident, reflection, and exit points.
[0031] Figure 2 A schematic diagram is constructed for the local coordinate system of the i-th reflection point.
[0032] Figure 3 This is a schematic diagram of the propagation and direction decomposition of incident electromagnetic waves in a local coordinate system.
[0033] Figure 4 This diagram illustrates the solution for ray reflection and scattering fields, as well as coordinate transformation. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of this application provided below with reference to the accompanying drawings is not intended to limit the scope of protection of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application. The present invention will be further described below with reference to the accompanying drawings.
[0035] This invention specifically relates to a method for generating verification models using ray tracing of arbitrary order. It addresses the poor adaptability of traditional general coordinate systems by constructing a dedicated standard orthogonal local coordinate system for each reflection point. Standardized vector calculations and normalization operations ensure modeling accuracy. Local-global spatial mapping and continuity constraints enable precise splicing of the reflection system model. Flexible scaling and topology generation of basic modeling cells complete the construction of verification models or meshes for reflection systems of arbitrary order. This effectively achieves standardized, accurate, and efficient generation of ray tracing verification models for N-order arbitrary reflection scenarios. Specifically, it includes the following:
[0036] S1. Input and determine the spatial coordinate parameters of the entire ray reflection link.
[0037] like Figure 1 The image shows the ray originating from the incident point in a global three-dimensional Cartesian coordinate system. Starting from x0, y0, z0, passing through the Nth order reflection point (x i ,y i ,z i (i=1,2,…,N, where N is the order of ray reflection) are reflected sequentially, and finally emerge from the exit point (x N+1 ,y N+1 ,z N+1 The complete three-dimensional spatial propagation path of the ray escaping the reflection system; specifically, obtaining the three-dimensional spatial coordinates of the entire path of ray incidence, reflection, and exit, and determining the coordinates of the incident point. (x0, y0, z0), the coordinates of the reflection point of the i-th reflection. (x i ,y i ,z i (i=1,2,…,N, where N is a positive integer representing the order of ray reflection), and the coordinates of the exit point of the ray escaping the reflection system after the Nth reflection. (x N+1 ,y N+1 ,z N+1 );
[0038] in, The initial spatial position of the ray incident on the reflecting system. Let be the spatial position where the ray is reflected for the i-th time in the reflection system. The final spatial position of the ray after N reflections is the position of the ray leaving the reflection system. All coordinates are coordinate values in the global three-dimensional rectangular coordinate system.
[0039] S2. Calculate the unit vector of the incident direction and the unit vector of the reflection direction for the i-th reflection.
[0040] Based on the full-link spatial coordinates determined by S1, the position of the i-th reflection at the reflection point is calculated respectively. Unit vector of incident direction at point and the unit vector of the reflection direction :
[0041] S201, Calculate the unit vector of the incident direction. :
[0042] ;
[0043] S202, Calculate the unit vector of the reflection direction. :
[0044] ;
[0045] S3. Calculate the i-th reflection point. Normal unit vector at point :
[0046] ;
[0047] S4, with reflection point Establish a standard orthogonal reflection local coordinate system with the origin.
[0048] Furthermore, such as Figure 2 and Figure 3 As shown, the i-th reflection point Assuming the origin of the local coordinate system, construct a system with the horizontal axis as the unit vector. Vertical axis unit vector Normal axis unit vector The standard orthogonal reflection local three-dimensional rectangular coordinate system , Indicates the origin;
[0049] S401, Calculate the unit vector on the horizontal axis. :
[0050] ;
[0051] S402, Calculate the unit vector along the vertical axis. :
[0052] ;
[0053] S403, Determine the unit vector of the normal axis. :
[0054] .
[0055] S5. Define the basic modeling cell and set the key modeling parameters.
[0056] Define the basic modeling cell , ∈ It can be set as a two-dimensional surface element (ζ=0) or a three-dimensional volume element; the modeling scale coefficient can be set. , , And the spatial continuity threshold ε.
[0057] S6. Generate local modeling units through local-global spatial mapping;
[0058] like Figure 4 The diagram shows the core process of solving for ray reflection, scattering field, and coordinate transformation in sequence: First, the ray at the incident point... Incident light, passing through the i-th reflection point Reflection, specify the reflection point Unit vector of incident direction at point unit vector of reflection direction The parameters for the ray reflection stage were calibrated; subsequently, the reflection point was used as the reference point. Origin of the local coordinate system Construct a unit vector along the horizontal axis Normal axis unit vector Standard orthogonal local coordinate system Based on this coordinate system, the definition of the basic modeling cell and the solution of the scattering field are completed, generating the i-th local modeling unit. Finally, all local modeling units at the reflection points are globally stitched and merged according to spatial continuity constraints, satisfying:
[0059] = ,
[0060] , ,
[0061] Where ε is the spatial continuity threshold set according to the modeling accuracy requirements, and Q and Q′ are the corresponding sampling points on two different units, namely the i-th and i+1-th local modeling units, respectively. Any spatial node.
[0062] Based on global node set According to the optical modeling mesh topology rules, generate an overall verification model or mesh of the reflection system that is adapted to any N-order reflection scene, and complete the construction of the arbitrary-order ray tracing verification model.
[0063] The above description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and improvements, and can be altered within the scope of the concept described herein through the above teachings or related technologies or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.
Claims
1. A method of generating a verification model for arbitrary order ray tracing, the method comprising: The method includes: Step one, input and determine the incident point coordinates , the reflection point coordinates of the i-th reflection , and the exit point coordinates after the ray escapes after the last reflection , where i = 1, 2, …, N; Step two, calculate the incident direction of the i-th reflection and the reflection direction and calculate the normal vector on the reflection point of the i-th reflection; Step 3: Establish the local coordinate system for the i-th reflection with the reflection point as the origin; Step 4: Generate a model or mesh of the reflection system based on the local coordinate system of the reflection system; Step four specifically includes the following: Define the basic modeling cell: Set the basic modeling cell , These are the normalized coordinates of the basic cell in the local reflection coordinate system; Local-Global Space Mapping: By using the mapping transformation formula between the local coordinate system and the global space, the basic modeling cells in the local coordinate system of each reflection point are transformed to the global three-dimensional space, generating local modeling units at each reflection point; Local unit stitching and fusion: All local modeling units generated at the reflection points are stitched and fused according to spatial continuity constraints. Let the set of local modeling unit nodes at the i-th reflection point be . The set of nodes in the overall model or mesh of the reflection system is = And satisfy , ε is the spatial continuity threshold set according to the modeling accuracy requirements, and Q and Q′ represent the corresponding sampling points on two different units, respectively. Generate the overall model or mesh: based on the stitched and merged global node set. Based on the mesh topology rules of optical modeling, a global verification model or mesh of the reflection system adapted to any N-order reflection scene is generated, thus completing the construction of an arbitrary-order ray tracing verification model.
2. The method for generating and validating an arbitrary-order ray tracing model according to claim 1, characterized in that: The incident direction for calculating the i-th reflection is... and reflection direction include: Calculation of incident direction vector: based on the reflection point of the i-th reflection. and adjacent reflection points The spatial coordinate relationship is determined by the vector normalization formula. The incident direction unit vector of the i-th reflection is calculated. This is a vector normalization operation; Calculation of reflection direction vector: based on the reflection point of the i-th reflection. With the next level of reflection point The spatial coordinate relationship of the exit point is calculated using the vector normalization formula. Obtain the unit vector of the reflection direction for the i-th reflection.
3. The method for generating and validating an arbitrary-order ray tracing model according to claim 2, characterized in that: The reflection point of the i-th reflection is calculated. Normal vector on include: Based on the obtained incident direction unit vector and the unit vector of the reflection direction By combining vector interpolation with normalization, and through the formula... The normal unit vector representing the normal direction of the reflecting surface at the reflection point is calculated, and the normal vector is then normalized. A unit vector representing the reflection point. The normal direction of the reflecting surface.
4. The method for generating and validating an arbitrary-order ray tracing model according to claim 3, characterized in that: Step three specifically includes the following: Determine the origin of the coordinate system: using the reflection point of the i-th reflection. It serves as the origin of the local coordinate system and as the reference point for local spatial modeling. Calculate the horizontal axis unit vector: based on the incident direction unit vector With the normal unit vector The dot product operation is performed using the formula. The x-axis unit vector of the local coordinate system of reflection is calculated, where · represents the dot product of three-dimensional vectors; Calculate the vertical axis unit vector: based on the normal unit vector unit vector with horizontal axis The cross product operation is performed using the formula... =norm( The vertical unit vector of the local coordinate system of reflection is calculated, where × is the three-dimensional vector cross product operation, and normalization is performed to ensure that the vertical vector is a unit vector; Determine the unit normal vector: The unit normal vector at the reflection point... Through formula Directly used as the unit vector of the normal axis of the local reflection coordinate system ; Unit vector on the horizontal axis Vertical axis unit vector Normal axis unit vector Composed of reflection points The standard orthogonal reflection local three-dimensional rectangular coordinate system with the origin as the origin.