Graphic shading device
Abstract
PURPOSE:To speed up a processing by calculating the interpolation of a normal vector with the use of a level difference based on a parametric curve, and also calculating the operation of an inner product at each point on a line segment with the use of the level difference based on the parametric curve. CONSTITUTION:A first arithmetic means 2 operates and generates the normal vector to have respectively intermpolated the respective terminations of the line segment of a polygon dissolved along a scanning line based on the normal vector of the two known points on the graphic with the use of the parametric curve and by using the level difference. A second arithmetic means 3 respectively regards the vector directed to a light source direction and the vector directed to a view point direction as the constant vectors, and the inner product of the vectors and the normal vector, which is obtained by further interpolating the normal vector interpolated at both terminations of the line segment dissolved along the scanning line, is operated and generated by a (n)-th degree polynominal. A color calculating means 4 calculates colors at the respective points in the displayed three-dimensional graphic, and displays a calculation result to a display device 1.
Term
Term ended
Projected expiry passed 9 August 2008, 18.1 years ago.
- Priority and filed
- Published
- Projected expiry
- Today
1 claim: 1 independent, 0 dependent
- 1[Claim(s)] 【特許請求の範囲】 In a figure shading device showing correlation of the Normal direction and the direction of a light source in each point of a display three-dimensional figure which corresponds luminosity of each pixel on a scan line of a display (1), and the direction of a viewpoint which computes as a function of an inner product of a vector and performs shading, Each polygon of a patch group of a polygon which approximates a three-dimensional indicator chart form is decomposed into said scan line at a Along line segment sequence, The 1st calculating means (2) that uses a parametric curve based on a Normal vector (@N_1@, @N_2@) of a point of known respectively of a Normal vector of a both-ends point of the line segment, and carries out operation generation of the Interpolated method line vector (@N@) using difference, It is the n-th polynomial (however) about an inner product with the Interpolated method line vector (@N_p@) further in a Normal vector (@N@) of a both-ends point of a line segment which considered that a vector which goes in said light source direction, and a vector which goes in said viewpoint direction were respectively fixed vectors, and interpolated [ said ] with those vectors. n performs color calculation of each point of said display three-dimensional figure based on output data of the 2nd calculating means (3) that carries out operation generation for an integer greater than or equal to 2, and said 2nd calculating means (3), A figure shading device possessing a color calculating means (4) which outputs the calculation result to said display (1). 表示装置(1)のスキャンライン上の各画素の輝度を対応する表示三次元図形の各点における法線方向と光源方向と視点方向の相互関係を表わすベクトルの内積の関数として算出してシェーディングを行なう図形シェーディング装置において、三次元の表示図形を近似する多角形のパッチ群の各多角形を前記スキャンラインに沿つた線分列に分解し、その線分の両端点の法線ベクトルの夫々既知の点の法線ベクトル(@N_1@、@N_2@)をもとにパラメトリック曲線を用いて補間した法線ベクトル(@N@)を、階差を利用して演算生成する第1の演算手段(2)と、 前記光源方向に向かうベクトルと前記視点方向に向かうベクトルとを夫々一定のベクトルとみなしてそれらのベクトルと前記補間した線分の両端点の法線ベクトル(@N@)をさらに補間した法線ベクトル(@N_p@)との内積をn次多項式(ただし、nは2以上の整数)により演算生成する第2の演算手段(3)と、 前記第2の演算手段(3)の出力データに基づいて前記表示三次元図形の各点の色計算を行ない、その計算結果を前記表示装置(1)へ出力する色計算手段(4)とを具備することを特徴とする図形シェーディング装置。
5 paragraphs, as filed
[Detailed Description of the Invention]
(Outline) It is related with the figure shading device which performs shade-and-shadow attachment to an indicator chart form in display processing of a three-dimensional figure, It aims at improvement in the speed of figure display processing, In the figure shading device showing the correlation of the Normal direction and the direction of a light source in each point of the display three-dimensional figure which corresponds the luminosity of each pixel on the scan line of a display, and the direction of a viewpoint which computes as a function of the inner product of a vector and performs shading, Each polygon of the patch group of the polygon which approximates a three-dimensional indicator chart form is decomposed into the line segment sequence in alignment with the above-mentioned scan line, The 1st calculating means that uses a parametric curve based on the Normal vector of two points of known respectively of the Normal vector of the both-ends point of the line segment, and carries out operation generation of the Interpolated method line vector using difference, It is the n-th polynomial (however) about an inner product with the Interpolated method line vector further in the Normal vector of the both-ends point of the line segment which considered that vector When which goes in the vector which goes in the above-mentioned light source direction, and the direction of the account viewpoint of true was a respectively fixed vector, and interpolated [ above-mentioned ] with those vectors. n performs color calculation of each point of the above-mentioned display three-dimensional figure based on the output data of the 2nd calculating means that carries out operation generation for an integer greater than or equal to 2, and the 2nd above-mentioned calculating means, and it constitutes it so that the color calculating means which outputs the calculation result to the above-mentioned display may be provided. [Industrial Application] The present invention relates to the figure shading device which is applied to a figure shading device, especially performs shade-and-shadow attachment to an indicator chart form in display processing of a three-dimensional figure. [Description of the Prior Art] In a graphic display device, when carrying out display processing of the three-dimensional figure, in order to consider it as a more natural display, it is common knowledge from the former to perform shade-and-shadow attachment (shading) by a suitable reflection model, and to calculate the color of each point in a figure. For example, it can set at point P on the surface of a figure of performing color calculation as shown in Drawing 5, If the direction vector of a unit of a field which carries out the unit vector which goes the unit method line vector of a field to a light source from N1 point P, and sets to E the unit vector which tends toward a viewpoint from point P, and induces the greatest highlight is set to 11, It is known that intensity C of the light in a viewpoint is denoted by a following formula (Blinn). JarRes F"Models of Reflection for Computer 5 y-nthesized P 1ctures", S IGGRAPH1977Proceeding, ACM Con+puterGraphi-C3, 11 (2), +11 192~198. C= I aKa+I o (Kd (N -L) +Ks(N-H)") (1), however intensity [ of the environment light from the 187 circumference ] ■p: Intensity of the light from a light source Ka: Environmental reflective coefficient Kd: Diffuse reflection coefficient KS: Specular reflection factor n: Specular surface index (it is 4 depending on the smoothness of the objective surface, and they are hundreds of values of a between from number"-) (-) expresses an inner product among (1) type. It is since direction vector H divides the direction of unit vectors L and E into two equally. (L+E) H= /(l L+E I) It is expressed with ■. The above-mentioned diffuse reflection is Circumstance which makes light scatter equally to all the directions like the lusterless surface, and it seems to it that the surface has the same brightness from all the vision. The above-mentioned specular reflexion is seen in respect of shining, and produces a highlight. By the way, as for the three-dimensional display object surrounded on the curved surface, it is common to be processed after a polygonal batch group is resembled first. The Normal vector of a vertex is given to each polygonal vertex by the average of the Normal vector of the adjoining polygon. At this time, the Proposed method line interpolation shading method is known for Foch (Phong) as a method of computing the intensity of the light in the point inside polygonal ([3 ui-Tuong Phong.). "I llumination for Computer GeneratedPictures", Communications of ACM 18 (6) June 1975. pp, 311~317. By being called alias 7 Ong shading and interpolating using Normal of each vertex, this Normal interpolation shading method asks for Normal in the point inside a polygon, and evaluates (1) type. Generally, since field figures, such as a polygon, have a two-dimensional spread, they need two interpolation in quest of Normal in an internal point. As a concrete interpolation method, Foch is polygonal two vertices P+, as shown in Drawing 6. It has proposed using line type interpolation for interpolating Normal between Normal vector N+ in P2, and N2. While this interpolation method can express well the highlight found by objects, such as metal, there is much total i1M. For example, when performing inner product calculation of the above-mentioned (1) formula with 7 Ong's interpolation method, calculation of an inner product (N-H) is 1. (t) =H-N (t) = H-(1-j) (N++tN2)/(1-t) N+ +tN2= (N((1-j) H-N++tH-N2 (1-j))+ +tNz) It becomes ■ and needs one division and one route calculation seven addition and Power n6 time to each pixel. Normal vector N1 of Drawing 6 is shown at the time of above 1= 0, and method line vector N2 is shown at the time of t= 1. Then, the method of improvement in the speed of Normal interpolation shading was proposed by Duff (Duff) (Quff.). Tom " -- 3moothly 5haded Renderings ofPolyaonal 0bjects on Ra5 ter Displays"S f GGRAPH1979Proceeding , ACMComputer Graphics 13 (2) Do 270~275. According to this Duff's calculation method, three formulas are further transformed, 1 Measure of the inner product (N-H) was to be made in three addition, one division, and one route calculation by considering it as (t) = ((1-t) H-N++tH-Nz), and using the advance difference which used difference to the inside and numerator of a route of a denominator. On the other hand, the case where a polygon was limited to a triangle was taken for the example, and the simple Needle stem method using Taylor's expansion was also proposed (31shop). Gary and Weimer, 1 a-vid M, "Fast phong 5hadina", S I G -GRAPH1986ProceediniJ, ACM Com-puter Graphics and 20 (4), Op 103~106. This method is a Normal vector in one in a polygon 2 variable function N (x, y) -Ax+By+C■ of x and y It expresses and is (ax+by+c) 1(X, V)=H-(AX+BV+C) (/lAX+BY+C1) = /E■1 Completion about an inner product (N-H). + It is referred to as exy+fy2+gx+hy+1. However, T+ = / (2b 1-ch) 2 i (the form of 7 To=C/f1 is used.) In order to actually calculate the value in each pixel, one of the two of X and y is fixed, and it treats as a 1 variable function. That is, in the pixel on one scanning line, the value of y is constant, and since X only increases every [ 1 ], if it considers that upper types are two following formulas of X, it is calculable [ by two addition per pixel ] by using difference too. It comes out. Taylor's expansion of this is carried out, 1 (X -- 1/) =TS X2+T4 XV+T3V20T2 X+T+ V10 -- TO Ts=(3iG2-4cdi-4agi)/B'12 (below) T4 = (3cgh-2ce il-2b i -2ah i)/412rT T3 = / (3Ch2-4cf 1-4bh i) 8r2 (dish under T2 = (2 ai-cG) / 2iF) (Object of the Invention) however, a conventional system by Duff's calculation method based on the above-mentioned (4) types -- Re from (4) types, or To -- division and route calculation still remain like. A conventional system by a calculation method using pooler deployment by a bishop etc. who needed and described remarkable processing time above also had complicated calculation until it calculates a constant, and its improvement in the speed of processing was insufficient. The present invention was made in view of the above-mentioned point, and an object of the present invention is to provide the figure shading device which can perform improvement in the speed of figure display processing. (Means for solving problem) Drawing 1 is Showing about the principle block diagram of the present invention. Among a figure, one is a display and displays a three-dimensional figure. 2 is the 1st calculating means, uses a parametric curve based on vector N+ and N2 in the law of two points of the known on a figure, and carries out operation generation of the Interpolated method line vector N of both corner point large Every of the line segment of each polygon decomposed along with clearance 11 Line using difference. 3 is the 2nd calculating means, It is the n-th polynomial (however) about an inner product with the Interpolated method line vector fan further in Normal vector N interpolated at the both-ends point of the line segment which considered that the vector which goes in the direction of a light source, and the vector which goes in the direction of a viewpoint were respectively fixed vectors, and was decomposed along with those vectors and scan lines. n carries out operation generation for an integer greater than or equal to 2. 4 is a color calculating means, performs color calculation of each point of a display three-dimensional figure, and outputs the calculation result to display 1. [Function] The Normal vector of the figure which should be displayed is supplied to the 1st calculating means 2, and is interpolated here. That is, it is Q about the point which expresses that the above-mentioned known Normal vector positive of two points and energy are moved mutually, and starting point O is shared as shown in Drawing 2, and has N1 and N2 as a coordinate value. After being referred to as Q2 and setting up control point Q1 suitable in the meantime, based on these, parametric curve I is generated in false. It is considered as Normal vector N in which the vector ingredient which has coordinate value P (t) on this parametric curve was interpolated. This interpolated Normal vector N regards it as a Flea bubble unit vector, and normalization processing is not performed. The error of the length of actually interpolated Normal is N+. When the angle between fans is 30", it can ignore enough with 0.01%. Since length shifts to the direction which becomes short, an error does not have a fear of the result raised to the power of n in (1) type overflowing. Operation generation of this Normal vector N is carried out by the 1st calculating means 2 using difference. This interpolated Normal vector N is supplied to the 2nd calculating means 3 with the coordinate value of each point, and has an inner product interpolated on the line segment (for example, EF of Drawing 7) decomposed by the scan line here. Namely, the vector (light source vector) which goes in the above-mentioned light source direction and the vector (viewpoint vector) which goes in the above-mentioned viewpoint direction, Since it can be regarded as a fixed vector in drawing of the polygon of one piece if it assumes that there are a light source and viewpoints of enough in the distance compared with a polygonal size, An inner product with Normal vector Np in which the light source vector and Normal vector N (NE or Np of Drawing 7) interpolated on the line segment decomposed along with the scan line were further interpolated by including in a curved formula with the inner product with the Interpolated method line vector Np and the viewpoint vector can be expressed by the n-th polynomial. Thus, the data in which the calculated inner product is shown is supplied to color calculating means 4, is supplied to back display 1 which had color calculation of each point of a display three-dimensional figure performed here, and is displayed as a color figure to which shading was given. The operation of the 1st and 2nd calculating means 2 and 3 of the above can reduce the number of times of an operation by using difference or considering that a light source vector and a viewpoint vector are fixed. [Example] Drawing 3 shows the block diagram of one example of the present invention. The same numerals are given to Drawing 1 and an identical configuration portion among the figure, and the explanation is omitted. In Drawing 3, from a post computer (not shown), the data about the coordinates and the Normal vector of each peak of an approximation polyhedron is supplied to coordinate transformation part 7 via input terminal 6, and is here, After coordinate conversion processing for expansion of a figure, reduction, rotation, parallel translation, etc. is performed if needed, field coating part 8 is supplied. It smears with blood, and part 8 consists of corner point generation part 81. method line interpolation area 82, as shown in Drawing 3. Corner point generation part 81 decomposes each polygon into the line segment sequence in alignment with a scan line, and computes x of the both-ends point of each of those line segments, and y coordinates, respectively. Normal interpolation area 82 interpolates Normal of the both-ends point of each line segment using secondary Bezier curves, respectively. This asks for line segment EF equivalent to the line of intersection of polygon ABCD and a certain scan line in Drawing 7, Normal vector [ in / for Normal / in / simultaneously / one corner point E / NE / two polygonal vertices A and B ] NA which should be interpolated, law [ in / similarly / it interpolates using secondary Betz curves from NB, and / corner point F of another side ] -- it means interpolating Nil N F using secondary Betz curves from Normal vector Nc in two polygonal vertices C and D which should be interpolated, and No. In order to perform each interpolation, as shown in Drawing 4, it is considered as Normal line in each of two peaks (equivalent to A of Drawing 7, B or C, and D) which perform color calculation which should be interpolated. Therefore, NH= (Nl +N2) /l Nl +N2 1 It is (7). it illustrates and comes out of Drawing 4 so that two Normal vector NN2 may be moved and starting point O may be shared mutually. Next, the point which has an ingredient of this three vector N+, N2, and Nl-+ as a coordinate value is set to Like <Qo shown in Drawing 4, respectively, Q2, and M. That is, on the other hand, when variable t is O, it passes along point Qo describing above, and when a rainbow is 1, secondary Petz 1 curve P (t) that passes along point Q1 describing above is denoted by a following formula from points Qo and Ql and one more control point Q2. P (1-t) (j) =2(1t)Qo+2 tQ++t2Q2 (9) Conditions are given and strange point Q1 is searched for so that it may pass along M at the time of t= 0.5. M= 0.25 Qo+ 0.5Q+ + 0.25 Q2Q+ =2M-0, 5Qo-0, 5Q2 (10) Here, it becomes if N+= (ax ay az) and N2= (bx by bz). Thus, if control point Q1 can be found, this will be substituted for zero formula and it will ask for P (t). since -- (az+bz) it is set to 2. For example, x+=r (upsilon2-0.5 0), Nz = they are k=r dishes when many values are assigned to a A (i2 0.5 0) ll and t(12) 2 Hint (13) type. Using this coordinate value of P (t) as an ingredient becomes interpolated Normal vector N (NE or NF of Drawing 7). (14) Although a formula performs multiplication, division, and addition, reduce Kaiito Bridge using difference in practice. Difference is publicly known (for example). [Shape processing engineering (I)J on Fujio Yamaguchi and [computer display, pp, 36~382 Nikkan Kogyo Shimbun]
If it is with necessity, please refer to it. Although the detailed explanation is omitted, each component P (t) of Normal vector N interpolated only by two addition about each pixel can be calculated by doing m division into equal parts of the domain of t, and using a difference operation, without completely using multiplication and division. Thus, Normal vector NE in the both-ends point of line segment EF by which operation generation was carried out in Normal interpolation area 82. Digital differentiation analyzing parts which show NF in Drawing 3 with coordinate data [ of the both-ends point of a line segment ] E, and F (DDA:D-igital Qifferential Analyser > 9 is supplied.) DDA part 9 consists of coordinate calculation part 10 and inner product (N and A 1) generation part 12 for inner product (N-1-) generation part 11. specular surface calculation for diffusion calculation, as shown in Drawing 3. Coordinate calculation part 10 computes X of point P on line segment EF, and Y coordinates, respectively. Inner 81i (N-L) generation part 11 for diffusion calculation and inner product (N-H) generation part 12 for specular surface calculation generate the inner product (Np-L) and (NP-H) of an each (1) type in point P as a polynomial function of a vector, respectively. That is, in this example, unit vector L which a light source shall have enough in the distance compared with polygonal large Kisa, and goes to a light source within a polygon considers that it is parallel. It considers that unit vector E which a viewpoint shall also have enough in the distance compared with large Kisa of a sickly form, and tends toward a viewpoint within a polygon is parallel. Therefore, under such assumption, it can be considered that above-mentioned light source vector L and viewpoint vector E are fixed respectively. this approximation -- Duff (Du -- "-- ") and a bishop (B 1shop) (it is what is conventionally Sexual that has broken as described in the paper by t!l.) Generation of this the secret investigation of each is also computed in a secondary polynomial using the idea of secondary Petz 1111 line from Normal vector NE in the both-ends point of a line segment, and NF. That is, inner product calculation of (1) type is Ip if (Np and 1") are taken for an example. (t) =H-Np = (1-t) 2 - (HXNEX) +Hy NE v +Hz NE z)+2 (1-t) It can express by -t-(it is -0 and 5 to 2/) (HX (NE x+NF x) 10 I-IY 10(NE Y+NF Y)H2 (NEZ+NFZ))+(1-t) 2 (Hx NF x+Hv NF Y+Hz -NF z), and the secondary polynomial. By using difference, this calculation can calculate the inner product (N-H) in each pixel only by two addition, and can shorten 1 Hour sharply compared with the conventional method shown in zero formula and (4) types. The operation result of the inner product (Np-L) which interpolated such an inner product and was generated by inner product (N-1) generation part 11 for diffusion calculation, Diffusion color calculating part 13G for diffusion color calculating part 13R9 green signals for red signals and diffusion color calculating part 13.8 for blue signals which are shown in Drawing 3 are supplied, respectively, and multiplication with Ip-Kd of the above-mentioned (1) formula is performed about each of three-primary-colors signal R, G, and B here, and a ■aKasigma multiplication result is also obtained. The operation result of the inner product (Np and A 1) generated using difference based on (15) types by inner product (N-H) generation part 12 for specular surface calculation, Further (after being referred to as Np-1-1>1, specular surface color calculating part 14G for specular surface color calculating part 14R1 green signals for red signals and specular surface color calculating part 14B for blue signals are supplied, respectively, and multiplication with to-Ks of the above-mentioned (1) formula is performed about each of G and B by three-primary-colors signal l here.) The re-output signal of diffusion color calculating part 13R and specular surface color calculating part 14R is supplied to adder unit 15R, and a red signal ingredient is generated among the signals which show Ia ℃ of the light in the viewpoint based on (1) type here. Similarly adder unit 15G generates the green signal ingredient which adds the re-output signal of diffusion color 84 A part 13G and specular surface color calculating part 14G, and shows strong IC of the above-mentioned light, and adder unit 15B generates n color signal ingredient which adds the re-output signal of diffusion color calculating part 13B and specular surface color calculating part 14B, and shows intensity C of the above-mentioned light. Each output signal of adder units 15R, 15G, and 15B is Incubated rare To to the address corresponding to [ it is supplied in parallel with frame buffers 16R, 16G, and 16B, respectively, and ] the calculation coordinate value from the above-mentioned coordinate calculation part 10. In thus, each of frame buffer 16R916G and 16B, Pixel data for red signals in which shading processing of the three-dimensional figure for one screen was performed, The pixel data for green signals and the pixel data for blue signals are stored, and those pixel data is supplied to back cathode-ray tube (CRT) 18 changed into the analog signal by D/A converters 17R, 17G, and 17B. Thereby, the color picture display of the three-dimensional figure to which shading processing was performed is performed to CRT18. A Z coordinate may also be computed in corner point generation part 81. coordinate calculation part 10, and hidden surface removal is made in that case. [Effect of the Invention] While computing like Above interpolation of the Normal vector in each both-ends point of the line segment sequence which decomposed the polygon along with the Susan line using difference based on a parametric curve according to the present invention, Since the operation of the inner product in each point on a line segment is also computing the polynomial based on a parametric curve using difference, compared with the former, interpolation of Normal and calculation of an inner product can be performed in the small amount of operations, and it has the feature that therefore improvement in the speed of shading processing is realizable etc.
[Brief Description of the Drawings]
In the explanatory view of one example of interpolation of a Normal vector, and Drawing 5, the block diagram of one example of the present invention and Drawing 4 are [ Drawing 1 / the principle block diagram of the present invention, and Drawing 2 / the interpolation principle explanatory view of the Normal vector of the present invention, and Drawing 3 ] reflection model explanatory views, The explanatory view of an example of the interpolation method of the former [ Drawing / 6 ] and Drawing 7 are conceptual explanatory views of interpolation of Normal. in a figure -- 1 -- a display and 2 -- the 1st calculating means and 3 -- a field coating part and 10 show a coordinate calculation part, 11 shows the inner product (N-L) generation part for diffusion calculation, and, as for a color calculating means and 8, the 2nd calculating means and 4 show the inner product (N-H) generation part for specular surface calculation 12. Applicant for a patent FUJITSU Sacred, Inc. R Reason and 72 figures Drawing 1 112f!1
Every citation, both ways
| Document | Relation | Office | Cited during |
|---|---|---|---|
| US5586232A | Cited by | United States of America | Search report |
| JPH04229387A | Cited by | Japan | Search report |
3 priority claims, no other members on record
Priority claims3
| Document | Office | Kind | Date |
|---|---|---|---|
| 19726588 | Japan | A | |
| 63197265 | – | – | – |
| JP19880197265 | – | – | – |
Numbers
- Publication
- 2-47784
- Publication, DOCDB
- H0247784
- Publication, EPODOC
- JPH0247784
- Application
- 63197265
- Application, DOCDB
- 19726588
- Application, EPODOC
- JP19880197265
Titles2
- English
- GRAPHIC SHADING DEVICE
- Japanese
- 【発明の名称】図形シェーディング装置
Classification
- IPC, 1
- G06T15 80