An xy polynomial curved surface light source modeling method and a nurbs curved surface light source modeling method
By using XY polynomials and NURBS surface light source modeling methods, the problems of uneven surface shape and large errors in surface light source modeling are solved, achieving high-precision surface light source modeling, which is suitable for simulating complex lighting effects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAN INST OF OPTICS & PRECISION MECHANICS CHINESE ACAD OF SCI
- Filing Date
- 2022-12-06
- Publication Date
- 2026-05-15
AI Technical Summary
Existing methods for modeling curved light sources have insufficient surface smoothness, large errors, and low simulation accuracy, failing to meet the requirements of high-precision lighting systems.
The XY polynomial and NURBS surface light source modeling method is adopted. The three-dimensional coordinates, normal vectors, energy distribution weights, etc. of the light are calculated by the light sampling parameters in the local coordinate system. The Monte Carlo method and polarization parameters are combined to establish the surface light source model and transform it into the global coordinate system.
It improves the accuracy and freedom of modeling curved light sources, resulting in smoother curved light source surfaces that are suitable for demanding lighting scenarios and provide more accurate simulation results.
Smart Images

Figure CN117292050B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for modeling curved surface light sources, specifically to an XY polynomial curved surface light source modeling method and a NURBS curved surface light source modeling method. Background Technology
[0002] Light sources include point sources, surface sources, volume sources, and ray data sources. A point source emits light from a single point; its light distribution characteristics are spatially independent and depend only on angle. A surface source is a collection of point sources, and its light distribution characteristics include both spatial and angular distributions. A volume source is a collection of surface sources, and its light distribution characteristics include both three-dimensional spatial and angular distributions. Ray data sources typically represent measured data of the light source; they are data files formatted in a specific way to characterize the light emission characteristics of the light source, facilitating the exchange of light source data across different software environments. This data usually includes the ray number, spatial coordinates, direction vector, energy, and spectral data.
[0003] In various lighting optical systems, the shape, size, and radiation distribution characteristics of the light source significantly impact the simulation results. In the simulation design of lighting optical systems, light sources are typically approximated as simple point, line, or planar sources. However, for applications requiring high simulation accuracy, the errors introduced by this approximation are unacceptable. Therefore, it is necessary to establish more complex and accurate curved surface light source models to simulate the lighting effects of actual light sources. In existing technologies, the modeling method for curved surface light sources typically employs mesh modeling. However, this modeling method produces curved surface light sources with insufficient smoothness, resulting in significant errors and low simulation accuracy. Summary of the Invention
[0004] The purpose of this invention is to solve the technical problems of insufficient smoothness, large errors, and low simulation accuracy of the surface light source established by the existing technology, and to provide an XY polynomial surface light source modeling method and a NURBS surface light source modeling method.
[0005] The technical solution adopted in this invention is:
[0006] A method for modeling XY polynomial surface light sources, characterized by the following steps:
[0007] Step 1: Obtain the ray sampling parameters in the local coordinate system;
[0008] 1.1 Define the number of rays as NR, sample each ray, and obtain the three-dimensional coordinates, normal vector, area weight, and energy distribution weight of each ray's sampling point; calculate the zenith angle, azimuth angle, and direction vector of each ray; where the sampling point is the starting point of each ray;
[0009] 1.2 Based on the zenith angle and azimuth angle of each ray, and the normal vector at the sampling point of each ray, remove G rays with an angle greater than 90 degrees to the normal. If G = NR, return to step 1.1 and resample. If 0 ≤ G < NR, execute step 1.3.
[0010] 1.3: Calculate the energy intensity weight, wavelength, and energy spectral weight of the remaining S light sampling points, S = NR - G;
[0011] 1.4: Based on the energy spectrum weight and energy intensity weight in step 1.3, and the area weight and energy distribution weight in step 1.1, calculate the energy weight of each ray;
[0012] 1.5: Obtain the polarization parameters of each ray;
[0013] Step 2: Model the surface light source in the local coordinate system to obtain the surface light source model and the S rays it emits;
[0014] Step 3: Transform the curved surface light source from the local coordinate system to the global coordinate system, and obtain the curved surface light source in the global coordinate system.
[0015] Furthermore, in step 1.1, sampling each ray to obtain the three-dimensional coordinates, normal vector, area weight, and energy distribution weight of each ray sampling point includes the following steps:
[0016] A1 obtains the three-dimensional coordinates of each ray sampling point;
[0017] A11 obtains the (x,y) coordinates of each ray sampling point;
[0018] A12 calculates the z-coordinate of each ray sampling point based on the (x,y) coordinates of each ray sampling point using an XY polynomial expression, thus obtaining the three-dimensional coordinates of each ray sampling point.
[0019] A2 obtains the normal vector and area weight at each sampling point;
[0020] Based on the XY polynomial expression and the three-dimensional coordinates of the sampling points, the z-value is calculated by taking the partial derivatives with respect to x and y. x ,z y This allows us to obtain the normal vector and area weight for each ray;
[0021] A3 obtains the energy distribution weights at the sampling points;
[0022] If the energy of the curved surface light source is uniformly distributed, then let the energy distribution weight at the sampling point of the o-th ray be FE(x). o ,y o ) = 1;
[0023] If the energy of the curved surface light source follows a Gaussian distribution, then set the weight of the energy distribution at the sampling point of the o-th ray. Where L0 and W0 are the half-widths of the light source in the X and Y directions;
[0024] Step 1.1 involves calculating the zenith angle, azimuth angle, and direction vector for each ray, including the following steps:
[0025] B1 calculates the zenith angle and azimuth angle for each ray.
[0026] If the light intensity of the NR rays is of equal energy distribution, then the azimuth and zenith angle of each ray can be calculated using the following formula; θ o =cos -1 (1-u 2o If the light intensities of the NR rays follow a Lambertian distribution, then the azimuth and zenith angles of each ray can be calculated using the following formulas:
[0027] Among them, u 1o and u 2o It is a uniform random distribution on (0,1), 1≤o≤NR. θ o Let represent the azimuth and zenith angles of the o-th ray, respectively. θ o ∈[θ min ,θ max ], Indicates the range of values for the azimuth angle, [θ min ,θ max [] indicates the range of values for the zenith angle;
[0028] B2 through The formula calculates the direction vector of each ray; where, (L o M o N o ) represents the direction vector of the o-th ray.
[0029] Furthermore, step 1.3 includes the following steps:
[0030] A1: Calculate the light energy and intensity weights of the remaining S light sampling points, S = NR - G;
[0031] If the light intensity of the curved surface light source has an equal energy distribution, then let the energy intensity weight of the t-th ray be... Where 1≤t≤S; if the light intensity of the curved surface light source is not of equal energy distribution, then let the energy intensity weight of the t-th ray be...
[0032] A2: Calculate the wavelength and energy spectral weights of the remaining S rays.
[0033] If the curved light source has a continuously distributed wavelength, and the operating wavelength range of the curved light source is set to [λ1, λ2], then the wavelength of each ray can be obtained using the following formula: λ t =λ1+(λ2-λ1)u 3t , where λ t Let u represent the wavelength of the t-th ray. 3t The values of are uniformly random distributed on (0,1); 1≤t≤S;
[0034] If the curved light source has a continuous wavelength distribution and its spectrum is uniformly distributed, then let FS(λ) t ) = 1; FS(λ) t ) represents the energy spectral weight of the t-th ray;
[0035] If the curved light source has a continuously distributed wavelength and the curved light source has a blackbody radiation spectrum, then let Where T = 6000K, h = 6.62607015 × 10 34 J·s,c=2.998×10 8 m / s, k = 1.380649 × 10 -23 J / K;
[0036] If the curved light source has discrete wavelengths, then the spectrum list for discrete wavelengths is {(λ 11 ,FS 11 ),(λ 12 ,FS 12 )......(λ 1n ,FS 1n )}, where λ represents the wavelength and FS represents the weight of that wavelength, then the spectral and energy spectral weights of each ray are obtained by the following formula: λ t =λ 1W ,FS(λ t ) = FS 1W ,in, The operation is floor function, where n represents the total number of discrete spectra; if the curved light source is a single wavelength, then λ t The value is equal to the wavelength of the curved surface light source, and the energy spectral weight FS(λ). t ) = 1.
[0037] Furthermore, in step 1.5, the polarization parameters of the curved surface light source are calculated using the following formula:
[0038]
[0039] Wherein, the electric field vector E = (E x E y )satisfy, E x0 Let E be the amplitude of the polarization ellipse X. y0 Let Y be the amplitude of the polarization ellipse Y, and δ be the phase difference of the polarization ellipse. Let be the ellipticity, (a,b) be the major and minor axes of the polarization ellipse, and τ be the angle between the major axis of the polarization ellipse and the positive x-axis.
[0040] Furthermore, step 3 includes the following steps:
[0041] 31. Convert the sampling point coordinates of S rays and the direction vector of each ray from local coordinates to global coordinates to obtain the transformed three-dimensional coordinates and direction vector of each ray;
[0042] 31A. Convert the sampling point coordinates of S rays from local coordinates to global coordinates to obtain the transformed three-dimensional coordinates of each ray;
[0043] If we use translation to transform local coordinates into global coordinates: then Where (x,y,z) are the coordinates in the local coordinate system, (x',y',z') are the coordinates in the global coordinate system, and (Δx,Δy,Δz) is the amount of translation from the local coordinate system to the global coordinate system;
[0044] If rotation is used to transform local coordinates into global coordinates:
[0045] but
[0046] in, (α0,β0,γ0) represents the angle of rotation around X, Y, Z, and R is the x, y, y, z angle. X ,R Y ,R Z These are rotation matrices around the three axes, where (x, y, z) are the coordinates in the local coordinate system, and (x', y', z') are the coordinates in the global coordinate system.
[0047] 31B. Obtain the transformed direction vector of each ray using the same method as in step 31A;
[0048] 32. Based on the three-dimensional coordinates and direction vectors of each ray obtained in step 31, the curved light source in the local coordinate system is transformed to the entire coordinate system to complete the modeling of the curved light source.
[0049] This invention also proposes a NURBS surface light source modeling method, which is characterized by including the following steps:
[0050] Step 1: Obtain the ray sampling parameters in the local coordinate system;
[0051] 1.1 Define the number of rays as NR, sample each ray, and obtain the three-dimensional coordinates, normal vector, area weight, and energy distribution weight of each ray's sampling point based on the control points of the surface; calculate the zenith angle, azimuth angle, and direction vector of each ray; where the sampling point is the starting point of each ray;
[0052] 1.2 Based on the zenith angle and azimuth angle of each ray, and the normal vector at the sampling point of each ray, remove G rays with an angle greater than 90 degrees to the normal. If G = NR, return to step 1.1 and resample. If 0 ≤ G < NR, execute step 1.3.
[0053] 1.3: Calculate the energy intensity weight, wavelength, and energy spectral weight of the remaining S light sampling points; S = NR - G;
[0054] 1.4: Based on the energy spectrum weight and energy intensity weight in step 1.3, and the area weight and energy distribution weight in step 1.1, calculate the energy weight of each ray;
[0055] 1.5 Obtain the polarization parameters of each ray;
[0056] Step 2: Model the surface light source in the local coordinate system to obtain the surface light source model and the S rays it emits;
[0057] Step 3: Transform the curved surface light source from the local coordinate system to the global coordinate system, and obtain the curved surface light source in the global coordinate system.
[0058] Furthermore, in step 1.1, sampling each ray and obtaining the three-dimensional coordinates, normal vector, area weight, and energy distribution weight of each ray sampling point based on the control points of the surface includes the following steps:
[0059] In step 1.1, sampling each ray and obtaining the three-dimensional coordinates, normal vector, area weight, and energy distribution weight of each ray sampling point based on the control points of the surface includes the following steps:
[0060] A1 is based on surface control points, using NURBS surface expressions and N... i,p (u) and N j,q Using the expression for (v) and the expressions for the node vectors U and V, the three-dimensional coordinates of the NR ray sampling points based on the u and v parameters are calculated, where N i,p (u) and N j,q (v) are nonrational B-spline basis functions defined on the node vectors U and V, respectively, with u and v taking values of [0,1] uniformly random distribution;
[0061] A2 obtains the energy distribution weights for each ray sampling point.
[0062] Let the three-dimensional coordinates (x(u) determined by the l-th u point and the v point be... l ,v l ),y(u l ,v l ),z(u l ,v l The corresponding energy distribution weight FE(u) l ,v l ) = 1;
[0063] A3 obtains the area distribution weights of each ray sampling point.
[0064] The expressions based on NURBS surfaces are respectively applied to (u l ,v l Find the partial derivative to obtain The expression for the surface area weight of a NURBS surface is:
[0065] in,
[0066] A4 calculates the normal vector of each ray sampling point.
[0067] The normal vector at each sampling point is calculated using the following formula:
[0068]
[0069] in, Indicates parameter (u) l ,v l The normal vector of the l-th ray corresponding to ) Represents the unit vector in the three directions of a three-dimensional coordinate system;
[0070] B1 calculates the zenith angle and azimuth angle for each ray.
[0071] If the light intensity of the NR rays is of equal energy distribution, then the azimuth and zenith angle of each ray can be calculated using the following formula; If the light intensities of the NR rays follow a Lambertian distribution, then the azimuth and zenith angles of each ray can be calculated using the following formulas:
[0072] in, and The value of is uniformly random on (0,1), 1≤l≤NR. θ l Let represent the azimuth and zenith angles of the l-th ray, respectively. θ l ∈[θ min ,θ max ], Indicates the range of values for the azimuth angle, [θ min ,θ max [] indicates the range of values for the zenith angle;
[0073] B2 calculates the direction vector of each ray using the following formula.
[0074]
[0075] Among them, (L) l M l N l ) represents the direction vector of the l-th ray.
[0076] The beneficial effects of this invention are:
[0077] 1. The curved surface light source modeling method proposed in this invention has a high degree of freedom, and the surface shape of the curved surface light source is more accurate, which can well simulate the lighting effect of light sources with complex surface shapes.
[0078] 2. The curved surface light source modeling method proposed in this invention has a wider range of applications compared to point light sources, planar light sources, etc., and is suitable for occasions with high requirements for lighting characteristics.
[0079] 3. The curved surface light source modeling method proposed in this invention can better control the curvature of the object surface compared with the mesh modeling method, and the surface shape of the curved light source is smoother. Attached Figure Description
[0080] Figure 1 This is a flowchart of the XY polynomial surface light source modeling method of the present invention;
[0081] Figure 2 This is a flowchart of the NURBS surface light source modeling method of the present invention;
[0082] Figure 3 This is a schematic diagram of the angle sampling of the light source in the XY polynomial surface light source modeling method of the present invention;
[0083] Figure 4 This is a schematic diagram of the polarization ellipse in the XY polynomial surface light source modeling method of the present invention;
[0084] Figure 5 This is a schematic diagram of the light source modeling result in the XY polynomial surface light source modeling method of the present invention;
[0085] Figure 6 This is a schematic diagram of the NURBS surface light source in the NURBS surface light source modeling method of the present invention;
[0086] Figure 7 This is a schematic diagram of light source spatial sampling and area weighting in the NURBS surface light source modeling method of this invention;
[0087] Figure 8 This is a schematic diagram of the light source modeling result in the NURBS surface light source modeling method of the present invention. The three formulas in the diagram represent the coordinates of the light ray and the product of the light ray direction and the weight, respectively.
[0088] Figure 9 This is a schematic diagram of the optical path for comparing and verifying the light source algorithm in the XY polynomial surface light source modeling method of this invention;
[0089] Figure 10 This is a spectral distribution diagram of the light source in the XY polynomial surface light source modeling method of the present invention, wherein (a) is a self-built spectral distribution diagram and (b) is a spectral distribution diagram fitted by Lighttools software;
[0090] Figure 11 This is a schematic diagram of the xy polynomial parameters used for testing in the XY polynomial surface light source modeling method of the present invention;
[0091] Figure 12 This is a spatial distribution diagram of the emitting surface of the xy polynomial light source used for testing in the XY polynomial surface light source modeling method of the present invention;
[0092] Figure 13 This is a schematic diagram of the sampling of the emitting surface of the xy polynomial light source used for testing and its area micro-element weights in the XY polynomial surface light source modeling method of the present invention (only 500 rays are shown);
[0093] Figure 14 This is a schematic diagram of the light intensity distribution of the xy polynomial light source used for testing in the XY polynomial surface light source modeling method of the present invention;
[0094] Figure 15 This is a schematic diagram of the light emission angle sampling in the XY polynomial surface light source modeling method of the present invention (only 500 rays are shown);
[0095] Figure 16 This is a light source model diagram obtained using the XY polynomial surface light source modeling method of this invention;
[0096] Figure 17 This is a Lighttools simulation target illuminance distribution data diagram of the light source obtained by using the XY polynomial surface light source modeling method of this invention;
[0097] Figure 18 (a) is the Lighttools simulation optical path of the present invention using the same parameters as the XY polynomial surface light source modeling method; Figure 18 (b) is the target illuminance distribution simulated by Lighttools; Figure 18 (c) is the calculated target illuminance distribution; Figure 18(d) is the deviation between the calculated distribution and the Lighttools simulation distribution;
[0098] Figure 19 This is a list of control points for the NURBS surface in an embodiment of the NURBS surface light source modeling method of the present invention;
[0099] Figure 20 This is a distribution diagram of NURBS parameters u and v in the NURBS surface light source modeling method of the present invention;
[0100] Figure 21 This is a schematic diagram of the spatial sampling points and their area micro-element weights of the light-emitting surface of the light source in an embodiment of the NURBS surface light source modeling method of the present invention (only 500 rays are shown);
[0101] Figure 22 This is a light intensity distribution diagram of the light source in an embodiment of the NURBS surface light source modeling method of the present invention;
[0102] Figure 23 This is a sampling diagram of the light emission angle of the light source (only 500 rays are displayed) in an embodiment of the NURBS surface light source modeling method of the present invention.
[0103] Figure 24 It is a NURBS surface light source model obtained by adopting the NURBS surface light source modeling method of the present invention, where F is the weight of each ray;
[0104] Figure 25 This is a simulated target illuminance distribution data diagram of a NURBS surface light source obtained using the NURBS surface light source modeling method of this invention in Lighttools.
[0105] Figure 26 (a) is the Lighttools simulation optical path of the present invention using the same parameters as the NURBS surface light source modeling method; Figure 26 (b) is the target illuminance distribution simulated by Lighttools; Figure 26 (c) is the obtained target illuminance distribution; Figure 26 (d) is the deviation between the calculated distribution and the Lighttools simulation distribution. Detailed Implementation
[0106] XY polynomial surface light sources are a collection of point light sources. Their light distribution characteristics include both three-dimensional spatial distribution and angular distribution. Typically, the spatial distribution of surface light sources is uniform on the surface, while the angular distribution of surface light sources includes Lambertian distribution, Gaussian distribution, etc.
[0107] This invention proposes a method for modeling XY polynomial surface light sources, such as... Figure 1 As shown, it includes the following steps:
[0108] Step 1: Obtain the ray sampling parameters in the local coordinate system, where the local coordinate system refers to the three-dimensional coordinate system established with the coordinates of the center of the curved light source as the origin;
[0109] 1.1 Define the number of rays as NR, sample each ray, and obtain the three-dimensional coordinates, normal vector, area weight, and energy distribution weight of each ray's sampling point; calculate the zenith angle, azimuth angle, and direction vector of each ray; where the sampling point is the starting point of each ray;
[0110] Specifically: 1.1A samples each ray to obtain the three-dimensional coordinates, normal vector, area weight, and energy distribution weight of each ray sampling point;
[0111] 1.1A1 obtains the three-dimensional coordinates of each ray sampling point;
[0112] 1.1A11 obtains the (x,y) coordinates of each ray sampling point within a pre-defined aperture according to the sampling rays of the planar light source;
[0113] 1.1A12 Based on the (x,y) coordinates of each ray sampling point, the z coordinate of each ray sampling point is calculated using the XY polynomial expression to obtain the three-dimensional coordinates of each ray sampling point;
[0114] in, c is the curvature of the freeform surface at a fixed point, h is the aspheric coefficient, and C d For polynomial x a y b The coefficients, where a is the order of x and b is the order of y; (x o ,y o ,z o ) represents the three-dimensional coordinates of the sampling point of the o-th ray, 1≤o≤NR;
[0115] 1.1A2 obtains the normal vector and area weight at each sampling point;
[0116] Based on the XY polynomial expression and the three-dimensional coordinates of the sampling points, the z-value is calculated by taking the partial derivatives with respect to x and y. x ,z y This allows us to obtain the normal vector and area weight for each ray;
[0117] Calculate z by taking the partial derivatives of the following formula with respect to x and y. x ,z y The normal vector (n) of the o-th ray is obtained. xo ,n yo ,n zo )=(-z xo ,-z yo,1); Area weight of the o-th ray
[0118] The partial derivative formulas are as follows:
[0119]
[0120] 1.1A3 Obtain the energy distribution weights at the sampling points
[0121] like Figure 3 As shown, if the energy of the curved surface light source is uniformly distributed, then let FE(x) o ,y o )=E(x o ,y o ) = 1; where, FE(x) o ,y o E(x) represents the energy distribution weight at the sampling point of the o-th ray. o ,y o Let ) represent the spatial distribution at the sampling point of the o-th ray; if the energy of the curved surface light source follows a Gaussian distribution, then let Where L0 and W0 are the half-widths of the light source in the X and Y directions;
[0122] 1.1B Calculate the zenith angle, azimuth angle, and direction vector for each ray;
[0123] 1.1B1 Calculate the zenith angle and azimuth angle for each ray;
[0124] ① Taking equal-energy sampling as an example, we first consider the generation of light rays from an isotropic point source in spherical coordinates. In the zenith angle, θ is the zenith angle. It is the azimuth angle; however, θ and θ cannot be easily generated. Using equidistantly distributed light rays to simulate isotropic distribution results in higher light density near the center point. The direction of equal-energy sampling (focused sampling) light rays can be derived from the light intensity distribution of the light source. The formula for calculating the normalized cumulative flux of an isotropic light source (hemispherical solid angle emission) is: ;
[0125] Due to θ and The variables are separable, therefore we can handle θ and θ independently. Cumulative flux is the cumulative probability density function of light rays emitted in a given direction. The zenith angle and azimuth angle of each ray can be obtained using the Monte Carlo method. θ o =cos -1 (1-u 2o );
[0126] ② If the light intensity distribution of the light source follows a Lambertian distribution, the number of light rays within a cone at different angles should be proportional to the cosine of that angle. This allows us to use the number of light rays to describe the energy level. Similar to the normalized cumulative flux of an isotropic light source (hemispherical solid angle emission), the formula for calculating the normalized cumulative flux of a Lambertian light source (hemispherical solid angle emission) is: The zenith angle and azimuth angle of each ray can be obtained using the Monte Carlo method.
[0127] Among them, u 1o and u 2o It is a uniform random distribution on (0,1), 1≤o≤NR. θ o Let represent the azimuth and zenith angles of the o-th ray, respectively. θ o ∈[θ min ,θ max ], Indicates the range of values for the azimuth angle, [θ min ,θ max [] indicates the range of values for the zenith angle;
[0128] 1.1B2 Calculate the direction vector of each ray using the following formula;
[0129] Among them, (L) o M o N o ) represents the direction vector of the o-th ray;
[0130] 1.2 Based on the zenith angle and azimuth angle of each ray, and the normal vector at the sampling point of each ray, remove G rays with an angle greater than 90 degrees to the normal. If G = NR, return to step 1.1; if 0 ≤ G < NR, execute step 1.3.
[0131] After sampling, it is necessary to compare the normal vectors (n) of the surface at the corresponding sampling points. xo ,n yo ,n zo The angle between the sampling ray direction and the sampled ray direction is used to discard rays with an angle greater than 90 degrees to the normal, ensuring that the surface light source does not emit light backwards. Specifically, the angle between the sampling ray direction and the normal vector of the surface at the sampling point is measured by the cosine of the angle between the normalized vectors, and the relevant parameters of the corresponding sampling point are substituted into the formula. In the process, the rays that do not meet the conditions are discarded, leaving S rays, where S = NR - G;
[0132] 1.3: Calculate the light energy intensity weight, wavelength, and energy spectral weight of the remaining S light sampling points;
[0133] Specifically: 1.3A: Calculate the light energy and intensity weights of the remaining S light ray sampling points;
[0134] If the light intensity of the curved surface light source has an equal energy distribution, then let the energy intensity weight of the t-th ray be... Where 1≤t≤S; if the light intensity of the curved surface light source is not of equal energy distribution, then let the energy intensity weight of the t-th ray be...
[0135]
[0136] 1.3B: Calculate the wavelength and energy spectral weights of the remaining S rays.
[0137] If the curved light source has a continuously distributed wavelength, and the operating wavelength range of the curved light source is set to [λ1, λ2], then the wavelength of each ray can be obtained using the following formula: λ t =λ1+(λ2-λ1)u 3t , where λ t Let u represent the wavelength of the t-th ray. 3t It is a uniform random distribution on (0,1); 1≤t≤S; If the curved surface light source has a continuous wavelength distribution and the spectrum of the curved surface light source is uniformly distributed, then let FS(λ) t )=SP(λ t ) = 1; FS(λ) t SP(λ) represents the energy spectral weight of the t-th ray; t Let FS(λ) represent the spectral power distribution of the t-th ray; if the curved light source has a continuous wavelength distribution and is a blackbody radiation spectrum, then let FS(λ) = λ / t. t )=SP(λ t ), where SP(λ) t The calculation formula for ) is as follows: T is the target Kelvin temperature, T = 6000 K, and h is Planck's constant, h = 6.62607015 × 10⁻⁶. 34 J·s, where c is the speed of light, c = 2.998 × 10⁻⁶. 8 m / s, k is the Boltzmann constant, k = 1.380649 × 10 -23 J / K;
[0138] If the curved light source has discrete wavelengths, then for the discrete wavelength spectral series {(λ 11 ,FS 11 ),(λ 12 ,FS 12 )......(λ 1n ,FS 1n )}, where λ represents the wavelength and FS represents the weight of that wavelength. The wavelength and weight are randomly assigned values based on random numbers. The spectral and energy spectral weights of each ray are then obtained using the following formula: λt =λ 1W ,FS(λ t ) = FS 1W ,in, The operation is floor function, where n represents the total number of discrete spectra; if the curved light source is a single wavelength, then λ t The value is equal to the wavelength of the curved surface light source, and the energy spectral weight FS(λ). t ) = 1;
[0139] 1.4: Calculate the energy weight of each ray using the following formula;
[0140] Energy weight of the t-th ray The calculation formula is:
[0141] 1.5: Obtain the polarization parameters of each ray;
[0142] Specifically: such as Figure 4 As shown, the polarization parameters of the curved surface light source are obtained in a local coordinate system, where the local coordinate system is a three-dimensional coordinate system established with the center coordinates of the curved surface light source as the origin; the electric field vector E = (E x E y The following equation must be satisfied:
[0143]
[0144] In addition, the polarization state of the light source can be uniquely determined using the major and minor axes (a, b), the angle τ, and the direction of rotation. To characterize the polarization transmission characteristics of light, the polarization ellipse parameters are transformed into polarization parameters as the initial polarization state of the light source. The formulas for calculating the polarization parameters are as follows:
[0145]
[0146] Among them, E x0 Let E be the amplitude of the polarization ellipse X. y0 Let Y be the amplitude of the polarization ellipse Y, and δ be the phase difference of the polarization ellipse. tanχ is the ellipticity, a parameter calculated based on the ratio of the major and minor axes of the ellipse. (a,b) are the major and minor axes of the polarization ellipse, and τ is the angle between the major axis of the polarization ellipse and the positive x-axis. When the polarized light is left-handed, tanχ is negative, and when the polarized light is right-handed, tanχ is positive.
[0147] Step 2: Model the surface light source in the local coordinate system to obtain the surface light source model and the S rays it emits;
[0148] Based on the three-dimensional coordinates of each ray sampling point, polarization parameters, normal vector, area weight, energy distribution weight, zenith angle, azimuth angle, direction vector, energy intensity weight, wavelength, energy spectrum weight, and energy weight obtained in step 1, a model is built in the local coordinate system to obtain the curved surface light source and the S rays emitted by it.
[0149] Step 3: As Figure 5 As shown, the curved light source is transformed from the local coordinate system to the global coordinate system, and the curved light source in the global coordinate system is obtained.
[0150] The sampling point coordinates of S rays and the direction vector of each ray are transformed from the local coordinate system to the global coordinate system to obtain the transformed three-dimensional coordinates and direction vector of each ray. The global coordinate system is a three-dimensional coordinate system established based on the actual application scenario.
[0151] Specifically:
[0152] 31. Transform the sampling point coordinates and direction vectors of S rays from local coordinates to global coordinates to obtain the transformed three-dimensional coordinates and direction vectors of each ray;
[0153] 31A. Convert the coordinates of the sampling points of S rays from local coordinates to global coordinates to obtain the transformed three-dimensional coordinates of the sampling points of each ray;
[0154] Will By normalizing the luminous flux φ of the light source (i.e., dividing the energy weight F of each ray by the sum of the energy weights F of all rays, and then multiplying by the luminous flux φ), we obtain the ray sampling model of the curved surface light source in the local coordinate system. By combining the three-dimensional coordinates (x0, y0, z0) and tilt angle (α0, β0, γ0) of the center of the curved light source, the spatial coordinates and direction vector of the curved light source are transformed to the global coordinate system;
[0155] Transforming light rays to the global coordinate system mainly involves two operations: translation and rotation.
[0156] ① Translation includes movement along three axes:
[0157] but Where (x,y,z) are the coordinates in the local coordinate system, (x',y',z') are the coordinates in the global coordinate system, and (Δx,Δy,Δz) is the amount of translation from the local coordinate system to the global coordinate system;
[0158] ② Coordinate rotation can be divided into two cases: rotation along Euler angles of the coordinate system and rotation along any vector. Euler angle rotation refers to the rotation of the coordinates and direction of a ray around the current coordinate axis by a certain angle. The order of rotation around the axis affects the result of the rotation:
[0159]
[0160] Where (α0, β0, γ0) are the angles of rotation around X, Y, and Z, respectively, and R... X ,R Y ,R Z These are rotation matrices around the three axes. The rotation matrices need to be directly applied to the coordinates of the point to be rotated, and the order of rotation around the axes cannot be changed.
[0161] The rotation matrix is applied to the coordinates of the point to be rotated, and the resulting coordinates are the coordinates of the rotated point.
[0162]
[0163] Where (x,y,z) are the coordinates in the local coordinate system, and (x',y',z') are the coordinates in the global coordinate system;
[0164] The above translation and two rotation methods can be combined to form various local coordinate system to global coordinate system transformation algorithms;
[0165] 31B. Obtain the transformed direction vector of each ray using the same method as in step 31A;
[0166] 32. Based on the three-dimensional coordinates and direction vectors of each ray obtained in step 31, the curved light source in the local coordinate system is transformed to the entire coordinate system to complete the modeling of the curved light source.
[0167] In other embodiments of the present invention, step 1.5 may be performed simultaneously with steps 1.1, 1.2, 1.3 or 1.4.
[0168] like Figure 6 As shown, NURBS surface light sources are a collection of point light sources. Their light distribution characteristics include both three-dimensional spatial distribution and angular distribution. Typically, the spatial distribution of surface light sources is uniform on the surface, while the angular distribution of surface light sources includes Lambertian distribution, Gaussian distribution, etc.
[0169] Based on the same concept as the aforementioned XY polynomial surface light source modeling method, this invention also proposes a NURBS surface light source modeling method, such as... Figure 2 As shown, its difference from the XY polynomial surface light source modeling method lies in steps 1.1 and 1.2 in step 1;
[0170] Specifically: Step 1.1:
[0171] Step 1.1 Define the number of rays as NR, sample each ray, and obtain the three-dimensional coordinates, normal vector, area weight, and energy distribution weight of each ray sampling point based on the control points of the surface; calculate the zenith angle, azimuth angle, and direction vector of each ray; where the sampling point is the starting point of each ray;
[0172] 1.1A Based on the control points of the surface, obtain the three-dimensional coordinates, normal vector, area weight, and energy distribution weight of each ray sampling point;
[0173] 1.1A1 Obtain the three-dimensional coordinates of each ray sampling point based on the control points of the surface;
[0174] The surface shape of the NURBS surface light source is represented by a non-uniform rational B-spline (NURBS) surface. A NURBS surface is a parametric surface, and its expression is as follows:
[0175]
[0176] Where q xi,j q yi,j q zi,j Let N be the control point, u and v be the parameters in the two directions, p and q be the orders in the corresponding directions, and U and V be the longitudinal and transverse dimensions in the two directions, respectively; i,p (u) and N j,q (v) are the nonrational B-spline basis functions defined on the node vectors U and V, respectively;
[0177] N i,p The expression for (u) is:
[0178] in, N j,q The expression for (v) and N i,p The expression for (u) is the same;
[0179] The expressions for node vectors U and V are as follows:
[0180] Where r = n + p; s = m + q, that is, the first p + 1 terms are 0 and the last p + 1 terms are 1;
[0181] After multiple iterations of the above formula, N is calculated. i,p (u) and N j,q (v), then N i,p (u) and N j,q (v) By substituting the expression of the NURBS surface, we can obtain the x, y, z values of u and v, that is, the three-dimensional coordinates of u and v corresponding to the sampling points;
[0182] In this embodiment, u and v are uniformly random distributions in the range [0,1], i.e., u l ,v l Where 1≤l≤NR, the three-dimensional coordinates of the NR group can be obtained through the above formula, where (x(u l ,v l ),y(u l ,v l ),z(u l ,v l )) represents the three-dimensional coordinates determined by the l-th u-th point and the v-th point;
[0183] Control points of the surface (q) xi,j q zi,j q yi,j The X, Y, Z coordinates are given in the form of a grid, where m and n are the horizontal and vertical dimensions of the grid, respectively.
[0184] 1.1A2 Obtain the energy distribution weights of each ray sampling point
[0185] like Figure 7 As shown, since u and v are uniformly random distributions in [0,1], let the three-dimensional coordinates determined by the l-th u point and v point be (x(u)). l ,v l ),y(u l ,v l ),z(u l ,v l The corresponding energy distribution weight FE(u) l ,v l ) = 1;
[0186] 1.1A3 Obtain the area distribution weights of each ray sampling point
[0187] The surface sampling of the curved light source adopts the (u,v) parameter equal interval sampling. After the (u,v) parameter equal interval sampling, the spatial distribution of the curved surface is not uniform. It is necessary to perform area weighting based on the area micro-element at the sampling point so that the spatial sampling is equivalent to the surface uniform sampling.
[0188] The expressions based on NURBS surfaces are respectively applied to (u l ,v l Find the partial derivative to obtain Specifically: partial derivatives and It can be obtained from the following formula
[0189] Where N' i,p (u l ) is N i,p (u l ) in ul The derivative at point N' j,q (v l ) is N j,q (v l ) in v l The derivative at point;
[0190]
[0191] The expression for the surface area weight of a NURBS surface is:
[0192]
[0193] in, The coordinates of points on the surface are the parameters (u) l ,v l The partial derivatives of E, F, and G are intermediate variables;
[0194] 1.1A4 Calculate the normal vector of each ray sampling point
[0195] in, Indicates parameter (u) l ,v l The normal vector of the l-th ray corresponding to ) Represents the unit vector in the three directions of a three-dimensional coordinate system;
[0196] 1.1B Calculate the zenith angle, azimuth angle, and direction vector for each ray;
[0197] 1.1B1 Calculate the zenith angle and azimuth angle for each ray;
[0198] ① Taking equal-energy sampling as an example, we first consider the generation of light rays from an isotropic point source in spherical coordinates. In the zenith angle, θ is the zenith angle. It is the azimuth angle; however, θ and θ cannot be easily generated. Using equidistantly distributed light rays to simulate isotropic distribution results in higher light density near the center point. The direction of equal-energy sampling (focused sampling) light rays can be derived from the light intensity distribution of the light source. The formula for calculating the normalized cumulative flux of an isotropic light source (hemispherical solid angle emission) is:
[0199] Due to θ and The variables are separable, therefore we can handle θ and θ independently. Cumulative flux is the cumulative probability density function of light rays emitted in a given direction, which can be obtained using the Monte Carlo method:
[0200]
[0201] ② If the light intensity distribution of the light source follows a Lambertian distribution, the number of light rays within a cone at different angles should be proportional to the cosine of that angle. This allows us to use the number of light rays to describe the energy level. Similar to the normalized cumulative flux of an isotropic light source (hemispherical solid angle emission), the formula for calculating the normalized cumulative flux of a Lambertian light source (hemispherical solid angle emission) is:
[0202] Based on the Monte Carlo method, we can obtain:
[0203] in, and The value of is uniformly random on (0,1), 1≤l≤NR. θ l Let represent the azimuth and zenith angles of the l-th ray, respectively. θ l ∈[θ min ,θ max ], Indicates the range of values for the azimuth angle, [θ min ,θ max [] indicates the range of values for the zenith angle;
[0204] 1.1B2 Calculate the direction vector of each ray using the following formula.
[0205] Among them, (L) l M l N l ) represents the direction vector of the l-th ray, 1≤l≤NR;
[0206] 1.2 Based on the zenith angle and azimuth angle of each ray, and the normal vector at the sampling point of each ray, remove G rays with an angle greater than 90 degrees to the normal. If G = NR, return to step 1.1 and resample. If 0 ≤ G < NR, execute step 1.3.
[0207] pass get In a three-dimensional coordinate system, the components in the three directions After sampling, it is necessary to compare the normal vectors of the surface at the corresponding sampling points. The angle between the sampling ray direction and the normal vector of the surface is determined by discarding rays with an angle greater than 90 degrees to the normal vector to ensure that the surface light source does not emit light backwards. Specifically, the angle between the sampling ray direction and the normal vector of the surface at the sampling point is measured by the cosine of the angle between the normalized vectors, and the relevant parameters of the corresponding sampling point are substituted into the formula.
[0208] In the process, rays that do not meet the conditions are discarded, leaving S rays, where S = NR - G.
[0209] like Figure 8 The image shows a schematic diagram of the NURBS surface light source modeling results using this method.
[0210] The two methods were verified using the following method:
[0211] By benchmarking against the Lighttools software, the feasibility and accuracy of the algorithm can be evaluated using comparative simulation testing. The specific verification process is as follows:
[0212] In Lighttools software, the same light source parameters are used to model the light source. These parameters include: the spatial coordinates of the light source (x0, y0, z0), the tilt angle of the light source (α0, β0, γ0), the spatial shape of the light source g(x, y, z) = 0, the spatial distribution of the light source E(x, y), and the emission angle of the light source [θ]. min ,θ max ]、 Angular distribution of light source Luminous flux Ф of the light source, spectral distribution SP(λ) of the light source, and number of light lines NR of the light source;
[0213] After the light source model is completed, as follows Figure 1 As shown, a planar receiver with dimensions Lt×Wt is set at a distance Ht from the light source. The receiver is divided into identical light-collecting grids with a grid size of Nt×Nt (the number of light rays in each grid is greater than 10,000, so that the Monte Carlo statistical error is less than 1%). The number of light rays, radiant flux, or irradiance incident on each grid is calculated. If the maximum relative deviation is less than 1%, the scheme is considered feasible.
[0214] For different light source types, the parameters that are the same in the verification process include: Ht = 50mm, Lt = Wt = 100mm, Nt = 11, θmin = 0, θmax = π / 3, φmin = 0, φmax = 2π, (x0,y0,z0) = (0,0,0), (α0,β0,γ0) = (0,0,0), Ф = 1W, NR = 10 7 The spectral distribution of the light source is set to the blackbody radiation spectrum (400nm~700nm) at a temperature of 6000K, such as... Figure 10 (a) and Figure 10 As shown in (b), the spectral distribution maps of the self-built light source and the light source modeled by Lighttools software are obtained;
[0215] Common surface representations include XY polynomial surfaces and non-uniform rational B-spline (NURBS) surfaces. The surface emits light uniformly, and the light intensity distribution follows a Lambertian distribution, which is controlled by maintaining a constant product of the surface sampling probability density and the surface area element weights.
[0216] I. Verification of a circular, uniformly distributed XY polynomial surface light source with a Lambertian angle distribution.
[0217] The parameters of the xy polynomial surface are as follows: Figure 11 As shown, the light source boundary is circular with a radius of 10 mm, and the (x, y) coordinates of the sampling points are uniformly distributed, resulting in the spatial distribution of the light-emitting surface of the light source as shown. Figure 12 As shown;
[0218] The (x,y) coordinates of the light source are obtained using equal-area Halton random sampling. Weights are assigned at each sampling point based on the size of a surface area element, resulting in the sampled surface of the light source and its area element weights, as shown below. Figure 13 As shown.
[0219] The light intensity distribution of the light source follows a Lambertian distribution. Light intensity distribution as Figure 14 As shown, where I0 represents the light intensity when the light propagates along the normal direction, and the emission angle of the light source is randomly sampled using Halton's constant solid angle, as shown in the figure. Figure 15 As shown, the light emission angle sampling diagram of the light source is obtained; the light ray sampling results after modeling are as follows. Figure 16 As shown, F is the weight of each ray.
[0220] The target illuminance distribution obtained by Lighttools simulation and the target illuminance distribution obtained by modeling calculation are respectively as follows: Figure 17 , Figure 18 (a) Figure 18 (b) Figure 18 (c) Figure 18 As shown in (d), the maximum relative deviation between the calculated illuminance distribution and the Lighttools simulated illuminance distribution is 0.531%, which meets the accuracy requirements for light source modeling.
[0221] The method for obtaining target illuminance is as follows: Based on the starting coordinates of the light ray and the direction of light propagation, the coordinates of the intersection point between the light ray and the receiver are obtained; the illuminance of each grid is obtained by multiplying the light ray in each grid with its own light energy weight and then summing them.
[0222] II. Validation of NURBS polynomial surface light sources with uniform surface and Lambertian angle distribution.
[0223] The parameters of the NURBS surface are as follows: Figure 19 As shown, Figure 20As shown, the NURBS surface has a uniform distribution with respect to parameters u and v, as... Figure 21 As shown, the (u,v) coordinates of the light source are obtained using equal-area Halton random sampling, with weights assigned at the sampling points based on the size of the surface area element, such as... Figure 22 As shown, the light intensity distribution of the light source follows a Lambertian distribution: I(θ,φ)=I0cosθ, as... Figure 23 As shown, the emission angle of the light source is obtained using Halton random sampling with equal solid angles. Based on the above, the following results are obtained: Figure 24 The light source model shown.
[0224] Because the Gaussian distribution of the light source in space and angle results in extremely low illuminance values at the receiver edge under this condition, the number of rays is selected as 2×10 to reduce the statistical error at the edge position. 7 Article (10) 7 The maximum relative deviation was ~1.077% (at the time of the test), so that the statistical error was much less than 1%.
[0225] The target illuminance distribution obtained by Lighttools simulation and the target illuminance distribution obtained by modeling calculation are respectively as follows: Figure 25 , Figure 26 (a) Figure 26 (b) Figure 26 (c) Figure 26 As shown in (d), the maximum relative deviation between the calculated illuminance distribution and the Lighttools simulated illuminance distribution is 0.813%, which meets the accuracy requirements for light source modeling.
Claims
1. A method for modeling an XY polynomial surface light source, characterized in that, Includes the following steps: Step 1: Obtain the ray sampling parameters in the local coordinate system; 1.1: Define the number of rays as NR, sample each ray, and obtain the three-dimensional coordinates, normal vector, area weight, and energy distribution weight of each ray's sampling point; calculate the zenith angle, azimuth angle, and direction vector of each ray; where the sampling point is the starting point of each ray; 1.2: Based on the zenith angle and azimuth angle of each ray, and the normal vector at the sampling point of each ray, remove G rays with an angle greater than 90 degrees to the normal. Then return to step 1.1 and resample. If so, proceed to step 1.3; 1.3: Calculate the energy intensity weight, wavelength, and energy spectral weight of the remaining S light ray sampling points. ; 1.4: Based on the energy spectrum weight and energy intensity weight in step 1.3, and the area weight and energy distribution weight in step 1.1, calculate the energy weight of each ray; 1.5: Obtain the polarization parameters of each ray; Step 2: Model the surface light source in the local coordinate system to obtain the surface light source model and the S rays it emits; Step 3: Transform the curved surface light source from the local coordinate system to the global coordinate system, and obtain the curved surface light source in the global coordinate system; In step 1.5, the polarization parameters of the curved surface light source are calculated using the following formula: Wherein, electric field vector satisfy, , Let X be the amplitude of the polarization ellipse. Let Y be the amplitude of the polarization ellipse. The phase difference of the polarization ellipse. , The ellipticity, The major and minor axes of the polarization ellipse are... The angle between the major axis of the polarization ellipse and the positive x-axis is denoted as .
2. The XY polynomial surface light source modeling method according to claim 1, characterized in that: In step 1.1, sampling each ray to obtain the three-dimensional coordinates, normal vector, area weight, and energy distribution weight of each ray sampling point includes the following steps: A1: Obtain the three-dimensional coordinates of each ray sampling point; A11: Obtain the sampling points for each ray. coordinate; A12: Based on sampling points of each ray Coordinates are calculated using an XY polynomial expression for each ray sampling point. After obtaining the coordinates, the three-dimensional coordinates of each ray sampling point are obtained; A2: Obtain the normal vector and area weight at each sampling point; Based on the XY polynomial expression and the three-dimensional coordinates of the sampling points, Find the partial derivative and calculate This allows us to obtain the normal vector and area weight for each ray; A3: Obtain the energy distribution weights at the sampling points; If the energy of the curved surface light source is uniformly distributed, then let the first... Light sampling points ( , Energy distribution weight at position ) ; If the energy of the curved surface light source follows a Gaussian distribution, then let the first... Energy distribution weight at each ray sampling point ,in The half-width of the light source in the X and Y directions; Step 1.1 involves calculating the zenith angle, azimuth angle, and direction vector for each ray, including the following steps: B1: Calculate the zenith angle and azimuth angle for each ray. like If the light intensity of each ray is of equal energy distribution, then the azimuth and zenith angle of each ray can be calculated using the following formulas; ;like If the intensity of each ray follows a Lambertian distribution, then the azimuth and zenith angle of each ray can be calculated using the following formulas: ; in, It is a uniform random distribution on (0,1). , , They represent the first The azimuth and zenith angle of the ray, and , , Indicates the range of values for the azimuth angle. Indicates the range of values for the zenith angle; B2: Through The formula calculates the direction vector of each ray; where, Indicates the first The direction vector of a ray.
3. The XY polynomial surface light source modeling method according to claim 2, characterized in that: Step 1.3 Includes the following steps: A1: Calculate the light energy and intensity weights of the remaining S light ray sampling points. ; If the light intensity of the curved surface light source has an equal energy distribution, then let the energy intensity weight of the t-th ray be... ;in, If the light intensity of the curved surface light source is not of equal energy distribution, then let the energy intensity weight of the t-th ray be... ; A2: Calculate the wavelength and energy spectral weights of the remaining S rays. If the curved surface light source has a continuously distributed wavelength, the operating wavelength range of the curved surface light source is set as follows: The wavelength of each ray can be obtained using the following formula: ,in, Let t represent the wavelength of the t-th ray. The values of are uniformly random distributed on (0,1); ; If the curved surface light source has a continuous wavelength distribution and its spectrum is uniformly distributed, then let ; Represents the energy spectral weight of the t-th ray; If the curved light source has a continuously distributed wavelength and the curved light source has a blackbody radiation spectrum, then let ,in, =6000K, , , ; If the curved light source has discrete wavelengths, then a spectral list for discrete wavelengths is provided. ,in Indicates the magnitude of the wavelength. The weight of each wavelength is indicated by the following formula: ,in, , The operation is to round down. This represents the total number of discrete spectra; if the curved light source is a single wavelength, then... The value is equal to the wavelength of the curved surface light source and the energy spectral weight. =1.
4. The XY polynomial surface light source modeling method according to claim 3, characterized in that: Step 3 includes the following steps:
31. Convert the sampling point coordinates of S rays and the direction vector of each ray from local coordinates to global coordinates to obtain the transformed three-dimensional coordinates and direction vector of each ray; 31A. Convert the sampling point coordinates of S rays from local coordinates to global coordinates to obtain the transformed three-dimensional coordinates of each ray; If we use translation to transform local coordinates into global coordinates: then ;in Coordinates in the local coordinate system The coordinates are in the global coordinate system. This represents the amount of translation from the local coordinate system to the global coordinate system. If rotation is used to transform local coordinates into global coordinates: but , in, , Let X be the angle of rotation around X, Y, Z. These are rotation matrices about the three axes. Coordinates in the local coordinate system The coordinates are in the global coordinate system; 31B. Obtain the transformed direction vector of each ray using the same method as in step 31A; 32. Based on the three-dimensional coordinates and direction vectors of each ray obtained in step 31, transform the curved light source in the local coordinate system to the entire coordinate system to complete the modeling of the curved light source.
5. A method for modeling NURBS surface light sources, characterized in that, Includes the following steps: Step 1: Obtain the ray sampling parameters in the local coordinate system; 1.1: Define the number of rays as NR, sample each ray, and obtain the three-dimensional coordinates, normal vector, area weight, and energy distribution weight of each ray sampling point based on the control points of the surface; calculate the zenith angle, azimuth angle, and direction vector of each ray; where the sampling point is the starting point of each ray; 1.2: Based on the zenith angle and azimuth angle of each ray, and the normal vector at the sampling point of each ray, remove G rays with an angle greater than 90 degrees to the normal. Then return to step 1.1 and resample. If so, proceed to step 1.3; 1.3: Calculate the light energy intensity weight, wavelength, and energy spectral weight of the remaining S light sampling points; ; 1.4: Based on the energy spectrum weight and energy intensity weight in step 1.3, and the area weight and energy distribution weight in step 1.1, calculate the energy weight of each ray; 1.5: Obtain the polarization parameters of each ray; Step 2: Model the surface light source in the local coordinate system to obtain the surface light source model and the S rays it emits; Step 3: Transform the curved surface light source from the local coordinate system to the global coordinate system, and obtain the curved surface light source in the global coordinate system; In step 1.5, the polarization parameters of the curved surface light source are calculated using the following formula: Wherein, electric field vector satisfy , Let X be the amplitude of the polarization ellipse. Let Y be the amplitude of the polarization ellipse. The phase difference of the polarization ellipse. , The ellipticity, The major and minor axes of the polarization ellipse are... The angle between the major axis of the polarization ellipse and the positive x-axis is denoted as .
6. The NURBS surface light source modeling method according to claim 5, characterized in that: In step 1.1, sampling each ray and obtaining the three-dimensional coordinates, normal vector, area weight, and energy distribution weight of each ray sampling point based on the control points of the surface includes the following steps: A1: Control points based on surfaces, expressed using NURBS surfaces. and The expression for and the expressions for node vectors U and V are used to calculate the expression based on . The three-dimensional coordinates of the NR ray sampling points of the parameter, where, and These are defined in the node vectors Nonrational B-spline basis functions on The values are uniformly randomized in the range [0,1]. A2: Obtain the energy distribution weights of each ray sampling point. Order No. indivual Point and The three-dimensional coordinates determined by the point The corresponding energy distribution weight ; A3: Obtain the area distribution weight of each ray sampling point. The expressions based on NURBS surfaces are respectively for Find the partial derivative to obtain , The expression for the surface area weight of a NURBS surface is: in, ; A4: Calculate the normal vector of each ray sampling point. The normal vector at each sampling point is calculated using the following formula: in, Indicates parameters The corresponding number The normal vector of a ray, Represents the unit vector in the three directions of a three-dimensional coordinate system; B1: Calculate the zenith angle and azimuth angle for each ray. like If the light intensity of each ray is of equal energy distribution, then the azimuth and zenith angle of each ray can be calculated using the following formulas; ;like If the intensity of each ray follows a Lambertian distribution, then the azimuth and zenith angle of each ray can be calculated using the following formulas: ; in, The values of are uniformly random distributed on (0,1). , They represent the first The azimuth and zenith angle of the ray, and , , Indicates the range of values for the azimuth angle. Indicates the range of values for the zenith angle; B2: Calculate the direction vector of each ray using the following formula. in, Indicates the first The direction vector of a ray.
7. The NURBS surface light source modeling method according to claim 6, characterized in that: Step 1.3 Includes the following steps: A1: Calculate the light energy and intensity weights of the remaining S light ray sampling points. ; If the light intensity of the curved surface light source has an equal energy distribution, then let the energy intensity weight of the t-th ray be... ;in, ; If the light intensity of the curved surface light source is not of equal energy distribution, then let the energy intensity weight of the t-th ray be... ; A2: Calculate the wavelength and energy spectral weights of the remaining S rays. If the curved surface light source has a continuously distributed wavelength, the operating wavelength range of the curved surface light source is set as follows: The wavelength of each ray can be obtained using the following formula: ,in, Let t represent the wavelength of the t-th ray. The values of are uniformly random distributed on (0,1); If the curved surface light source has a continuous wavelength distribution and its spectrum is uniformly distributed, then let ; Represents the energy spectral weight of the t-th ray; Let represent the spectral power distribution of the t-th ray; If the curved light source has a continuously distributed wavelength and the curved light source has a blackbody radiation spectrum, then let ,in, The calculation formula is as follows: , =6000K, , , ; If the curved light source has discrete wavelengths, then a spectral list for discrete wavelengths is provided. ,in Indicates the magnitude of the wavelength. The weight of each wavelength is indicated by the following formula: ,in, , The operation is to round down. This represents the total number of discrete spectra. If the curved surface light source has a single wavelength, then The value is equal to the wavelength of the curved surface light source and the energy spectral weight. =1.
8. The NURBS surface light source modeling method according to claim 7, characterized in that: Step 3 includes the following steps:
31. Convert the sampling point coordinates of S rays and the direction vector of each ray from local coordinates to global coordinates to obtain the transformed three-dimensional coordinates and direction vector of each ray; 31A. Convert the sampling point coordinates of S rays from local coordinates to global coordinates to obtain the transformed three-dimensional coordinates of each ray; If translation is required, convert the local coordinates to global coordinates: but ;in Coordinates in the local coordinate system The coordinates are in the global coordinate system. This represents the amount of translation from the local coordinate system to the global coordinate system. If rotation is required, convert local coordinates to global coordinates: but , in, , Let X be the angle of rotation around X, Y, Z. These are rotation matrices about the three axes. Coordinates in the local coordinate system The coordinates are in the global coordinate system; 31B. Obtain the transformed direction vector of each ray using the same method as in step 31A; 32. Based on the three-dimensional coordinates and direction vectors of each ray obtained in step 31, transform the curved light source in the local coordinate system to the entire coordinate system to complete the modeling of the curved light source.