CN109491639B - A kind of Ray tracing calculation method and system - Google Patents
A kind of Ray tracing calculation method and system Download PDFInfo
- Publication number
- CN109491639B CN109491639B CN201811365311.2A CN201811365311A CN109491639B CN 109491639 B CN109491639 B CN 109491639B CN 201811365311 A CN201811365311 A CN 201811365311A CN 109491639 B CN109491639 B CN 109491639B
- Authority
- CN
- China
- Prior art keywords
- equation
- simple cubic
- cubic equation
- root
- laser
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
- G06F7/483—Computations with numbers represented by a non-linear combination of denominational numbers, e.g. rational numbers, logarithmic number system or floating-point numbers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
- G06F7/544—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices for evaluating functions by calculation
- G06F7/552—Powers or roots, e.g. Pythagorean sums
- G06F7/5525—Roots or inverse roots of single operands
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Pure & Applied Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Mathematical Optimization (AREA)
- General Engineering & Computer Science (AREA)
- Nonlinear Science (AREA)
- Optical Modulation, Optical Deflection, Nonlinear Optics, Optical Demodulation, Optical Logic Elements (AREA)
Abstract
The present invention provides a kind of Ray tracing calculation method and system, comprising: acquires the parameter value of measured laser;Based on the parameter value of the acquisition, the light parametric equation constructed in advance is solved using high-resolution method, calculates the laser propagation time;The tracing point of the laser is calculated based on the laser propagation time.Technical solution provided by the invention is theoretical according to floating-point stable calculation, solves light parametric equation using high-resolution method, improves the accuracy of Ray tracing.
Description
Technical field
The present invention relates to the high-performance computing sectors in scientific research calculating, and in particular to a kind of Ray tracing calculating side
Method.
Background technique
The energy deposition problems of laser in the plasma are laser indirect driving inertial confinement fusion (ICF, Inertial
Confinement Fusion) in important physical process, simulation precision will affect ICF whole-course numerical modeling result just
True property.In ICF entirety numerical simulation, laser mainly uses geometrical light-path to model at present, is needed in simulations by solving light
The overlapping relation of line and grid determines the motion profile of light.
Ray tracing algorithm is widely used, such as wireless communication systems, crystal optics, propagating electromagnetic radiation and collision
Detection, propagation of laser etc..Realize that quick high accuracy Ray tracing calculates always one and has challenge on Massive parallel process
The task of property.A series of intersection point of calculating optical path and (3-D or 2-D) solids is the core component of Ray tracing algorithm.
The propagation trajectories of light are made of the intersection point of light and solid.At crosspoint and the substance characteristics of near zone determine light
The state of line and the direction of propagation.Precision and the efficiency for how improving algorithm are often different because of application problem.Fusion is constrained in laser
In problem, laser appears among physical modeling as the source item of fusion.Specifically, geometrical ray approximation is generallyd use to simulate
Laser is absorbed in the plasma and is propagated.Laser beam is expressed as multi-stripe laser light (straight line or curve).Every light quilt
Assign certain laser energy.With the propagation of laser, the energy carried is deposited in plasma on the way.In each meter
Under the hypothesis for calculating the electron number densitiy linear distribution of grid, the core of intersection algorithm is exactly to find out light parametric equation and each net
The intersection point of lattice sideline section.In the design of algorithm, on the one hand need in view of electron number densitiy to be the equiprobable degeneration feelings of constant
On the other hand shape needs the finite presentation digit in view of computer digit, theoretically identical numerically different algorithm may
It can obtain different numerical solutions.Due to the limitation of Floating-point Computation, many common algorithms are difficult to calculate theoretic accurate
Solution.And in the algorithm for calculating intersection point when criterion or threshold value reach the magnitude of computer floating point precision, numerical result may be used also
Difference, numerical result difference it can may cause change or the propagation path in paths direction due to computer difference
The change of length.
IEEE binary floating point has figured most widely used floating-point since art standard (IEEE 754) is the 1980s
Number operation standard, is used by many CPU with floating point calculator, and this standard define the formats for indicating floating number and abnormality
Value, some particular values, such as: " the floating point arithmetic symbol " of infinite (Inf) and nonumeric (NaN) and these numerical value;It
Four kinds of numerical value round off errors and five kinds of exception conditions are specified, the opportunity occurred including exception and processing mode.
Because 754 standard of IEEE specifies effective storage bit number of floating number, lead to floating number operation knot in a computer
The inexactness of fruit from floating number limited digit can not a natural number in accurate expression nature, further result in
Some algorithms are theoretically correct, but on computers then may calculated result it is different from actual value, and calculating mistake
Accidentally.
Summary of the invention
For the deficiency for solving above-mentioned technology, the present invention provides a kind of Ray tracing calculation method, according to floating-point stability meter
Theory is calculated, light parametric equation is solved using extended precision floating-point number calculating method, subtraction cancellation bring is solved and calculates mistake
Accidentally, the accuracy for improving the solution of light parametric equation, can accurately realize the tracking of optical path.
A kind of Ray tracing calculation method, it is improved in that the described method includes:
Acquire the parameter value of measured laser;
Based on the parameter value of the acquisition, the light parametric equation constructed in advance, meter are solved using high-resolution method
Calculate the laser propagation time;
The tracing point of the laser is calculated based on the laser propagation time;
The light parametric equation includes unary biquadratic equation.
Preferably, the parameter value based on the acquisition solves the light constructed in advance using high-resolution method
Parametric equation, calculate the laser propagation time include:
Four light parametric equations of unitary are reduced to simple cubic equation;
The simple cubic equation is solved using trigonometric function method based on extended precision floating number and obtains the unitary three times
Equation root;
Based on the root of the simple cubic equation, the solution of four light parametric equations of unitary is calculated, when obtaining laser propagation
Between;
Wherein, the extended precision floating number includes the floating number that precision is higher than double precision.
Preferably, described to include: using the trigonometric function method solution simple cubic equation based on extended precision floating number
Calculate the discriminate of the simple cubic equation;
The simple cubic equation is solved based on the discriminate result, obtains solving result;Based on the solving result
Determine the root of the simple cubic equation.
Preferably, described to solve the simple cubic equation based on the discriminate result, obtaining solving result includes:
When the discriminate of the simple cubic equation >=0, using single precision or double-precision floating points to the unitary three
Equation of n th order n radical formula is solved;
Otherwise, judge whether occur subtraction cancellation in radical formula, when there is subtraction cancellation, using extended precision floating-point
Several radical formulas to the simple cubic equation solve;When there is not subtraction cancellation, using single precision or double-precision floating point
It is several that the simple cubic equation radical formula is solved.
Preferably, the root that the simple cubic equation is determined based on the solving result includes:
Calculating is iterated to the solving result using Newton iteration method;
As the discriminate < 0 of the simple cubic equation, whether the root after detection iterative calculation has repeated root;It weighs if it exists
Root is iterated calculating using Newton iteration method to one of repeated root, until there is not repeated root again;
Using the iterative calculation result as the root of the simple cubic equation.
Preferably, described subtraction cancellation whether occur and judged as the following formula:
In formula, m: the first floating number in radical formula;N: the size of the second floating number in radical formula, m and n connect very much
Closely;ε: the threshold value of detection subtraction cancellation.
Preferably, the discriminate of the simple cubic equation is shown below:
In formula: Δ: discriminate;P, q: the coefficient of the simple cubic equation after eliminating quadratic term;
Wherein: p is calculated as the following formula:
Q is calculated as the following formula:
Preferably, when the discriminate < 0 of the simple cubic equation, the number of the root of the simple cubic equation is 3,
Radical formula is shown below:
In formula: x1、x2、x3: the root of simple cubic equation;θ: ginseng when simple cubic equation is solved using trigonometric function method
Number;
Wherein, θ is calculated as the following formula:
Preferably, the tracing point for calculating laser based on the laser propagation time includes:
The laser propagation time is updated to the light parametric equation about the light propagation time, obtains the track of laser
Point.
A kind of Ray tracing computing system, including parameter collection module, time-obtaining module and tracing point obtain module;
Parameter collection module: for acquiring the parameter value of measured laser;
Time-obtaining module: the parameter value based on the acquisition solves the light constructed in advance using high-resolution method
Line parametric equation calculates the laser propagation time;
Tracing point obtains module: the tracing point of the laser is calculated based on the laser propagation time;
The light parametric equation includes unary biquadratic equation.
With immediate prior art ratio, technical solution provided by the invention is had the advantages that
Technical solution provided by the invention, it is theoretical according to floating-point stable calculation, using extended precision floating number calculating side
Method solves light parametric equation, solves subtraction cancellation bring and calculates mistake, improves the accurate of light parametric equation solution
Property, accurately realize the tracking of optical path.
Technical solution provided by the invention, the method for refining precision and repeated root detection using extended precision operation, iteration are excellent
The precision of neutralizing improves the stability of light parametric equation derivation algorithm.
Detailed description of the invention
Fig. 1 is the schematic diagram of Ray tracing calculation method of the present invention;
Fig. 2 is the flow chart the present invention is based on extended precision floating number using trigonometric function method solution simple cubic equation;
Fig. 3 is the schematic diagram of Ray tracing computing system of the present invention.
Specific embodiment
For a better understanding of the present invention, following will be combined with the drawings in the embodiments of the present invention, in the embodiment of the present invention
Technical solution be clearly and completely described, it is clear that described embodiments are some of the embodiments of the present invention, rather than
Whole embodiments.
Embodiment one,
A kind of Ray tracing calculation method, as shown in Figure 1, comprising:
Step 1: acquiring the parameter value of measured laser;
Step 2: the parameter value based on the acquisition solves the light parameter side constructed in advance using high-resolution method
Journey calculates the laser propagation time;
Step 3: the tracing point of the laser is calculated based on the laser propagation time;
The light parametric equation includes unary biquadratic equation.
Step 1: acquiring the parameter value of measured laser.
Step 2: the parameter value based on the acquisition solves the light parameter side constructed in advance using high-resolution method
Journey calculates the laser propagation time.
Specifically, described that the light parametric equation constructed in advance is solved using high-resolution method, calculate laser propagation
Time includes:
Four light parametric equations of unitary are reduced to simple cubic equation;
The simple cubic equation is solved using trigonometric function method based on extended precision floating number and obtains the unitary three times
Equation root;
Based on the root of the simple cubic equation, the solution of four light parametric equations of unitary is calculated, when obtaining laser propagation
Between;
Wherein, the extended precision floating number includes the floating number that precision is higher than double precision.
Specifically, described to include: using the trigonometric function method solution simple cubic equation based on extended precision floating number
Calculate the discriminate of the simple cubic equation;
The simple cubic equation is solved based on the discriminate result, obtains solving result;Based on the solving result
Determine the root of the simple cubic equation.
Specifically, described to solve the simple cubic equation based on the discriminate result, obtaining solving result includes:
When the discriminate of the simple cubic equation >=0, using single precision or double-precision floating points to the unitary three
Equation of n th order n radical formula is solved;
Otherwise, judge whether occur subtraction cancellation in radical formula, when there is subtraction cancellation, using extended precision floating-point
Several radical formulas to the simple cubic equation solve;When there is not subtraction cancellation, using single precision or double-precision floating point
It is several that the simple cubic equation radical formula is solved.
Specifically, the root that the simple cubic equation is determined based on the solving result includes:
Calculating is iterated to the solving result using Newton iteration method;
As the discriminate < 0 of the simple cubic equation, whether the root after detection iterative calculation has repeated root;It weighs if it exists
Root is iterated calculating using Newton iteration method to one of repeated root, until there is not repeated root again;
Using the iterative calculation result as the root of the simple cubic equation.
Specifically, the subtraction cancellation is judged as the following formula:
In formula, m: the first floating number in radical formula;N: the size of the second floating number in radical formula, m and n connect very much
Closely;ε: the threshold value of detection subtraction cancellation.
Specifically, the discriminate of the simple cubic equation is shown below:
In formula: Δ: discriminate;P, q: the coefficient of the simple cubic equation after eliminating quadratic term;
Wherein: p is calculated as the following formula:
Q is calculated as the following formula:
Specifically, when the discriminate < 0 of the simple cubic equation, the number of the root of the simple cubic equation is 3,
Radical formula is shown below:
In formula: x1、x2、x3: the root of simple cubic equation;θ: ginseng when simple cubic equation is solved using trigonometric function method
Number;
Wherein, θ is calculated as the following formula:
Step 3: the tracing point that laser is calculated based on the laser propagation time.
The laser propagation time is updated to the light parametric equation about the light propagation time, obtains the track of laser
Point.
Embodiment two,
A kind of Ray tracing calculation method, as shown in Figure 1, which comprises
Step 1: acquiring the parameter value of measured laser;
Step 2: the parameter value based on the acquisition solves the light parameter side constructed in advance using high-resolution method
Journey calculates the laser propagation time;
Step 3: the tracing point of the laser is calculated based on the laser propagation time;
The light parametric equation includes unary biquadratic equation.
Step 1: acquiring the parameter value of measured laser.
Under approximation in geometric optics, light propagation equation be can be described as
WhereinThe position vector of light, ω andIt is the frequency and spread speed of laser respectively
T indicates the time of laser propagation, and c is the light velocity in vacuum, neIt is electron number densitiy, critical electron number densitiy nc=
ω2me/4πe2, meIt is electron mass, e is electron charge.
What description laser was propagated in the plasma is Maxwell equation, and it is laser wave that its solution, which requires mesh scale,
Long magnitude, also there is same requirement in terms of time scale.And current simulation program far can not also reach.In this feelings
The Ray tracing method under approximation in geometric optics is proposed under condition.Its basic thought is: laser beam being divided into several light, often
Light assigns certain laser energy when initial, propagates in the plasma, behavior meets light parametric equation, along light
Line tracking, laser energy pass through inverse tough cause process and other processes by plasma absorption.Due to laser propagation speed quickly,
It assume that in a hydrodynamics step-length self-energy deposition it is instantaneous, in a light communication process, plasma
State is constant.
For by three-dimensional light be applied to using z as symmetry axis two-dimensional columns geometry numerical value calculate in, i.e.,
Wherein (kr, kθ, kz) indicate speed of the light under cylindrical coordinate, it can will be in rectangular coordinate system by coordinate transform
Light parametric equation transform be cylindrical coordinate under light parametric equation:
Pass through nondimensionalizationThe affix about grid is omitted, and is assumed in each grid
The variation of upper electron number densitiy is linear, the then three-dimensional light parameter side in available cylindrical coordinate on each two-dimensional grid
Journey:
Wherein,(r0, z0, θ0) withRespectively light
The position of line inlet point and wave vector.The available light parametric equation about t of above-mentioned equation is solved, specifically,
A) work as h*When=0, light parametric equation is:
B) work as GrWhen=0, light parametric equation is:
C) work as h*≠ 0 and GrIt when ≠ 0, can not accurately solve, rememberEnable s=y '
(r),
Then light parametric equation can approximate representation are as follows:
Based on the concrete form of glazed thread parametric equation, light parametric equation and two-dimensional columns geometric grid can be calculated
Intersection point.
Specifically, the intersection point of light Yu every Grid Edge is calculated separately.Linear equation where Grid Edge is denoted as
R=Az+B, A=(r2-r1)/(z2-z1), B=r1-Az1,
Wherein (r1, z1) and (r2, z2) be respectively any Grid Edge two endpoints, it is possible thereby to be correspondingly made available as follows
Quadratic equation with one unknown and unary biquadratic equation about t.
A) work as h*When=0,
B) work as GrWhen=0,
C) work as h*≠ 0 and GrWhen ≠ 0,
It solves above-mentioned quadratic equation with one unknown or unary biquadratic equation can be obtained by the value of parameter t, substitute into light parameter
The coordinate value of intersection point can be obtained in equation.May be obtained by solving One- place 2-th Order or biquadratic equation by multiple, judge the item of true solution
Part is t > 10-6And intersection point is on Grid Edge.Meet true solution condition if any multiple, track of the minimum value as light should be chosen
Point.The distance that light passes through grid can be found out according to the tracing point of light, then calculates the laser of this light deposition
Energy.
Ferrari algorithm is to solve for a kind of algorithms most in use of unary biquadratic equation, specific as follows:
For unary biquadratic equation
a′x4+b′x3+c′x2+ d ' x+e=0
The highest order item of equation is turned to 1, is executed
Equation is transplanted, is turned to
x4+b′x3=-c ' x2-d′x-e
Equation both sides add simultaneouslyThe left side is set to be made into perfect square expression, as follows:
It introduces parameter y and solves y, so that equation the right and left is all made into perfect square expression.
Firstly, left and right all addsIt obtains
Needing for be made on the right perfect square expression, i.e. the discriminate on the right is 0, it is shown below:
Abbreviation is a cubic equation
-y3+c′y2+(4e-b′d′)y+d′2+eb′2- 4ec '=0
Then this simple cubic equation is solved, three values of y can be obtained, take any one.It is available
Original equation is equivalent to
Available two quadratic equation with one unknown
To the two quadratic equation with one unknown abbreviations
The two quadratic equation with one unknown are solved, four real roots of unary biquadratic equation can be obtained.
In above-mentioned Ferrari algorithm, need to solve a simple cubic equation, whether the solution of the equation accurately will be direct
Influence the correctness for the unary biquadratic equation root that Ferrari algorithm solves.
Step 2: the parameter value based on the acquisition solves the light parameter side constructed in advance using high-resolution method
Journey calculates the laser propagation time.
Specifically, described that the light parametric equation constructed in advance is solved using high-resolution method, calculate laser propagation
Time includes:
Four light parametric equations of unitary are reduced to simple cubic equation;
The simple cubic equation is solved using trigonometric function method based on extended precision floating number and obtains the unitary three times
Equation root;
Based on the root of the simple cubic equation, the solution of four light parametric equations of unitary is calculated, when obtaining laser propagation
Between;
Wherein, the extended precision floating number includes the floating number that precision is higher than double precision.
Common floating number is single precision in computer, double-precision floating points, present invention uses extended precision floating number,
The index and significant figure digit of these type floating numbers are as follows:
The digit of 1 floating number of table is distributed
Type | Occupy digit | Index digit | Decimal digits |
Single precision | 32 | 8 | 23 |
Double precision | 64 | 11 | 52 |
As shown in Fig. 2, described solve the simple cubic equation packet using trigonometric function method based on extended precision floating number
It includes:
Calculate the discriminate of the simple cubic equation;
The simple cubic equation is solved based on the discriminate result, obtains solving result;Based on the solving result
Determine the root of the simple cubic equation.
Specifically, described to solve the simple cubic equation based on the discriminate result, obtaining solving result includes:
When the discriminate of the simple cubic equation >=0, using single precision or double-precision floating points to the unitary three
Equation of n th order n radical formula is solved;
Otherwise, judge whether occur subtraction cancellation in radical formula, when there is subtraction cancellation, using extended precision floating-point
Several radical formulas to the simple cubic equation solve;When there is not subtraction cancellation, using single precision or double-precision floating point
It is several that the simple cubic equation radical formula is solved.
Specifically, the root that the simple cubic equation is determined based on the solving result includes:
Calculating is iterated to the solving result using Newton iteration method;
As the discriminate < 0 of the simple cubic equation, whether the root after detection iterative calculation has repeated root;It weighs if it exists
Root is iterated calculating using Newton iteration method to one of repeated root, until there is not repeated root again;
Using the iterative calculation result as the root of the simple cubic equation.
Newton iteration method solves Equation f (x)=0.Given initial estimation solution x0, Newton iteration method is changed by following formula
Generation is acquired to be solved in next step, is shown below:
The limit that Newton iteration method can converge to the precision of solution depends onThe levels of precision that can be calculated.
In Floating-point Computation, subtraction cancellation occurs very close floating number in two values and subtracts each other, this often leads
A large amount of effective digital is caused to lose.Consider a function
Its codomain is [0,0.5], in x=1.2 × 10-5, in the case that effective digital is 10
Cosx=0.9999999999
1-cosx=0.0000000001
The reason of this obvious calculating mistake, this problem is that the number of significant digit of 1-cosx only has one, the floating-point of 1-cosx
Calculated result is accurate, but subtraction operation handlebar floating point error is exaggerated.In this function, identity cosx=1- is utilized
2sin2(x/2), equation is rewritten as following form to avoid rounding error
Assuming that there are two similar floating number m and n, haveWith WithBe m and
N natural number to be represented, Δ m and Δ n are the rounding error in data, or the error calculated before, calculate x=m-n, have
When | m-n | < < | m |+| n | when, as a result serious relative error can be generated with result corresponding in nature.
But as Δ m=Δ n=0, i.e. floating number energy Precise Representation natural number, subtraction cancellation error will not be generated.Institute
Subtraction cancellation is stated to be judged as the following formula:
In formula, m: the first floating number in radical formula;N: the size of the second floating number in radical formula, m and n connect very much
Closely;ε: the threshold value of detection subtraction cancellation.
The simple cubic equation is shown below:
ax3+bx2+ cx+d=0.
Specifically, when the number of the root of the simple cubic equation is 3, radical formula is shown below:
In formula, p, q: the coefficient of the simple cubic equation after eliminating quadratic term;
At this point, discriminate is less than zero.
Wherein, parameter θ when solving simple cubic equation using trigonometric function method is calculated as the following formula:
P is calculated as the following formula:
Discriminate is calculated as the following formula:
Wherein: Δ: discriminate;
Q is calculated as the following formula:
If discriminate is equal to zero:
If p=q=0, simple cubic equation has a root, and radical formula is shown below:
Otherwise there are two roots for simple cubic equation:
If q < 0, radical formula is shown below:
Otherwise radical formula is shown below:
If discriminate > 0, simple cubic equation has a root:
IfRadical formula is shown below:
Otherwise radical formula is shown below:
Step 3: by the laser propagation time substitute into light parametric equation, obtain light tracing point include: will be described
The laser propagation time is updated to the light parametric equation about the light propagation time, obtains the tracing point of laser.
Table 2 is listed uses discriminate extended precision, radical formula subtraction phase in Ray tracing high-resolution method
Disappear detection and extended precision, Newton iteration method, repeated root detection with restart Newton iteration various situations and various situations under pass through
It crosses and 13,000,000 simple cubic equations is calculated, the solution accuracy of statistics.It can be seen that using skill provided by the invention
Art scheme can get 100% accuracy.And classical trigonometric function algorithm, do not use discriminate extended precision, radical formula to subtract
The detection of method cancellation and extended precision, Newton iteration method, repeated root detection and restart in the case where Newton iteration to these equations just
True rate is about 85%.
2 comparison sheet of table
Embodiment three,
A kind of Ray tracing computing system, as shown in figure 3, including parameter collection module, time-obtaining module and tracing point
Obtain module;
Parameter collection module: for acquiring the parameter value of measured laser;
Time-obtaining module: the parameter value based on the acquisition solves the light constructed in advance using high-resolution method
Line parametric equation calculates the laser propagation time;
Tracing point obtains module: the tracing point of the laser is calculated based on the laser propagation time;
The light parametric equation includes unary biquadratic equation;
Specifically, tracing point obtains the parameter value based on the acquisition in module, is solved using high-resolution method pre-
The light parametric equation first constructed, calculate the laser propagation time include:
Four light parametric equations of unitary are reduced to simple cubic equation;
The simple cubic equation is solved using trigonometric function method based on extended precision floating number and obtains the unitary three times
Equation root;
Based on the root of the simple cubic equation, the solution of four light parametric equations of unitary is calculated, when obtaining laser propagation
Between;
Wherein, the extended precision floating number includes the floating number that precision is higher than double precision.
Specifically, described that the simple cubic equation is solved using trigonometric function method based on extended precision floating number:
Calculate the discriminate of the simple cubic equation;
The simple cubic equation is solved based on the discriminate result, obtains solving result;Based on the solving result
Determine the root of the simple cubic equation.
Specifically, described to solve the simple cubic equation based on the discriminate result, obtaining solving result includes:
When the discriminate of the simple cubic equation >=0, using single precision or double-precision floating points to the unitary three
Equation of n th order n radical formula is solved;
Otherwise, judge whether occur subtraction cancellation in radical formula, when there is subtraction cancellation, using extended precision floating-point
Several radical formulas to the simple cubic equation solve;When there is not subtraction cancellation, using single precision or double-precision floating point
It is several that the simple cubic equation radical formula is solved.
Specifically, the root that the simple cubic equation is determined based on the solving result includes:
Calculating is iterated to the solving result using Newton iteration method;
As the discriminate < 0 of the simple cubic equation, whether the root after detection iterative calculation has repeated root;It weighs if it exists
Root is iterated calculating using Newton iteration method to one of repeated root, until there is not repeated root again;
Using the iterative calculation result as the root of the simple cubic equation.
Specifically, the subtraction cancellation is judged as the following formula:
In formula, m: the first floating number in radical formula;N: the size of the second floating number in radical formula, m and n connect very much
Closely;ε: the threshold value of detection subtraction cancellation.
Specifically, the discriminate of the simple cubic equation is shown below:
In formula: Δ: discriminate;P, q: the coefficient of the simple cubic equation after eliminating quadratic term;
Wherein: p is calculated as the following formula:
Q is calculated as the following formula:
Specifically, when the discriminate < 0 of the simple cubic equation, the number of the root of the simple cubic equation is 3,
Radical formula is shown below:
In formula: x1、x2、x3: the root of simple cubic equation;θ: ginseng when simple cubic equation is solved using trigonometric function method
Number;
Wherein, parameter θ when solving simple cubic equation using trigonometric function method is calculated as the following formula:
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
The above embodiments are merely illustrative of the technical scheme of the present invention and are not intended to be limiting thereof, although referring to above-described embodiment pair
The present invention is described in detail, those of ordinary skill in the art still can to a specific embodiment of the invention into
Row modification perhaps equivalent replacement these without departing from any modification of spirit and scope of the invention or equivalent replacement, applying
Within pending claims of the invention.
Claims (7)
1. a kind of Ray tracing calculation method, which is characterized in that the described method includes:
Acquire the parameter value of measured laser;
Based on the parameter value of the acquisition, the light parametric equation constructed in advance is solved using high-resolution method, is calculated and is swashed
The light propagation time;
The tracing point of the laser is calculated based on the laser propagation time;
The light parametric equation includes unary biquadratic equation;
The parameter value based on the acquisition solves the light parametric equation constructed in advance, meter using high-resolution method
Calculate the laser propagation time include:
Four light parametric equations of unitary are reduced to simple cubic equation;
The simple cubic equation is solved using trigonometric function method based on extended precision floating number and obtains the simple cubic equation
Root;
Based on the root of the simple cubic equation, the solution of four light parametric equations of unitary is calculated, the laser propagation time is obtained;
Wherein, the extended precision floating number includes the floating number that precision is higher than double precision;
It is described to include: using the trigonometric function method solution simple cubic equation based on extended precision floating number
Calculate the discriminate of the simple cubic equation;
The simple cubic equation is solved based on the discriminate result, obtains solving result;It is determined based on the solving result
The root of the simple cubic equation;
Described to solve the simple cubic equation based on the discriminate result, obtaining solving result includes:
When the discriminate of the simple cubic equation >=0, using single precision or double-precision floating points to the unitary cube
Journey radical formula is solved;
Otherwise, judge whether occur subtraction cancellation in radical formula, when there is subtraction cancellation, using extended precision floating number pair
The radical formula of the simple cubic equation solves;When there is not subtraction cancellation, using single precision or double-precision floating points pair
The simple cubic equation radical formula is solved.
2. calculation method as described in claim 1, which is characterized in that described to determine the unitary three based on the solving result
The root of equation of n th order n includes:
Calculating is iterated to the solving result using Newton iteration method;
As the discriminate < 0 of the simple cubic equation, whether the root after detection iterative calculation has repeated root;Repeated root if it exists,
Calculating is iterated again using Newton iteration method to one of repeated root, until there is not repeated root;
Using the iterative calculation result as the root of the simple cubic equation.
3. calculation method as described in claim 1, which is characterized in that whether occur subtraction cancellation in the radical formula and press
Formula is judged:
In formula, m: the first floating number in radical formula;N: the size of the second floating number in radical formula, m and n are very close;ε:
Detect the threshold value of subtraction cancellation.
4. calculation method as described in claim 1, it is characterised in that: the discriminate of the simple cubic equation such as following formula institute
Show:
In formula: Δ: discriminate;P, q: the coefficient of the simple cubic equation after eliminating quadratic term;
Wherein: p is calculated as the following formula:
Q is calculated as the following formula:
5. calculation method as claimed in claim 4, which is characterized in that described when the discriminate < 0 of the simple cubic equation
The number of the root of simple cubic equation is 3, and radical formula is shown below:
In formula: x1、x2、x3: the root of simple cubic equation;θ: parameter when simple cubic equation is solved using trigonometric function method;
Wherein, parameter θ when solving simple cubic equation using trigonometric function method is calculated as the following formula:
6. calculation method as described in claim 1, which is characterized in that described to calculate laser based on the laser propagation time
Tracing point includes:
The laser propagation time is updated to the light parametric equation about the light propagation time, obtains the tracing point of laser.
7. Ray tracing computing system used in a kind of Ray tracing calculation method as described in claim 1, which is characterized in that
The system comprises parameter collection module, time-obtaining module and tracing points to obtain module;
Parameter collection module: for acquiring the parameter value of measured laser;
Time-obtaining module: the parameter value based on the acquisition is solved the light constructed in advance using high-resolution method and joined
Number equation, calculates the laser propagation time;
Tracing point obtains module: the tracing point of the laser is calculated based on the laser propagation time;
The light parametric equation includes unary biquadratic equation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811365311.2A CN109491639B (en) | 2018-11-16 | 2018-11-16 | A kind of Ray tracing calculation method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811365311.2A CN109491639B (en) | 2018-11-16 | 2018-11-16 | A kind of Ray tracing calculation method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109491639A CN109491639A (en) | 2019-03-19 |
CN109491639B true CN109491639B (en) | 2019-08-13 |
Family
ID=65695987
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811365311.2A Active CN109491639B (en) | 2018-11-16 | 2018-11-16 | A kind of Ray tracing calculation method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109491639B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN203414169U (en) * | 2013-07-26 | 2014-01-29 | 华东师范大学 | Light path device |
CN206584041U (en) * | 2016-11-14 | 2017-10-24 | 深圳市镭神智能系统有限公司 | A kind of light path system |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104238025B (en) * | 2013-06-21 | 2017-12-29 | 华为技术有限公司 | light path processing method and device |
CN106597540B (en) * | 2016-12-30 | 2017-10-31 | 中国科学院地质与地球物理研究所 | Gaussian beam offset imaging method and device |
CN107727084B (en) * | 2017-09-18 | 2021-02-12 | 北京卫星环境工程研究所 | Method for automatically searching normal direction of cube mirror on satellite by robot high-precision measuring instrument |
CN108445469A (en) * | 2018-05-11 | 2018-08-24 | 天津大学 | A kind of rotating mirror scanning device and method of multi-line laser radar |
-
2018
- 2018-11-16 CN CN201811365311.2A patent/CN109491639B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN203414169U (en) * | 2013-07-26 | 2014-01-29 | 华东师范大学 | Light path device |
CN206584041U (en) * | 2016-11-14 | 2017-10-24 | 深圳市镭神智能系统有限公司 | A kind of light path system |
Also Published As
Publication number | Publication date |
---|---|
CN109491639A (en) | 2019-03-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Moon et al. | Exact charge-conserving scatter–gather algorithm for particle-in-cell simulations on unstructured grids: A geometric perspective | |
Beilina et al. | Numerical linear algebra: Theory and applications | |
Manocha et al. | Algorithms for intersecting parametric and algebraic curves II: Multiple intersections | |
Brönnimann et al. | Computing exact geometric predicates using modular arithmetic with single precision | |
Verschelde et al. | Mixed-volume computation by dynamic lifting applied to polynomial system solving | |
Teukolsky | Formulation of discontinuous Galerkin methods for relativistic astrophysics | |
Dassios | On solutions and algebraic duality of generalised linear discrete time systems | |
Wang et al. | An FPGA implementation of the Hestenes-Jacobi algorithm for singular value decomposition | |
Lulli et al. | Out-of-equilibrium finite-size method for critical behavior analyses | |
Clerc et al. | Towards mapping turbulence in the intra-cluster medium-I. Sample variance in spatially-resolved X-ray line diagnostics | |
Frenod et al. | An exponential integrator for a highly oscillatory Vlasov equation | |
CN109491639B (en) | A kind of Ray tracing calculation method and system | |
Gusev et al. | Symbolic-numerical algorithms for solving the parametric self-adjoint 2D elliptic boundary-value problem using high-accuracy finite element method | |
Duan et al. | An efficient ADER discontinuous Galerkin scheme for directly solving Hamilton-Jacobi equation | |
CN109508172B (en) | A kind of ray trajectory point calculating method and system | |
Todhunter et al. | Mathematical approach to the validation of field surface texture parameter software | |
Dehghan et al. | On the total variation of a third-order semi-discrete central scheme for 1D conservation laws | |
Garrett et al. | A fast solver for implicit integration of the Vlasov--Poisson system in the Eulerian framework | |
Han et al. | Two uniform tailored finite point schemes for the two dimensional discrete ordinates transport equations with boundary and interface layers | |
Cheng et al. | Determining the topology of real algebraic surfaces | |
Luo | A finite volume method based on weno reconstruction for compressible flows on hybrid grids | |
Li et al. | An efficient surface–surface intersection algorithm based on geometry characteristics | |
Kytmanov | An algorithm for calculating power sums of roots for a class of systems of nonlinear equations | |
CN102999085B (en) | Lognormal clutter implementation method and device | |
Sanchez-Romero et al. | An approach to the application of shift-and-add algorithms on engineering and industrial processes |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |