CN-122021081-A - Method for generating verification model by random order ray tracing
Abstract
The invention relates to a method for generating verification model by random order ray tracing, which comprises the steps of inputting and determining the coordinates of an incident point N-order reflection point coordinates And the coordinates of the exit point after the ray escapes after the last reflection Calculating the incident direction of the ith reflection And a reflection direction And calculating a reflection point of the ith reflection Normal vector on And generating a model or an on-grid of the reflection system according to the reflection local coordinate system. The method remarkably improves the accuracy of the ray tracing verification model, can adapt to any ray reflection scene with positive integer order, and provides high-fidelity model support for various complex optical reflection system designs and ray tracing simulation.
Inventors
- LI BING
- LI YAOYAO
Assignees
- 东莘电磁科技(成都)有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260415
Claims (5)
- 1. A method for generating a verification model by random order ray tracing is characterized by comprising the following steps: step one, inputting and determining the coordinates of an incident point Coordinates of reflection point of ith reflection And the coordinates of the exit point after the ray escapes after the last reflection Wherein i=1, 2, N; step two, calculating the incident direction of the ith reflection And a reflection direction And calculating a reflection point of the ith reflection Normal vector on ; Step three, a reflection local coordinate system of the ith reflection is established by taking the reflection point as an origin; and step four, generating a model or grid of the reflection system according to the reflection local coordinate system.
- 2. The method for generating a verification model by random order ray tracing of claim 1 wherein said calculating the incident direction of the ith reflection And a reflection direction Comprising the following steps: incident direction vector calculation, i.e. reflection point based on ith reflection Adjacent reflection points Through a vector normalization operation formula The incident direction unit vector of the ith reflection is calculated, Performing vector normalization operation; reflection direction vector calculation, namely, reflection point based on ith reflection And the next stage reflection point The space coordinate relation of the emergent points is calculated by a vector normalization operation formula And obtaining a reflection direction unit vector of the ith reflection.
- 3. A method for generating a verification model by random order ray tracing according to claim 2, wherein said calculating reflection points of the ith reflection Normal vector on Comprising the following steps: Based on the obtained incident direction unit vector And a reflection direction unit vector By combining vector difference operation with normalization operation, and by the formula Calculating to obtain a normal unit vector representing the normal direction of the reflecting surface at the reflecting point, and normalizing the normal unit vector Representing reflection points as unit vectors In the normal direction of the reflecting surface.
- 4. The method for generating a verification model by random order ray tracing of claim 3, wherein said step three comprises the following steps: determining origin of coordinate system, i.e. reflecting point reflected by ith time The origin of the reflected local coordinate system is used as a reference point of local space modeling; Calculating a horizontal axis unit vector based on the incident direction unit vector And normal unit vector Is calculated by dot product of the formula Calculating to obtain a transverse axis unit vector of a reflection local coordinate system, wherein, the cross axis unit vector is three-dimensional vector point multiplication operation; Calculating vertical axis unit vector based on normal unit vector Unit vector with transverse axis Is calculated by cross multiplication of (a) through a formula =norm( ) Calculating to obtain a vertical axis unit vector of the reflection local coordinate system, wherein x is three-dimensional vector cross multiplication operation, and normalizing to ensure that the vertical axis vector is a unit vector; Determining a normal axis unit vector by combining the normal unit vector at the reflection point By the formula Normal axis unit vector directly used as reflection local coordinate system ; From transverse axis unit vectors Vertical axis unit vector Normal axis unit vector Is constructed to reflect points The standard orthogonal reflection local three-dimensional rectangular coordinate system is used as an origin.
- 5. The method for generating a verification model by random order ray tracing of claim 3, wherein said step four specifically comprises the following steps: Defining basic modeling cells, setting basic modeling cells , Respectively normalizing coordinates of the basic cells in a reflection local coordinate system; local-global space mapping, namely converting basic modeling unit cells in the local coordinate system of each reflection point into a global three-dimensional space through a mapping transformation formula of the local coordinate system-global space, and generating local modeling units at each reflection point; splicing and fusing the local modeling units, namely splicing and fusing the local modeling units generated at all reflection points according to space continuity constraint, and setting the node set of the local modeling unit at the ith reflection point as The node set of the whole model or grid of the reflection system is = And meet the following , Epsilon is a spatial continuity threshold value set according to modeling accuracy requirements, Q, Q' respectively represent corresponding sampling points on two different units; generating an integral model or grid based on the global node set after splicing and fusion And generating a reflection system integral verification model or grid adapting to the N-order arbitrary reflection scene according to the grid topology rule of the optical modeling, and completing the construction of the arbitrary-order ray tracing verification model.
Description
Method for generating verification model by random order ray tracing Technical Field The invention relates to the field of electromagnetic wave processing, in particular to a method for generating a verification model by random order ray tracing. Background The current ray tracing modeling and verification of the optical reflection system mainly depends on three technologies, namely a fixed end prefabricated model, a universal coordinate system modeling and a simplified grid generation method. Fixed model parameters of limited-order reflection are preset in a fixed-order prefabricated model technology (such as a traditional optical simulation tracePro basic module), but the ray reflection order of a complex optical system (such as a multi-surface reflection laser device) can be flexibly adjusted as required, and the prefabricated model cannot be adapted to any order reflection scene, so that the model reusability is extremely low, for example, in a certain multi-order reflection optical antenna design, the time consumption for reconstructing the model after the order adjustment is increased by more than 8 times, and the design efficiency is greatly reduced. The modeling calculation of all reflection points is completed through a single global coordinate system by the general coordinate system modeling method (such as a Zemax global coordinate system modeling algorithm), the suitability of the method for multi-order reflection points is poor, the matching error of a normal vector and a reflection direction increases exponentially along with the increase of the order, the fitting degree of a model and an actual ray track is less than 70% under a 5-order reflection scene, and the ray tracking verification precision is seriously reduced. The method for generating the simplified grid (such as an optical modeling simple gridding tool) sacrifices orthogonality and space continuity of a local coordinate system, and basic grid units are directly spliced, so that the generated model has the problems of grid fracture and overlapping, the local scattering characteristics of reflection points cannot be accurately represented, and the calculation error of a reflection field in optical simulation is more than or equal to 12%. The defects are caused by conflict between the fixity of modeling order and the demand of any order of a reflection system, insufficient suitability of singleness of a universal coordinate system and local characteristics of reflection points, simplicity of grid generation and contradiction between the demands of model space continuity. Therefore, how to realize standardization, precision and high-efficiency generation of a reflection system model under any-order ray reflection scene solves the problems of poor modeling adaptability, low precision and insufficient reusability in the prior art, and is a problem to be solved in the field of optical ray tracing and modeling at present. Disclosure of Invention The invention aims to overcome the defects of the prior art, provides a method for generating a verification model by random order ray tracing, and solves the defects in the prior art. The aim of the invention is realized by the following technical scheme that the method for generating the verification model by random order ray tracing comprises the following steps: step one, inputting and determining the coordinates of an incident point Coordinates of reflection point of ith reflectionAnd the coordinates of the exit point after the ray escapes after the last reflectionWherein i=1, 2, N; step two, calculating the incident direction of the ith reflection And a reflection directionAnd calculating a reflection point of the ith reflectionNormal vector on; Step three, a reflection local coordinate system of the ith reflection is established by taking the reflection point as an origin; and step four, generating a model or grid of the reflection system according to the reflection local coordinate system. The incident direction of the ith reflection is calculatedAnd a reflection directionComprising the following steps: incident direction vector calculation, i.e. reflection point based on ith reflection Adjacent reflection pointsThrough a vector normalization operation formulaThe incident direction unit vector of the ith reflection is calculated,Performing vector normalization operation; reflection direction vector calculation, namely, reflection point based on ith reflection And the next stage reflection pointThe space coordinate relation of the emergent points is calculated by a vector normalization operation formulaAnd obtaining a reflection direction unit vector of the ith reflection. The reflection point of the ith reflection is calculatedNormal vector onComprising the following steps: Based on the obtained incident direction unit vector And a reflection direction unit vectorBy combining vector difference operation with normalization operation, and by the formulaCalculating to obtain a normal unit vect