High-precision ray tracing method and device for optical system based on NURBS surface

By adopting the NURBS surface-based light tracking method in the optical system, combining light packet allocation and parallel computing strategies, a graded BVH acceleration data structure is constructed, and the quasi-Newtonian method is used to solve the problem of low interaction accuracy between the surface of the optical machine and the scale light, achieving high-precision and high-efficiency light tracking.

CN115453753BActive Publication Date: 2025-05-16CHANGCHUN INST OF OPTICS FINE MECHANICS & PHYSICS CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211170391.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-23
Publication Date
2025-05-16
Estimated Expiration
2042-09-23

AI Technical Summary

Technical Problem

In existing optical systems, the interaction accuracy between the surface of the optical machine and the scale of light is low, making it difficult to meet the requirements of sub-nanometer and even higher accuracy, and the efficiency is also limited.

Method used

The high-precision ray tracing method of optical system based on NURBS surface is adopted to generate optical machine surface shape expression through forward and reverse construction methods. Combined with light packet allocation and parallel computing strategies, a graded BVH acceleration data structure is constructed, and the quasi-Newtonian method is used to iterate the high-precision value of the intersection point between the light and the optical machine surface shape.

Benefits of technology

It has achieved the improvement of light trace accuracy in optical systems, achieving sub-nanometer and even higher accuracy, while improving interaction efficiency, significantly improving the accuracy and efficiency of the optical machine surface and large-scale light interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115453753B_ABST
    Figure CN115453753B_ABST
Patent Text Reader

Abstract

The present invention relates to a high-precision ray tracing method and device for an optical system based on a NURBS surface. The method and device include: generating an optical-mechanical surface expression based on NURBS by forward and reverse construction methods; formulating a ray packet allocation and parallel computing strategy according to the scale of the ray; constructing a primary BVH bounding box using the information of the optical-mechanical surface node; refining the surface element to generate a secondary BVH bounding box containing sub-surface elements; and using a quasi-Newton method to iteratively solve a high-precision value of the intersection of the ray and the optical-mechanical surface. The method and device are based on the NURBS mathematical representation method, combined with a large-scale ray subpackaging strategy, a parallel computing strategy, a specific discrete sampling scheme, etc., and by designing a hierarchical BVH acceleration data structure, high-precision tracing accuracy is achieved by using the quasi-Newton method while obtaining excellent iterative initial values, while effectively improving the interaction efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of non-sequential ray tracing, and in particular to a high-precision ray tracing method and device for an optical system based on a NURBS surface. Background Art

[0002] In the field of non-sequential ray tracing, ray tracing accuracy and efficiency are two crucial indicators, which are reflected in the analysis of geometric models, mainly in the intersection accuracy and efficiency of light and geometric models. Different from the rendering tracing process in the field of computer graphics, the optical system has very strict requirements on the intersection accuracy of ray tracing. The intersection accuracy of optical components will reach at least sub-nanometer or even higher precision requirements.

[0003] Usually, accuracy and efficiency are contradictory. With the rapid development of computers, the application of Computer Aided Geometric Design (CAGD) has become more mature and widespread. In geometric modeling, the two most commonly used representation methods (mainly for curves and surfaces) include implicit and parametric representation. Among them, the parametric representation method shows advantages such as being more direct and more natural in CAGD design. At the same time, for bounded geometry, the parametric representation method is more convenient. As a representative of parametric representation, NURBS has become the standard for representing curves and surfaces. At the same time, relevant research institutions have adopted NURBS to complete the modeling and optimization of optical components for free-form surface imaging design (such as Michael P. Chrisp of MIT Lincoln Laboratory, etc.). Therefore, it has become a trend to use NURBS to unify the characterization method of optomechanical models in optical systems.

[0004] But at the same time, the requirements of large-scale light, non-sequential, high precision, and high efficiency bring certain challenges to the optical software analysis process based on non-sequential ray tracing. Therefore, it is crucial to solve the problems of accuracy and efficiency of the interaction between optomechanical surfaces and large-scale light in optical systems when NURBS is used as a unified representation of the optical system model. Summary of the invention

[0005] The embodiments of the present invention provide a high-precision ray tracing method and device for an optical system based on a NURBS surface, so as to at least solve the technical problem of low interaction precision between the optomechanical surface and the scale light in the existing optical system.

[0006] According to an embodiment of the present invention, a high-precision ray tracing method for an optical system based on a NURBS surface is provided, comprising the following steps:

[0007] Generate NURBS-based optomechanical surface expressions through forward and reverse construction methods;

[0008] Develop strategies for ray packet allocation and parallel computing based on ray scale;

[0009] Use the optical-mechanical surface node information to construct a first-level BVH bounding box;

[0010] Refine the surface element to generate a secondary BVH bounding box containing the sub-surface element;

[0011] The quasi-Newton method is used to iteratively solve the high-precision value of the intersection between the light ray and the optomechanical surface.

