Rainbow fringe simulation method and device of diffractive optical waveguide, equipment and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]本申请的主要目的在于提供一种衍射光波导的彩虹纹仿真方法、装置、设备及存储介质,旨在解决在对衍射光波导进行彩虹纹仿真分析时,衍射光波导的彩虹纹效果直观性不佳的技术问题
Smart Images

Figure CN121091506B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of rainbow pattern simulation technology, and in particular to a method, apparatus, device and storage medium for simulating rainbow patterns in a diffractive optical waveguide. Background Technology
[0002] Diffractive waveguides, such as surface relief grating (SRG) waveguides, offer advantages such as thinness, high transmittance, low reflectivity, high mass production feasibility, and good adaptability to glasses, making them a mainstream choice for optical display solutions in augmented reality (AR) glasses. However, because diffractive waveguides utilize the diffraction principle of gratings, they are highly susceptible to diffraction effects on ambient light while transmitting light, causing diffraction rainbow patterns to enter the human eye, affecting display quality and reducing user experience. Therefore, optimizing the treatment of rainbow patterns is a crucial aspect of diffractive waveguide design.
[0003] In related technologies, when performing rainbow pattern simulation analysis on diffractive waveguides, the rainbow pattern spectrum information corresponding to the diffractive waveguide is established based on the spectral K-vector information in the wave vector domain (K-space, K-domain). However, given the determined rainbow pattern spectrum information, professional designers need to judge the rainbow pattern effect based on this spectrum information, which can easily lead to poor intuitiveness of the rainbow pattern effect of the diffractive waveguide. Summary of the Invention
[0004] The main objective of this application is to provide a method, apparatus, device, and storage medium for simulating rainbow patterns in diffractive optical waveguides, aiming to solve the technical problem of poor intuitiveness of the rainbow pattern effect in diffractive optical waveguides when performing rainbow pattern simulation analysis.
[0005] In a first aspect, this application provides a method for simulating rainbow patterns in a diffractive optical waveguide, including:
[0006] Obtain the incident angle information of the incident light rays provided to the diffracting waveguide in the K-domain;
[0007] Obtain the grating parameters of the diffractive waveguide in the K-domain;
[0008] Based on the incident angle information and the grating parameters, the exit angle information of the outgoing light in the K-domain after the incident light passes through the diffraction waveguide is determined.
[0009] The emission angle information of the emitted ray in the K domain is converted into the target angle position of the emitted ray in the world coordinate system at the eye center;
[0010] Based on the multiple target angular positions and the wavelength of the incident light corresponding to each target angular position, the rainbow pattern simulation image of the diffraction waveguide in the world coordinate system at the center of the eye is determined.
[0011] Secondly, this application provides a rainbow pattern simulation device for a diffractive optical waveguide, the rainbow pattern simulation device comprising:
[0012] The information acquisition module is used to acquire the incident angle information of the incident light rays provided to the diffractive waveguide in the K-domain.
[0013] The parameter acquisition module is used to acquire the grating parameters of the diffractive waveguide in the K-domain;
[0014] The information determination module is used to determine the exit angle information of the outgoing light in the K-domain after the incident light has passed through the diffraction waveguide, based on the incident angle and the grating parameters.
[0015] The information conversion module is used to convert the emission angle information of the emitted light in the K domain into the target angle position of the emitted light in the world coordinate system of the eye center;
[0016] The image generation module is used to determine the rainbow pattern simulation image of the diffraction waveguide in the world coordinate system at the center of the eye, based on the multiple target angular positions and the wavelength of the incident light corresponding to each target angular position.
[0017] Thirdly, this application provides a computer device, which includes a memory and a processor;
[0018] The memory is used to store computer programs;
[0019] The processor is configured to execute the computer program and, in executing the computer program, implement the steps of the rainbow ripple simulation method for diffractive waveguides as described above.
[0020] Fourthly, this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for simulating rainbow patterns in a diffractive waveguide.
[0021] This application provides a method, apparatus, device, and storage medium for simulating rainbow patterns in a diffractive waveguide. The rainbow pattern simulation method includes: acquiring the incident angle information of the incident light provided to the diffractive waveguide in the K-domain; acquiring the grating parameters of the diffractive waveguide in the K-domain; determining the exit angle information of the outgoing light in the K-domain after the incident light passes through the diffractive waveguide based on the incident angle information and the grating parameters; converting the exit angle information of the outgoing light in the K-domain into the target angle position of the outgoing light in the eye-centric world coordinate system; and determining the rainbow pattern simulation image of the diffractive waveguide in the eye-centric world coordinate system based on multiple target angle positions and the wavelength of the incident light corresponding to each target angle position.
[0022] Since the rainbow pattern simulation image of the diffracted waveguide in the eye-centric world coordinate system is determined based on multiple target angle positions and the wavelengths of the incident light rays corresponding to each target angle position, and the target angle positions are obtained by transforming the exit angle information of the outgoing light rays in the K-domain to the eye-centric world coordinate system, and the eye-centric world coordinate system matches human vision, it is equivalent to converting the exit angle information of the outgoing light rays in the K-domain into a rainbow pattern simulation image that can be directly viewed by the human eye. Therefore, users can determine the position of the rainbow pattern formed by the outgoing light rays in the rainbow pattern simulation image by using the target angle positions, and determine the color of the rainbow pattern formed by the outgoing light rays in the rainbow pattern simulation image by using the wavelengths of the incident light rays corresponding to the target angle positions. Based on the determination of the rainbow pattern simulation image, users do not need to have prior knowledge of the diffracted waveguide in the K-domain; they can still determine the rainbow pattern simulation effect of the diffracted waveguide by viewing the rainbow pattern simulation image, which helps to improve the intuitiveness of the rainbow pattern effect of the diffracted waveguide. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating a method for simulating rainbow patterns in a diffractive waveguide according to an embodiment of this application.
[0025] Figure 2 This is a schematic diagram illustrating the incident angle information of the incident light in the K-domain according to an embodiment of this application;
[0026] Figure 3 This is a schematic flowchart of a method for simulating rainbow patterns in a diffractive waveguide according to an embodiment of this application.
[0027] Figure 4This is a schematic diagram of the light path set corresponding to the outgoing light rays that can be transmitted from the grating region to the human eye according to an embodiment of this application;
[0028] Figure 5 This is another schematic block diagram of the rainbow pattern simulation method for diffractive waveguides according to an embodiment of this application;
[0029] Figure 6 This is a simulated image of a diffractive waveguide in the eye-centered world coordinate system according to an embodiment of this application;
[0030] Figure 7 This is a schematic block diagram of a rainbow pattern simulation device for a diffractive waveguide provided in an embodiment of this application;
[0031] Figure 8 This is a schematic block diagram of a computer device provided in an embodiment of this application. Detailed Implementation
[0032] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0033] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0034] This application provides a method, apparatus, device, and storage medium for simulating rainbow patterns in a diffractive optical waveguide. The method for simulating rainbow patterns in a diffractive optical waveguide can be applied to computer devices. Computer devices may include near-eye display devices, wearable devices, laptops, desktop computers, mobile phones, etc., and are not limited thereto. Near-eye display devices may include augmented reality (AR) glasses, mixed reality (MR) glasses, AR helmets, MR helmets, etc., and are not limited thereto. The method for simulating rainbow patterns in a diffractive optical waveguide can also be applied to servers. These servers can be standalone servers or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0035] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0036] Please see Figure 1 , Figure 1 This is a schematic flowchart illustrating a method for simulating rainbow patterns in a diffractive waveguide, as provided in an embodiment of this application. It should be noted that the rainbow pattern simulation method provided in this application can be used in computer equipment or servers, and is not limited thereto.
[0037] like Figure 1 As shown, the method for simulating rainbow patterns in the diffractive waveguide includes steps S101 to S105.
[0038] S101. Obtain the incident angle information of the incident light provided to the diffractive waveguide in the K domain.
[0039] For example, a diffractive waveguide is equivalent to a diffractive waveguide in a rainbow pattern simulation environment. For instance, it can be obtained by simulating a diffractive waveguide designed in a real environment, or it can be obtained by simulating the relevant design parameters of the diffractive waveguide, such as its shape and size, before designing the diffractive waveguide in a real environment. There are no restrictions on this.
[0040] During the simulation of rainbow patterns in a diffractive waveguide, incident light rays can be provided to the waveguide. These incident light rays can be provided by a preset light source. The preset light source can be obtained by simulating a light source in a real environment, or it can be obtained by simulating a light source based on its design parameters, such as the type and wavelength range, before designing the light source in a real environment. No restrictions are placed on this.
[0041] The incident light rays can form rainbow patterns after passing through the diffractive waveguide, which can then be used to simulate the rainbow patterns of the diffractive waveguide.
[0042] When an incident ray is provided to a diffracting waveguide, the incident angle information of the incident ray in the K-domain can be obtained. The K-domain can also be called K-dislocation, three-dimensional K-space, etc., without limitation.
[0043] Taking a diffracted waveguide satisfying a right-handed coordinate system in the K-domain polar coordinate system, with the Z-axis of the K-domain polar coordinate system pointing towards the human eye, as an example, the incident angle information of the incident light ray in the K-domain is as follows: Figure 2 As shown. The K-domain polar coordinate system can also be called the K-vector polar coordinate system, and this is not a restriction here.
[0044] like Figure 2As shown, the range of incident angles for the incident ray can include multiple discrete incident angles, that is, the incident angles corresponding to the incident ray in the K-domain. Each incident angle can have a one-to-one corresponding azimuth angle. And the zenith angle θ.
[0045] For example, the incident angle information of the incident ray in the K-domain includes the first direction cosine vector of the incident ray in the K-domain. The first direction cosine vector of the incident ray in the K-domain can be represented as (L, M, N). Here, L indicates the direction cosine vector component of the incident ray along the X-axis of the Cartesian coordinate system in the K-domain, M indicates the direction cosine vector component along the Y-axis of the Cartesian coordinate system in the K-domain, and N indicates the direction cosine vector component along the Z-axis of the Cartesian coordinate system in the K-domain. The first direction cosine vector (L, M, N) satisfies...
[0046] L 2 +M 2 +N 2 =1.
[0047] For example, the first direction cosine vector of the incident ray in the K-domain is determined based on the range of incident angles corresponding to the incident ray in the K-domain. For instance, the first direction cosine vector of the incident ray in the K-domain is determined based on the incident angles included in the range of incident angles corresponding to the incident ray.
[0048] The first direction cosine vector of the incident ray in the K-domain and the corresponding incident angle of the incident ray in the K-domain satisfy the following relationship (normalized):
[0049]
[0050] N = cosθ
[0051] The incident angle information of the incident ray in the K domain can be converted into the preset angular position of the incident ray in the world coordinate system at the center of the eye.
[0052] For example, if the incident angle information of the incident ray in the K-domain includes the first direction cosine vector of the incident ray in the K-domain, the preset angular position of the incident ray in the world coordinate system at the eye center and the first direction cosine vector of the incident ray in the K-domain satisfy the following relationship:
[0053]
[0054] Where, α x α is used to indicate the angular position component of the incident ray along the X-axis in the world coordinate system at the center of the eye. y This is used to indicate the angular position component of the incident ray along the Y-axis in the eye-centric world coordinate system. The preset angular position of the incident ray in the eye-centric world coordinate system includes the angular position component α. x and the angular position component αy .
[0055] By acquiring the incident angle information of the incident light ray in the K-domain provided to the diffracting waveguide, this information can be used for subsequent rainbow pattern simulation of the diffracting waveguide, thus improving the convenience of rainbow pattern simulation. Correspondingly, since the incident angle information of the incident light ray in the K-domain can be converted into a preset angular position of the incident light ray in the eye-centric world coordinate system, the incident angle information in the K-domain can be used to determine the rainbow pattern simulation image of the diffracting waveguide in the eye-centric world coordinate system during subsequent rainbow pattern simulation. This allows users to intuitively view the rainbow pattern simulation effect of the diffracting waveguide, thereby improving the intuitiveness of the rainbow pattern effect.
[0056] S102. Obtain the grating parameters of the diffractive waveguide in the K-domain.
[0057] For example, the grating parameters of a diffracting waveguide in the K-domain can also be called the grating K-vector parameters of the diffracting waveguide, without limitation. The grating parameters of a diffracting waveguide can be expressed as k g The grating parameters satisfy the following relationship:
[0058]
[0059] Where λ indicates the incident wavelength of the incident light provided to the diffractive waveguide, and d indicates the grating period of the diffractive waveguide.
[0060] Having obtained the grating parameters of the diffracting waveguide in the K-domain, these parameters can be decomposed into the grating parameter components k along the X-axis of the K-domain Cartesian coordinate system. gx And the grating parameter component k along the Y-axis of the diffracted waveguide in the K-domain Cartesian coordinate system. gy Grating parameter k g , grating parameter components k gx and grating parameter components k gy The following relationship must be satisfied:
[0061]
[0062] in, The angle used to indicate the grating period of the diffracting waveguide relative to the X-axis of the K-domain Cartesian coordinate system. The angle used to indicate the grating period of the diffracting waveguide relative to the Y-axis of the K-domain Cartesian coordinate system.
[0063] Once the grating parameters of the diffracting waveguide in the K-domain are obtained, these parameters can be combined with the incident angle information of the incident light in the K-domain to simulate the effect of the diffracting waveguide on the incident light. This can then be used to simulate the rainbow pattern of the diffracting waveguide, thereby improving the convenience of simulating the rainbow pattern of the diffracting waveguide.
[0064] S103. Based on the incident angle information and grating parameters, determine the exit angle information of the outgoing light in the K domain after the incident light passes through the diffraction waveguide.
[0065] For example, given the incident angle information of the incident light in the K-domain and the grating parameters of the diffractive waveguide in the K-domain, the effect of the diffractive waveguide on the incident light can be evaluated based on the incident angle information and the grating parameters, so as to determine the exit angle information of the outgoing light in the K-domain after the incident light passes through the diffractive waveguide.
[0066] The incident angle information includes the first direction cosine vector (L, M, N) of the incident ray in the K domain, and the grating parameters include the grating parameter components k. gx and grating parameter components k gy For example.
[0067] The first direction cosine vector (L, M, N) of the incident ray can be used to determine the first K vector value of the incident ray in the K-domain Cartesian coordinate system. The first K vector value may include the K vector component k along the X-axis of the incident ray in the K-domain Cartesian coordinate system. incx And the K vector component k of the incident ray in the K-domain rectangular coordinate system along the Y-axis. incy The first direction cosine vector of the incident ray and the first K vector value of the incident ray satisfy the following relationship:
[0068] k incx =L
[0069] k incy =M
[0070] Correspondingly, the grating parameter component k gx , grating parameter components k gy K vector value component k incx and the K vector value component k incy It can be used to evaluate the effect of diffractive waveguides on incident light.
[0071] The grating K-vector action formula that satisfies the effect of the diffracting waveguide on the incident light ray is as follows:
[0072] k incx +m*k gx =k outx =L out
[0073] k incy +m*k gy =k outy =M out
[0074] Where m indicates the diffraction order, k outx and k outy The second K-vector value, k, is used to indicate the output ray of the incident ray after it passes through the diffraction waveguide in the K-domain Cartesian coordinate system. outx The K-vector component used to indicate the X-axis value of the outgoing ray in the K-domain Cartesian coordinate system, k outy L is used to indicate the K-vector component of the outgoing ray along the Y-axis in the K-domain Cartesian coordinate system. out M is used to indicate the direction cosine vector component of the outgoing ray along the X-axis in the K-domain Cartesian coordinate system. out Used to indicate the direction cosine vector component of the outgoing ray along the Y-axis in the K-domain Cartesian coordinate system.
[0075] In some exemplary embodiments, the diffraction order m includes ±1 order of action, but is not limited thereto and is not restricted here.
[0076] Direction cosine vector component L out and the direction cosine vector component M out It can be used to determine the exit angle information of the outgoing light in the K-domain after the incident light has passed through the diffraction waveguide.
[0077] For example, the exit angle information of the outgoing ray in the K-domain includes the second direction cosine vector of the outgoing ray in the K-domain. For instance, based on the direction cosine vector component L... out and the direction cosine vector component M out The direction cosine vector component N of the outgoing ray along the Z-axis in the K-domain Cartesian coordinate system can be determined. out According to the direction cosine vector component L out Direction cosine vector component M out and the direction cosine vector component N out The second direction cosine vector of the outgoing ray in the K-domain can be determined. The second direction cosine vector of the outgoing ray can be expressed as (L... out M out N out ).
[0078] Since the first direction cosine vector (L,M,N) satisfies L 2 +M 2 +N 2 =1, then the second direction cosine vector (L) can be determined. out M out N out ) satisfies Lout 2 +M out 2 +N out 2 =1. Based on this, the direction cosine vector component L can be... out and the direction cosine vector component M out Substituting into the previous equation, we obtain the direction cosine vector component N. out This allows us to determine the second direction cosine vector (L) of the emitted ray. out M out N out ).
[0079] Having determined the exit angle information of the outgoing ray in the K-domain after the incident ray passes through the diffraction waveguide, this information can be used to determine the target angular position of the outgoing ray in the eye-centric world coordinate system, thereby determining the simulated rainbow pattern image of the diffraction waveguide in the eye-centric world coordinate system. Since the eye-centric world coordinate system matches human vision, the exit angle information in the K-domain can be subsequently converted into a simulated rainbow pattern image that is visually perceptible to the human eye, thus improving the intuitiveness of the rainbow pattern effect of the diffraction waveguide.
[0080] S104. Convert the outgoing angle information of the outgoing ray in the K domain into the target angle position of the outgoing ray in the world coordinate system at the eye center.
[0081] For example, when the exit angle information of the outgoing ray in the K-domain includes the second direction cosine vector of the outgoing ray in the K-domain, since the preset angular position of the incident ray in the world coordinate system at the eye center satisfies the first direction cosine vector of the incident ray in the K-domain... as well as Then, the target angular position of the outgoing ray in the world coordinate system at the eye center and the second direction cosine vector of the outgoing ray in the K domain satisfy the following relationship:
[0082]
[0083] Where, α outx α is used to indicate the angular position component of the outgoing ray along the X-axis in the world coordinate system at the eye's center. outy This indicates the angular position component of the emitted ray on the Y-axis in the eye's central world coordinate system. The target angular position of the emitted ray in the eye's central world coordinate system includes the angular position component α. outx and the angular position component α outy .
[0084] Based on this, the direction cosine vector component L can be... out Direction cosine vector component M outand the direction cosine vector component N out Substituting into the previous equation, we obtain the angular position component α. outx and the angular position component α outy This allows us to determine the target angle position of the emitted ray in the world coordinate system at the center of the eye.
[0085] Once the target angular position of the outgoing ray in the eye's central coordinate system is determined, this position can be used to subsequently determine the rainbow pattern simulation image of the diffracted waveguide in the eye's central coordinate system. Since the eye's central coordinate system matches human vision, the target angular position of the outgoing ray in the eye's central coordinate system can be converted into a rainbow pattern simulation image that is visually perceptible to the human eye, thereby improving the intuitiveness of the rainbow pattern effect of the diffracted waveguide.
[0086] S105. Based on the multiple target angular positions and the wavelength of the incident light corresponding to each target angular position, determine the simulated rainbow pattern image of the diffraction waveguide in the world coordinate system at the center of the eye.
[0087] For example, in simulating rainbow patterns on a diffractive waveguide, incident rays with different incident angles can be provided to the waveguide. These incident angles can fall within the same range, but are not limited to this; they can also fall within different ranges. Correspondingly, after passing through the diffractive waveguide, the incident rays with different incident angles yield corresponding outgoing rays, allowing us to determine their target angular positions in the eye's central coordinate system. These target angular positions can be different or partially the same, without limitation. Based on this, we can synthesize the target angular positions of the different outgoing rays—multiple target angular positions—to determine the simulated rainbow pattern image of the diffractive waveguide in the eye's central coordinate system.
[0088] Accordingly, since the incident light rays have the same wavelength as their corresponding outgoing light rays after passing through the diffraction waveguide, in determining the simulated rainbow pattern image of the diffraction waveguide in the eye's central world coordinate system based on multiple target angular positions, the wavelength of the incident light rays corresponding to the target angular positions can also be used to determine the simulated rainbow pattern image. For example, the position of the rainbow pattern on the simulated rainbow pattern image can be determined based on the target angular positions, and the color of the rainbow pattern can be determined based on the wavelength of the incident light rays corresponding to the target angular positions, thus determining the simulated rainbow pattern image.
[0089] Given a simulated rainbow pattern image, since the world coordinate system at the eye center matches human vision, users can see the position and color of the rainbow pattern formed by the outgoing light rays based on the simulated rainbow pattern image. Furthermore, users do not need to have knowledge of diffractive waveguides in the K-domain to determine the simulated rainbow pattern effect of the diffractive waveguide, which helps to improve the intuitiveness of the rainbow pattern effect of the diffractive waveguide.
[0090] The improved intuitiveness of the rainbow effect in diffractive waveguides allows users to quickly and intuitively judge the effect and assess whether it has been improved. This facilitates cross-disciplinary information sharing on the rainbow effect of diffractive waveguides, thereby promoting continuous and rapid iterative improvement.
[0091] In some implementations, a first direction cosine vector of the incident ray in the K domain is determined based on the incident angle range corresponding to the incident ray in the K domain; and the incident angle information of the incident ray in the K domain is determined based on the first direction cosine vector.
[0092] For example, since the incident light is supplied to the diffracting waveguide via a preset light source, and this preset light source is simulated from a light source in a real environment, the incident light emitted by the preset light source can be continuously varied. Therefore, it can be determined that the incident light has a corresponding range of incident angles in the K-domain. This range of incident angles can include multiple discrete incident angles. Each incident angle has a one-to-one corresponding azimuth angle. And the zenith angle θ.
[0093] In the process of obtaining the incident angle information of the incident light ray provided to the diffracting waveguide in the K-domain, the incident angle range corresponding to the incident light ray in the K-domain can be obtained. For example, the incident angle range corresponding to the incident light ray can be preset, or it can be set or modified by the user, without any restrictions.
[0094] The range of incident angles corresponding to the incident ray in the K-domain can be used to determine the incident angle of the incident ray. Given the incident angle of the incident ray, it can be normalized and then processed using the relationship between the first direction cosine vector of the incident ray in the K-domain and the corresponding incident angle of the incident ray in the K-domain. This yields the first direction cosine vector of the incident ray in the K-domain, thus determining the incident angle information of the incident ray in the K-domain.
[0095] Having obtained the range of incident angles of the incident ray in the K-domain, the first direction cosine vector of the incident ray in the K-domain can be determined by combining this range, thereby determining the incident angle information in the K-domain. This improves the ease of determining the incident angle information in the K-domain. The incident angle information in the K-domain can be used to simulate rainbow patterns in diffracted waveguides, further enhancing the ease of rainbow pattern simulation for diffracted waveguides.
[0096] In some implementations, the incident light ray is discretized and sampled according to the incident angle range to obtain the incident angle corresponding to the incident light ray in the K domain; the incident angle is transformed from the K domain rectangular coordinate system to the K domain polar local coordinate system to obtain the polar coordinates corresponding to the incident angle; and the first direction cosine vector is determined according to the polar coordinates corresponding to the incident angle.
[0097] like Figure 3 As shown, in the process of simulating rainbow patterns on a diffractive waveguide, the incident angle range of the incident light rays supplied to the diffractive waveguide can be obtained, which is equivalent to defining the light source angle range of a preset light source. Correspondingly, the wavelength range of the incident light rays can also be obtained, which is equivalent to defining the wavelength range of the incident light rays supplied by the preset light source. To improve the convenience of simulating rainbow patterns on a diffractive waveguide, the incident light rays can be discretized and sampled according to the incident angle range, dividing the continuous incident angle range into a finite number of discrete incident angles, thus obtaining the incident angles corresponding to the incident light rays in the K-domain.
[0098] The calculation process for discretizing the incident light ray according to the incident angle range to obtain the incident angle in the K-domain can be performed in the K-domain Cartesian coordinate system. For example... Figure 3 As shown, given a fixed incident angle, the incident angle can be transformed from the K-domain Cartesian coordinate system to the K-domain polar local coordinate system to determine the corresponding polar coordinates. The polar coordinates corresponding to the incident angle include the azimuth angle corresponding to the incident angle. And the zenith angle θ. Based on this, the polar coordinates corresponding to the incident angle, after normalization, can be used to determine the first direction cosine vector of the incident angle in the K-domain by combining the relationship between the first direction cosine vector of the incident ray in the K-domain and the corresponding incident angle of the incident ray in the K-domain, and thus to determine the incident angle information of the incident ray. Specifically, incident rays with different incident angles can have a one-to-one corresponding first direction cosine vector, that is, they have one-to-one corresponding incident angle information.
[0099] By discretizing the incident ray to obtain the incident angle in the K domain, and by performing coordinate transformation on the incident angle to obtain the polar coordinates of the incident ray, and then determining the first direction cosine vector of the incident ray, it is beneficial to improve the convenience of determining the first direction cosine vector of the incident ray, which in turn is beneficial to improving the convenience of determining the incident angle information of the incident ray.
[0100] In some implementations, a first K-vector value of the incident ray in the K-domain Cartesian coordinate system is determined based on a first direction cosine vector; a second K-vector value of the outgoing ray in the K-domain Cartesian coordinate system is determined based on the first K-vector value and grating parameters; a second K-vector value of the outgoing ray in the K-domain Cartesian coordinate system is determined based on the second K-vector value; a second direction cosine vector of the outgoing ray in the K-domain is determined based on the second K-vector value; and the exit angle information of the outgoing ray is determined based on the second direction cosine vector.
[0101] like Figure 3 As shown, given the first direction cosine vector of the incident ray, it can be substituted into the relationship between the first direction cosine vector of the incident ray and the first K vector value of the incident ray to obtain the first K vector value of the incident ray in the K-domain Cartesian coordinate system. Correspondingly, the first direction cosine vector of the incident ray can be normalized before determining the first K vector value. The first K vector value includes the K vector component k of the incident ray. incx and the K vector value component k incy .
[0102] like Figure 3 As shown, the grating parameters of the diffractive waveguide can be obtained. The grating parameters include the grating parameter component k. gx and grating parameter components k gy .
[0103] Based on the first K-vector value of the incident ray and the grating parameters, the effect of the diffracting waveguide on the incident ray can be evaluated to determine the second K-vector value of the outgoing ray in the K-domain Cartesian coordinate system. The second K-vector value includes the K-vector component k of the outgoing ray. outx and the K vector component k outy .
[0104] like Figure 3 As shown, given the second K-vector value of the emitted ray, the second direction cosine vector of the emitted ray in the K-domain can be determined based on this second K-vector value. The second direction cosine vector can be expressed as (L... out M out N outAccordingly, before determining the second direction cosine vector, the second K vector value can be normalized first, and then the normalized second direction cosine vector can be determined.
[0105] With the second direction cosine vector determined, it can be used to determine the exit angle information of the emitted light ray, which improves the ease of determining the exit angle information. This exit angle information can then be used to simulate rainbow patterns in the diffracted waveguide, further improving the ease of rainbow pattern simulation.
[0106] In some implementations, before determining the incident angle information of the incident light in the K-domain, the method further includes: determining the light path set corresponding to the outgoing light that can be transmitted from the grating region to the human eye based on the first position range of the grating region of the diffraction waveguide in the eye-centric world coordinate system and the second position range of the human eye in the eye-centric world coordinate system; determining the direction cosine vector set of the light path set in the K-domain; and adjusting the incident angle range corresponding to the incident light in the K-domain based on the direction cosine vector set to obtain the adjusted incident angle range.
[0107] Based on the adjusted incident angle range, determine the first direction cosine vector of the incident ray in the K domain.
[0108] For example, a diffractive waveguide includes a grating region. When simulating rainbow patterns on a diffractive waveguide, the incident light rays are processed by the grating region to form corresponding outgoing light rays. Therefore, the grating region of the diffractive waveguide affects the rainbow pattern effect. Based on this, when simulating rainbow patterns on a diffractive waveguide, the focus should be on analyzing the impact of the grating region on the rainbow pattern effect.
[0109] For example, a first position range of the grating region of the diffractive waveguide in the eye-centric world coordinate system and a second position range of the human eye in the eye-centric world coordinate system can be obtained. The first position range of the grating region is obtained by simulating the position range of the grating region on the diffractive waveguide, and the second position range of the human eye is obtained by simulating the positional relationship between the human eye and the diffractive waveguide. The first position range of the grating region and the second position range of the human eye can be preset, or they can be set or modified by the user, without any restrictions.
[0110] Given a first position range of the grating region and a second position range of the human eye, the first position range can restrict the light rays that can exit from the grating region of the diffractive waveguide, and the second position range can restrict the light rays that can enter the human eye. Therefore, based on the first position range of the grating region of the diffractive waveguide in the eye's central world coordinate system and the second position range of the human eye in the eye's central world coordinate system, the set of light paths corresponding to the outgoing light rays that can travel from the grating region to the human eye can be determined. Specifically, outgoing light rays that can travel from the grating region to the human eye can enter the human eye, and the resulting rainbow pattern can also enter the human eye. Conversely, outgoing light rays that cannot travel from the grating region to the human eye cannot enter the human eye, and the resulting rainbow pattern cannot enter the human eye. Based on this, when simulating rainbow patterns on a diffractive waveguide, the corresponding rainbow pattern effect can be determined by combining the determined set of light paths corresponding to the outgoing light rays that can travel from the grating region to the human eye.
[0111] Taking the grating region of a diffractive waveguide, which includes grating region 1 and grating region 2, and the human eye, which includes the human eye pupil, as an example. Figure 4 As shown, a set of ray paths 1 that can travel from grating region 1 to the human eye's pupil can be determined based on the first position range of grating region 1 and the second position range of the human eye's pupil; similarly, a set of ray paths 2 that can travel from grating region 2 to the human eye's pupil can be determined based on the first position range of grating region 2 and the second position range of the human eye's pupil. Based on ray path sets 1 and ray path sets 2, the set of ray paths corresponding to the outgoing rays that can travel from the grating region to the human eye can be determined. The ray path sets can be used to define the range of ray paths visible to the human eye. Once the ray path sets are determined, they can be normalized to obtain a normalized ray path set.
[0112] Accordingly, for a set of ray paths or a normalized set of ray paths, the set of direction cosine vectors of the ray path set in the K-domain can be determined. Each direction cosine vector included in the set of direction cosine vectors can be represented as (L... out M out N out (in the form of ).
[0113] When simulating rainbow patterns in diffracted waveguides to analyze their rainbow effect, the incident angle range of the incident light ray in the K-domain can be adjusted based on the direction cosine vector set. This adjusted incident angle range allows for analysis of the rainbow effect within this range. For example, the direction cosine vector set can be transformed to the local polar coordinate system in the K-domain to obtain the transformed direction cosine vector set. Based on this transformed set, the incident angle range of the incident light ray in the K-domain can then be adjusted to obtain the adjusted incident angle range.
[0114] The adjusted incident angle range can be used to simulate rainbow patterns on diffractive waveguides. For example, based on the adjusted incident angle range, the first direction cosine vector of the incident ray in the K-domain is determined. The first direction cosine vector of the incident ray in the K-domain can be used to determine the incident angle information of the incident ray in the K-domain. Furthermore, combined with the grating parameters of the diffractive waveguide in the K-domain, rainbow pattern simulation can be performed on the diffractive waveguide to determine the simulated rainbow pattern image of the diffractive waveguide in the eye-centric world coordinate system.
[0115] Since the range of incident angles in the K domain before adjustment is greater than the range of incident angles in the K domain after adjustment, determining the range of incident angles after adjustment is beneficial to improving the efficiency of rainbow pattern simulation analysis of diffraction waveguides.
[0116] In some implementations, the grating region is discretized and sampled according to a first position range to obtain a plurality of first positions included in the grating region; the human eye is discretized and sampled according to a second position range to obtain a plurality of second positions included in the human eye; the light path corresponding to the outgoing light rays that can be transmitted from the grating region to the human eye is determined according to the vectors corresponding to the first and second positions; and the light path set is determined according to the light path corresponding to each outgoing light ray.
[0117] In determining the set of light paths corresponding to the outgoing light rays that can be transmitted from the grating region to the human eye, it is necessary to perform position discretization sampling on both the grating region and the human eye to improve the ease of determining the light path set.
[0118] For example, based on a first position range, the grating region is discretized and sampled to divide the complete grating region into multiple grating region sampling points, resulting in multiple first positions included in the grating region. Each first position can be represented in vector form. For example, a first position can be represented as a vector. Grating .
[0119] For example, based on the range of the second position, the human eye is discretized and sampled to divide the complete range of the human eye into multiple eye sampling points, resulting in multiple second positions encompassed by the human eye. The range of the human eye can also be referred to as the eye box corresponding to the human eye, without limitation here. Each second position can be represented in vector form. For example, a second position can be represented as a vector. Pupil .
[0120] The vectors corresponding to the first and second positions can be represented as vectors. Grating-Pupil vector Grating-PupilThis allows us to determine the ray path corresponding to the outgoing light rays that can travel from the grating region to the human eye. (vector) Grating-Pupil It is based on vector Grating with vector Pupil Definitely, vector Grating-Pupil It can be represented as:
[0121] vector Grating-Pupil =vector Pupil -vector Grating
[0122] Taking a grating region comprising grating region 1 and grating region 2 as an example, the ray path set 1 corresponding to the outgoing rays that can be transmitted from grating region 1 to the human eye can be different from the ray path set 2 corresponding to the outgoing rays that can be transmitted from grating region 2 to the human eye. For example, the ray path set 1 containing the outgoing rays can be represented as a vector. Grating1-Pupil The ray paths corresponding to the outgoing rays included in ray path set 2 can be represented as vectors. Grating2-Pupil The grating path set can be obtained by normalizing the grating paths.
[0123] By analogy, the ray path set can be determined by combining the ray paths corresponding to each emitted ray.
[0124] In one exemplary implementation, such as Figure 5As shown, after determining the incident angle range of the incident ray in the K-domain and before determining the first direction cosine vector of the incident ray in the K-domain, the position of the grating region of the diffractive waveguide can be discretized and sampled, and the position of the human eye can also be discretized and sampled. This allows for the determination of the ray path corresponding to the outgoing ray that can travel from the grating region to the human eye, thus determining the ray path set. The direction cosine vector set of the ray path set in the K-domain is then determined. Based on this direction cosine vector set, the incident angle range of the incident ray in the K-domain is adjusted to obtain the adjusted incident angle range. This adjusted incident angle range can then be used to perform the corresponding steps in simulating the rainbow pattern of the diffractive waveguide, such as determining the first direction cosine vector of the incident ray in the K-domain based on the adjusted incident angle range. In determining the first direction cosine vector of the incident light in the K-domain based on the adjusted incident angle range, the incident light can be discretized and sampled to obtain the incident angle corresponding to the incident light in the K-domain. The incident angle is then transformed from the rectangular coordinate system of the K-domain to the local polar coordinate system of the K-domain to obtain the polar coordinates corresponding to the incident angle. The first direction cosine vector is determined based on the polar coordinates corresponding to the incident angle. Combining the first direction cosine vector and the grating parameters of the diffraction waveguide, the exit angle information of the outgoing light in the K-domain after the incident light passes through the diffraction waveguide is determined, thereby determining the simulated rainbow pattern image of the diffraction waveguide.
[0125] In some implementations, a rainbow pattern is displayed at the position indicated by the target angle position, and the color of the rainbow pattern is determined according to the wavelength of the incident light corresponding to the target angle position, so as to obtain a simulated image of the rainbow pattern of the diffracted waveguide in the eye center world coordinate system.
[0126] The target angular position includes the angular position component α. outx and the angular position component α outy For example, the angular position of this target is the position of the rainbow pattern in the world coordinate system at the center of the eye. The position of the rainbow pattern can be represented as (α... outx ,α outy ), where the angular position component α outx The angular position component α corresponds to the X-axis (Xangle) in the eye-centric world coordinate system. outy This corresponds to the Y-axis (Y angle) of the eye-centric world coordinate system. Based on this, the target angle position can be plotted onto the eye-centric world coordinate system, that is, a rainbow pattern can be displayed at the position indicated by the target angle position.
[0127] Correspondingly, when a diffractive waveguide acts on incident light, it does not change the wavelength of the incident light. Therefore, the wavelength of the outgoing light after passing through the diffractive waveguide remains the same as the wavelength of the incident light, and the outgoing light has a corresponding target angular position. Based on this, the color of the rainbow pattern can be determined according to the wavelength of the incident light corresponding to the target angular position. Then, by combining the position and color of the rainbow pattern, a simulated image of the rainbow pattern in the eye's central world coordinate system can be obtained.
[0128] Please see Figure 6 , Figure 6 This is a simulated rainbow pattern image of a diffractive waveguide according to an embodiment of this application in the world coordinate system at the center of the eye.
[0129] like Figure 6 As shown, a rainbow pattern simulation image can include multiple rainbow pattern simulation sub-images. Each rainbow pattern simulation sub-image can correspond to different eye sampling points of the same human eye, such as corresponding to one of the second positions of the human eye. The second position includes, for example, one of the positions corresponding to Pupil 1, Pupil 2 to Pupil 9, but is not limited to this, and is not restricted. Figure 6 The blue dashed box in the image is used to indicate the range of angular positions of interest for this diffractive waveguide, such as the rainbow effect within that range. Figure 6 The black solid box in the figure is used to indicate the relevant design parameters of the diffractive waveguide, such as the design field of view range and position of the diffractive waveguide. Figure 6 The red circles in the diagram indicate the preset angular position of the incident light. The multiple discrete red circles in the diagram indicate the angular discretization sampling of the incident light provided to the diffractive waveguide. Accordingly, the red circles in the diagram can be obtained by adjusting the incident angle range in the K-domain based on the light path set corresponding to the outgoing light that can travel from the grating region of the diffractive waveguide to the human eye; this is not limited here. The red circles are correlated with the position of the human eye sampling point.
[0130] Depend on Figure 6 The multiple rainbow pattern simulation sub-images shown can be used to determine that each rainbow pattern simulation sub-image can intuitively display the location and color of the rainbow pattern. Users do not need to have knowledge related to diffractive waveguides in the K-domain. They can still determine the rainbow pattern simulation effect of diffractive waveguides by viewing the rainbow pattern simulation images, which helps to improve the intuitiveness of the rainbow pattern effect of diffractive waveguides.
[0131] The rainbow pattern simulation method provided in the above embodiments includes: acquiring the incident angle information of the incident light provided to the diffractive waveguide in the K-domain; acquiring the grating parameters of the diffractive waveguide in the K-domain; determining the exit angle information of the outgoing light after the incident light passes through the diffractive waveguide in the K-domain based on the incident angle information and the grating parameters; converting the exit angle information of the outgoing light in the K-domain into the target angle position of the outgoing light in the eye center world coordinate system; and determining the rainbow pattern simulation image of the diffractive waveguide in the eye center world coordinate system based on multiple target angle positions and the wavelength of the incident light corresponding to each target angle position.
[0132] Since the rainbow pattern simulation image of the diffracted waveguide in the eye-centric world coordinate system is determined based on multiple target angle positions and the wavelengths of the incident light rays corresponding to each target angle position, and the target angle positions are obtained by transforming the exit angle information of the outgoing light rays in the K-domain to the eye-centric world coordinate system, and the eye-centric world coordinate system matches human vision, it is equivalent to converting the exit angle information of the outgoing light rays in the K-domain into a rainbow pattern simulation image that can be directly viewed by the human eye. Therefore, users can determine the position of the rainbow pattern formed by the outgoing light rays in the rainbow pattern simulation image by using the target angle positions, and determine the color of the rainbow pattern formed by the outgoing light rays in the rainbow pattern simulation image by using the wavelengths of the incident light rays corresponding to the target angle positions. Based on the determination of the rainbow pattern simulation image, users do not need to have prior knowledge of the diffracted waveguide in the K-domain; they can still determine the rainbow pattern simulation effect of the diffracted waveguide by viewing the rainbow pattern simulation image, which helps to improve the intuitiveness of the rainbow pattern effect of the diffracted waveguide.
[0133] Please see Figure 7 , Figure 7 This is a schematic block diagram of a rainbow pattern simulation device for a diffractive waveguide, provided in an embodiment of this application. This rainbow pattern simulation device for a diffractive waveguide can be configured in a computer device or server to execute the aforementioned rainbow pattern simulation method for a diffractive waveguide. The computer device may include near-eye display devices, wearable devices, laptops, desktop computers, mobile phones, etc., and is not limited thereto. Near-eye display devices may include AR glasses, MR glasses, AR helmets, MR helmets, etc., and are not limited thereto. The server may be a standalone server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms.
[0134] like Figure 7 As shown, the rainbow pattern simulation device for the diffractive waveguide includes an information acquisition module 110, a parameter acquisition module 120, an information determination module 130, an information conversion module 140, and an image generation module 150.
[0135] The information acquisition module 110 is used to acquire the incident angle information of the incident light provided to the diffractive waveguide in the K domain;
[0136] Parameter acquisition module 120 is used to acquire the grating parameters of the diffractive waveguide in the K domain;
[0137] The information determination module 130 is used to determine the exit angle information of the outgoing light in the K-domain after the incident light passes through the diffraction waveguide, based on the incident angle and the grating parameters.
[0138] The information conversion module 140 is used to convert the emission angle information of the emitted light in the K domain into the target angle position of the emitted light in the world coordinate system of the eye center;
[0139] The image generation module 150 is used to determine the rainbow pattern simulation image of the diffraction waveguide in the world coordinate system at the center of the eye based on the multiple target angular positions and the wavelength of the incident light corresponding to each target angular position.
[0140] For example, the information acquisition module 110 includes a first vector determination submodule and an incident angle information determination submodule.
[0141] The first vector determination submodule determines the first direction cosine vector of the incident ray in the K domain based on the incident angle range corresponding to the incident ray in the K domain.
[0142] The incident angle information determination submodule is used to determine the incident angle information of the incident ray in the K domain based on the first direction cosine vector.
[0143] For example, the first vector determination submodule includes an angle sampling submodule, an angle transformation submodule, and a first direction cosine vector determination submodule.
[0144] An angle sampling submodule is used to perform angle discretization sampling on the incident light ray according to the incident angle range, so as to obtain the incident angle of the incident light ray in the K domain;
[0145] An angle transformation submodule is used to transform the incident angle from the K-domain rectangular coordinate system to the K-domain polar local coordinate system to obtain the polar coordinates corresponding to the incident angle.
[0146] The first direction cosine vector determination submodule is used to determine the first direction cosine vector based on the polar coordinates corresponding to the incident angle.
[0147] For example, the information determination module 130 includes a first K vector value determination submodule, a second K vector value determination submodule, a second direction cosine vector determination submodule, and a launch angle information determination submodule.
[0148] The first K-vector value determination submodule is used to determine the first K-vector value of the incident ray in the K-domain rectangular coordinate system based on the first direction cosine vector.
[0149] The second K-vector value determination submodule is used to determine the second K-vector value of the outgoing light in the K-domain rectangular coordinate system based on the first K-vector and the grating parameters.
[0150] The second direction cosine vector determination submodule is used to determine the second direction cosine vector of the outgoing light in the K domain based on the second K vector value;
[0151] The emission angle information determination submodule is used to determine the emission angle information of the emitted light ray based on the second direction cosine vector.
[0152] For example, the rainbow pattern simulation device further includes a light path set determination submodule, a direction cosine set determination submodule, and an incident angle range adjustment submodule.
[0153] The ray path set determination submodule is used to determine the ray path set corresponding to the outgoing rays that can be transmitted from the grating region to the human eye based on the first position range of the grating region of the diffraction waveguide in the eye center world coordinate system and the second position range of the human eye in the eye center world coordinate system.
[0154] The direction cosine vector set determination submodule is used to determine the direction cosine vector set of the ray path set in the K domain;
[0155] The incident angle range adjustment submodule is used to adjust the incident angle range of the incident ray in the K domain according to the direction cosine vector set, so as to obtain the adjusted incident angle range.
[0156] The first vector determination submodule includes a first vector adjustment submodule.
[0157] The first vector adjustment submodule is used to determine the first direction cosine vector of the incident ray in the K domain based on the adjusted incident angle range.
[0158] For example, the ray path set determination submodule includes a first position sampling submodule, a second position sampling submodule, a ray path determination submodule, and a ray path integration submodule.
[0159] The first position sampling submodule is used to perform position discretization sampling on the grating region according to the first position range to obtain a plurality of first positions included in the grating region;
[0160] The second position sampling submodule is used to perform position discretization sampling on the human eye according to the second position range to obtain multiple second positions included in the human eye;
[0161] The light path determination submodule is used to determine the light path corresponding to the outgoing light rays that can be transmitted from the grating region to the human eye based on the vectors corresponding to the first position and the second position.
[0162] The ray path integration submodule is used to determine the ray path set according to the ray path corresponding to each of the emitted rays.
[0163] For example, the image generation module 150 includes a rainbow pattern simulation image determination submodule.
[0164] The rainbow pattern simulation image determination submodule is used to display a rainbow pattern at the position indicated by the target angle position, and determine the color of the rainbow pattern according to the wavelength of the incident light corresponding to the target angle position, so as to obtain a rainbow pattern simulation image of the diffracted waveguide in the eye center world coordinate system.
[0165] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the above-described apparatus and its modules and units can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0166] The method of this application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0167] For example, the above-described methods and apparatus can be implemented as a computer program that runs on a computer device or server to control the computer device. For example, the computer device may include near-eye display devices, wearable devices, laptops, desktop computers, mobile phones, etc., without limitation. The server can be a standalone server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms.
[0168] Please see Figure 8 , Figure 8 This is a schematic block diagram of the structure of a computer device provided in an embodiment of this application.
[0169] like Figure 8 As shown, the computer device includes a memory and a processor. The memory and processor can be connected via a system bus, and the memory may include a storage medium and internal memory.
[0170] The storage medium can store the operating system and computer programs. When the computer program is executed, it enables the processor to perform any method for simulating rainbow patterns in diffractive waveguides.
[0171] The processor provides computing and control capabilities, supporting the operation of the entire computer device.
[0172] The internal memory provides an environment for the execution of computer programs stored in the storage medium. When the computer program is executed by the processor, it enables the processor to perform any method for simulating rainbow patterns in diffractive waveguides.
[0173] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0174] It should be understood that a processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other convertible logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.
[0175] In one embodiment, the processor is configured to execute a computer program and, when executing the computer program, perform the following steps:
[0176] Obtain the incident angle information of the incident light rays provided to the diffracting waveguide in the K-domain;
[0177] Obtain the grating parameters of the diffractive waveguide in the K-domain;
[0178] Based on the incident angle information and the grating parameters, the exit angle information of the outgoing light in the K-domain after the incident light passes through the diffraction waveguide is determined.
[0179] The emission angle information of the emitted ray in the K domain is converted into the target angle position of the emitted ray in the world coordinate system at the eye center;
[0180] Based on the multiple target angular positions and the wavelength of the incident light corresponding to each target angular position, the rainbow pattern simulation image of the diffraction waveguide in the world coordinate system at the center of the eye is determined.
[0181] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of simulating the rainbow pattern of a diffractive waveguide described above can be referred to the corresponding process in the aforementioned embodiment of the method for simulating the rainbow pattern of a diffractive waveguide, and will not be repeated here.
[0182] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the method implemented can be referred to in various embodiments of the rainbow ripple simulation method for diffractive waveguides in this application.
[0183] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device.
[0184] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0185] It should also be understood that the term "and / or" as used in this specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations. It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element. The above-described embodiment numbers are merely descriptive and do not represent the superiority or inferiority of the embodiments. The above descriptions are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for simulating rainbow patterns in a diffractive optical waveguide, characterized in that, include: Obtain the incident angle information of the incident light rays provided to the diffracting waveguide in the K-domain; Obtain the grating parameters of the diffractive waveguide in the K-domain; Based on the incident angle information and the grating parameters, the exit angle information of the outgoing light in the K-domain after the incident light passes through the diffraction waveguide is determined. The emission angle information of the emitted ray in the K domain is converted into the target angle position of the emitted ray in the world coordinate system at the eye center; Based on the multiple target angular positions and the wavelength of the incident light corresponding to each target angular position, the rainbow pattern simulation image of the diffraction waveguide in the world coordinate system at the center of the eye is determined.
2. The rainbow pattern simulation method according to claim 1, characterized in that, The acquisition of the incident angle information of the incident light ray provided to the diffracting waveguide in the K-domain includes: Based on the incident angle range corresponding to the incident ray in the K domain, determine the first direction cosine vector of the incident ray in the K domain; Based on the first direction cosine vector, the incident angle information of the incident ray in the K domain is determined.
3. The rainbow pattern simulation method according to claim 2, characterized in that, Determining the first direction cosine vector of the incident ray in the K domain based on the incident angle range includes: Based on the incident angle range, the incident light ray is discretized and sampled to obtain the incident angle of the incident light ray in the K domain; The incident angle is transformed from the K-domain rectangular coordinate system to the K-domain polar local coordinate system to obtain the polar coordinates corresponding to the incident angle; The first direction cosine vector is determined based on the polar coordinates corresponding to the incident angle.
4. The rainbow pattern simulation method according to claim 3, characterized in that, The step of determining the exit angle information of the outgoing light in the K-domain after the incident light has passed through the diffraction waveguide, based on the incident angle information and the grating parameters, includes: Based on the first direction cosine vector, determine the first K vector value of the incident ray in the K-domain rectangular coordinate system; Based on the first K vector and the grating parameters, determine the second K vector value of the outgoing ray in the K-domain Cartesian coordinate system; Based on the second K vector value, determine the second direction cosine vector of the emitted ray in the K domain; The emission angle information of the emitted light is determined based on the second direction cosine vector.
5. The rainbow pattern simulation method according to claim 2, characterized in that, Before determining the first direction cosine vector of the incident ray in the K domain based on the incident angle range corresponding to the incident ray in the K domain, the method further includes: Based on the first position range of the grating region of the diffraction waveguide in the eye center world coordinate system and the second position range of the human eye in the eye center world coordinate system, determine the set of light paths corresponding to the outgoing light rays that can be transmitted from the grating region to the human eye; Determine the set of direction cosine vectors of the ray path set in the K domain; Based on the set of direction cosine vectors, the incident angle range of the incident ray in the K domain is adjusted to obtain the adjusted incident angle range. Determining the first direction cosine vector of the incident ray in the K domain based on the incident angle range corresponding to the incident ray in the K domain includes: Based on the adjusted incident angle range, the first direction cosine vector of the incident ray in the K domain is determined.
6. The rainbow pattern simulation method according to claim 5, characterized in that, The step of determining the set of light paths corresponding to the outgoing light rays that can be transmitted from the grating region to the human eye based on the first position range of the grating region of the diffraction waveguide in the eye-centric world coordinate system and the second position range of the human eye in the eye-centric world coordinate system includes: Based on the first position range, the grating region is discretized and sampled to obtain a plurality of first positions included in the grating region; Based on the second position range, the human eye is discretized and sampled to obtain multiple second positions including the human eye; Based on the vectors corresponding to the first position and the second position, determine the light path corresponding to the outgoing light rays that can be transmitted from the grating region to the human eye; The set of light paths is determined based on the light paths corresponding to each of the emitted light rays.
7. The rainbow pattern simulation method according to any one of claims 1 to 5, characterized in that, The step of determining the rainbow pattern simulation image of the diffraction waveguide in the eye-centric world coordinate system based on multiple target angular positions and the wavelength of the incident light corresponding to each target angular position includes: A rainbow pattern is displayed at the position indicated by the target angle position, and the color of the rainbow pattern is determined according to the wavelength of the incident light corresponding to the target angle position, so as to obtain a simulated image of the rainbow pattern of the diffracted waveguide in the world coordinate system at the center of the eye.
8. A rainbow pattern simulation device for a diffractive optical waveguide, characterized in that, The rainbow pattern simulation device includes: The information acquisition module is used to acquire the incident angle information of the incident light rays provided to the diffractive waveguide in the K-domain. The parameter acquisition module is used to acquire the grating parameters of the diffractive waveguide in the K-domain; The information determination module is used to determine the exit angle information of the outgoing light in the K-domain after the incident light has passed through the diffraction waveguide, based on the incident angle and the grating parameters. The information conversion module is used to convert the emission angle information of the emitted light in the K domain into the target angle position of the emitted light in the world coordinate system of the eye center; The image generation module is used to determine the rainbow pattern simulation image of the diffraction waveguide in the world coordinate system at the center of the eye, based on the multiple target angular positions and the wavelength of the incident light corresponding to each target angular position.
9. A computer device, characterized in that, The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and, in executing the computer program, implement the steps of the rainbow ripple simulation method for diffractive waveguides as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the rainbow pattern simulation method for diffractive waveguides as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Optical waveguide rainbow pattern detection system and method
CN117191347A
Diffraction optical waveguide rainbow pattern simulation method and device and computer equipment
CN118013765A