Adaptive ray tracing method for free gradient index medium based on refractive index directional derivative

CN118011627BActive Publication Date: 2026-11-03NANJING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410274993.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-12
Publication Date
2026-11-03
Estimated Expiration
2044-03-12

AI Technical Summary

Technical Problem

Existing technologies suffer from low computational efficiency and insufficient accuracy in ray tracing of free gradient refractive index media, making it difficult to balance computation time and result accuracy. Traditional methods require manual setting of step size and are inefficient.

Method used

An adaptive ray tracing method based on the directional derivative of refractive index is adopted. The step size is adaptively adjusted by calculating the refractive index change. The numerical solution of differential equations and the step size correction factor are used to adaptively adjust the step size in the ray tracing process.

Benefits of technology

It improves the computational efficiency and accuracy of ray tracing, reduces the number of calculations, and enables the optimized design of a high-efficiency, high-precision optical system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118011627B_ABST
    Figure CN118011627B_ABST
Patent Text Reader

Abstract

The application discloses a self-adapting light ray tracing method of free gradient refractive index medium based on refractive index directional derivative, which comprises the following steps: obtaining a reasonable initial step length according to the refractive index distribution and the initial state of the light ray; using the step length to solve the position and direction of the light ray after the next step according to the light ray equation; judging whether the current position exceeds the device boundary, if yes, then making iterative correction to the step length of the last step until the position error of the final exit point is less than a threshold, if not, then continuing the step-by-step tracing process; calculating the refractive index variation coefficient of the position and direction obtained by the refractive index distribution, obtaining a step length correction factor, and solving a new step length; judging whether the step length exceeds the range, if yes, then making correction; and gradually calculating until the light ray finally reaches the device boundary. The application has high calculation precision and speed for the light ray tracing in the free gradient refractive index medium, does not need manual adjustment of the step length, can adaptively adjust the step length in the light ray tracing process, and provides a fast and high-precision light ray tracing solution for the free gradient refractive index system design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of optical design, and in particular to an adaptive ray tracing method for free gradient refractive index media based on the directional derivative of refractive index. Background Technology

[0002] In recent years, researchers have continuously expanded design freedom to achieve higher optical quality in more complex optical systems. With the development of processes such as ion exchange, materials with gradient refractive indices are increasingly widely used in fields such as fiber optic communication and imaging optics. Furthermore, advancements in additive manufacturing technology have allowed for more complex gradient refractive index forms, moving towards free gradient refractive indices, adding the degree of freedom of refractive index distribution to optical design. For proper evaluation of system optical quality during the design process, ray tracing methods for free gradient refractive indices are crucial. While analytical methods can be used to obtain ray tracing results for several specific forms of gradient refractive indices, analytical methods are not suitable for complex forms like free gradient refractive indices. Existing optical design software uses numerical calculations to perform ray tracing step-by-step. Although the accuracy can be improved by reducing the step size, excessively small step sizes not only significantly increase computation time but also offer minimal accuracy gains. In the optical design process, image quality evaluation and optimization iterations involve numerous ray tracing processes. Therefore, optical designers need to balance computational efficiency and result accuracy by repeatedly adjusting the step size, but this leads to very low design efficiency. Summary of the Invention

[0003] The purpose of this invention is to address the problems existing in the prior art by providing an efficient and high-precision ray tracing method for free gradient refractive index media.

[0004] The technical solution to achieve the objective of this invention is: an adaptive ray tracing method for free gradient refractive index media based on the directional derivative of the refractive index, the method comprising the following steps:

[0005] Step 1: Based on the refractive index distribution n(r) at the initial position r0 of the light ray along the initial propagation direction d0, the refractive index directional derivative K, and the device length L, calculate the initial step size Δh0, and the number of calculations m = 1.

[0006] Step 2, using step size Δh m-1 Solve for the position r of the ray after it takes one step forward using the ray equation. m and direction d m ;

[0007] Step 3: Determine if the current position exceeds the device boundary. If it does, proceed to step 7; otherwise, proceed to step 4.

[0008] Step 4: Calculate the position r of the refractive index distribution obtained in step 2. m and direction d m The coefficient of refractive index change c m Obtain the step size correction factor α, and calculate the new step size Δh. m ;

[0009] Step 5, determine Δh m If the value exceeds the preset range, corrections are made, and the number of calculations is m = m + 1.

[0010] Step 6: Repeat steps 2 through 5 until the ray tracing extends beyond the device's range;

[0011] Step 7: Iteratively correct the step size of the light beam in the last step until the position error of the final emission point is less than the threshold.

[0012] Furthermore, the initial step size Δh0 is calculated in step 1, and the specific process includes:

[0013] Step 1-1: Based on the position and direction of the ray, calculate the directional derivative of the refractive index at the initial position r0 along the initial propagation direction of the ray:

[0014]

[0015] In the formula, n is the free gradient refractive index in three-dimensional distribution, r0=(x0,y0,z0) is the initial position of the ray, d0=(cosα0,cosβ0,cosγ0) is the initial direction cosine of the ray, used to represent the direction of the ray, where α0, β0 and γ0 are the angles between the ray and the positive direction of the optical axis, and K0 is the directional derivative of the refractive index along the propagation direction at the initial position of the ray;

[0016] Steps 1-2: Obtain the refractive index variation coefficient based on the directional derivative. The calculation formula is as follows:

[0017]

[0018] In the formula, c0 is the coefficient of refractive index variation;

[0019] Steps 1-3: Obtain the initial step size based on the refractive index variation coefficient. The calculation formula is as follows:

[0020] Δh0=(1.45c0 2 -0.73c0+0.10)L -0.37

[0021] In the formula, Δh0 is the initial step size, and L is the device length.

[0022] Furthermore, step 2 uses a step size Δh. m-1Solve for the position r of the ray after it takes one step forward using the ray equation. m and direction d m The specific process includes:

[0023] The equation of light is:

[0024]

[0025] In the formula, r = r(s) is the position vector of any point P on the ray and is a function of the ray arc length s;

[0026] Define the variable dh = ds / n, and rewrite the above formula as:

[0027]

[0028] Introducing the ray vector g = ndr / ds = (cosα,cosβ,cosγ)n, i.e. g = nd, the above equation is transformed into a system of first-order ordinary differential equations related to r and g:

[0029]

[0030]

[0031] Solving the first-order ordinary differential equation system using numerical methods, the position r of the ray after taking one step forward is obtained. m and the ray vector g m The calculation formula is:

[0032]

[0033] g m =g m-1 +ψ(r m-1 ,g m-1 ,Δh m-1 ,n)Δh m-1

[0034] In the formula, Both ψ and ψ are increment functions;

[0035] Therefore, we obtain: d m =g m / n.

[0036] Furthermore, the process of determining whether the current position exceeds the device boundary in step 3 includes:

[0037] Step 3-1, take the light position r obtained in step 2 m =(x m ,y m ,z m ) of (x m ,ym Substitute into the formula for the position of the surface profile:

[0038] z surface =f(x,y)+L

[0039] In the formula, x m y m , z m Let x, y, and z be the x, y, and z coordinates of the ray position, respectively, and f(x, y) be the surface shape expression of the back surface. surface For the back surface in (x m ,y m The z-coordinate of the position;

[0040] Step 3-2, compare z m With z surface If z m >z surface This indicates that the current position of the light beam has exceeded the device boundary.

[0041] Furthermore, step 4 involves calculating the refractive index distribution at the position r obtained in step 2. m and direction d m The coefficient of refractive index change c m Obtain the step size correction factor α, and calculate the new step size Δh. m Specifically, it includes:

[0042] Step 4-1, calculate the refractive index distribution at the current position r of the ray. m and direction d m The coefficient of refractive index change c m The calculation formula is:

[0043]

[0044] In the formula, K m Let the refractive index be r at the current position of the ray. m The directional derivative along the direction of propagation;

[0045] Step 4-2, use c m The step size correction factor α is calculated using the following formula:

[0046]

[0047] In the formula, q=|c m |-|c m-1 |, where the exponential part consisting of q indicates the direction of correction for Δh at each step; c m-1 For the refractive index distribution at the previous position r m-1 and the previous direction d m-1 The coefficient of refractive index variation;

[0048] Step 4-3, calculate the new step size Δh m The calculation formula is:

[0049] Δh m =αΔh m-1 .

[0050] Furthermore, the determination of Δh in step 5 m Whether it exceeds the preset range, the specific process includes:

[0051] Based on the step size Δh obtained in step 4 m Determine its size and make corrections, based on the following conditions:

[0052] 0.001≤Δh m ≤0.1mm

[0053] If Δh m If the above judgment conditions are met, no modification is made; if Δh m If the value is greater than 0.1 mm, then let Δh m =0.1mm, if Δh m If <0.001mm, then let Δh m =0.001mm.

[0054] Furthermore, the iterative correction of the step size of the light beam in the final step, as described in step 7, until the position error of the final emission point is less than the threshold, specifically includes:

[0055] Step 7-1, calculate the step size error e:

[0056] e = z m -z surface

[0057] In the formula, z m Let the position of the light be r. m z-coordinate, z surface For the back surface in (x m ,y m The z-coordinate of the position;

[0058] Step 7-2: Correct the step size of the last step of the light beam using the step size error e.

[0059] Δh′ last =Δh last -e

[0060] In the formula, Δh last , Δh′ last These are the step sizes for the last step before and after the correction, respectively;

[0061] Step 7-3: Using the corrected step size, recalculate the ray position r from the last step using the process in Step 2.last and the ray vector g last Iterative calculations continue until the following equation is satisfied:

[0062] |e|≤ε

[0063] In the formula, ε is the threshold.

[0064] Compared with the prior art, the significant advantages of this invention are:

[0065] 1) This invention can adaptively adjust the step size in the ray tracing process according to the change of refractive index, which solves the problem that designers need to manually set and judge whether the step size is reasonable in traditional methods.

[0066] 2) The present invention can adaptively correct the step size of each step, and can make reasonable corrections to the step size by judging the change in refractive index along the current light transmission direction during the gradual ray tracing process.

[0067] 3) This invention can significantly improve computational efficiency and bring convenience to the optimized design of free gradient refractive index optical systems.

[0068] 4) The present invention can achieve the required calculation accuracy for devices of different lengths, and can reduce the number of calculations while maintaining the same accuracy.

[0069] The present invention will now be described in further detail with reference to the accompanying drawings. Attached Figure Description

[0070] Figure 1 This is a flowchart of the adaptive ray tracing method for free gradient refractive index media based on the directional derivative of refractive index according to the present invention. Detailed Implementation

[0071] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0072] It should be noted that if the embodiments of the present invention involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of the components in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.

[0073] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.

[0074] In one embodiment, combined Figure 1 An adaptive ray tracing method based on the directional derivative of the refractive index in a free gradient refractive index medium is provided. The method includes the following steps:

[0075] Step 1: Based on the refractive index distribution n(r) at the initial position r0 of the light ray along the initial propagation direction d0, the refractive index directional derivative K, and the device length L, calculate the initial step size Δh0, and the number of calculations m = 1.

[0076] Step 2, using step size Δh m-1 Solve for the position r of the ray after it takes one step forward using the ray equation. m and direction d m ;

[0077] Step 3: Determine if the current position exceeds the device boundary. If it does, proceed to step 7; otherwise, proceed to step 4.

[0078] Step 4: Calculate the position r of the refractive index distribution obtained in step 2. m and direction d m The coefficient of refractive index change c m Obtain the step size correction factor α, and calculate the new step size Δh. m ;

[0079] Step 5, determine Δh m If the value exceeds the preset range, corrections are made, and the number of calculations is m = m + 1.

[0080] Step 6: Repeat steps 2 through 5 until the ray tracing extends beyond the device's range;

[0081] Step 7: Iteratively correct the step size of the light beam in the last step until the position error of the final emission point is less than the threshold.