[0012] Furthermore, through forward and inverse construction methods, the NURBS-based optomechanical surface expression is generated, including:

[0013] Use forward construction to generate elementary analytic geometry optical-mechanical surfaces based on NURBS representation, including planes, spheres, cylinders, cones, tori, and ellipsoids;

[0014] For free-form optomechanical surfaces, a reverse construction method is adopted. At the same time, optical and mechanical components are distinguished during the tracing process, and the types of optical surfaces are marked and identified. Different discrete sampling methods are set for different geometric outer contour shapes.

[0015] Furthermore, according to the scale of light, the light packet allocation and parallel computing strategies are formulated including:

[0016] The large-scale light is classified into quantity intervals, the light package size is set accordingly, and a parallel dynamic light package distribution strategy is adopted.

[0017] Furthermore, using the optical-mechanical surface node information, constructing a first-level BVH bounding box includes:

[0018] The first-level BVH bounding box is constructed by using the optical-mechanical surface node information to exclude some surface elements without intersection.

[0019] Furthermore, the optical-mechanical surface node information is used to construct a first-level BVH bounding box, excluding some non-intersection surface elements including:

[0020] Construct a bounding volume hierarchical acceleration data structure used with the ray package. The bounding volume hierarchical acceleration data structure constructs a first-level BVH bounding box structure containing each segmented surface patch based on the NURBS node information and the strong convex hull characteristics of the NURBS surface.

[0021] First, the intersection test process is simplified by testing the intersection with the first-level BVH structure, and the BVH inner surface elements that do not intersect with the light are quickly eliminated. The traversal intersection test order is O(logn). For the light that intersects with the first-level BVH bounding box, the intersection test of the second-level BVH bounding box after surface refinement is performed.

[0022] Further, the surface element is refined to generate a secondary BVH bounding box containing the sub-surface element, including:

[0023] The surface element is refined to generate a secondary BVH bounding box containing the sub-surface element, and an initial value is obtained at the same time.

[0024] Furthermore, the surface element is refined to generate a secondary BVH bounding box containing the sub-surface element, and an initial value is obtained including:

[0025] The surface patch within the first-level BVH bounding box with intersection points is refined, a subdivision strategy is formulated, the number of nodes to be inserted into the non-empty node span is determined, the surface patch is subdivided into multiple sub-patches, and the maximum repetition of each node is set to p+1 and q+1 in the u and v parameter directions respectively, where p and q are the number of surfaces in the u and v directions, and each sub-surface is converted into a rational Bezier surface.

[0026] Furthermore, an initial value obtained is an initial guess parameter value used for subsequent numerical iteration to obtain an exact solution, and the initial guess parameter value is defined as the center of the parameter interval of the refined sub-surface parameter domain.

[0027] Furthermore, the quasi-Newton method is used to iteratively solve the high-precision value of the intersection between the light and the optical-mechanical surface, including:

[0028] When good initial parameter values ​​are obtained, the quasi-Newton method is used for numerical iterative solution. The quasi-Newton method only needs to add a correction matrix to the coefficient matrix of the previous iteration for each iteration.

[0029] According to another embodiment of the present invention, there is provided a high-precision ray tracing device for an optical system based on a NURBS surface, comprising:

[0030] Optomechanical surface expression unit, used to generate NURBS-based optomechanical surface expression through forward and inverse construction methods;

[0031] A strategy formulation unit, used to formulate ray packet allocation and parallel computing strategies according to the ray scale;

[0032] A first-level BVH bounding box construction unit is used to construct a first-level BVH bounding box using the optical-mechanical surface node information;

[0033] A secondary BVH bounding box generation unit is used to refine the surface element and generate a secondary BVH bounding box containing the sub-surface element;

[0034] The iterative unit is used to iteratively solve the high-precision value of the intersection of light rays and optomechanical surfaces using the quasi-Newton method.

[0035] A processor is used to run a program, wherein when the program is run, any one of the above-mentioned high-precision ray tracing methods for an optical system based on a NURBS surface is executed.

[0036] The high-precision ray tracing method and device for an optical system based on a NURBS surface in an embodiment of the present invention is based on a NURBS mathematical characterization method, combined with a large-scale ray packetization strategy, a parallel computing strategy, a specific discrete sampling scheme, etc., and by designing a hierarchical BVH acceleration data structure, high-precision tracing accuracy is achieved through the quasi-Newton method while obtaining excellent iterative initial values, while effectively improving the interaction efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0038] Figure 1 A flowchart of the steps of the high-precision ray tracing method for an optical system based on a NURBS surface according to the present invention;

[0039] Figure 2 It is a technical flow chart of the high-precision ray tracing method of the optical system based on NURBS surface of the present invention;

[0040] Figure 3 A schematic diagram of optical surface types in a high-precision ray tracing method for an optical system based on a NURBS surface according to the present invention;

[0041] Figure 4 A schematic diagram of a NURBS curve of an exemplary associated bounding volume in a high-precision ray tracing method for an optical system based on a NURBS surface according to the present invention;

[0042] Figure 5 It is a module diagram of a high-precision ray tracing device for an optical system based on a NURBS surface according to the present invention. DETAILED DESCRIPTION

[0043] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0044] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0045] Example 1

[0046] According to an embodiment of the present invention, a high-precision ray tracing method for an optical system based on a NURBS surface is provided. Figure 1 , including the following steps:

[0047] S100: Generate NURBS-based optomechanical surface expression through forward and reverse construction methods;

[0048] S200: Formulate a light packet allocation and parallel computing strategy according to the light scale;

[0049] S300: constructing a first-level BVH bounding box using the optical-mechanical surface node information;

[0050] S400: Refine the surface element to generate a secondary BVH bounding box containing the sub-surface element;

[0051] S500: The quasi-Newton method is used to iteratively solve the high-precision value of the intersection between the light and the optical-mechanical surface.

[0052] The high-precision ray tracing method for an optical system based on a NURBS surface in an embodiment of the present invention is based on a NURBS mathematical characterization method, combined with a large-scale ray subpackaging strategy, a parallel computing strategy, a specific discrete sampling scheme, etc., and by designing a hierarchical BVH acceleration data structure, high-precision tracing accuracy is achieved through the quasi-Newton method while obtaining excellent iterative initial values, while effectively improving the interaction efficiency.

[0053] Among them, the generation of NURBS-based optomechanical surface expressions through forward and reverse construction methods includes:

[0054] Use forward construction to generate elementary analytic geometry optical-mechanical surfaces based on NURBS representation, including planes, spheres, cylinders, cones, tori, and ellipsoids;

[0055] For free-form optomechanical surfaces, a reverse construction method is adopted. At the same time, optical and mechanical components are distinguished during the tracing process, and the types of optical surfaces are marked and identified. Different discrete sampling methods are set for different geometric outer contour shapes.

[0056] Among them, according to the scale of light, the light packet allocation and parallel computing strategies are formulated including:

[0057] The large-scale light is classified into quantity intervals, the light package size is set accordingly, and a parallel dynamic light package distribution strategy is adopted.

[0058] Among them, using the optical-mechanical surface node information, constructing a first-level BVH bounding box includes:

[0059] The first-level BVH bounding box is constructed by using the optical-mechanical surface node information to exclude some surface elements without intersection.

[0060] Among them, the first-level BVH bounding box is constructed by using the optical-mechanical surface node information, excluding some non-intersection surface elements including:

[0061] Construct a bounding volume hierarchical acceleration data structure used with the ray package. The bounding volume hierarchical acceleration data structure constructs a first-level BVH bounding box structure containing each segmented surface patch based on the NURBS node information and the strong convex hull characteristics of the NURBS surface.

[0062] First, the intersection test process is simplified by testing the intersection with the first-level BVH structure, and the BVH inner surface elements that do not intersect with the light are quickly eliminated. The traversal intersection test order is O(logn). For the light that intersects with the first-level BVH bounding box, the intersection test of the second-level BVH bounding box after surface refinement is performed.

[0063] Among them, the surface element is refined to generate a secondary BVH bounding box containing the sub-surface element, including:

[0064] The surface element is refined to generate a secondary BVH bounding box containing the sub-surface element, and an initial value is obtained at the same time.

[0065] Among them, the surface element is refined to generate a secondary BVH bounding box containing the sub-surface element, and an initial value is obtained including:

[0066] The surface patch within the first-level BVH bounding box with intersection points is refined, a subdivision strategy is formulated, the number of nodes to be inserted into the non-empty node span is determined, the surface patch is subdivided into multiple sub-patches, and the maximum repetition of each node is set to p+1 and q+1 in the u and v parameter directions respectively, where p and q are the number of surfaces in the u and v directions, and each sub-surface is converted into a rational Bezier surface.

[0067] Among them, an initial value obtained is an initial guess parameter value used for subsequent numerical iteration to obtain an exact solution, and the initial guess parameter value is defined as the center of the parameter interval of the refined sub-surface parameter domain.

[0068] Among them, the quasi-Newton method is used to iteratively solve the high-precision value of the intersection between light and optical-mechanical surface, including:

[0069] When good initial parameter values ​​are obtained, the quasi-Newton method is used for numerical iterative solution. The quasi-Newton method only needs to add a correction matrix to the coefficient matrix of the previous iteration for each iteration.

[0070] The following is a detailed description of the high-precision ray tracing method for an optical system based on a NURBS surface according to the present invention.

[0071] The purpose of the present invention is to solve the problem of the interaction accuracy between the optical-mechanical surface and the scaled light in the existing optical system, and to further improve the computational efficiency. The present invention is based on the NURBS mathematical representation method, combined with the scaled light subpackaging strategy, parallel computing strategy, specific discrete sampling scheme, etc., and by designing a hierarchical BVH acceleration data structure, high-precision tracing accuracy is achieved through the quasi-Newton method while obtaining excellent iterative initial values, while effectively improving the interaction efficiency.

[0072] The present invention provides a high-precision ray tracing method for an optical system based on a NURBS surface, and the technical solution includes the following contents:

[0073] 1. Generate NURBS-based optomechanical surface expression through forward and reverse construction methods;

[0074] 2. Develop strategies for light packet allocation and parallel computing based on the light scale;

[0075] 3. Use the optical-mechanical surface node information to construct a first-level BVH bounding box and exclude some surface elements without intersection points;

[0076] 4. Refine the surface element to generate a secondary BVH bounding box containing the sub-surface element, and obtain a better initial value;

[0077] 5. The quasi-Newton method is used to iteratively solve the high-precision value of the intersection between the light and the optomechanical surface.

[0078] The present invention adopts multi-construction algorithms and multiple optimization strategies to formulate a multi-level acceleration structure, and improves the traditional Newton iteration method, effectively solving the problem of the interaction accuracy between the optical-mechanical surface and large-scale light in complex optical systems, while improving the efficiency of interactive calculations. Specifically including:

[0079] The forward construction method is used to generate elementary analytical geometric optomechanical surfaces based on NURBS representation, including planes, spheres, cylinders, cones, tori, and ellipsoids. For free-form optomechanical surfaces, especially optical surfaces, the reverse construction method is used. At the same time, the optical and mechanical components are distinguished during the tracing process, and the types of optical surfaces are marked and identified. Different discrete sampling methods are set for different geometric outer contour shapes.

[0080] Large-scale rays are classified into quantity intervals, the ray package size is set accordingly, and a parallel dynamic ray package distribution strategy is adopted to ensure the real-time utilization of processor cores and avoid thread waiting problems caused by differences in ray intersection times in different core threads.

[0081] Construct a bounding volume hierarchy (BVH) acceleration data structure for use with the ray package. This structure is built based on NURBS node information. Using the strong convex hull characteristics of the NURBS surface, a first-level BVH bounding box structure containing each segmented surface patch is constructed. First, the intersection test process is simplified by testing the intersection with the first-level BVH structure, and the surface elements in the BVH that do not intersect with the ray are quickly eliminated. Since the depth of the structure is logarithmic to the number of surfaces, the traversal intersection test order is O(logn) instead of O(n), which significantly simplifies the intersection process. For rays that intersect with the first-level BVH bounding box, a second-level BVH bounding box intersection test is further performed after surface refinement.

[0082] The surface patch within the first-level BVH bounding box with intersections is refined, a subdivision strategy is formulated, the number of nodes to be inserted into the non-empty node span is determined, and the surface patch is subdivided into multiple sub-patches. The maximum repetition of each node is set to p+1 and q+1 in the u and v parameter directions, respectively, where p and q are the number of surfaces in the u and v directions. Each sub-surface is converted into a rational Bezier surface, which effectively solves the problem of long calculation time caused by the independence of P and q from the control polygon characteristics of NURBS without losing accuracy. At the same time, an initial guess parameter value is given here for subsequent numerical iteration to find an exact solution. This initial guess parameter value is defined as the center of the parameter interval of the refined sub-surface parameter domain.

[0083] When good initial parameter values ​​are obtained, the quasi-Newton method is used for numerical iterative solution. This method is an improved algorithm of the Newton iteration method and inherits the advantages of the Newton iteration method. However, unlike the Newton iteration method, which requires solving the coefficient matrix at each iteration, each iteration only requires adding a correction matrix to the coefficient matrix of the previous iteration, which effectively improves the computational efficiency.

[0084] Reference Figure 2First, the forward construction method is used to generate elementary analytic geometric optomechanical surfaces based on NURBS representation, including planes, spheres, cylinders, cones, tori, and ellipsoids. For free-form optomechanical surfaces, especially optical surfaces, the reverse construction method is used. At the same time, the optical and mechanical components are distinguished during the tracing process, and the types of optical surfaces are marked and identified. Figure 3 The main and commonly used optical surface shapes in the field of geometric optics are listed, and different discrete sampling methods are set for different geometric outer contour shapes. Taking the cylindrical high-order aspheric lens as an example, the polar coordinate method is selected for surface discrete sampling. First, a fitting curve is constructed in two-dimensional space, and the number of sampling points N and the semi-aperture R are set to complete the two-dimensional space discrete sampling. The NURBS rotation surface is obtained by applying the NURBS rotation algorithm to the curve. Among them:

[0085] The forward construction method means that in mathematics, the NURBS surface is defined by control points, node vectors, weights, and the order of the surface. Therefore, given this part of data, the NURBS surface can be defined at the program level.

[0086] The reverse construction method refers to the reverse generation of control points, node vectors and weights by giving fitting points, order of curves or surfaces and other information when the control points, node vectors and weights are unknown to complete NURBS surface fitting.

[0087] Distinguishing between optical and mechanical components during the tracing process mainly refers to the fact that the mechanical components in the optical system are limited by the actual processing technology and other situations, and do not need to reach the surface accuracy level of the optical components. Making a distinction here and setting different accuracies will effectively improve the tracing speed.

[0088] Different discrete sampling methods are set for different geometric outer contours, including: for rotational optical elements, polar coordinates are used to first perform discrete sampling in two-dimensional space, and then NURBS fitting surfaces are generated by rotating the fitting curve, and high-density sampling is performed in areas with larger surface curvature; for stretching optical elements, Cartesian coordinates are used to first perform discrete sampling in two-dimensional space, and then NURBS fitting surfaces are generated by stretching the fitting curve, and high-density sampling is performed in areas with larger surface curvature; for non-rotational or stretching elements, Cartesian coordinates are used to directly perform discrete sampling in three-dimensional space, and high-density sampling is performed in areas with larger surface curvature in accordance with the marked and identified surface types to ensure high sampling precision.

[0089] Large-scale rays are classified into quantity intervals, the ray package size is set accordingly, and a parallel dynamic ray package distribution strategy is adopted to ensure the real-time utilization of processor cores and avoid thread waiting problems caused by differences in ray intersection times in different core threads.

[0090] Construct a BVH acceleration data structure for use with the ray package. This structure is built based on NURBS node information. Using the strong convex hull characteristics of the NURBS surface, a first-level BVH bounding box structure containing each segmented surface patch is constructed. For example, the maximum values ​​of the x, y, and z coordinates of all control vertices of each surface element form a vector Vmax = (xmax, ymax, zmax), and the minimum values ​​form a vector Vmin = (xmin, ymin, zmin); these two vectors are then used as diagonal vectors to obtain the BVH bounding box of each surface element. The intersection test process is simplified by first testing the intersection with the first-level BVH structure, and the surface elements in the BVH that do not intersect with the ray are quickly excluded. Since the depth of the structure is logarithmic to the number of surfaces, the order of traversal intersection testing is O(logn) instead of O(n), which significantly simplifies the intersection process. For rays that have intersections with the first-level BVH bounding box, a second-level BVH bounding box intersection test is further performed after surface refinement.

[0091] The surface patch within the first-level BVH bounding box with intersections is refined, a subdivision strategy is formulated, the number of nodes to be inserted into the non-empty node span is determined, and the surface patch is subdivided into multiple sub-patches. The maximum repetition of each node is set to p+1 and q+1 in the u and v parameter directions, respectively. Here, p and q are the number of surfaces in the u and v directions. Each sub-surface is converted into a rational Bezier surface, which effectively solves the problem of long calculation time caused by global characteristics of NURBS such as independence of P and q, without losing accuracy. At the same time, an initial guess parameter value is given here for subsequent numerical iteration to find the exact solution. This initial guess parameter value is defined as the center of the parameter interval of the refined sub-surface parameter domain, such as Figure 4 As shown, by increasing the number of non-empty nodes on the surface, the parameter interval becomes smaller and better initial guess parameter values ​​are obtained.

[0092] When good initial parameter values ​​are obtained, the quasi-Newton method is used for numerical iterative solution. This method is an improved algorithm of the Newton iteration method and inherits the advantages of the Newton iteration method. However, unlike the Newton iteration method, which requires solving the coefficient matrix at each iteration, each iteration only requires adding a correction matrix to the coefficient matrix of the previous iteration, which effectively improves the computational efficiency.

[0093] Compared with the prior art, the present invention has at least the following beneficial effects:

[0094] Based on NURBS surfaces, the present invention proposes a high-precision ray tracing method for optical systems. For free-form optical surfaces, it is proposed to adopt a specific discrete sampling method through optical surface recognition to effectively improve the global accuracy of NURBS fitting. By formulating ray subpackaging and parallel computing strategies and setting a special two-level BVH acceleration structure, a good iterative initial value is obtained while improving the interaction efficiency. The traditional Newton method is improved, and the quasi-Newton method is adopted to iteratively obtain the exact solution, further improving the iteration efficiency based on the quadratic convergence speed of the Newton method.

[0095] Example 2

[0096] According to another embodiment of the present invention, a high-precision ray tracing device for an optical system based on a NURBS surface is provided. Figure 5 ,include:

[0097] The optical-mechanical surface expression unit 201 is used to generate an optical-mechanical surface expression based on NURBS by forward and reverse construction methods;

[0098] A strategy formulation unit 202, used to formulate a ray packet allocation and parallel computing strategy according to the ray scale;

[0099] A first-level BVH bounding box construction unit 203 is used to construct a first-level BVH bounding box using the optical-mechanical surface node information;

[0100] A secondary BVH bounding box generation unit 204 is used to refine the surface element and generate a secondary BVH bounding box containing the sub-surface element;

