CN107730588A - Hypotenuse length of side fast acquiring method and circuit for graphics process - Google Patents
Hypotenuse length of side fast acquiring method and circuit for graphics process Download PDFInfo
- Publication number
- CN107730588A CN107730588A CN201710936661.9A CN201710936661A CN107730588A CN 107730588 A CN107730588 A CN 107730588A CN 201710936661 A CN201710936661 A CN 201710936661A CN 107730588 A CN107730588 A CN 107730588A
- Authority
- CN
- China
- Prior art keywords
- length
- reaction coefficient
- angle
- value
- hypotenuse
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/20—Finite element generation, e.g. wire-frame surface description, tesselation
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Generation (AREA)
Abstract
In order to fast and accurately obtain the length of side in texture space parallelogram region corresponding to pixel, namely the hypotenuse length of side of corresponding right angled triangle, the invention provides a kind of hypotenuse length of side fast acquiring method and circuit for graphics process.Two right-angle sides for defining right angled triangle are respectively s and t, hypotenuse L;Right-angle side s and t length of side value are converted into binary number, method includes step:1) according to computational accuracy
Description
Technical field
The invention belongs to computer graphics disposal technology field, is related to a kind of hypotenuse for graphics process
Length of side fast acquiring method and circuit.
Background technology
With the development of computer graphics techniques, virtual reality (Virtual reality, VR), augmented reality
The extensive use of technologies such as (Augmented reality, AR), people get over to the speed and quality requirement that generate photo realism graphic
Come higher.In high quality graphics technology is generated, mapping technology is a kind of raising complex object really degree in surface
Important technology.
In computer graphics techniques earlier era, description objective world mainly passes through mathematical modeling on aageneral-purposeaprocessor
Mode is realized, because objective world is complicated and changeable, objective world, amount of calculation pole are represented using general processor processing geometrical model
Its is huge and is difficult to meet requirement of real-time.Photo realism graphic is generated for real-time, researchers are by textures mode, complexity
Figure pastes on a surface of an, and without research body surface complex geometry.
Objective world figure can efficiently be generated using mapping technology (i.e. texture mapping), it is no longer necessary to answered
Miscellaneous mathematical modeling draws body surface complex geometry, it is only necessary to existing multicolour pattern is mapped on body surface,
And the color value of multicolour pattern is added on body surface by shading method so that drawing result is more nearly objective
Things.
At present, texture mapping mainly has two kinds of implementations, and one kind is Direct mapping (texture scan mode), i.e., by texture
The body surface of physical space is mapped to, then image space is mapped to by projective transformation, is eventually displayed on screen.Other one
Kind is reverse Mapping (screen scanning mode), i.e., by the pixel reverse Mapping in image space to texture space, to texture space
In pattern sampled.
Fig. 1 show pixel region and is mapped to texture region schematic diagram, and wherein s and t is texture space coordinates equation respectively
To pixel space x Directional partial derivatives and the partial derivative in y directions.As shown in Fig. 2 the side L of the parallelogram length of side can be by local derviation
Number s and t calculates gained, and s, t, L form a right angled triangle, and L is the hypotenuse of the right angled triangle.
Using during the Pythagorean theorem method hypot length of side, it is necessary to carry out twice square operation, once
Add operation, once extraction of square root operation, calculating process is complex, can not realize hardware design in this manner.
Calculating to the hypotenuse length of side at present is all that it is using secondary by surmounting function circuit realiration
Approach or approach three times to reach the computational accuracy of requirement.This complex circuit designs degree is larger, circuit area, power consumption all compare
It is larger.
The content of the invention
Based on above-mentioned background technology, in order to fast and accurately obtain texture space parallelogram region corresponding to pixel
The length of side, namely the hypotenuse length of side of corresponding right angled triangle, the invention provides a kind of right angled triangle for graphics process
Hypotenuse length of side fast acquiring method and circuit.
The present invention technical solution be:
For the hypotenuse length of side fast acquiring method of graphics process, two right angles of right angled triangle are defined
While be respectively s and t, hypotenuse L;Right-angle side s and t length of side value are converted into binary number;Comprise the following steps:
1) side reaction coefficient is selected according to computational accuracy f (α);The computational accuracy
2) compare the right-angle side s and t length of side using comparator, the less right-angle side of the length of side is selected using selector;
3) according to the side reaction coefficient, shifting function, displacement add operation are made to the length of side value of the less right-angle side of the length of side, or
The length of side value of the less right-angle side of the length of side and side reaction coefficient are made multiplication operation by person;
4) length of side value of the result of the step 3) right-angle side larger with the length of side is added, acquired results are right angled triangle
Hypotenuse L the length of side.
Further, above-mentioned steps 1) in side reaction coefficient span be [0.15,0.5];
When it is 0.5 to select side reaction coefficient, the length of side value of the less right-angle side of the length of side is carried out moving to right a bit manipulation in step 3);
When it is 0.4375 to select side reaction coefficient, the length of side value of the less right-angle side of the length of side is carried out moving to right two respectively in step 3)
Position, three, the numerical value after processing will be moved to right after four bit manipulations be three times again added;
When it is 0.375 to select side reaction coefficient, the length of side value of the less right-angle side of the length of side is carried out moving to right two respectively in step 3)
The numerical value after handling will be moved to right after position, three bit manipulations twice again to be added;
When it is 0.3125 to select side reaction coefficient, the length of side value of the less right-angle side of the length of side is carried out moving to right two respectively in step 3)
The numerical value after handling will be moved to right after position, four bit manipulations twice again to be added;
When it is 0.25 to select side reaction coefficient, the length of side value of the less right-angle side of the length of side is carried out moving to right two bit manipulations in step 3);
When it is 0.1875 to select side reaction coefficient, the length of side value of the less right-angle side of the length of side is carried out moving to right three respectively in step 3)
The numerical value after handling will be moved to right after position, four bit manipulations twice again to be added;
When it is other values to select side reaction coefficient, the length of side value of the less right-angle side of the length of side is multiplied with side reaction coefficient in step 3).
Further, when above-mentioned side reaction coefficient is 0.5 and 0.25, the realization price of hardware of methods described is minimum;Side reaction coefficient is
The realization price of hardware of methods described is taken second place when 0.375 and 0.1875.
Preferably, above-mentioned steps 1) in side reaction coefficient when being 0.3284271247, error is minimum, is 0.0018.It is preferred that
Above-mentioned steps 2) -4) it can carry out with simultaneously while obtain multiple hypotenuse length of sides.
Invention also provides a kind of hypotenuse length of side quick obtaining circuit for graphics process, and it is special
Different part is, including comparator, selector, processor and the adder being sequentially connected;Comparator is used to compare right angle trigonometry
The length of side of two right-angle sides of shape;Selector is used to select the less right-angle side of the length of side, and the length of side value of the right-angle side is sent into
Processor;The concrete structure of processor determines that side reaction coefficient is according to computational accuracy according to selected side reaction coefficient It is determined that;
When it is 0.5 or 0.25 to select side reaction coefficient, the processor is shift unit, for being shifted to the data received
Operation, and the result after shifting function is sent into adder;
When elected side reaction coefficient is 0.4375,0.375,0.3125 or 0.1875, the processor is shift unit and the first addition
Device, for carrying out multi-shift operation to the data that receive, and institute is re-fed into after the results added after multi-shift is operated
State adder;
Elected side reaction coefficient value but is not equal to 0.5,0.4375,0.375,0.3125,0.25 and in the range of [0.15,0.5]
When 0.1875, the processor is multiplier, for the data received to be multiplied with side reaction coefficient, and the result after multiplication is sent
Enter the adder;
The adder is used to the length of side of the less right-angle side of the length of side being added with the result that processor exports, gained
As a result it is the hypotenuse length of side of right angled triangle.
Further, when the side reaction coefficient is 0.5 and 0.25, the circuit Least-cost, side reaction coefficient is 0.375 and 0.1875
Shi Suoshu circuit costs are taken second place.
Preferably, above-mentioned side reaction coefficient is 0.3284271247.
Beneficial effects of the present invention:
The present invention is in the case where meeting certain precision, it is easy to accomplish hypotenuse quickly calculates, circuit design
Complexity, circuit area, power consumption and realize cost etc. to surmount function circuit more excellent all than existing.
Brief description of the drawings
Fig. 1 is texture space region parallelogram.
Fig. 2 is right angled triangle schematic diagram.
Fig. 3 is that side reaction coefficient is equal to when can not be by other coefficients of displacement, and the quick counting circuit of hypotenuse is set
Meter.
When Fig. 4 is that side reaction coefficient is equal to 0.5, the design of the quick counting circuit of hypotenuse.
When Fig. 5 is that side reaction coefficient is equal to 0.4375, the design of the quick counting circuit of hypotenuse.
When Fig. 6 is that side reaction coefficient is equal to 0.375, the design of the quick counting circuit of hypotenuse.
When Fig. 7 is that side reaction coefficient is equal to 0.3125, the design of the quick counting circuit of hypotenuse.
When Fig. 8 is that side reaction coefficient is equal to 0.25, the design of the quick counting circuit of hypotenuse.
When Fig. 9 is that side reaction coefficient is equal to 0.1875, the design of the quick counting circuit of hypotenuse.
Embodiment
Below in conjunction with accompanying drawing, the present invention is described in detail.
Two right-angle sides for defining right angled triangle are respectively s and t, hypotenuse L, right-angle side s and t length of side value are changed
For binary number.Hypotenuse length of side fast acquiring method provided by the present invention for graphics process, including with
Lower step:
1) side reaction coefficient is selected according to computational accuracy f (α);The computational accuracy
2) compare the right-angle side s and t length of side using comparator, the less right-angle side of the length of side is selected using selector;
3) according to the side reaction coefficient, shifting function, displacement add operation are made to the length of side value of the less right-angle side of the length of side, or
The length of side value of the less right-angle side of the length of side and side reaction coefficient are made multiplication operation by person;
4) length of side value of the result of the step 3) right-angle side larger with the length of side is added, acquired results are right angled triangle
The hypotenuse L length of side.
Side reaction coefficient can be chosen in [0.15,0.5] in step 1):
When selecting side reaction coefficient to be equal to 0.5, the length of side value of the less right-angle side of the length of side move to right at one in step 3)
Reason;
When selecting side reaction coefficient to be equal to 0.4375, the length of side value of the less right-angle side of the length of side is moved to right respectively in step 3)
Two, three, four processing after again will move to right three times processing after numerical value be added;
When selecting side reaction coefficient to be equal to 0.375, the length of side value of the less right-angle side of the length of side is carried out moving to right two respectively in step 3)
The numerical value after handling will be moved to right after position, three processing twice again to be added;
When selecting side reaction coefficient to be equal to 0.3125, the length of side value of the less right-angle side of the length of side is moved to right respectively in step 3)
Two, four processing after again will move to right twice processing after numerical value be added;
When selecting side reaction coefficient to be equal to 0.25, the length of side value of the less right-angle side of the length of side is carried out moving to right two in step 3);
When selecting side reaction coefficient to be equal to 0.1875, the length of side value of the less right-angle side of the length of side is moved to right respectively in step 3)
Three, four processing after again will move to right twice processing after numerical value be added;
Elected side reaction coefficient in the range of [0.15,0.5] value but not equal to 0.5,0.4375,0.375,0.3125,0.25,
When 0.1875, the length of side value of the less right-angle side of the length of side is multiplied with side reaction coefficient in step 3).Elected side reaction coefficient is
When 0.3284271247, error calculated is minimum.
Invention also provides the hypotenuse length of side quick obtaining circuit for realizing the above method, including successively
Connected comparator, selector, processor and adder;Comparator is used for the length of side for comparing two right-angle sides of right angled triangle;
Selector is used to select the less right-angle side of the length of side, and the length of side value of the right-angle side is sent into processor;Processor it is specific
Structure determines that side reaction coefficient is according to computational accuracy according to selected side reaction coefficient
It is determined that;
When it is 0.5 or 0.25 to select side reaction coefficient, the processor is shift unit, for being shifted to the data received
Operation, and the result after shifting function is sent into adder;
When elected side reaction coefficient is 0.4375,0.375,0.3125 or 0.1875, the processor is shift unit and the first addition
Device, for carrying out multi-shift operation to the data that receive, and institute is re-fed into after the results added after multi-shift is operated
State adder;
Elected side reaction coefficient value but is not equal to 0.5,0.4375,0.375,0.3125,0.25 and in the range of [0.15,0.5]
When 0.1875, the processor is multiplier, for the data received to be multiplied with side reaction coefficient, and the result after multiplication is sent
Enter the adder;
The adder is used to the length of side of the less right-angle side of the length of side being added with the result that processor exports, gained
As a result it is the hypotenuse length of side of right angled triangle.
Explanation is further explained to the present invention below by way of specific embodiment.
Embodiment 1:
As shown in figure 3, side reaction coefficient, which is equal to, can not pass through other data of displacement mode, input comparator GTE two right-angle sides
The length of side is respectively s and t;Compare s and t, if s is more than t, comparator GTE output signals 1, long right-angle side s selected by signal 1,
The signal 0 for negating to obtain by signal 1 selects short right-angle side t;If s is less than t, comparator GTE output signals 0, pass through signal 0
Long right-angle side t is selected, the signal 1 for negating to obtain by signal 0 selects short right-angle side s;If input comparator GTE s etc.
In t, comparator GTE output signals 1, right-angle side s is selected by signal 1, the signal 0 for negating to obtain by signal 1 is selected
Right-angle side t;
For example, taking side reaction coefficient to be equal to 0.3284271247, the input comparator GTE two right-angle side length of sides are respectively s=8, t
=6.75;Compare s and t, s is more than t, comparator GTE output signals 1, selects long right-angle side s=8 by signal 1, pass through letter
Number 0 selects short right-angle side t=6.75, then the hypotenuse L length of sides are L=8+6.75*0.3284271247=
10.216883091725。
Embodiment 2:
Such as Fig. 4, side reaction coefficient is equal to 0.5, and the input comparator GTE two right-angle side length of sides are s=8, t=6.75;Compare s and
T, s are more than t, comparator GTE output signals 1, select long right-angle side s=8 by signal 1, the letter for negating to obtain by signal 1
Number 0 selects short right-angle side t=6.75;(in other embodiments, if input comparator GTE s is less than t, comparator GTE is defeated
Go out signal 0, long right-angle side t is selected by signal 0, the signal 1 for negating to obtain by signal 0 selects short right-angle side s;It is if defeated
The s for entering comparator GTE is equal to t, comparator GTE output signals 1, selects right-angle side s by signal 1, is negated by signal 1
To signal 0 select right-angle side t);
6.75 with binary representation be 000110.1100000;
Carry out moving to right a bit manipulation to 000110.1100000, obtain 000011.0110000 and (be decimally expressed as
3.375) one, that is, is moved to right equivalent to being multiplied by 0.5;
Then the hypotenuse L length of sides are L=3.375+8=11.375.
Embodiment 3:
As shown in figure 5, side reaction coefficient is equal to 0.4375, the two right-angle side length of sides of input comparator are s=8, t=6.75;Compare
S and t, s are more than t, comparator GTE output signals 1, long right-angle side s=8 are selected by signal 1, are selected by signal 0 short
Right-angle side t=6.75;(in other embodiments, if input comparator GTE s is less than t, comparator GTE output signals 0, pass through
Signal 0 selects long right-angle side t, and the signal 1 for negating to obtain by signal 0 selects short right-angle side s;If input comparator GTE
S be equal to t, comparator GTE output signals 1, right-angle side s is selected by signal 1, the signal 0 for negating to obtain by signal 1 selects
Select out right-angle side t);
6.75 with binary representation be 000110.1100000;
Carry out moving to right two bit manipulations to 000110.1100000, obtain 0001.1011000 and (be decimally expressed as
1.6875) two, that is, are moved to right equivalent to being multiplied by 0.25;
Carry out moving to right three bit manipulations to 000110.1100000, with being represented in binary as 000.1101100, decimally table
0.84375 is shown as, that is, moves to right three equivalent to being multiplied by 0.125;
Carry out moving to right four bit manipulations to 000110.1100000, with being represented in binary as 00.0110110, decimally table
0.421875 is shown as, that is, moves to right four equivalent to being multiplied by 0.0625;
Then the hypotenuse L length of sides are L=1.6875+0.84375+0.421875+8=10.953125.
Embodiment 4:
As shown in fig. 6, side reaction coefficient is equal to 0.375, the two right-angle side length of sides of input comparator are s=8, t=6.75;Compare s
And t, s are more than t, comparator GTE output signals 1, long right-angle side s=8 are selected by signal 1, selected by signal 0 short straight
Arm of angle t=6.75;(in other embodiments, if input comparator GTE s is less than t, comparator GTE output signals 0, pass through letter
Number 0 selects long right-angle side t, and the signal 1 for negating to obtain by signal 0 selects short right-angle side s;If input comparator GTE s
Equal to t, comparator GTE output signals 1, right-angle side s is selected by signal 1, the signal 0 for negating to obtain by signal 1 selects
Go out right-angle side t);
6.75 with binary representation be 000110.1100000;
Carry out moving to right two bit manipulations to 000110.1100000, obtain 0001.1011000 and (be decimally expressed as
1.6875) two, that is, are moved to right equivalent to being multiplied by 0.25;
Carry out moving to right three bit manipulations to 000110.1100000, with being represented in binary as 000.1101100, decimally table
0.84375 is shown as, that is, moves to right three equivalent to being multiplied by 0.125;
Then the hypotenuse L length of sides are L=1.6875+0.84375+8=10.53125.
Embodiment 5:
As shown in fig. 7, side reaction coefficient is equal to 0.3125, the two right-angle side length of sides of input comparator are s=8, t=6.75;Compare
S and t, s are more than t, comparator GTE output signals 1, long right-angle side s=8 are selected by signal 1, are selected by signal 0 short
Right-angle side t=6.75;(in other embodiments, if input comparator GTE s is less than t, comparator GTE output signals 0, pass through
Signal 0 selects long right-angle side t, and the signal 1 for negating to obtain by signal 0 selects short right-angle side s;If input comparator GTE
S be equal to t, comparator GTE output signals 1, right-angle side s is selected by signal 1, the signal 0 for negating to obtain by signal 1 selects
Select out right-angle side t);
6.75 with binary representation be 000110.1100000;
Carry out moving to right two bit manipulations to 000110.1100000, obtain 0001.1011000 and (be decimally expressed as
1.6875) two, that is, are moved to right equivalent to being multiplied by 0.25;
Carry out moving to right four bit manipulations to 000110.1100000, with being represented in binary as 00.0110110, decimally table
0.421875 is shown as, that is, moves to right four equivalent to being multiplied by 0.0625;
Then the hypotenuse L length of sides are L=1.6875+0.421875+8=10.109375.
Embodiment 6:
As shown in figure 8, side reaction coefficient is equal to 0.25, the two right-angle side length of sides of input comparator are s=8, t=6.75;Compare s
And t, s are more than t, comparator GTE output signals 1, long right-angle side s=8 are selected by signal 1, selected by signal 0 short straight
Arm of angle t=6.75;(in other embodiments, if input comparator GTE s is less than t, comparator GTE output signals 0, pass through letter
Number 0 selects long right-angle side t, and the signal 1 for negating to obtain by signal 0 selects short right-angle side s;If input comparator GTE s
Equal to t, comparator GTE output signals 1, right-angle side s is selected by signal 1, the signal 0 for negating to obtain by signal 1 selects
Go out right-angle side t);
6.75 with binary representation be 000110.1100000;
Carry out moving to right two bit manipulations to 000110.1100000, obtain 0001.1011000 and (be decimally expressed as
1.6875) two, that is, are moved to right equivalent to being multiplied by 0.25;
Then the hypotenuse L length of sides are L=1.6875+8=9.6875.
Embodiment 7:
As shown in figure 9, side reaction coefficient is equal to 0.1875, the two right-angle side length of sides of input comparator are s=8, t=6.75;Compare
S and t, s are more than t, comparator GTE output signals 1, long right-angle side s=8 are selected by signal 1, are selected by signal 0 short
Right-angle side t=6.75;(in other embodiments, if input comparator GTE s is less than t, comparator GTE output signals 0, pass through
Signal 0 selects long right-angle side t, and the signal 1 for negating to obtain by signal 0 selects short right-angle side s;If input comparator GTE
S be equal to t, comparator GTE output signals 1, right-angle side s is selected by signal 1, the signal 0 for negating to obtain by signal 1 selects
Select out right-angle side t);
6.75 with binary representation be 000110.1100000;
Carry out moving to right three bit manipulations to 000110.1100000, with being represented in binary as 000.1101100, decimally table
0.84375 is shown as, that is, moves to right three equivalent to being multiplied by 0.125;
Carry out moving to right four bit manipulations to 000110.1100000, with being represented in binary as 00.0110110, decimally table
0.421875 is shown as, that is, moves to right four equivalent to being multiplied by 0.0625;
Then the hypotenuse L length of sides are L=0.84375+0.421875+8=9.265625.
Error analysis contrasts:
According to Pythagorean theorem, hypotenuse calculation formula shown in Fig. 2 is:
In Fig. 2 right angled triangles, it is assumed that there is a scale factor, α ∈ [0,1], and | s | > | t |, hypotenuse approximation computation
Method is:
L2=| s |+α * | t | (2)
IfK ∈ (0,1], then formula (2) and formula (1) are relative to | s | error be
To E (k)2[0,1 interval integral, function f (α) of the mean square error on α can be obtained, i.e., in k ∈:
Abbreviation obtains
F (α) existsWhen obtain minimum value, i.e.,:
Work asWhen error amount it is minimum, therefore be fitted α and be
0.32842712474.In the case where guarantee error is very small, table 1 below is error amount f (α):
Error amount comparative analysis under the different α values of table 1
As can be seen from Table 1, precision corresponding to different side reaction coefficients is different, and as α=0.3284271247, error is minimum
For 0.0018.
Further, since realization price of hardware corresponding to different α values is different, can ensure to calculate essence in practical application
On the premise of degree, realization price of hardware is considered to choose corresponding α values, so as to select suitable scheme.In above-described embodiment, α
Realization price of hardware is minimum when coefficient is 0.5 and 0.25, and realization price of hardware is taken second place when side reaction coefficient is 0.375 and 0.1875, α systems
Realization price of hardware is larger when number is other values.
Claims (8)
1. being used for the hypotenuse length of side fast acquiring method of graphics process, two right-angle sides of right angled triangle are defined
Respectively s and t, hypotenuse L;Right-angle side s and t length of side value are converted into binary number;It is characterised in that it includes following step
Suddenly:
1) side reaction coefficient is selected according to computational accuracy f (α);The computational accuracy
2) compare the right-angle side s and t length of side using comparator, the less right-angle side of the length of side is selected using selector;
3) according to the side reaction coefficient, shifting function, displacement add operation are made to the length of side value of the less right-angle side of the length of side, or will
The length of side value of the less right-angle side of the length of side makees multiplication operation with side reaction coefficient;
4) length of side value of the result of the step 3) right-angle side larger with the length of side is added, acquired results are the oblique of right angled triangle
The side L length of side.
2. the hypotenuse length of side fast acquiring method according to claim 1 for graphics process, its feature
It is, the side reaction coefficient span in step 1) is [0.15,0.5];
When it is 0.5 to select side reaction coefficient, the length of side value of the less right-angle side of the length of side is carried out moving to right a bit manipulation in step 3);
The length of side value of the less right-angle side of the length of side is carried out moving to right respectively when it is 0.4375 to select side reaction coefficient, in step 3) two, three
The numerical value after handling will be moved to right after position, four bit manipulations three times again to be added;
The length of side value of the less right-angle side of the length of side is carried out moving to right respectively when it is 0.375 to select side reaction coefficient, in step 3) two, three
The numerical value after handling will be moved to right after bit manipulation twice again to be added;
The length of side value of the less right-angle side of the length of side is carried out moving to right respectively when it is 0.3125 to select side reaction coefficient, in step 3) two, four
The numerical value after handling will be moved to right after bit manipulation twice again to be added;
When it is 0.25 to select side reaction coefficient, the length of side value of the less right-angle side of the length of side is carried out moving to right two bit manipulations in step 3);
The length of side value of the less right-angle side of the length of side is carried out moving to right respectively when it is 0.1875 to select side reaction coefficient, in step 3) three, four
The numerical value after handling will be moved to right after bit manipulation twice again to be added;
When it is other values to select side reaction coefficient, the length of side value of the less right-angle side of the length of side is multiplied with side reaction coefficient in step 3).
3. the hypotenuse length of side fast acquiring method according to claim 2 for graphics process, its feature
It is, when side reaction coefficient is 0.5 and 0.25, the realization price of hardware of methods described is minimum, described in when side reaction coefficient is 0.375 and 0.1875
The realization price of hardware of method is taken second place.
4. the hypotenuse length of side fast acquiring method for graphics process according to claim 1 or 2 or 3,
Characterized in that, when the side reaction coefficient in step 1) is 0.3284271247, error is minimum, is 0.0018.
5. the hypotenuse length of side fast acquiring method for graphics process according to claim 1 or 2 or 3,
Characterized in that, the step 2) -4) it can carry out with simultaneously while obtain multiple hypotenuse length of sides.
6. the hypotenuse length of side quick obtaining circuit for graphics process, it is characterised in that including what is be sequentially connected
Comparator, selector, processor and adder;Comparator is used for the length of side for comparing two right-angle sides of right angled triangle;Selector
Processor is sent into for selecting the less right-angle side of the length of side, and by the length of side value of the right-angle side;The concrete structure root of processor
Determine that side reaction coefficient is according to computational accuracy according to selected side reaction coefficientReally
It is fixed;
When it is 0.5 or 0.25 to select side reaction coefficient, the processor is shift unit, for carrying out shifting function to the data received,
And the result after shifting function is sent into adder;
When elected side reaction coefficient is 0.4375,0.375,0.3125 or 0.1875, the processor is shift unit and first adder,
Be re-fed into for carrying out multi-shift operation to the data that receive, and after the results added after multi-shift is operated it is described plus
Musical instruments used in a Buddhist or Taoist mass;
Elected side reaction coefficient value but is not equal to 0.5,0.4375,0.375,0.3125,0.25 and in the range of [0.15,0.5]
When 0.1875, the processor is multiplier, for the data received to be multiplied with side reaction coefficient, and the result after multiplication is sent
Enter the adder;
The adder is used to the length of side of the less right-angle side of the length of side being added with the result that processor exports, acquired results
The as hypotenuse length of side of right angled triangle.
7. the hypotenuse length of side quick obtaining circuit according to claim 6 for graphics process, its feature
It is, when the side reaction coefficient is 0.5 and 0.25, the circuit Least-cost, circuit generation when side reaction coefficient is 0.375 and 0.1875
Valency takes second place.
8. the hypotenuse length of side quick obtaining circuit according to claim 6 for graphics process, its feature
It is, the side reaction coefficient is 0.3284271247.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710936661.9A CN107730588A (en) | 2017-10-10 | 2017-10-10 | Hypotenuse length of side fast acquiring method and circuit for graphics process |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710936661.9A CN107730588A (en) | 2017-10-10 | 2017-10-10 | Hypotenuse length of side fast acquiring method and circuit for graphics process |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107730588A true CN107730588A (en) | 2018-02-23 |
Family
ID=61210054
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710936661.9A Pending CN107730588A (en) | 2017-10-10 | 2017-10-10 | Hypotenuse length of side fast acquiring method and circuit for graphics process |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107730588A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0637797A1 (en) * | 1993-08-02 | 1995-02-08 | Matsushita Electric Industrial Co., Ltd. | Calculation apparatus |
EP0811909A1 (en) * | 1996-06-05 | 1997-12-10 | Sharp Kabushiki Kaisha | Arithmetic circuit for calculating a square-root of a sum of squares |
US20050228843A1 (en) * | 2004-04-12 | 2005-10-13 | Shi-Ho Tien | Method and apparatus for demodulating square root |
CN101356449A (en) * | 2006-05-26 | 2009-01-28 | 全球定位有限公司 | Method and apparatus for performing signal correlation for signals received from satellites in multiple satellite systems |
CN106067063A (en) * | 2016-06-03 | 2016-11-02 | 福州大学 | RBF neuron circuit and method of work thereof |
-
2017
- 2017-10-10 CN CN201710936661.9A patent/CN107730588A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0637797A1 (en) * | 1993-08-02 | 1995-02-08 | Matsushita Electric Industrial Co., Ltd. | Calculation apparatus |
EP0811909A1 (en) * | 1996-06-05 | 1997-12-10 | Sharp Kabushiki Kaisha | Arithmetic circuit for calculating a square-root of a sum of squares |
US20050228843A1 (en) * | 2004-04-12 | 2005-10-13 | Shi-Ho Tien | Method and apparatus for demodulating square root |
CN101356449A (en) * | 2006-05-26 | 2009-01-28 | 全球定位有限公司 | Method and apparatus for performing signal correlation for signals received from satellites in multiple satellite systems |
CN106067063A (en) * | 2016-06-03 | 2016-11-02 | 福州大学 | RBF neuron circuit and method of work thereof |
Non-Patent Citations (1)
Title |
---|
曹广界 等: "分段三次多项式逼近初等函数的硬件实现", 《计算机辅助设计与图形学学报》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109063301B (en) | Single image indoor object attitude estimation method based on thermodynamic diagram | |
CN109214282B (en) | A kind of three-dimension gesture critical point detection method and system neural network based | |
WO2018040511A1 (en) | Method for implementing conversion of two-dimensional image to three-dimensional scene based on ar | |
KR101865655B1 (en) | Method and apparatus for providing service for augmented reality interaction | |
CN109559338B (en) | Three-dimensional point cloud registration method based on weighted principal component analysis method and M estimation | |
Xu et al. | Automatic reconstruction method for large scene based on multi-site point cloud stitching | |
CN112819947A (en) | Three-dimensional face reconstruction method and device, electronic equipment and storage medium | |
CN107168516B (en) | Global climate vector field data method for visualizing based on VR and gesture interaction technology | |
CN104809755A (en) | Single-image-based cultural relic three-dimensional reconstruction method | |
CN112001926A (en) | RGBD multi-camera calibration method and system based on multi-dimensional semantic mapping and application | |
JPH08101922A (en) | Picture editing and forming device and picture editing and forming method | |
CN110097599A (en) | A kind of workpiece position and orientation estimation method based on partial model expression | |
CN109443320A (en) | Binocular vision speedometer and measurement method based on direct method and line feature | |
CN107730588A (en) | Hypotenuse length of side fast acquiring method and circuit for graphics process | |
CN112017159A (en) | Ground target reality simulation method in remote sensing scene | |
CN115409928A (en) | Water body effect rendering method and device, electronic equipment and storage medium | |
Cheng et al. | An augmented reality image registration method based on improved ORB | |
JP4740956B2 (en) | Three-dimensional graphic device, three-dimensional graphic method, three-dimensional graphic program, and recording medium | |
CN116129087A (en) | Positioning method, visual map generation method and device thereof | |
Chai et al. | Cultural heritage assets optimization workflow for interactive system development | |
CN111197975A (en) | Image attitude estimation method based on Rodrigues | |
Han et al. | 3D reconstruction of dense model based on the sparse frames using RGBD camera | |
CN112100900B (en) | Space non-cooperative target point cloud initial attitude measurement method | |
CN116958450B (en) | Human body three-dimensional reconstruction method for two-dimensional data | |
Yin et al. | A parametrically controlled terrain generation method |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180223 |