[0082] Furthermore, in one embodiment, the initial step size Δh0 is calculated in step 1, and the specific process includes:

[0083] Step 1-1: Based on the position and direction of the ray, calculate the directional derivative of the refractive index at the initial position r0 along the initial propagation direction of the ray:

[0084]

[0085] In the formula, n is the free gradient refractive index in three-dimensional distribution, r0=(x0,y0,z0) is the initial position of the ray, d0=(cosα0,cosβ0,cosγ0) is the initial direction cosine of the ray, used to represent the direction of the ray, where α0, β0 and γ0 are the angles between the ray and the positive direction of the optical axis, and K0 is the directional derivative of the refractive index along the propagation direction at the initial position of the ray;

[0086] Steps 1-2: Obtain the refractive index variation coefficient based on the directional derivative. The calculation formula is as follows:

[0087]

[0088] In the formula, c0 is the coefficient of refractive index variation;

[0089] Steps 1-3: Obtain the initial step size based on the refractive index variation coefficient. The calculation formula is as follows:

[0090] Δh0=(1.45c0 2 -0.73c0+0.10)L -0.37

[0091] In the formula, Δh0 is the initial step size, and L is the device length.

[0092] Furthermore, in one embodiment, step 2 uses a step size Δh. m-1 Solve for the position r of the ray after it takes one step forward using the ray equation. m and direction d m The specific process includes:

[0093] The propagation of light follows the equation of light rays. To find the position and direction of light rays during their propagation, we need to solve the equation of light rays.

[0094] The equation of light is:

[0095]

[0096] In the formula, r = r(s) is the position vector of any point P on the ray and is a function of the ray arc length s;

[0097] Define the variable dh = ds / n, and rewrite the above formula as:

[0098]

[0099] Introducing the ray vector g = ndr / ds = (cosα,cosβ,cosγ)n, i.e. g = nd, the above equation is transformed into a system of first-order ordinary differential equations related to r and g:

[0100]

[0101]

[0102] The first-order ordinary differential equation system is solved using numerical methods for differential equations. Here, the fourth-order Runge-Kutta method is used. The position r of the ray after one step forward is then determined. m and the ray vector g m The calculation formula is:

[0103]

[0104]

[0105] In the formula, A, B, C and D are defined as follows:

[0106] A=Δh m-1 D(r m-1 )

[0107]

[0108]

[0109]

[0110] In the formula,

[0111] Ultimately, d m =g m / n.

[0112] Furthermore, in one embodiment, the process of determining whether the current position exceeds the device boundary in step 3 specifically includes:

[0113] Step 3-1, take the light position r obtained in step 2 m =(x m ,y m ,z m ) of (x m ,y m Substitute into the formula for the position of the surface profile:

[0114] z surface =f(x,y)+L

[0115] In the formula, x m y m , z mLet x, y, and z be the x, y, and z coordinates of the ray position, respectively, and f(x, y) be the surface shape expression of the back surface. surface For the back surface in (x m ,y m The z-coordinate of the position;

[0116] Step 3-2, compare z m With z surface If z m >z surface This indicates that the current position of the light beam has exceeded the device boundary.

[0117] Furthermore, in one embodiment, step 4 involves calculating the refractive index distribution at the position r obtained in step 2. m and direction d m The coefficient of refractive index change c m Obtain the step size correction factor α, and calculate the new step size Δh. m Specifically, it includes:

[0118] Step 4-1, calculate the refractive index distribution at the current position r of the ray. m and direction d m The coefficient of refractive index change c m The calculation formula is:

[0119]

[0120] In the formula, K m Let the refractive index be r at the current position of the ray. m The directional derivative along the direction of propagation;

[0121] Step 4-2, use c m The step size correction factor α is calculated using the following formula:

[0122]

[0123] In the formula, q=|c m |-|c m-1 |, where the exponential part consisting of q indicates the direction of correction for Δh at each step; c m-1 For the refractive index distribution at the previous position r m-1 and the previous direction d m-1 The coefficient of refractive index variation;

[0124] Step 4-3, calculate the new step size Δh m The calculation formula is:

[0125] Δh m =αΔh m-1 .

[0126] Furthermore, in one embodiment, the determination of Δh in step 5... m Whether it exceeds the preset range, the specific process includes:

[0127] Based on the step size Δh obtained in step 4 m Determine its size and make corrections, based on the following conditions:

[0128] 0.001≤Δh m ≤0.1mm

[0129] If Δh m If the above judgment conditions are met, no modification is made; if Δh m If the value is greater than 0.1 mm, then let Δh m =0.1mm, if Δh m If <0.001mm, then let Δh m =0.001mm.

[0130] Furthermore, in one embodiment, the iterative correction of the step size of the last step of the light beam in step 7 until the position error of the final emission point is less than a threshold includes the following specific process:

[0131] Step 7-1, calculate the step size error e:

[0132] e = z m -z surface

[0133] In the formula, z m Let the position of the light be r. m z-coordinate, z surface For the back surface in (x m ,y m The z-coordinate of the position;

[0134] Step 7-2: Correct the step size of the last step of the light beam using the step size error e.

[0135] Δh′ last =Δh last -e

[0136] In the formula, Δh last , Δh′ last These are the step sizes for the last step before and after the correction, respectively;

[0137] Step 7-3: Using the corrected step size, recalculate the ray position r from the last step using the process in Step 2. last and the ray vector g last Iterative calculations continue until the following equation is satisfied:

[0138] |e|≤ε

[0139] In the formula, ε is the threshold. Preferably, the threshold ε = 10. -13 .

[0140] In one embodiment, an adaptive ray tracing system based on a free gradient refractive index medium with refractive index directional derivative is provided, the system comprising sequentially executing:

[0141] The first module is used to calculate the initial step size Δh0 based on the refractive index directional derivative K of the refractive index distribution n(r) at the initial position r0 of the light ray along the initial propagation direction d0 of the light ray, and the device length L, with the number of calculations m = 1.

[0142] The second module is used to use step size Δh m-1 Solve for the position r of the ray after it takes one step forward using the ray equation. m and direction d m ;

[0143] The third module is used to determine whether the current position exceeds the device boundary. If it does, the seventh module is executed; otherwise, the fourth module is executed.

[0144] The fourth module is used to calculate the position r of the refractive index distribution obtained in step 2. m and direction d m The coefficient of refractive index change c m Obtain the step size correction factor α, and calculate the new step size Δh. m ;

[0145] The fifth module is used to determine Δh. m If the value exceeds the preset range, corrections are made, and the number of calculations is m = m + 1.

[0146] The sixth module is used to cycle through modules two through five until the ray tracing goes beyond the device's range;

[0147] The seventh module is used to iteratively correct the step size of the light beam in the final step until the position error of the final emission point is less than the threshold.

[0148] Specific limitations regarding the adaptive ray tracing system for free gradient refractive index media based on the directional derivative of the refractive index can be found in the limitations of the adaptive ray tracing method for free gradient refractive index media based on the directional derivative of the refractive index mentioned above, and will not be repeated here. Each module in the aforementioned adaptive ray tracing system for free gradient refractive index media based on the directional derivative of the refractive index can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of the processor, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0149] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements:

[0150] Step 1: Based on the refractive index distribution n(r) at the initial position r0 of the light ray along the initial propagation direction d0, the refractive index directional derivative K, and the device length L, calculate the initial step size Δh0, and the number of calculations m = 1.

[0151] Step 2, using step size Δh m-1 Solve for the position r of the ray after it takes one step forward using the ray equation. m and direction d m ;

[0152] Step 3: Determine if the current position exceeds the device boundary. If it does, proceed to step 7; otherwise, proceed to step 4.

[0153] Step 4: Calculate the position r of the refractive index distribution obtained in step 2. m and direction d m The coefficient of refractive index change c m Obtain the step size correction factor α, and calculate the new step size Δh. m ;

[0154] Step 5, determine Δh m If the value exceeds the preset range, corrections are made, and the number of calculations is m = m + 1.

[0155] Step 6: Repeat steps 2 through 5 until the ray tracing extends beyond the device's range;

[0156] Step 7: Iteratively correct the step size of the light beam in the last step until the position error of the final emission point is less than the threshold.

[0157] For specific limitations on each step, please refer to the limitations on the adaptive ray tracing method for free gradient refractive index media based on the directional derivative of refractive index mentioned above, which will not be repeated here.

[0158] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program being implemented when executed by a processor:

[0159] Step 1: Based on the refractive index distribution n(r) at the initial position r0 of the light ray along the initial propagation direction d0, the refractive index directional derivative K, and the device length L, calculate the initial step size Δh0, and the number of calculations m = 1.

[0160] Step 2, using step size Δh m-1 Solve for the position r of the ray after it takes one step forward using the ray equation. m and direction dm ;

[0161] Step 3: Determine if the current position exceeds the device boundary. If it does, proceed to step 7; otherwise, proceed to step 4.

[0162] Step 4: Calculate the position r of the refractive index distribution obtained in step 2. m and direction d m The coefficient of refractive index change c m Obtain the step size correction factor α, and calculate the new step size Δh. m ;

[0163] Step 5, determine Δh m If the value exceeds the preset range, corrections are made, and the number of calculations is m = m + 1.

[0164] Step 6: Repeat steps 2 through 5 until the ray tracing extends beyond the device's range;

[0165] Step 7: Iteratively correct the step size of the light beam in the last step until the position error of the final emission point is less than the threshold.

[0166] For specific limitations on each step, please refer to the limitations on the adaptive ray tracing method for free gradient refractive index media based on the directional derivative of refractive index mentioned above, which will not be repeated here.

[0167] As a specific example, in one embodiment, the ray tracing method for free gradient refractive index media based on the directional derivative of refractive index of the present invention is further verified and explained, specifically including:

[0168] In this embodiment, a free gradient refractive index device is selected, whose refractive index distribution expression is a three-dimensional orthogonal polynomial composed of Zernike polynomials and Legendre polynomials, and the coefficients of each term are shown in Table 1.

[0169] Table 1. Expressions and coefficients for the free gradient refractive index distribution.

[0170]

[0171] The overall length of the device is set to 2.5 mm, and the aperture is 4.2 mm. In this embodiment, a single light beam is selected for incident, with the incident light position being (0,1,0) and the direction cosine of the incident light beam being (0,0.44,0.90).

[0172] The method of this invention for ray tracing includes the following steps:

[0173] Step 1: Based on the refractive index distribution n(r) at the initial position r0 of the light ray along the initial propagation direction d0, and the device length L, obtain a reasonable initial step size Δh0, and perform the following calculations m = 1.

[0174] Step 2, using step size Δh m-1 Solve for the position r of the ray after it takes one step forward using the ray equation. m and direction d m ;

[0175] Step 3: Determine if the current position exceeds the device boundary. If it does, proceed to step 7; otherwise, proceed to step 4.

[0176] Step 4: Calculate the position r of the refractive index distribution obtained in step 2. m and direction d m The coefficient of refractive index change c m Obtain the step size correction factor α, and then calculate the new step size Δh. m ;

[0177] Step 5, determine Δh m If the range is exceeded, a correction is made, and the number of calculations is m = m + 1.

[0178] Step 6: Repeat steps 2 through 5 until the ray tracing extends beyond the device's range;

[0179] Step 7: After the tracking position exceeds the device boundary, iteratively correct the step size of the last step until the position error of the final exit point is less than the threshold.

[0180] Ray tracing of the device was performed using both conventional and the method of this invention, and the results are shown in Table 2. Since there is currently no precise analytical solution for this complex refractive index, the results of the conventional method with a very small step size were used as reference values. The conventional method uses a step size of 10... -6 The calculations were performed with a step size of mm, and the results were used as reference values. The total number of calculation steps was over 1.645 million, and the time for single-ray tracing was 45.719 seconds. The accuracy of the calculation results must meet the standards for use in optical design, typically less than 10. -9 mm. When the step size of the conventional method is set to 10. -4 When the value was mm, the calculation steps were 16453, taking 0.462 seconds, and the error of the result was 1.89 × 10⁻⁶. -9 mm. The method of this invention achieves 5.77 × 10 mm in just 24 steps by adaptively adjusting the step size. -10 With an error of mm, the time taken is only 0.003 seconds, which not only provides higher accuracy but also increases the calculation speed by approximately 130 times compared to conventional methods. Therefore, the method of this invention provides high accuracy and speed in ray tracing results in free gradient refractive index media. Compared to traditional methods, it does not require manual setting of the step size, and can provide high-precision and high-efficiency ray tracing for the design of free gradient refractive index optical systems.

[0181] Table 2 Comparison between conventional methods and the method of this invention

[0182]

[0183] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.

Claims

1. An adaptive ray tracing method for free gradient refractive index media based on the directional derivative of refractive index, characterized in that, The method includes the following steps: Step 1: Based on the refractive index distribution n(r) at the initial position r0 of the light ray along the initial propagation direction d0, the refractive index directional derivative K, and the device length L, calculate the initial step size ∆h0, and the number of calculations m=1. Step 2, using step size ∆h m-1 Solve for the position r of the ray after it takes one step forward using the ray equation. m and direction d m ; Step 3: Determine if the current position exceeds the device boundary. If it does, proceed to step 7; otherwise, proceed to step 4. Step 4: Calculate the position r of the refractive index distribution obtained in step 2. m and direction d m The coefficient of refractive index change c m Obtain the step size correction factor α, and calculate the new step size ∆h. m ; Step 5, determine ∆h m If the value exceeds the preset range, corrections are made, and the number of calculations is m = m + 1. Step 6: Repeat steps 2 through 5 until the ray tracing extends beyond the device's range; Step 7: Iteratively correct the step size of the light beam in the last step until the position error of the final exit point is less than the threshold. Step 1 calculates the initial step size ∆h0, and the specific process includes: Step 1-1: Based on the position and direction of the ray, calculate the directional derivative of the refractive index at the initial position r0 along the initial propagation direction of the ray: In the formula, n is the free gradient refractive index in three-dimensional distribution, r0=(x0, y0, z0) is the initial position of the ray, d0=(cosα0, cosβ0, cosγ0) is the initial direction cosine of the ray, used to represent the direction of the ray, where α0, β0 and γ0 are the angles between the ray and the positive direction of the optical axis, and K0 is the directional derivative of the refractive index along the propagation direction at the initial position of the ray; Steps 1-2: Obtain the refractive index variation coefficient based on the directional derivative. The calculation formula is as follows: In the formula, c0 is the coefficient of refractive index variation; Steps 1-3: Obtain the initial step size based on the refractive index variation coefficient. The calculation formula is as follows: In the formula, ∆h0 is the initial step size, and L is the device length; Step 4 involves calculating the refractive index distribution at the position r obtained in step 2. m and direction d m The coefficient of refractive index change c m Obtain the step size correction factor α, and calculate the new step size ∆h. m Specifically, it includes: Step 4-1, calculate the refractive index distribution at the current position r of the ray. m and direction d m The coefficient of refractive index change c m The calculation formula is: In the formula, K m Let r be the refractive index at the current position of the ray. m The directional derivative along the direction of propagation; Step 4-2, use c m The step size correction factor α is calculated using the following formula: In the formula, q = |c m |−|c m−1 |, where the exponential part consisting of q indicates the direction of correction for ∆h at each step; c m-1 For the refractive index distribution at the previous position r m-1 and the previous direction d m-1 The coefficient of refractive index variation; Step 4-3, calculate the new step size ∆h m The calculation formula is: 。 2. The adaptive ray tracing method for free gradient refractive index media based on the directional derivative of refractive index according to claim 1, characterized in that, Step 2 describes using a step size ∆h m-1 Solve for the position r of the ray after it takes one step forward using the ray equation. m and direction d m The specific process includes: The equation of light is: In the formula, r = r(s) is the position vector of any point P on the ray and is a function of the ray arc length s; Define the variable dh = ds / n, and rewrite the above equation as: Introducing the ray vector g = ndr / ds = (cosα, cosβ, cosγ)n, i.e. g = nd, the above equation is transformed into a system of first-order ordinary differential equations related to r and g: Solving the first-order ordinary differential equation system using numerical methods, the position r of the ray after taking one step forward is obtained. m and the ray vector g m The calculation formula is: In the formula, φ and ψ are both increment functions; Therefore, we obtain: d m = g m / n.

3. The adaptive ray tracing method for free gradient refractive index media based on the directional derivative of refractive index according to claim 1, characterized in that, Step 3, determining whether the current position exceeds the device boundary, specifically includes the following process: Step 3-1, take the light position r obtained in step 2 m =(x m , y m , z m ) of (x m , y m Substitute into the formula for the position of the surface profile: In the formula, x m y m , z m Let x, y, and z be the x, y, and z coordinates of the ray position, respectively; f(x, y) is the surface shape expression of the back surface; z... surface For the back surface in (x m , y m The z-coordinate of the position; Step 3-2, compare z m With z surface If z m >z surface This indicates that the current position of the light beam has exceeded the device boundary.

4. The adaptive ray tracing method for free gradient refractive index media based on the directional derivative of refractive index according to claim 1, characterized in that, The determination of ∆h in step 5 m Whether it exceeds the preset range, the specific process includes: Based on the step size ∆h obtained in step 4 m Determine its size and make corrections, based on the following conditions: If ∆h m If the above judgment conditions are met, no modification is required; if ∆h m If the value is greater than 0.1 mm, then let ∆h m =0.1mm, if ∆h m If <0.001mm, then let ∆h m =0.001mm.

5. The adaptive ray tracing method for free gradient refractive index media based on the directional derivative of refractive index according to claim 1, characterized in that, Step 7 involves iteratively correcting the step size of the light beam in the final step until the position error of the final emission point is less than the threshold. The specific process includes: Step 7-1, calculate the step size error : In the formula, Let the position of the light be r. m z-coordinate, z surface For the back surface in (x m , y m The z-coordinate of the position; Step 7-2, utilizing the step size error Correct the step size of the last step of the light: In the formula, ∆h last , These are the step sizes for the last step before and after the correction, respectively; Step 7-3: Using the corrected step size, recalculate the ray position r from the last step using the process in step 2. last and the ray vector g last Iterative calculations continue until the following equation is satisfied: In the formula, ε is the threshold.

6. An adaptive ray tracing system for a free gradient refractive index medium based on the directional derivative of refractive index, according to any one of claims 1 to 5, characterized in that, The system includes sequential execution of: The first module is used to calculate the initial step size ∆h0 based on the refractive index direction derivative K of the refractive index distribution n(r) at the initial position r0 of the light ray along the initial propagation direction d0 of the light ray, and the device length L, with the number of calculations m=1. The second module is used to use step size ∆h m-1 Solve for the position r of the ray after it takes one step forward using the ray equation. m and direction d m ; The third module is used to determine whether the current position exceeds the device boundary. If it does, the seventh module is executed; otherwise, the fourth module is executed. The fourth module is used to calculate the position r of the refractive index distribution obtained in step 2. m and direction d m The coefficient of refractive index change c m Obtain the step size correction factor α, and calculate the new step size ∆h. m ; The fifth module is used to determine ∆h m If the value exceeds the preset range, corrections are made, and the number of calculations is m = m + 1. The sixth module is used to cycle through modules two through five until the ray tracing goes beyond the device's range; The seventh module is used to iteratively correct the step size of the light beam in the final step until the position error of the final emission point is less than the threshold.

7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Continuous wave ultrasonic tomography reconstruction method for correcting path tracking description

    CN110097608A

  • Optical processing method and optical processor using the same

    JP2001242376A