[0101] The iteration unit 205 is used to iteratively solve the high-precision value of the intersection of the light ray and the optomechanical surface using the quasi-Newton method.

[0102] The high-precision ray tracing device for an optical system based on a NURBS surface in an embodiment of the present invention is based on a NURBS mathematical characterization method, combined with a large-scale ray packetization strategy, a parallel computing strategy, a specific discrete sampling scheme, etc., and by designing a hierarchical BVH acceleration data structure, high-precision tracing accuracy is achieved through the quasi-Newton method while obtaining excellent iterative initial values, while effectively improving the interaction efficiency.

[0103] The following is a detailed description of the high-precision ray tracing device for an optical system based on a NURBS surface according to the present invention using a specific embodiment:

[0104] The purpose of the present invention is to solve the problem of the interaction accuracy between the optical-mechanical surface and the scaled light in the existing optical system, and to further improve the computational efficiency. The present invention is based on the NURBS mathematical representation method, combined with the scaled light subpackaging strategy, parallel computing strategy, specific discrete sampling scheme, etc., and by designing a hierarchical BVH acceleration data structure, high-precision tracing accuracy is achieved through the quasi-Newton method while obtaining excellent iterative initial values, while effectively improving the interaction efficiency.

[0105] The present invention adopts multi-construction algorithms and multiple optimization strategies to formulate a multi-level acceleration structure, and improves the traditional Newton iteration method, effectively solving the problem of the interaction accuracy between the optical-mechanical surface and large-scale light in complex optical systems, while improving the efficiency of interactive calculations. Specifically including:

[0106] The forward construction method is used to generate elementary analytical geometric optomechanical surfaces based on NURBS representation, including planes, spheres, cylinders, cones, tori, and ellipsoids. For free-form optomechanical surfaces, especially optical surfaces, the reverse construction method is used. At the same time, the optical and mechanical components are distinguished during the tracing process, and the types of optical surfaces are marked and identified. Different discrete sampling methods are set for different geometric outer contour shapes.

[0107] Large-scale rays are classified into quantity intervals, the ray package size is set accordingly, and a parallel dynamic ray package distribution strategy is adopted to ensure the real-time utilization of processor cores and avoid thread waiting problems caused by differences in ray intersection times in different core threads.

[0108] Construct a bounding volume hierarchy (BVH) acceleration data structure for use with the ray package. This structure is built based on NURBS node information. Using the strong convex hull characteristics of the NURBS surface, a first-level BVH bounding box structure containing each segmented surface patch is constructed. First, the intersection test process is simplified by testing the intersection with the first-level BVH structure, and the surface elements in the BVH that do not intersect with the ray are quickly eliminated. Since the depth of the structure is logarithmic to the number of surfaces, the traversal intersection test order is O(logn) instead of O(n), which significantly simplifies the intersection process. For rays that intersect with the first-level BVH bounding box, a second-level BVH bounding box intersection test is further performed after surface refinement.

[0109] The surface patch within the first-level BVH bounding box with intersections is refined, a subdivision strategy is formulated, the number of nodes to be inserted into the non-empty node span is determined, and the surface patch is subdivided into multiple sub-patches. The maximum repetition of each node is set to p+1 and q+1 in the u and v parameter directions, respectively, where p and q are the number of surfaces in the u and v directions. Each sub-surface is converted into a rational Bezier surface, which effectively solves the problem of long calculation time caused by the independence of P and q from the control polygon characteristics of NURBS without losing accuracy. At the same time, an initial guess parameter value is given here for subsequent numerical iteration to find an exact solution. This initial guess parameter value is defined as the center of the parameter interval of the refined sub-surface parameter domain.

[0110] When good initial parameter values ​​are obtained, the quasi-Newton method is used for numerical iterative solution. This method is an improved algorithm of the Newton iteration method and inherits the advantages of the Newton iteration method. However, unlike the Newton iteration method, which requires solving the coefficient matrix at each iteration, each iteration only requires adding a correction matrix to the coefficient matrix of the previous iteration, which effectively improves the computational efficiency.

[0111] Reference Figure 2 First, the forward construction method is used to generate elementary analytic geometric optomechanical surfaces based on NURBS representation, including planes, spheres, cylinders, cones, tori, and ellipsoids. For free-form optomechanical surfaces, especially optical surfaces, the reverse construction method is used. At the same time, the optical and mechanical components are distinguished during the tracing process, and the types of optical surfaces are marked and identified. Figure 3 The main and commonly used optical surface shapes in the field of geometric optics are listed, and different discrete sampling methods are set for different geometric outer contour shapes. Taking the cylindrical high-order aspheric lens as an example, the polar coordinate method is selected for surface discrete sampling. First, a fitting curve is constructed in two-dimensional space, and the number of sampling points N and the semi-aperture R are set to complete the two-dimensional space discrete sampling. The NURBS rotation surface is obtained by applying the NURBS rotation algorithm to the curve. Among them:

[0112] The forward construction method means that in mathematics, the NURBS surface is defined by control points, node vectors, weights, and the order of the surface. Therefore, given this part of data, the NURBS surface can be defined at the program level.

[0113] The reverse construction method refers to the reverse generation of control points, node vectors and weights by giving fitting points, order of curves or surfaces and other information when the control points, node vectors and weights are unknown to complete NURBS surface fitting.

[0114] Distinguishing between optical and mechanical components during the tracing process mainly refers to the fact that the mechanical components in the optical system are limited by the actual processing technology and other situations, and do not need to reach the surface accuracy level of the optical components. Making a distinction here and setting different accuracies will effectively improve the tracing speed.

[0115] Different discrete sampling methods are set for different geometric outer contours, including: for rotational optical elements, polar coordinates are used to first perform discrete sampling in two-dimensional space, and then NURBS fitting surfaces are generated by rotating the fitting curve, and high-density sampling is performed in areas with larger surface curvature; for stretching optical elements, Cartesian coordinates are used to first perform discrete sampling in two-dimensional space, and then NURBS fitting surfaces are generated by stretching the fitting curve, and high-density sampling is performed in areas with larger surface curvature; for non-rotational or stretching elements, Cartesian coordinates are used to directly perform discrete sampling in three-dimensional space, and high-density sampling is performed in areas with larger surface curvature in accordance with the marked and identified surface types to ensure high sampling precision.

[0116] Large-scale rays are classified into quantity intervals, the ray package size is set accordingly, and a parallel dynamic ray package distribution strategy is adopted to ensure the real-time utilization of processor cores and avoid thread waiting problems caused by differences in ray intersection times in different core threads.

[0117] Construct a BVH acceleration data structure for use with the ray package. This structure is built based on NURBS node information. Using the strong convex hull characteristics of the NURBS surface, a first-level BVH bounding box structure containing each segmented surface patch is constructed. For example, the maximum values ​​of the x, y, and z coordinates of all control vertices of each surface element form a vector Vmax = (xmax, ymax, zmax), and the minimum values ​​form a vector Vmin = (xmin, ymin, zmin); these two vectors are then used as diagonal vectors to obtain the BVH bounding box of each surface element. The intersection test process is simplified by first testing the intersection with the first-level BVH structure, and the surface elements in the BVH that do not intersect with the ray are quickly excluded. Since the depth of the structure is logarithmic to the number of surfaces, the order of traversal intersection testing is O(logn) instead of O(n), which significantly simplifies the intersection process. For rays that have intersections with the first-level BVH bounding box, a second-level BVH bounding box intersection test is further performed after surface refinement.

[0118] The surface patch within the first-level BVH bounding box with intersections is refined, a subdivision strategy is formulated, the number of nodes to be inserted into the non-empty node span is determined, and the surface patch is subdivided into multiple sub-patches. The maximum repetition of each node is set to p+1 and q+1 in the u and v parameter directions, respectively. Here, p and q are the number of surfaces in the u and v directions. Each sub-surface is converted into a rational Bezier surface, which effectively solves the problem of long calculation time caused by global characteristics of NURBS such as independence of P and q, without losing accuracy. At the same time, an initial guess parameter value is given here for subsequent numerical iteration to find the exact solution. This initial guess parameter value is defined as the center of the parameter interval of the refined sub-surface parameter domain, such as Figure 4 As shown, by increasing the number of non-empty nodes on the surface, the parameter interval becomes smaller and better initial guess parameter values ​​are obtained.

[0119] When good initial parameter values ​​are obtained, the quasi-Newton method is used for numerical iterative solution. This method is an improved algorithm of the Newton iteration method and inherits the advantages of the Newton iteration method. However, unlike the Newton iteration method, which requires solving the coefficient matrix at each iteration, each iteration only requires adding a correction matrix to the coefficient matrix of the previous iteration, which effectively improves the computational efficiency.

[0120] Compared with the prior art, the beneficial effects of the present invention include at least:

[0121] Based on NURBS surface, the present invention proposes a high-precision ray tracing device for optical system. For free-form optical surface, it is proposed to adopt a specific discrete sampling method through optical surface recognition to effectively improve the global accuracy of NURBS fitting. By formulating ray subpackaging and parallel computing strategies and setting a special two-level BVH acceleration structure, a good iteration initial value is obtained while improving the interaction efficiency. The traditional Newton method is improved, and the quasi-Newton method is adopted to iterate and obtain the exact solution, further improving the iteration efficiency on the basis of the quadratic convergence speed of the Newton method.

[0122] Example 3

[0123] A storage medium stores a program file capable of implementing any one of the above-mentioned high-precision ray tracing methods for an optical system based on a NURBS surface.

[0124] Example 4

[0125] A processor is used to run a program, wherein when the program is run, any one of the above-mentioned high-precision ray tracing methods for an optical system based on a NURBS surface is executed.

[0126] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0127] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0128] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the system embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0129] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0130] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0131] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0132] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A high-precision ray tracing method for an optical system based on a NURBS surface, characterized in that: The following steps are involved: Generate NURBS-based optomechanical surface expressions through forward and reverse construction methods; Develop strategies for ray packet allocation and parallel computing based on ray scale; Use the optical-mechanical surface node information to construct a first-level BVH bounding box; Refine the surface element to generate a secondary BVH bounding box containing the sub-surface element; The quasi-Newton method is used to iteratively solve the high-precision value of the intersection between the light ray and the optomechanical surface.

2. The high-precision ray tracing method for an optical system based on a NURBS surface according to claim 1, characterized in that: The generation of NURBS-based optomechanical surface expression by forward and reverse construction includes: Use forward construction to generate elementary analytic geometry optical-mechanical surfaces based on NURBS representation, including planes, spheres, cylinders, cones, tori, and ellipsoids; For free-form optomechanical surfaces, a reverse construction method is adopted. At the same time, optical and mechanical components are distinguished during the tracing process, and the types of optical surfaces are marked and identified. Different discrete sampling methods are set for different geometric outer contour shapes.

3. The high-precision ray tracing method for an optical system based on a NURBS surface according to claim 1, characterized in that: The formulation of the light packet allocation and parallel computing strategy according to the light scale includes: The large-scale light is classified into quantity intervals, the light package size is set accordingly, and a parallel dynamic light package distribution strategy is adopted.

4. The high-precision ray tracing method for an optical system based on a NURBS surface according to claim 1, characterized in that: The construction of a first-level BVH bounding box using the optical-mechanical surface node information includes: The first-level BVH bounding box is constructed by using the optical-mechanical surface node information to exclude some surface elements without intersection.

5. The high-precision ray tracing method for an optical system based on a NURBS surface according to claim 4, characterized in that: The method of constructing a first-level BVH bounding box by using the optical-mechanical surface node information and excluding a part of the surface elements without intersections includes: Construct a bounding volume hierarchical acceleration data structure used with the ray package. The bounding volume hierarchical acceleration data structure constructs a first-level BVH bounding box structure containing each segmented surface patch based on the NURBS node information and the strong convex hull characteristics of the NURBS surface. First, the intersection test process is simplified by testing the intersection with the first-level BVH structure, and the BVH inner surface elements that do not intersect with the light are quickly eliminated. The traversal intersection test order is O(logn). For the light that intersects with the first-level BVH bounding box, the intersection test of the second-level BVH bounding box after surface refinement is performed.

6. The high-precision ray tracing method for an optical system based on a NURBS surface according to claim 1, characterized in that: The step of thinning the surface element to generate a secondary BVH bounding box containing the sub-surface element includes: The surface element is refined to generate a secondary BVH bounding box containing the sub-surface element, and an initial value is obtained at the same time.

7. The high-precision ray tracing method for an optical system based on a NURBS surface according to claim 6, characterized in that: The surface element is refined to generate a secondary BVH bounding box containing the sub-surface element, and an initial value is obtained including: The surface patch within the first-level BVH bounding box with intersection points is refined, a subdivision strategy is formulated, the number of nodes to be inserted into the non-empty node span is determined, the surface patch is subdivided into multiple sub-patches, and the maximum repetition of each node is set to p+1 and q+1 in the u and v parameter directions respectively, where p and q are the number of surfaces in the u and v directions, and each sub-surface is converted into a rational Bezier surface.

8. The high-precision ray tracing method for an optical system based on a NURBS surface according to claim 7, characterized in that: The obtained initial value is used as the initial guess parameter value for subsequent numerical iteration to obtain the exact solution. The initial guess parameter value is defined as the center of the parameter interval of the refined sub-surface parameter domain.

9. The high-precision ray tracing method for an optical system based on a NURBS surface according to claim 1, characterized in that: The method of iteratively solving the high-precision value of the intersection of the light ray and the optical-mechanical surface using the quasi-Newton method includes: When good initial parameter values ​​are obtained, the quasi-Newton method is used for numerical iterative solution. The quasi-Newton method only needs to add a correction matrix to the coefficient matrix of the previous iteration for each iteration.

10. A high-precision ray tracing device for an optical system based on a NURBS surface, characterized in that: include: Optomechanical surface expression unit, used to generate NURBS-based optomechanical surface expression through forward and inverse construction methods; A strategy formulation unit, used to formulate ray packet allocation and parallel computing strategies according to the ray scale; A first-level BVH bounding box construction unit is used to construct a first-level BVH bounding box using the optical-mechanical surface node information; A secondary BVH bounding box generation unit is used to refine the surface element and generate a secondary BVH bounding box containing the sub-surface element; The iterative unit is used to iteratively solve the high-precision value of the intersection of light rays and optomechanical surfaces using the quasi-Newton method.

Citation Information

Patent Citations

  • Multi-virtual image laminating type light emitting lamp

    CN103017060A

  • LED free-form surface lighting system design

    CN104864279A