JPS61195468A - Picture displaying method - Google Patents

Picture displaying method

Info

Publication number
JPS61195468A
JPS61195468A JP3707885A JP3707885A JPS61195468A JP S61195468 A JPS61195468 A JP S61195468A JP 3707885 A JP3707885 A JP 3707885A JP 3707885 A JP3707885 A JP 3707885A JP S61195468 A JPS61195468 A JP S61195468A
Authority
JP
Japan
Prior art keywords
data
visible
invisible
plane
area
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
Application number
JP3707885A
Other languages
Japanese (ja)
Inventor
Tetsuzo Kuragano
哲造 倉賀野
Atsushi Kikuchi
敦 菊池
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP3707885A priority Critical patent/JPS61195468A/en
Priority to EP86102358A priority patent/EP0193151B1/en
Priority to US06/832,990 priority patent/US4819192A/en
Priority to CA000502519A priority patent/CA1260638A/en
Priority to AT86102358T priority patent/ATE97246T1/en
Priority to DE86102358T priority patent/DE3689271T2/en
Publication of JPS61195468A publication Critical patent/JPS61195468A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To make shadow processing of a picture by simple calculation, by cutting out the surface of object placed in a dimensional space into triangular unit area, and by calculating the inner product of sight direction vector at each apex and the normal line unit vector of the surface. CONSTITUTION:The surface of object is cut out into triangular unit area, and the inner product of sight direction vectors at 3 apexes of the unit area and normal line unit vector. According to the sign of the calculation result, the visible-invisible data to show whether the apex is in visible area or invisible area is obtained. On the other hand, the position data of these 3 apexes is prospectively converted into 2-dimensional plane which corresponds with a display scope according to the sight position, and forms triangular area which corresponds with the area on 2-dimensional plane. And, by making interpolation calculation about visible-invisible data with respect to a pixel within the triangular area, the border line is established between visible area and invisible area on the 2-dimensional plane.

Description

【発明の詳細な説明】 以下の順序で本発明を説明する。[Detailed description of the invention] The present invention will be explained in the following order.

A産業上の利用分野 B発明の概要 C従来の技術 り発明が解決しようとする問題点 E問題点を解決するための手段 1作用 G実施例 (G1)陰影処理(第2図) (G2)陰面処理(第3図、第4図) (G3)変換処理手順(第1図) 各種テーブルの生成手順(第5図〜第10図)線形補間
、陰影、陰面処理(第11図〜第16図) (G4)実施例の作用 (G5)変形例 H発明の効果 A産業上の利用分野 本発明は画像表示方法に関し、特にメモリ内に予め書込
まれた3次元画像情報を、コンピュータ処理により画像
変換してディスプレイのラスク表示画面上に立体的に表
示するものである。
A. Industrial field of application B. Overview of the invention C. Conventional technology Problems to be solved by the invention E. Means for solving the problems 1. Effect G. Example (G1) Shading processing (Figure 2) (G2) Hidden surface processing (Figures 3 and 4) (G3) Conversion processing procedure (Figure 1) Various table generation procedures (Figures 5 to 10) Linear interpolation, shading, hidden surface processing (Figures 11 to 16) (G4) Effect of the embodiment (G5) Modification H Effect of the invention A Field of industrial application The present invention relates to an image display method, and in particular, the present invention relates to an image display method, and in particular, three-dimensional image information written in advance in a memory is displayed by computer processing. This converts the image and displays it three-dimensionally on the rask display screen of the display.

B発明の概要 第1の発明においては、3次元空間にある物体の表面を
ディスプレイの2次元表示画面上に変換表示する画像表
示方法において、物体の表面を三角形の単位領域に切出
し、この単位領域の3つの頂点において、視線方向のベ
クトルと表面の法線単位ベクトルとの内積を演算するこ
とにより得られかつ当該演算結果の符号によって各頂点
が可視領域にあるか、又は不可視領域にあるかを表す可
視−不可視データを得る。−万単位領域の3つの頂点に
ついての位置データを、視点位置に基づいてディスプレ
イの表示画面に相当する2次元平面に透視変換して2次
元平面上に対応する三角形領域を形成し、この領域に含
まれるピクセルについて、可視−不可視データに関する
線形補間演算を実行することによって、2次元平面上に
可視領域及び不可視領域の境界を明確に形成させること
ができ、かくして容易に陰画処理をなし得る。
B Summary of the Invention In the first invention, in an image display method for converting and displaying the surface of an object in a three-dimensional space on a two-dimensional display screen of a display, the surface of the object is cut out into a triangular unit area, and the unit area is It is obtained by calculating the inner product of the vector in the line of sight direction and the normal unit vector of the surface at the three vertices of Obtain visible-invisible data representing - Perspectively transform the position data for the three vertices of the 10,000 unit area into a two-dimensional plane corresponding to the display screen of the display based on the viewpoint position to form a corresponding triangular area on the two-dimensional plane, and By performing a linear interpolation operation on visible-invisible data for the included pixels, boundaries between visible and invisible areas can be clearly formed on a two-dimensional plane, and thus negative image processing can be easily performed.

また第2の発明においては、かかる構成に加えて同一の
ピクセルについての複数の表面について可視判定結果が
得られたとき、物体の表面上の単位領域の各、頂点につ
いて、視点との距離を表す距離データを得ておき、この
距離データの内容が最も小さい表面についての画像デー
タ以外のデータは、当該単位鯖域の表面が陰画にあると
判断してディスプレイ上には表示しないようにし、かく
して陰面処理を確実になし得るようにする。
Further, in the second invention, in addition to this configuration, when visibility determination results are obtained for a plurality of surfaces for the same pixel, the distance from the viewpoint is expressed for each vertex of a unit area on the surface of the object. Distance data is obtained, and any data other than the image data for the surface with the smallest distance data is determined to be the surface of the unit mackerel area in the negative image, and is not displayed on the display. Ensure that the process can be carried out reliably.

C従来の技術 3次元画像情報をディスプレイの表示画面上に立体的に
表示する技術は、コンピュータグラフィックス(cG)
として知られている。すなわちコンピュータグラフィッ
クスは、3次元空間内に位置する物体に関するグラフィ
ック画像データを3次元の座標情報として予めメモリ内
に書込んでおき、この情報を読出して所定の演算式に基
づいて画像変換することにより、ディスプレイ上に立体
的に表現されたグラフィック画像を得るものである。
C. Conventional technology Computer graphics (cG) is a technology for displaying three-dimensional image information three-dimensionally on a display screen.
known as. In other words, computer graphics involves writing graphic image data regarding an object located in a three-dimensional space into a memory in advance as three-dimensional coordinate information, reading out this information, and converting the image based on a predetermined calculation formula. This provides a three-dimensional graphic image on the display.

ここで2次元的な表示画面上に画像を立体的に表現する
ために、画像変換のための演算を実行する際に、透視変
換処理、陰影処理、及び陰面処理の3つの手法が用いら
れている。
Here, in order to express an image three-dimensionally on a two-dimensional display screen, three methods are used when performing calculations for image conversion: perspective conversion processing, shadow processing, and hidden surface processing. There is.

透視変換処理は、一般に人間の目で物体を見たとき、手
前のものは大きく見えかつ遠方のものは小さく見える点
に着目し、物体の大きさを視点からの距離に応じて変化
させることによって距離感を表すものである。
Perspective transformation processing focuses on the fact that when the human eye looks at an object, things in the foreground appear large and things in the distance appear small, and by changing the size of the object according to the distance from the viewpoint. It represents a sense of distance.

また陰影処理は、3次元空間上の1点に位置する光源に
対して物体の各表面の傾斜が異なるため、人間の目には
当該各表面の明るさが変化する′ように見える点に着目
し、ディスプレイ上に表示されたグラフィック画像の各
表面の明るさを変化させることによって物体の表面の起
伏を表すようにしたものである。
In addition, shading processing focuses on the fact that the brightness of each surface appears to change to the human eye because the slope of each surface of the object is different relative to the light source located at one point in three-dimensional space. However, the undulations of the surface of the object are expressed by changing the brightness of each surface of the graphic image displayed on the display.

さらに陰面処理は、3次元空間の1点に位置する視点か
ら見たとき、1つの物体の裏面や、互いに重なり合うよ
うに見える複数の物体のうち、後方の物体の重なり合う
面は見えないことに着目して、当該見えない部分のグラ
フィック画像を表示しないようにすることによって、遠
近感を表すものである。
Furthermore, hidden surface processing focuses on the fact that when viewed from a viewpoint located at one point in three-dimensional space, the back side of a single object and the overlapping surfaces of objects behind are invisible among multiple objects that appear to overlap each other. Perspective is expressed by not displaying the graphic image of the invisible part.

これらの処理は、何れも3次元空間に位置する物体を人
間が見たときの経験則を物理的演算によって実現すれば
、当該物体を表示したとき立体的に表現できるという考
え方に基づいて採用されている手法であり、いくつかの
アルゴリズムが提案されている。
All of these processes are based on the idea that if the empirical rules used when humans view an object located in a three-dimensional space are realized through physical calculations, the object can be expressed three-dimensionally when displayed. Several algorithms have been proposed.

これらの処理は、単独でもある程度の効果は得られるが
、必要に応じて組合せることにより、より自然な立体感
を得ることができ、これらの処理をコンピュータによっ
て演算する手法として従来主として次に挙げる2つの方
法が用いられていた。
These processes can achieve some effect even when used alone, but by combining them as necessary, a more natural three-dimensional effect can be obtained. Two methods were used.

D発明が解決しようとする問題点 その第1の方法は、視点、光源及び物体間の空間的位置
関係を予め決めておき、透視変換処理、陰影処理及び陰
面処理によって得た結果をデータ列としてメモリに書込
んでおき、当該メモリを必要に応じて読出すことによっ
てグラフィック画像を表示する。
D Problems to be Solved by the Invention The first method is to predetermine the spatial positional relationships among the viewpoint, light source, and object, and then use the results obtained by perspective transformation processing, shading processing, and hidden surface processing as a data string. A graphic image is displayed by writing it into a memory and reading the memory as needed.

この第1の方法によると、メモリに書込むべきデータ列
を生成する際に多大な時間がかかるものの、画像情報の
変換自身にはそれほど時間を必要としない利点がある。
According to this first method, although it takes a lot of time to generate a data string to be written into the memory, there is an advantage that converting the image information itself does not require much time.

しかしながら、視点の空間的位置情報を予め決定してお
く必要があること、視点が増える(視点が移動する)場
合、各視点ごとにデータ列を形成する必要があるなどの
問題がある。このため視点の位置を細かく変更すること
ができないことや、データ列を記憶するために大規模な
メモリ容量を必要とする欠点があり、実用上比較的単純
な形状の物体を表現する場合にしか使用できなかった。
However, there are problems such as the need to determine the spatial position information of the viewpoints in advance, and when the number of viewpoints increases (the viewpoints move), it is necessary to form a data string for each viewpoint. For this reason, it has the disadvantage that the position of the viewpoint cannot be changed in detail and that it requires a large amount of memory capacity to store data strings, so in practice it is only useful when representing objects with relatively simple shapes. Couldn't use it.

また第2の方法は、光源と物体との空間的位置関係を初
期設定し得るようにすると共に、透視変換処理、陰影処
理及び陰面処理をそれぞれサブルーチンとして実行し得
るようになされ、視点の空間的位置情報が与えられたと
き、上述の立体表現のための処理を順次実行するように
なされている。
In addition, the second method makes it possible to initialize the spatial positional relationship between the light source and the object, and also allows perspective transformation processing, shadow processing, and hidden surface processing to be executed as subroutines. When position information is given, the above-described three-dimensional representation processing is sequentially executed.

この第2の方法による従来のグラフィック画像表示装置
によれば、視点の空間的位置を自由に設定できるものの
、透視変換処理、陰影処理及び陰面処理を各ピクセルご
とに実行しなければならないように構成されているため
、コンピュータによる演算量が膨大となり、実用的では
なかった0例えば1000 X 1000個のピクセル
で構成されている場合、1つの視点について透視変換処
理、陰影処理及び陰面処理を各ピクセルごとに1000
000回演算を繰返さなければならず、そのため演算処
理時間が例えば数時間程度もかかる欠点があった。
According to the conventional graphic image display device using this second method, although the spatial position of the viewpoint can be set freely, the configuration is such that perspective transformation processing, shading processing, and hidden surface processing must be performed for each pixel. For example, if the image is composed of 1000 x 1000 pixels, perspective transformation processing, shading processing, and hidden surface processing are performed for each pixel for one viewpoint. 1000 to
The calculation has to be repeated 000 times, which has the drawback that the calculation processing time takes several hours, for example.

本発明は以上の点を考慮してなされたもので、上述の第
2の演算処理方法のうち、特に膨大な演算時間を必要と
する陰影処理及び陰面処理を従来の場合と比較して格段
的に簡便かつ短時間の間に実行し得るようにした画像表
示方法を提案しようとするものである。
The present invention has been made in consideration of the above points, and among the above-mentioned second calculation processing methods, shadow processing and hidden surface processing, which particularly require a huge amount of calculation time, are significantly improved compared to conventional methods. The purpose of this paper is to propose an image display method that is simple and can be executed in a short period of time.

E問題点を解決するための手段 かかる問題点を解決するため第1の発明においては、3
次元空間にある物体の表面を所定の視点位置から見たと
きの当該表面に関するデータを、ディスプレイの2次元
表示画面上に変換表示する画像表示方法において、視点
3の位置から見た物体1.4の表面IA、4Aを三角形
の単位領域UA1、UA2に切出し、当該三角形の単位
領域UA1、UA2の3つの頂点でなる第1の頂点PX
の位置を表す第1の位置データと、頂点px位置におけ
る視線方向のベクトルE1及び表面の法線単位ベクトル
N*の内積N8 ・Eoを演算することにより得られか
つ当該演算結果の符号によって可視又は不可視領域であ
ることを表す可視−不可視データを求め、第1の位置デ
ータを、視点位置に基づいて、ディスプレイのラスク表
示画面を形成する2次元平面に透視変換して3つの頂点
pxに対応する第2の頂点P+ 、Pg 、P3の位置
を表す第2の位置データを得、2次元平面上の第2の頂
点P+ 、Pg 、Ps位置に可視−不可視データを垂
直に立てて、その先端に三角形の可視−不可視データ平
面■PXを張り、2次元平面上の第2の頂点P+ 、P
g 、Psで囲まれた三角形領域UAXに含まれるピク
セルでなる処理点pcに垂直に立てた直線と、可視−不
可視データ平面■PXとの交点を補間演算によって求め
、この交点における可視−不可視データ平面VBXのデ
ータの内容が不可視であるとき、単位領域UAI、UA
2の表面が陰面であると判断して当該処理点P。
EMeans for solving the problem In order to solve the problem, in the first invention, 3.
In an image display method for converting and displaying data regarding the surface of an object in a dimensional space when viewed from a predetermined viewpoint position on a two-dimensional display screen of a display, an object 1.4 viewed from a viewpoint position 3 The surfaces IA and 4A are cut out into triangular unit areas UA1 and UA2, and the first vertex PX is formed by the three vertices of the triangular unit areas UA1 and UA2.
The first position data representing the position of Obtain visible-invisible data indicating that it is an invisible area, and based on the viewpoint position, perspectively transform the first position data into a two-dimensional plane forming the rask display screen of the display to correspond to the three vertices px. Obtain second position data representing the positions of the second vertices P+, Pg, and P3, and set visible-invisible data vertically at the positions of the second vertices P+, Pg, and Ps on the two-dimensional plane. The visible-invisible data plane ■PX of the triangle is stretched, and the second vertices P+, P on the two-dimensional plane
g, The intersection point between the straight line perpendicular to the processing point pc, which is made up of pixels included in the triangular area UAX surrounded by Ps, and the visible-invisible data plane ■PX is determined by interpolation, and the visible-invisible data at this intersection point is calculated. When the data contents of the plane VBX are invisible, the unit areas UAI and UA
It is determined that the surface of No. 2 is a hidden surface, and the processing point P is determined.

に画像データを表示しないようにする。Prevent image data from being displayed.

また第2の発明においては、3次元空間にある物体の表
面を所定の視点位置から見たときの当該表面に関するデ
ータを、ディスプレイの2次元表示画面上に変換表示す
る画像表示方法において、物体1.4の表面IA、4A
を三角形の単位領域UAI、UA2に切出し、この三角
形の単位領域UAI、UA2の3つの頂点でなる第1の
頂点PXの位置を表す第1の位置データと、この第1の
頂点PX位置における視線方向のベクトルE0及び表面
の法線単位ベクトルN0の内積E1 ・N1を演算する
ことにより得られかつ当該演算結果の符号によって可視
又は不可視領域であることを表す可視−不可視データと
、第1の頂点PX位置から視点3までの距離を表す距離
データとを求め、第1の位置データを、視点位置に基づ
いて、ディスプレイの表示画面に相当する2次元平面5
に透視変換して、第1の頂点pxに対応する2次元平面
上の第2の頂点Pt 、Pg −Psの位置を表す第2
の位置データを得、2次元平面上の第2の頂点pt 、
pm 、ps位置に可視−不可視データを垂直に立てて
、その先端に三角形の可視−不可視データ平面vPXを
張り、2次元平面上の第2の頂点P、、Pオ、Pgで囲
まれた三角形領域UAXに含まれる処理点PCに垂直に
立てた直線と、可視−不可視データ平面vPXとの第1
の交点を補間演算によって求め、この第1の交点におけ
る可視−不可視データ平面vPXのデータの内容が不可
視であるとき、単位領域UAI、UA2の曲面が陰面で
あると判断して処理点PCに画像データを表示しないよ
うにすると共に、同一の処理点Pcについて第1の交点
における可視−不可視データの内容が可視であると判断
される表面が複数個あるときには、当該複数の表面につ
いて、2次元平面上の第2の頂点P、、P、 、P3位
置に距離データを垂直に立てて、その先端に三角形の距
離データ平面DPXを張り、2次元平面の第2の頂点P
I’ 、Pg 、Pzで囲まれた三角形領域UAXに含
まれる処理点PCに垂直に立てた直線と、距離データ平
面DPXとの第2の交点を補間演算によって求め、表面
IA、4Aのうち第2の交点における距離データ平面D
PXのデータの内容が最も小さい表面についてのデータ
以外のデータについては、単位領域υA1、UA2の表
面が陰面であると判断して処理点Pcに画像データを表
示しないようにする。
Further, in a second invention, in an image display method for converting and displaying data regarding the surface of an object in a three-dimensional space when viewed from a predetermined viewpoint position on a two-dimensional display screen of a display, .4 surface IA, 4A
is cut out into triangular unit areas UAI and UA2, and first position data representing the position of the first vertex PX consisting of the three vertices of the triangular unit areas UAI and UA2, and the line of sight at the position of this first vertex PX. Inner product E1 of direction vector E0 and surface normal unit vector N0 Visible-invisible data obtained by calculating N1 and indicating that it is a visible or invisible area depending on the sign of the calculation result, and the first vertex Distance data representing the distance from the PX position to the viewpoint 3 is obtained, and the first position data is calculated based on the viewpoint position on a two-dimensional plane 5 corresponding to the display screen of the display.
The second vertices Pt and Pg −Ps on the two-dimensional plane corresponding to the first vertex px are
Obtain the position data of the second vertex pt on the two-dimensional plane,
The visible-invisible data is set vertically at the pm and ps positions, and a triangular visible-invisible data plane vPX is attached to the tip of the visible-invisible data plane vPX, and the triangle surrounded by the second vertices P,, Po, and Pg on the two-dimensional plane The first line between a straight line perpendicular to the processing point PC included in the area UAX and the visible-invisible data plane vPX.
When the data content of the visible-invisible data plane vPX at this first intersection point is invisible, it is determined that the curved surfaces of the unit areas UAI and UA2 are hidden surfaces, and the image is transferred to the processing point PC. In addition to not displaying the data, if there are multiple surfaces for which the content of the visible-invisible data at the first intersection point is determined to be visible for the same processing point Pc, the two-dimensional plane Place the distance data vertically at the second vertices P, , P, , P3 above, and attach a triangular distance data plane DPX to the tip of the distance data, and set the distance data at the second vertices P of the two-dimensional plane.
The second intersection point between the distance data plane DPX and a straight line perpendicular to the processing point PC included in the triangular area UAX surrounded by I', Pg, and Pz is found by interpolation, and the second intersection of the surfaces IA and 4A is Distance data plane D at the intersection of 2
For data other than the data for the surface with the smallest data content of PX, it is determined that the surfaces of the unit areas υA1 and UA2 are hidden surfaces, and the image data is not displayed at the processing point Pc.

2作用 第1の発明においては、3次元空間にある物体14の表
面IA、4Aの単位領域UAI、tJA2の3つの頂点
PXについて、視線方向のベクトルE1と、法線単位ベ
クトルN′″との内積N1 ・Eoを求める。この内積
演算結果は、法線単位ベクトルN*と、視線ベクトルE
1とのなす角φの余弦cos φで表され、従って表面
IA、4Aが視点3に対向する面部分をもっている場合
には、正の値になる。これに対してφが±π/2になれ
ば0になり、さらに±π/2以上の値になると、内積の
値は負になる。
2 Effects In the first invention, for the surface IA of the object 14 in the three-dimensional space, the unit area UAI of 4A, and the three vertices PX of tJA2, the vector E1 in the viewing direction and the normal unit vector N'' Calculate the inner product N1 ・Eo.The result of this inner product calculation is the normal unit vector N* and the line-of-sight vector E
It is expressed as the cosine cos φ of the angle φ formed with 1, and therefore, when the surfaces IA and 4A have a surface portion facing the viewpoint 3, it becomes a positive value. On the other hand, when φ becomes ±π/2, it becomes 0, and when it becomes a value of ±π/2 or more, the value of the inner product becomes negative.

従って内積演算結果の符号が0又は負になれば、当該単
位領域UAI、UA2は陰面にあると判断し得る。
Therefore, if the sign of the inner product calculation result is 0 or negative, it can be determined that the unit areas UAI and UA2 are on the hidden surface.

このように内積演算結果の符号によって陰面にある面部
分のデータであるか否かを簡易に判定し得るので、その
分演算時間を短縮し得る。
In this way, it is possible to easily determine whether or not the data corresponds to a surface portion that is a hidden surface based on the sign of the inner product calculation result, so that the calculation time can be shortened accordingly.

これに加えて第2の発明においては、同一の処理点PC
において、同一視線上にある複数の表面IA、4Aから
得られた可視−不可視データにつ距離を表す距離データ
を求め、当該距離データの内容が最も小さい表面以外の
表面については、これを陰面であると判定することによ
り、陰面の判定を一段と確実にし得る。
In addition to this, in the second invention, the same processing point PC
, distance data representing distance is obtained from visible-invisible data obtained from multiple surfaces IA and 4A on the same line of sight, and for surfaces other than the surface for which the content of the distance data is the smallest, this is calculated as a hidden surface. By determining that there is a hidden surface, the determination of a hidden surface can be made more reliable.

G実施例 以下図面について本発明を、曲面を存する物体の画像デ
ータを変換処理するようにした場合の一実施例を詳述す
る。
Embodiment G An embodiment of the present invention will be described in detail with reference to the drawings, in which image data of an object having a curved surface is converted.

以下に述べるグラフィック画像変換方法においては、2
次元的なラスク画面上に立体的なグラフィック画像を表
現するために必要な陰影処理及び陰面処理を次に述べる
ような手法で実行する。
In the graphic image conversion method described below, 2
The shadow processing and hidden surface processing necessary to express a three-dimensional graphic image on a dimensional rask screen are performed using the method described below.

(G1)陰影処理 陰影処理は、ディスプレイ上に表示するグラフィック画
像の表面に陰をつける処理で、第2図に示すように、絶
対座標xyzで表される3次元空間に配設された物体1
の表面でなる曲面IAに対して光源2から光が照射され
たとき、曲面IA上の微小面積の位置P1における輝度
(すなわち明るさ)は位置P1における曲面IAの法線
と光源2の方向との間になす角度θが変化すればこれに
応じて変化して行く、そこで陰影処理は、次式1式%(
) によって、位置P1における輝度■を表現することによ
って、物体1の表面上に、光源2によって生ずる影を表
現する。(1)式においてDは定数Aは で表される変数である。この変数Aは光源ベクトルK”
と位置P1における法線単位ベクトルN”との内積を、
光源ベクトルK”及び法線単位ベクトルN”の絶対値の
積で割った式で表され、この式は法線単位ベクトルN*
に対して光源ベクトルに*がなす角度θの余弦cosθ
になる。
(G1) Shading processing Shading processing is a process of shading the surface of a graphic image displayed on a display.As shown in Fig. 2, an object 1 arranged in a three-dimensional space expressed by absolute coordinates xyz
When light is irradiated from the light source 2 to the curved surface IA, which has a surface of If the angle θ made between
) expresses the shadow caused by the light source 2 on the surface of the object 1 by expressing the brightness ■ at the position P1. In equation (1), D is a variable represented by a constant A. This variable A is the light source vector K”
The inner product of the normal unit vector N” at the position P1 is
It is expressed by the formula divided by the product of the absolute values of the light source vector K" and the normal unit vector N", and this formula is the normal unit vector N*
The cosine cosθ of the angle θ that * makes to the light source vector
become.

第2図において、光源2の位置は絶対座標xy2におけ
る光源2の位置ベクトルS88によって表され、また曲
面IA上の位置P1は曲面の位置ベクトルS1′で表さ
れる。この位置P1における曲面IAの傾きは、曲面I
Aの法線単位ベクトルN1によって表され、また位置P
1に対して光源2から入射する光の方向は位置P1から
光源2に引いたベクトルに0によって表され、さらに当
該入射する光の入射角は、法線単位ベクトルN1に対し
て光源ベクトルに1がなす角度θによって表される。
In FIG. 2, the position of the light source 2 is represented by the position vector S88 of the light source 2 in absolute coordinates xy2, and the position P1 on the curved surface IA is represented by the position vector S1' of the curved surface. The slope of the curved surface IA at this position P1 is the curved surface I
is represented by the normal unit vector N1 of A, and the position P
1, the direction of the light incident from the light source 2 is represented by 0 on the vector drawn from the position P1 to the light source 2, and the angle of incidence of the incident light is 1 on the light source vector with respect to the normal unit vector N1. It is expressed by the angle θ formed by

このように曲面IA上の位置P1の輝度■は、変数へで
決まり、従って光源2から位置P1に入射する光の入射
角θが変化すれば、これに応じて変数Aが−1〜+1の
範囲を変化することによって、入射角θが0° (すな
わち曲面IAの位置Plに立てた法線単位ベクトルN*
の方向に光源2があるとき)最も明るくなり、この状態
から入射角θが±90°の範囲で変化すれば、位置P1
の明るさは暗くなって行く(輝度■がOになって行く)
ことになる。
In this way, the brightness ■ at the position P1 on the curved surface IA is determined by the variable. Therefore, if the incident angle θ of the light incident on the position P1 from the light source 2 changes, the variable A changes from -1 to +1 accordingly. By changing the range, the incident angle θ becomes 0° (that is, the normal unit vector N* set at the position Pl of the curved surface IA)
(when the light source 2 is in the direction of
The brightness of becomes darker (the brightness becomes O)
It turns out.

(G2)陰面処理 陰面処理は、物体の表面のうち、視点から見て見えない
部分についてはディスプレイ上に表示し、ないようにグ
ラフィック画像データを処理することを言う、この処理
は、第3図に示すように、物体4の表面でなる曲面4A
を視点3から見たとき、見える部分(これを可視部分と
呼ぶ)と見えない部分(これを不可視部分と呼ぶ)とが
生ずることに基づいて、見える部分に対応する部分だけ
をディスプレイ上に表示させる。
(G2) Hidden surface processing Hidden surface processing refers to processing graphic image data so that parts of the surface of an object that are not visible from the viewpoint are displayed on the display. This processing is shown in Figure 3. As shown in , a curved surface 4A formed by the surface of the object 4
Based on the fact that when viewed from viewpoint 3, there are visible parts (this is called the visible part) and invisible parts (this is called the invisible part), only the parts that correspond to the visible parts are displayed on the display. let

ここで、曲面4Aの各部分が可視部分であるか否の判断
は、次の2つの条件に基づいてなされる。
Here, the determination as to whether each part of the curved surface 4A is a visible part is made based on the following two conditions.

すなわち第1の条件は、第3図に示すように、視点3か
ら視線ELIに沿って物体4の曲面4Aを見たとき、視
線ELIが曲面4Aと交差する点P11、PI3、PI
3のうち、位置P12及びPI3の面部分は、視線EL
Iの視点3側の位置pHに視線EL1と交差する面部分
が存在することにより、当該面部分に隠される結果にな
っており、従って位置P12及びPI3の面部分は不可
視であると判断し、物体4及び視点3間に設けられた仮
想スクリーン5上に可視である位置pHの面部分を透視
するような画像データの変換処理を実行する。
That is, the first condition is that, as shown in FIG. 3, when viewing the curved surface 4A of the object 4 from the viewpoint 3 along the line of sight ELI, the points P11, PI3, PI where the line of sight ELI intersects the curved surface 4A are
3, the surface portions at positions P12 and PI3 are in the line of sight EL.
The presence of a surface portion that intersects the line of sight EL1 at the position pH on the viewpoint 3 side of I results in being hidden by the surface portion, and therefore the surface portions at positions P12 and PI3 are determined to be invisible, Image data conversion processing is performed to see through the surface portion of the position pH that is visible on the virtual screen 5 provided between the object 4 and the viewpoint 3.

また第2の条件は、注目している面部分が他の曲面にも
隠されていないことである。すなわち第3図において、
物体4の曲面4Aと、視点3との間に他の物体6が存在
し、視線EL2に沿って物体4を見たとき、視線EL2
が物体6の曲面6Aと交差した後、物体4の曲面4Aと
交差するような状態にあるとき、物体4の曲面4A上の
位置P14の面部分は、視点3側にある物体6の曲面6
Ahの位置P 15の面部分によって隠されており、従
って仮想スクリーン5上には、不可視の面部分(位置P
14の面部分)を表示せずに可視の面部分(位置P15
の面部分)を表示するようにグラフィック画像データを
変換処理する。
The second condition is that the surface portion of interest is not hidden by other curved surfaces. That is, in Figure 3,
When another object 6 exists between the curved surface 4A of the object 4 and the viewpoint 3, and the object 4 is viewed along the line of sight EL2, the line of sight EL2
intersects with the curved surface 6A of the object 6 and then intersects with the curved surface 4A of the object 4, the surface portion of the position P14 on the curved surface 4A of the object 4 is the curved surface 6 of the object 6 on the viewpoint 3 side.
The position P of Ah is hidden by the surface portion of 15, and therefore the invisible surface portion (position P
The visible surface portion (position P15) is not displayed.
The graphic image data is converted so as to display the surface area).

第1の条件(すなわち可視−不可視)は、第4図に示す
手法で判断される。すなわち、閉曲面7Aを有する物体
7(例えば円球でなる)上の注目点P210面部分にお
いて視点3の方向を差す視線単位ベクトルE0を引き、
この視線単位ベクトルE*と法線単位ベクトルN0との
内積を求めると、注目点P210面部分が可視であるた
めの必要十分条件は、 N1・E”>0        −・・・・・(3)と
表し得る。ここで視線単位ベクトルE*及び法wAm位
6クトルN゛の角度がφであれば・視線単    叉、
位ベクトルE1及び法線単位ベクトルN”の内積の値は
、 N1・E”−lN”l・ IE* 1・cos φ” 
cosφ      ・・・・・・(4)となる、従っ
て(3)式を満足する条件は、φが鋭角であること、す
なわち 0〈φく□        ・・・・・・(5)のとき
成立つことが分かる。
The first condition (ie, visible-invisible) is determined by the method shown in FIG. That is, draw a line-of-sight unit vector E0 pointing in the direction of the viewpoint 3 at the point of interest P210 on the object 7 (for example, a circular sphere) having the closed curved surface 7A,
When calculating the inner product of this line-of-sight unit vector E* and normal unit vector N0, the necessary and sufficient condition for the point of interest P210 to be visible is N1・E">0 - (3) Here, if the angle of the line-of-sight unit vector E* and the modulus wAm order 6 vectors N' is φ, then line-of-sight unit vector E
The value of the inner product of the position vector E1 and the normal unit vector N” is N1・E”−lN”l・IE* 1・cos φ”
cosφ ・・・・・・(4) Therefore, the condition for satisfying equation (3) is satisfied when φ is an acute angle, that is, 0〈φ×□ ・・・・・・(5) I understand that.

例えば第4図において視線EL3と表面の位置P21と
の交点で示すように、°角度φが鋭角であれば、視線単
位ベクトルE”及び法、%11位ベクトルN0の内積は
正であるので、(3)式の条件を満足し、従って注目点
P21の面部分は可視であると判断できる。これに対し
て第4図において視線EL3と裏面の注目点P22の面
部分との交点で示すように、角度φがπ/2以上になる
と、視線単位ベクトルE*及び法線単位ベクトルN*の
内積は負になるから、(3)式の条件を満足せず、当該
注目点P22の面部分は不可視であると判断し得る。
For example, if the angle φ is an acute angle, as shown by the intersection of the line of sight EL3 and the surface position P21 in FIG. The condition of equation (3) is satisfied, so it can be determined that the surface of the point of interest P21 is visible.On the other hand, as shown by the intersection of the line of sight EL3 and the surface of the point of interest P22 on the back side in FIG. When the angle φ becomes π/2 or more, the inner product of the line-of-sight unit vector E* and the normal unit vector N* becomes negative, so the condition of equation (3) is not satisfied and the surface portion of the target point P22 can be considered invisible.

かかる判断は、曲面フA上に存在する各注目点の面部分
の傾斜が、視点3に向いているか否かを判定したもので
あり、かかる判定によつt可視であると判断された注目
点は、上述の第2の条件を満足できれば最終的に可視な
点となる(このような点を可視候補点と呼ぶ)。
This judgment is made by determining whether the slope of the surface portion of each point of interest existing on the curved surface A is oriented toward the viewpoint 3, and the points of interest that are determined to be visible by this judgment are A point finally becomes a visible point if it satisfies the second condition described above (such a point is called a visible candidate point).

そして上述の第2の条件の判定が、当該可視候補点につ
いて実行される。すなわち第3図について上述したよう
に、同一の視線ELL、EL2上にある複数の可視候補
点(Pll、PI3)、(PI3、PI3)のうち、最
も視点3に近い距離を有する可視候補点が選定され、当
該可視候補点が最終的な可視点であると判断される。
The determination of the second condition described above is then performed for the visible candidate point. In other words, as described above with reference to FIG. 3, among the plurality of visible candidate points (Pll, PI3), (PI3, PI3) on the same line of sight ELL, EL2, the visible candidate point having the closest distance to viewpoint 3 is The selected visible candidate point is determined to be the final visible point.

(G3)変換処理手順 ■里之二1土!失底王皿 コンピュータグラフィックスを用いた画像表示装置は、
中央処理ユニット(cPU)によって第1図の処理手順
に従って、グラフィック画像変換処理を実行する。
(G3) Conversion processing procedure ■ Satonoji 1st soil! An image display device using computer graphics is
A central processing unit (cPU) executes graphic image conversion processing according to the processing procedure shown in FIG.

まずステップSPIにおいて、変換処理プログラムを開
始し、ステップSP2において、視点3(第3図)の位
置、光源2(第2図)の位置、及びグラフィック画像を
変換処理する際に必要とされるパッチ数をオペレータの
操作によって入力する。
First, in step SPI, the conversion processing program is started, and in step SP2, the position of viewpoint 3 (Fig. 3), the position of light source 2 (Fig. 2), and patches required when converting the graphic image are determined. The number is input by the operator.

このときCPUは、予め格納している3次元のグラフィ
ック画像データに基づいて、当該グラフィック画像デー
タによって表される3次元のグラフィック画像を、ステ
ップSP2において指定された視点3によって決まる仮
想スクリーン5(第3図)上に透視する際に、3次元グ
ラフィック画像の曲面上の点を仮想スクリーン5上の対
応する点に変換するために用いる透視変換マトリクスを
生成する。
At this time, the CPU, based on the three-dimensional graphic image data stored in advance, displays the three-dimensional graphic image represented by the graphic image data on the virtual screen 5 (the third point) determined by the viewpoint 3 specified in step SP2. 3) A perspective transformation matrix is generated that is used to transform points on the curved surface of the three-dimensional graphic image to corresponding points on the virtual screen 5 when viewing upward.

次にCPUは、第5図に示すように、変換すべきグラフ
ィック画像データのうち1バッチ分のデータDATAを
読出し、次のステップSP5において三角形に切出す。
Next, as shown in FIG. 5, the CPU reads out one batch of data DATA from among the graphic image data to be converted, and cuts it into triangles in the next step SP5.

この実施例の場合、三角形の切出しは、1パッチ分のデ
ータDATAを所定のパラメータに基づいて、当該パラ
メータが等間隔になる(必ずしも曲面上で等間隔にはな
らない)ような間隔で順次配列する2群の切出線群L1
及びL2の交点位置を順次演算して行く、ここで、切出
線群L1及びL2に含まれる切出線の数は縦横5本に選
定され、切出線群Ll及び切出線群L2が互いに綱目状
に交差するように設定されている。か(して1パッチ分
のデータDATAでなろ曲面は、切出線群L1及びL2
の隣合う2本の切出線によって囲まれた小領域UAに分
割され、当該小領域tJAを4つの交点PXによって囲
むように切出し処理される。
In the case of this embodiment, the triangles are cut out by sequentially arranging the data DATA for one patch at intervals such that the parameters are at equal intervals (not necessarily at equal intervals on the curved surface) based on predetermined parameters. 2nd group cutting line group L1
and L2 are sequentially calculated. Here, the number of cutting lines included in the cutting line groups L1 and L2 is selected to be 5 vertically and horizontally, and the cutting line group Ll and the cutting line group L2 are They are set to intersect with each other in a grid pattern. (Then, with data DATA for one patch, the Naro curved surface is divided into cutting line groups L1 and L2.
is divided into a small area UA surrounded by two adjacent cutting lines, and the small area tJA is cut out so as to be surrounded by four intersection points PX.

この小領域UAの大きさは、ステップSP2において入
力されたパッチ数との関連によって決められ、これによ
り小領域UAをディスプレイのラスク画面上に変換した
とき、当該変換された小領域に含まれるピクセル数が決
まるようになされている。
The size of this small area UA is determined in relation to the number of patches input in step SP2, so that when the small area UA is converted onto the rask screen of the display, the pixels included in the converted small area are The number is determined.

小領域UAは、互いに対向する2つの交点間を結ぶ対角
線L3によって2つの三角形状の単位領域UAI及びU
A2に分割され、かくしてデータDATAが表す曲面が
多数の単位領域UAI及びUA2に分割される。そして
各単位領域UAI及びUA2にそれぞれ含まれるピクセ
ル数は、例えば20〜30個程度になるように設定され
ている。
The small area UA is divided into two triangular unit areas UAI and U by a diagonal line L3 connecting two mutually opposing intersection points.
A2, and thus the curved surface represented by the data DATA is divided into a large number of unit areas UAI and UA2. The number of pixels included in each unit area UAI and UA2 is set to, for example, about 20 to 30.

このようにして曲面から単位領域UAI及びUA2の切
出しを実行した後、CPUが各単位領域UAI及びυA
2の頂点にある3つの交点位置について法線単位ベクト
ルN1を計算する。
After cutting out the unit areas UAI and UA2 from the curved surface in this way, the CPU cuts out each unit area UAI and υA.
The normal unit vector N1 is calculated for the three intersection points at the vertices of 2.

このようにして処理すべき曲面のデータDATAを三角
形の単位領域UAI及びUA2に分割して、3つの頂点
についてデータを得ることは、三角形の単位領域UAI
及びUA2をディスプレイのラスク表示画面上に変換し
たとき、当該変換した単位領域に含まれている20〜3
0個のピクセルについてのデータを、3つの頂点のデー
タによって代表させたことを意味し、従って以後の処理
を3つの頂点のデータに基づいて実行することにより、
データの処理速度を格段的に速めることができることを
意味している。
In this way, dividing the data DATA of the curved surface to be processed into the triangular unit areas UAI and UA2 and obtaining data about the three vertices means that the triangular unit area UAI
And when UA2 is converted onto the rask display screen of the display, 20 to 3 included in the converted unit area
This means that the data for 0 pixels is represented by the data of three vertices, so by performing the subsequent processing based on the data of three vertices,
This means that data processing speed can be dramatically increased.

CPUは、次のステップSP6において陰面処理におい
て使用する可視−不可視データでなるテーブルを生成す
る。このステップは単位領域UA1及びUA2の3つの
頂点について、それぞれ第6図に示すように、視線単位
ベクトルE″を演算により求め、この視線単位ベクトル
E1と法線単位ベクトルN1との内積を演算し、この演
算結果を、第7図に示すように、コンピュータの内部ニ
設けられたテーブル10の可視−不可視テーブルTAB
LE4に順次記憶させて行く。
The CPU generates a table consisting of visible and invisible data to be used in hidden surface processing in the next step SP6. In this step, as shown in FIG. 6, the line-of-sight unit vector E'' is calculated for the three vertices of the unit areas UA1 and UA2, and the inner product of this line-of-sight unit vector E1 and the normal unit vector N1 is calculated. , this calculation result is stored in the visible-invisible table TAB of the table 10 provided inside the computer, as shown in FIG.
Store them in LE4 sequentially.

この場合テーブル10は、lパッチ分の曲面データDA
TA (第5図)を、切出線群L2が配列されている方
向(これをU方向と呼ぶ)、及び切出線群L iが配列
されている方向(これをV方向と呼ぶ)にそれぞれ5つ
ずつある交点PXのデータを、1パツチ25ワ一ド分の
データとして記憶するようになされている。
In this case, the table 10 contains the surface data DA for l patches.
TA (Fig. 5) in the direction in which the cutting line group L2 is arranged (this is called the U direction) and in the direction in which the cutting line group L i is arranged (this is called the V direction). The data of each of the five intersection points PX is stored as data for one patch of 25 words.

かくして可視−不可視テーブルTABLE4には、各パ
ッチごとに25個の交点PXについての可視−不可視デ
ータが格納され、その符号に基づいて第3図について上
述したように、陰面処理する際に必要な第1の条件デー
タを生成することになる。
In this way, the visible-invisible table TABLE4 stores the visible-invisible data for the 25 intersection points PX for each patch, and based on the codes, as described above with reference to FIG. 1 condition data will be generated.

これに続いてCPUはステップSP7において距離テー
ブルを生成する。この距離テーブルは、曲面データDA
TAの各頂点について第2図に対応させて第8図に示す
ように、頂点PXから視点3までの距離ベクトルD*を
計算し、当該計算結果をテーブル10の距離テーブルT
ABLE3に格納する。
Following this, the CPU generates a distance table in step SP7. This distance table is the curved surface data DA
As shown in FIG. 8 for each vertex of TA in correspondence with FIG.
Store in ABLE3.

この距離テーブルTABLE3の距離データDは、陰面
処理における第2条件(第3図)の判断をする際に使用
されるもので、頂点pxから視点3までの距離ベクトル
を D” =E” −3”         ・・・・・・
(6)によって演算した後、当該距離ベクトルD0の絶
対値を距離データDとして得る。
The distance data D of this distance table TABLE3 is used when determining the second condition (Fig. 3) in hidden surface processing, and the distance vector from the vertex px to the viewpoint 3 is expressed as D" = E" -3 ” ・・・・・・
After calculating according to (6), the absolute value of the distance vector D0 is obtained as the distance data D.

かくしてディスプレイのラスク表示画面上、同じピクセ
ルについて複数の曲面部分についての距離データが得ら
れたとき、視点3に最も近い曲面部分のデータを判定す
ることができる。
In this way, when distance data for a plurality of curved surface portions are obtained for the same pixel on the rask display screen of the display, the data for the curved surface portion closest to the viewpoint 3 can be determined.

次に、CPUはステップSP8に移って輝度テーブルの
生成処理を行う。このステップは、第2図に対応させて
第9図に示すように、各頂点pxにおける輝度を計算す
るもので、まず次式1式%(7) によって頂点PXから見た光源2に対する位置ベクトル
を計算する。そしてその計算結果を用いて、頂点PXの
法線単位ベクトルN“との内積に基づいて入射角θの余
弦CO3θを次式 を演算し、これを変数Aとおく。
Next, the CPU moves to step SP8 and performs a brightness table generation process. This step is to calculate the brightness at each vertex px as shown in FIG. 9 corresponding to FIG. Calculate. Then, using the calculation result, the cosine CO3θ of the incident angle θ is calculated based on the inner product with the normal unit vector N'' of the vertex PX, and this is set as a variable A.

さらにこの変数Aを用いて輝度!を次式1式%(9) によって演算する。Furthermore, using this variable A, calculate the brightness! The following formula 1 formula % (9) Calculate by

ここで定数りの値は、例えば0.22程度であるのに対
して、変数Aはθ〜lの範囲で変動する(θが±π/2
の範囲で変動するので)。かくして輝度Iは頂点PXに
対して光源2から入射する光の変化に応じて変化し、こ
れにより第2図について上述した陰影処理に使用するデ
ータが得られ、このデータがテーブル10(第7図)の
輝度テーブルTABLE2に格納される。
Here, the value of the constant R is, for example, about 0.22, whereas the variable A fluctuates in the range of θ to l (θ is ±π/2
). In this way, the brightness I changes in response to changes in the light incident on the vertex PX from the light source 2, and this provides data used for the shading process described above with respect to FIG. ) is stored in the brightness table TABLE2.

次にCPUは、ステップSP9に移って透視変換処理を
実行する。この透視変換処理は、第3図に対応させて第
10図に示すように、物体4の曲面4A上にある頂点P
Xの位置を、物体4及び視点3間に設けた仮想スクリー
ン5上に透視したとき、3次元空間にある曲面4A上の
頂点PXを仮想スクリーン5上の2次元XY平面に変換
するものである。かかる変換処理は、上述のステップS
P5において得た頂点PXの位置データを、ステップS
P3において生成した透視変換マトリクスを用いて、X
Y平面上に変換演算することにより実行され、この演算
結果はテーブルlOのXYテーブルTABLEIに格納
される。
Next, the CPU moves to step SP9 and executes perspective transformation processing. This perspective transformation process is performed as shown in FIG. 10 corresponding to FIG.
When the position of . Such conversion processing is performed in step S described above.
The position data of the vertex PX obtained in P5 is transferred to step S
Using the perspective transformation matrix generated in P3,
This is executed by performing a conversion operation on the Y plane, and the result of this operation is stored in the XY table TABLEI of table IO.

この変換処理を実行することにより、3次元空間にある
曲面上の頂点についてのデータを、XY平面上のデータ
として取り扱うことができることになり、これにより、
以下の処理をXY平面すなわちディスプレイのラスク表
示画面を基準にして実行し得ることになる。
By executing this conversion process, data about vertices on a curved surface in three-dimensional space can be treated as data on the XY plane, and as a result,
The following processing can be executed based on the XY plane, that is, the rask display screen of the display.

かくしてCPUは、lパッチ分のデータに基づいて切出
された三角形の各頂点位置における各種の物体表面情報
を表すデータをテーブル10に生成でき、次のステップ
5PIOにおいて初期値として設定された全てのパッチ
についての処理が終了したか否かを判断し、終了してい
なければ、ステップSP4に戻って次のパッチについて
テーブルlOへのデータの生成処理を実行する。その結
果ステップ5PlOにおいて、肯定結果が得られると、
CPUはディスプレイの画面上に表示すべき曲面につい
てその状態を表す全ての情報を、単位領域UAI及びU
A2 (第5図)の3つの頂点位置のデータとしてテー
ブルlO内に取込むことができる。
In this way, the CPU can generate data representing various types of object surface information at each vertex position of the triangle cut out based on the data for l patches in the table 10, and in the next step 5PIO, all the data set as initial values It is determined whether or not the processing for the patch has been completed, and if it has not been completed, the process returns to step SP4 to execute data generation processing for the next patch in the table IO. As a result, if a positive result is obtained in step 5PlO,
The CPU stores all information representing the state of the curved surface to be displayed on the display screen in the unit areas UAI and U.
A2 (FIG. 5) can be imported into the table IO as data of the three vertex positions.

1、り、几 かくしてテーブル10に取込まれた曲面情報は、単位領
域UAI及びUA2がディスプレイの表示画面上20〜
30個のピクセルに対応しているので、cpuは以下の
ステップ5PII〜5P1Bにおいて、当該単位領域U
AI及びUA2に対応する各ピクセルについて、テーブ
ル10のデータを用いて線形補間演算を実行することに
よって、陰影処理及び陽画処理した画像データを得、こ
れによりディスプレイの表示画面上に立体的に見えるよ
うに処理した平面画像を再現する。
1. The curved surface information thus methodically imported into the table 10 is such that the unit areas UAI and UA2 are 20 to 20 on the display screen of the display.
Since it corresponds to 30 pixels, the CPU selects the unit area U in the following steps 5PII to 5P1B.
For each pixel corresponding to AI and UA2, linear interpolation calculations are performed using the data in Table 10 to obtain image data that has undergone shading processing and positive image processing, so that it appears three-dimensionally on the display screen of the display. Reproduces the processed planar image.

すなわち、CPUはステップ5PIIにおいて表示領域
の決定処理を実行する。この処理は、表示すべき画像を
ディスプレイの画面のほぼ中央位置に適切な寸法で表示
させるための表示領域を決めるステップで、第11図に
示すように、テーブル10のxyテーブルTABLEI
 (第7図)から全てのデータを取出して、2次元の表
示画像DESを構成する透視変換された頂点のX軸方向
の最大値X11.及び最小値X +simと、Y軸方向
の最大値Y、□及び最小値Y1..とをそれぞれ抽出し
、X軸方向について最大値X、18及び最小値X*ia
の中心位置Xcを次式 によって求めると共に、Y軸方向の最大値Y、、8、最
小値Y e i *の中心位置Ycを次式によって求め
る。かくして求めた中央位置(Xc。
That is, the CPU executes display area determination processing in step 5PII. This process is a step of determining a display area for displaying an image to be displayed at approximately the center of the display screen with appropriate dimensions.As shown in FIG.
(FIG. 7), the maximum value X11 in the X-axis direction of the perspective-transformed vertices constituting the two-dimensional display image DES. and the minimum value X + sim, the maximum value Y in the Y-axis direction, □, and the minimum value Y1. .. and the maximum value X, 18 and the minimum value X*ia in the X-axis direction.
The center position Xc of the maximum value Y, . The center position thus obtained (Xc.

Yc)をディスプレイのラスク表示画面11の中心位置
に設定すると共に、表示画像DBSがディスプレイの表
示画面11を形成するピクセルに対応するメモリセルを
有するフレームバッファのサイズに収まるような表示領
域AREを定める。
Yc) is set at the center position of the rask display screen 11 of the display, and a display area ARE is determined such that the display image DBS fits within the size of a frame buffer having memory cells corresponding to pixels forming the display screen 11 of the display. .

ここで表示領域AREは、第11図から明らかなように
、X軸方向に最大値X @AK〜最小値x、i1の領域
をもち、かつY軸方向に最大値Y1.8〜最小値Y、1
.の領域をもつ。
Here, as is clear from FIG. 11, the display area ARE has an area from maximum value ,1
.. It has an area of

CPUは、この表示領域AREを決定すると、以下当該
表示領域ARE内にあるピクセルに限って以後の処理ス
テップを実行する。このことは、ラスク表示画面上に表
示すべき画像の変換演算量を一段と低減できることを意
味している。すなわち一般に、ラスク表示画面上に画像
変換処理された画像を表示させようとする場合、ラスク
表示画面を構成する全てのピクセルについて、表示すべ
き画像データの有無及びその内容を演算しながらフレー
ムバッファメモリの対応するメモリエリアにその演算結
果を格納して行く方法が採用されている。この点11図
の場合は、ラスク表示画面11のうち、表示すべきデー
タがないピクセルについては演算処理をしないので、結
局全体として画像変換演算量を格段的に低減し得る。
After determining this display area ARE, the CPU executes subsequent processing steps only for pixels within the display area ARE. This means that the amount of conversion calculations for images to be displayed on the rask display screen can be further reduced. In other words, in general, when attempting to display an image that has undergone image conversion processing on the rask display screen, the frame buffer memory is calculated while calculating the presence or absence of image data to be displayed and its contents for all pixels that make up the rask display screen. A method is adopted in which the calculation results are stored in the corresponding memory area. In this respect, in the case of FIG. 11, since arithmetic processing is not performed on pixels on the rask display screen 11 for which there is no data to be displayed, the overall amount of image conversion calculation can be significantly reduced.

CPUは次のステップ5P12において、この表示領域
AREにある単位領域UAI及びUA2(第5図)の3
つの頂点PXに対応する1バッチ分の位置データDAT
AX (第12図)をテーブル10のXYテーブルTA
BLEIから順次取出してデータの補間演算処理を実行
する。かくしてCPUは、表示画面11 (第11図)
のうち表示領域AREの内部にある三角形領域UAIX
及びUA2Xに含まれるピクセルの輝度を決定するため
の補間演算に供するデータを供給する。
In the next step 5P12, the CPU selects unit areas UAI and UA2 (FIG. 5) in this display area ARE.
One batch of position data DAT corresponding to one vertex PX
AX (Fig. 12) as XY table TA of table 10
Data is sequentially extracted from BLEI and interpolation calculation processing is performed on the data. Thus, the CPU displays the display screen 11 (Figure 11).
The triangular area UAIX inside the display area ARE
and supplies data for interpolation calculations to determine the brightness of pixels included in UA2X.

CPUは次に、ステップ5P13において、表示領域A
REに含まれる1パッチ分のピクセルのうち、現時点に
おいて輝度を演算決定すべきピクセル(これを処理点と
呼ぶ)PCが、どの三角形領域UAIX及びUA2Xに
属するものであるかを判定する。この判定は第13図に
示すように、各三角形領域UAIX及びUA2Xの3つ
の頂点を透視変換してなるXY平面上の点PI  (X
I、YI)、点Pz  (Xt SYt ) 、点Ps
CXs、ys)を頂点として、これらの頂点P、 、P
、、23間を互いに結ぶ直線DLI 、DL2 、DL
3によって囲まれた三角形領域UAXについてその重心
Pa  (Xo 、Yo )を用いて、以下に述べる手
順によって三角形領域UAX内に処理点PC(XcSY
c)が存在するか否かを判定する。
Next, in step 5P13, the CPU displays the display area A.
It is determined to which triangular area UAIX or UA2X the pixel PC (referred to as a processing point) whose brightness is to be calculated and determined at the present time belongs to among the pixels for one patch included in the RE. As shown in FIG. 13, this determination is made at a point PI (X
I, YI), point Pz (Xt SYt), point Ps
CXs, ys) as vertices, these vertices P, , P
, 23 are connected to each other by straight lines DLI , DL2 , DL
Using the center of gravity Pa (Xo, Yo) of the triangular area UAX surrounded by 3, a processing point PC (XcSY
Determine whether c) exists.

まず頂点P、及びP2を通る直*DL1の方程式は ・・・・・・(12) で表され、これを書換えると、 (Y−Yl)(xz −XI) −(Yt −Yl) (X−XI)−0・・・・・・(
13)となる、ところがこの(13)式は、X及びYの
値として直線DLI上の点のX及びY座標の値を代入す
れば、左辺が0になることを意味している。
First, the equation of direct*DL1 passing through vertices P and P2 is expressed as (12), and rewriting this, (Y-Yl)(xz -XI) -(Yt -Yl) ( X-XI)-0...(
13) However, this equation (13) means that if the values of the X and Y coordinates of the point on the straight line DLI are substituted as the values of X and Y, the left side becomes 0.

そこで(13)式の左辺をF (XSY)と置き、F 
(Xt Y)−(Y−yo(Xs Xt)(Yg −Y
t) (X  Xt) ・・・・・・(14) の式を立て、直fiDLl上の点を代入すれば、F(X
、Y)の値が0になるのに対して、直線DL1の内側又
は外側の点の座標値を代入すれば、F(XSY)は正又
は負の値になる数になる。
Therefore, the left side of equation (13) is set as F (XSY), and F
(Xt Y)-(Y-yo(Xs Xt)(Yg-Y
t) (X
, Y) becomes 0, but if the coordinate values of points inside or outside the straight line DL1 are substituted, F(XSY) becomes a number that becomes a positive or negative value.

この点に着目して三角形領域UAXの重心P0(Xs 
、YI )の座標値 Xt + X 2 + X s x、−a□   ・・・・・・(15)値 F  (Xs 、Yo)−(YI  −YI)  (X
z   Xt)−(YI−YI)(XI  −XI) ・・・・・−(17) と、処理点Pc (xc、Yc)の座標値を代入したと
きのF (Xc、Yc’)の値 F (Xc、Yc)−(Yc−Yl)(Xt −xt)
−(Yg  YI)(Xc Xt) ・・・・・・(18) との積を求め、この積が正のときすなわちF (xt 
、yo)−F (Xc 、 Me )  >’0・・・
・・・(19) のとき、処理点PC(Xc、Yc)が直線DLIの重心
P(1(Xll 、Yo )側にあると判定し得る。
Focusing on this point, the center of gravity P0 (Xs
, YI ) coordinate value Xt + X 2 +
z Xt) - (YI - YI) (XI - F (Xc, Yc) - (Yc - Yl) (Xt - xt)
-(Yg YI)(Xc
, yo)-F (Xc, Me) >'0...
...(19), it can be determined that the processing point PC (Xc, Yc) is on the center of gravity P (1 (Xll, Yo) side of the straight line DLI.

勿論一般に重心Pa  (Xo 、Yo )は三角形領
域UAXの内側にあるから、(19)式の条件が成立す
るような処理点Pc (Xc、Yc)の位置は、直線D
LIに対して内側にあるということができる。
Of course, the center of gravity Pa (Xo, Yo) is generally inside the triangular area UAX, so the position of the processing point Pc (Xc, Yc) that satisfies the condition of equation (19) is the straight line D.
It can be said that it is inside the LI.

同様の演算を、三角形領域UAXの他の辺を形成する直
線DL2及びDL3についても次式のように演算し、 F (Xc、Yc)−(Yc−Yt)(XI −xt)
(Ys  Yz) (Xc −Xs) ・・・・・・(20) F (XcSYc)= (Y−−Ys)(Xt −Xs
)−(Yt −Ys) (Xc −Xs)・・・・・・
(21) その演算結果に基づいて(19)式について上述したよ
うに、F (Xs 、Yo )と、F (Xc、Yc)
との積が正であるとの判定結果が得られれば、処理点P
c (Xc、Yc)は三角形領域UAXの3辺を構成す
る直線DLI、DL2、DL3の全てについて、重心P
a  (Xo 、 Yo )と同じ側にあることになる
。熱論一般に三角形の重心は3辺の全てについて内側に
あることは明らかであるので、処理点P、(Xc、Yc
)が三角形領域UAX内に存在すると判定することがで
きる。
Similar calculations are performed on the straight lines DL2 and DL3 forming the other sides of the triangular area UAX as shown in the following formula, F (Xc, Yc) - (Yc - Yt) (XI - xt)
(Ys Yz) (Xc −Xs) ・・・・・・(20) F (XcSYc)= (Y−−Ys)(Xt−Xs
)-(Yt-Ys) (Xc-Xs)...
(21) Based on the calculation results, as described above for equation (19), F (Xs, Yo) and F (Xc, Yc)
If a determination result is obtained that the product is positive, the processing point P
c (Xc, Yc) is the center of gravity P for all straight lines DLI, DL2, and DL3 that constitute the three sides of the triangular area UAX.
It will be on the same side as a (Xo, Yo). Heat Theory Generally speaking, it is clear that the center of gravity of a triangle is on the inside of all three sides, so the processing point P, (Xc, Yc
) can be determined to exist within the triangular area UAX.

これに対して(18)式、(20)式、(21)式の値
のうちの1つについて、次式 %式%) のように負の判定結果が得られると、処理点Pc(Xc
、Yc’)は、直線DLI、DL2、DL3の何れか1
つ又は複数について重心P(1(XOlY、)とは反対
側に存在することが分かり、このとき処理点PCは三角
形領域UAXの内側にはないことが分かる。
On the other hand, if a negative judgment result is obtained for one of the values of equations (18), (20), and (21), as shown in the following equation (%), processing point Pc (Xc
, Yc') is any one of the straight lines DLI, DL2, and DL3.
It can be seen that one or more of the points exist on the opposite side from the center of gravity P(1(XOlY,), and that the processing point PC is not inside the triangular area UAX.

このようにして処理点P9の位置が、三角形領域UAX
の外側にあると判定されたとき、CPUは当該三角形M
域についての以後の補間演算を実行せずに、処理点PC
を内部に含むような三角形M域υAXを見出すことがで
きるまで、新たな三角形領域UAXについての判定を繰
返して行く。
In this way, the position of the processing point P9 is changed to the triangular area UAX
When it is determined that the triangle M
processing point PC without performing subsequent interpolation operations on the area.
The determination for a new triangular area UAX is repeated until a triangular area υAX that includes the inside thereof can be found.

この結果ステップ5P13において処理点Peが内部に
ある三角形領域UAXを発見すると、CPUは次のステ
ップ5P14に移って線形捕間による可視又は不可視の
決定処理を実行する。この処理は、CPUがテーブル1
0の可視−不可視テーブルTABLE4 (第7図)か
ら順次当該三角形の頂点P+ 1P! 、Psについて
格納されている可視−不可視データを読出し、第14図
に示すように、ディスプレイの表示画面上の位MI P
 +、Pt、Psに対して、対応する可視−不可視デー
タV1+ 、Vlt 、VIsを垂直に立てる。そして
可視−不可視データVIl 、Vl、 、Vlsの先端
に可視−不可視平面vPxを張る。この可視−不可視平
面vpxは、頂点P1、P2、P、の可視−不可視デー
タV I t 、V I z 、V I s (D値に
よって、可視−不可視データV 1 * ’=V I 
sの全部が「+l」の値をもつときには第14図(A)
に示すように三角形領域UAXに対して上方に平行に延
長する可視−不可視平面vPxが得られ、これに対して
可視−不可視データVI+〜V13が全て「−1」のと
きには、第14図(B)に示すように、三角形領域UA
Xの下方に平行に延長する可視−不可視平面vPXが得
られる。
As a result, when the triangular area UAX in which the processing point Pe is located is found in step 5P13, the CPU moves to the next step 5P14 and executes visible or invisible determination processing by linear interpolation. This process is performed by the CPU
From the visible-invisible table TABLE 4 (FIG. 7) of 0, the vertices of the triangle are sequentially changed to P+ 1P! , Ps is read out, and as shown in FIG.
+, Pt, and Ps, the corresponding visible-invisible data V1+, Vlt, and VIs are set vertically. Then, a visible-invisible plane vPx is set at the tips of the visible-invisible data VIl, Vl, , Vls. This visible-invisible plane vpx is the visible-invisible data VI t , VI z , VI s of the vertices P1, P2, P (depending on the D value, the visible-invisible data V 1 *'=VI
When all s have the value of "+l", Figure 14 (A)
As shown in FIG. 14 (B ), the triangular area UA
A visible-invisible plane vPX is obtained that extends parallel to and below X.

これに対して、可視−不可視データVt、−Vl、のう
ちの一部(例えばVl、及びVt、)が「+1」であり
、かつ他部(すなわちVl、)がr−IJである場合に
は、第14図(c)に示すように可視−不可視平面vP
Xが三角形領域UAXと交差することになり、その交差
wALINを挟んで頂点P、及びP!側の可視−不可視
平面vpXが正となり、かつ境界vALTNを挟んで、
頂点P、側の可視−不可視平面vPXの符号が負になる
On the other hand, if some of the visible-invisible data Vt, -Vl (e.g., Vl and Vt) are "+1" and the other part (i.e., Vl,) is r-IJ, is the visible-invisible plane vP as shown in FIG. 14(c).
X intersects the triangular area UAX, and the vertices P and P! The visible-invisible plane vpX on the side is positive, and across the boundary vALTN,
The sign of the visible-invisible plane vPX on the vertex P side becomes negative.

従って処理点PCを通り、三角形領域UAX (従って
ディスプレイのラスク表示−面)に垂直な直線LC’l
と可視−不可視平面vPxとの交点を求め、その値vI
、。を当該処理点PCの可視−不可視データとして補間
する。
Therefore, a straight line LC'l passing through the processing point PC and perpendicular to the triangular area UAX (therefore, the rask display surface of the display)
and the visible-invisible plane vPx, and its value vI
,. is interpolated as visible-invisible data of the processing point PC.

このようにすれば、表示すべき3次元の曲面から得たデ
ータとして3つの頂点Pt 、 Pg 、Psについて
の可視−不可視データvt、、v1.、Vl、を得さえ
すれば、 ディスプレイの表示画面上の三角形領域UA
Xに含まれる全ての処理点P、(これは表示画面上のピ
クセルを表している)における可視−不可視データを、
処理点PCを通る直線LCIと三角形平面でなる可視−
不可視平面vpxとの交点を演算する(これは線形補間
演算になる)ことによって、簡易に得ることができる。
In this way, visible-invisible data vt, v1 . , Vl, the triangular area UA on the display screen
The visible-invisible data at all processing points P, (which represent pixels on the display screen) included in
Visible line consisting of straight line LCI passing through processing point PC and triangular plane -
This can be easily obtained by calculating the intersection with the invisible plane vpx (this is a linear interpolation calculation).

因に当該線形補間演算は、平面と直線との解を求める演
算になり、簡易かつ一義的に解が求まることになる。
Incidentally, the linear interpolation operation is an operation for finding a solution between a plane and a straight line, and the solution can be easily and uniquely found.

次に、CPUはステップ5P15に移って、線形補間に
よる輝度の決定処理を実行する。この処理は、第15図
に示すように、ディスプレイの表示画面上の三角形領域
UAXの頂点pt 、pg、P、の輝度データI* 、
It 、4mに基づいて、三角形領域UAXに含まれる
ピクセルでなる処理点PCにおける輝度ICを補間演算
するもので、次の手順によって演算処理を実行する。
Next, the CPU moves to step 5P15 and executes brightness determination processing by linear interpolation. This process, as shown in FIG. 15, involves the luminance data I*,
Based on It, 4m, the brightness IC at the processing point PC consisting of pixels included in the triangular area UAX is calculated by interpolation, and the calculation process is performed according to the following procedure.

すなわち三角形領域UAXの頂点P+、Pg、P8の輝
度データI1、It、Isを、テーブル10の輝度テー
ブルTABLE2から読出して、ディスプレイの表示画
面上の対応する頂点PI%P!、P8位置に垂直に立て
る。そして輝度データIt、It、Isの先端を結ぶ輝
度平面BPXを張る。そして三角形領域UAXに含まれ
る各ピクセルについての処理点PCからディスプレイの
表示画面に垂直に直線LC2を引き、当該直線LC2と
輝度平面BPXとの交点を求め、その交点における輝度
平面BPXの値を処理点PCの輝度1、cと決定する。
That is, the brightness data I1, It, Is of the vertices P+, Pg, P8 of the triangular area UAX are read from the brightness table TABLE2 of the table 10, and the corresponding vertices PI%P! on the display screen of the display are read out. , stand vertically at P8 position. Then, a brightness plane BPX connecting the tips of the brightness data It, It, and Is is drawn. Then, draw a straight line LC2 perpendicularly to the display screen of the display from the processing point PC for each pixel included in the triangular area UAX, find the intersection of the straight line LC2 and the brightness plane BPX, and process the value of the brightness plane BPX at the intersection. The brightness of point PC is determined to be 1, c.

このようにすれば、三角形領域UAXに含まれる全ての
ピクセルを順次処理点P、として選定して行けば、直線
LC2と三角形輝度平面BPXとの交点を求める線形補
間演算を実行することによ 。
In this way, by sequentially selecting all pixels included in the triangular area UAX as processing points P, a linear interpolation calculation is performed to find the intersection of the straight line LC2 and the triangular brightness plane BPX.

って3次元曲面から得た3つの輝度データから筒易に全
てのピクセルについての輝度データを得ることができる
Therefore, the brightness data for all pixels can be easily obtained from the three brightness data obtained from the three-dimensional curved surface.

因にこの場合も、直&11LC2と平面BPXとの解を
求めることになるので、当該演算は簡易であり、かつそ
の解は一義的に決まることになる。
Incidentally, in this case as well, since the solution between the direct &11LC2 and the plane BPX is found, the calculation is simple and the solution is uniquely determined.

次に、CPUはステップ5P16において、補間演算に
よる距離の決定処理を実行する。この処理は、第16図
に示すように、ディスプレイの表示西面上の三角形M域
UAXに含まれるピクセルについて、視点からの距離を
補間演算するもので、CPUは次の処理手順に従って補
間演算を実行する。
Next, in step 5P16, the CPU executes distance determination processing by interpolation calculation. As shown in Fig. 16, this process interpolates the distance from the viewpoint for pixels included in the triangle M area UAX on the west side of the display, and the CPU performs the interpolation calculation according to the following processing steps. Execute.

すなわち先ず、ディスプレイの表示画面上の頂点P、 
、P、 SP、についての距離データDI %Dt、D
sを、テーブル10の距離テーブルTABLE3から読
出して、頂点P、、P、 、P、位置に垂直に立てる。
That is, first, the vertex P on the display screen of the display,
, P, SP, distance data DI %Dt,D
s is read from the distance table TABLE3 of the table 10 and is set perpendicular to the vertex P, , P, , P, position.

そして距離データD、 、D、、D3の先端を結ぶよう
に距離平面DPXを張り、処理点Pcを通り、かつディ
スプレイの表示画面と垂直な直線LC3と、距離平面D
PXとの交点を演算により求める。そしてこの交点にお
ける距離平面DPXの値り、ct−当該処理点Pcの視
点からの距離データとして決定する。
Then, a distance plane DPX is drawn to connect the ends of the distance data D, , D, , D3, and a straight line LC3 that passes through the processing point Pc and is perpendicular to the display screen and the distance plane D
Calculate the intersection with PX. Then, the value of the distance plane DPX at this intersection is determined as ct - distance data from the viewpoint of the processing point Pc.

かくしてこの場合にも、三角形領域UAXに含まれる全
てのピクセルを順次処理点PCとして指定して行くこと
により、当該処理点Pcの距離データDIICを線形補
間演算によって得ることができる。この場合も、当該補
間演算は、直線LC3と距離平面DPXとの解を求める
ことになるので、簡易な演算により、一義的な解を求め
ることができる。
Thus, in this case as well, by sequentially specifying all pixels included in the triangular area UAX as the processing point PC, the distance data DIIC of the processing point PC can be obtained by linear interpolation calculation. In this case as well, since the interpolation calculation involves finding a solution between the straight line LC3 and the distance plane DPX, a unique solution can be found by a simple calculation.

その後CPUは、ステップ5P17に移って距離の比較
による。ピクセルデータの生成処理を実行する。この処
理は、ディスプレイの表示画面上の表示領域ARE (
第11図)に含まれる全てのピクセルについて、それぞ
れ距離データD、cが最も小さい曲面に対応する輝度デ
ータIpc(第15図)及び可視−不可視データMLc
(第14図)を集め、可視データが得られかつ距離デー
タD□が最も小さい曲面についての輝度データがディス
プレイ上に表示すべきピクセルデータとして生成される
After that, the CPU moves to step 5P17 and compares the distances. Executes pixel data generation processing. This process is carried out in the display area ARE (
For all pixels included in Figure 11), the brightness data Ipc (Figure 15) and visible-invisible data MLc correspond to the curved surface with the smallest distance data D and c, respectively.
(FIG. 14), the luminance data of the curved surface for which visible data is obtained and the distance data D□ is the smallest is generated as pixel data to be displayed on the display.

実際上CPUは、ディスプレイの各ピクセルに対応する
メモリセルを有するフレームバッファメモリと、当該フ
レームバッファメモリの各ピクセルに対応するデツプス
バツファメモリとを有し、ステップ5P16において各
ピクセルに対する距離データD pcが決定されて行く
とき、同一ピクセルについて最も小さい距離データD、
cが得られたとき、当該距離データをデツプスバッファ
メモリの当該ピクセルに対応するメモリエリアに記憶す
ると共に、ステップ5P15において決定された輝度デ
ータ■□をフレームバッファメモリに書込んで行(よう
になされ、かくして最も距離データDDcが小さい曲面
から得られた輝度データIPCがフレームバッファメモ
リに書込まれることになる。
In practice, the CPU has a frame buffer memory having memory cells corresponding to each pixel of the display, and a depth buffer memory corresponding to each pixel of the frame buffer memory, and in step 5P16, the distance data D for each pixel is stored. When pc is determined, the smallest distance data D for the same pixel,
When c is obtained, the distance data is stored in the memory area corresponding to the pixel in the depth buffer memory, and the luminance data □ determined in step 5P15 is written in the frame buffer memory and Thus, the brightness data IPC obtained from the curved surface with the smallest distance data DDc is written into the frame buffer memory.

かかるステップ5P12〜5P17の一連の演算処理は
1つのパッチに含まれるピクセルごとに実行され、CP
Uはステップ5P17の処理が終了するごとにステップ
5P1Bにおいて全てのパッチについての演算処理が終
了したか否かを判断し、否定結果が得られたとき再度ス
テップ5PI2に戻って新たなピクセルについてのデー
タの演算処理を繰返す、これに対してステップ5pia
において肯定結果が得られれば、CPUはステップ5P
19に移って当該プログラムを終了する。
The series of arithmetic processing in steps 5P12 to 5P17 is executed for each pixel included in one patch, and the CP
Every time the processing in step 5P17 is completed, U judges in step 5P1B whether or not the arithmetic processing for all patches has been completed, and if a negative result is obtained, it returns to step 5PI2 again and calculates the data for the new pixel. The calculation process of step 5pia is repeated.
If a positive result is obtained in step 5P, the CPU
The program moves to step 19 and ends the program.

(G4)実施例の作用 第1図のデータ処理方法によれば、3次元空間にある物
体曲面を、所定の視点位置から見たときの還視変換画像
をディスプレイの2次元表示画面上に変換表示すること
ができるが、か(するにつき、3次元空間にある物体の
曲面を三角形の単位領域UAI及びUA2に切出してそ
の3つの頂点Pxにおける物体表面情報を3次元空間に
おけるデータとして得ると共に、当該3つの頂点PXを
ディスプレイのラスク表示画面を形成する2次元平面に
透視変換した後、当該2次元平面に変換された頂点P*
 、Pz 、Pa位置を使って曲面から得た物体表面情
報でなる三角形のデータ平面を張ることによって、表示
画面上の三角形の領域に含まれている各全てのピクセル
について、当該データ平面から線形補間演算によって画
像データを得ることができる。
(G4) Effects of the Embodiment According to the data processing method shown in FIG. 1, a second-view transformed image of an object curved surface in a three-dimensional space viewed from a predetermined viewpoint position is converted onto a two-dimensional display screen of a display. However, (to do so, the curved surface of the object in the three-dimensional space is cut out into triangular unit areas UAI and UA2, and the object surface information at the three vertices Px is obtained as data in the three-dimensional space, After perspectively converting the three vertices PX to a two-dimensional plane forming the rask display screen of the display, the vertex P* converted to the two-dimensional plane
, Pz, and Pa positions to form a triangular data plane consisting of object surface information obtained from the curved surface, linear interpolation is performed from the data plane for each and every pixel included in the triangular area on the display screen. Image data can be obtained by calculation.

かくするにつき、3次元空間の物体の表面から2次元平
面に透視変換する際のデータとして、各単位領域につい
て3つで済むので、変換演算時間を一段と短くすること
ができる。そしてデータ平面から各ピクセルについての
画像データを得るにつき、平面と直線との解を求める演
算を実行するだけで良いので、この補間演算は線形とな
り、解が一義的に決る簡易な演算で済む。
In this way, since only three pieces of data are required for each unit area when perspectively converting the surface of an object in a three-dimensional space to a two-dimensional plane, the conversion calculation time can be further shortened. In order to obtain image data for each pixel from the data plane, it is only necessary to perform an operation to find the solution between the plane and the straight line, so this interpolation operation is linear and a simple operation that uniquely determines the solution is sufficient.

また第1図の画像表示方法によれば、2次元平面上の三
角形領域UAXを基準にしてデータ平面を形成するよう
にしたので、ディスプレイの表示画面上に表示される画
面に光源の位置に応じた陰影を容易に付けることができ
、かくして曲面上の起伏を確実に表現することができる
Furthermore, according to the image display method shown in FIG. 1, the data plane is formed based on the triangular area UAX on the two-dimensional plane, so that the screen displayed on the display screen is displayed according to the position of the light source. It is possible to easily add shading, and thus the undulations on a curved surface can be reliably expressed.

さらに第1図の画像表示方法によれば、2次元平面に基
づいて可視−不可視データ平面を張−ることによって、
当該2次元平面上の三角形領域UAX内に可視領域と不
可視領域とが存在する場合にも、各ピクセルについての
線形補間演算結果によって可視M域と不可視領域との境
界を明確に判定することができ、これにより陰面処理を
容易に実現し得る。
Furthermore, according to the image display method shown in FIG. 1, by creating a visible-invisible data plane based on a two-dimensional plane,
Even if a visible area and an invisible area exist within the triangular area UAX on the two-dimensional plane, the boundary between the visible M area and the invisible area can be clearly determined based on the linear interpolation calculation result for each pixel. , whereby hidden surface processing can be easily realized.

またかかる陰面処理をするにつき、同一のピクセルにつ
いて複数の可視データが得られたときは、曲面上の単位
領域UAI及びUA2から視点までの距離を表す距離デ
ータを用いて、最も距離が短い曲面についての画像デー
タだけを有効なものと判断してこれを表示するようにし
たことにより、陰面処理を混乱なく確実に実行し得、か
くして明確な遠近感を有する画像をディスプレイの表示
画面上に得ることができる。
In addition, when performing such hidden surface processing, when multiple pieces of visible data are obtained for the same pixel, the distance data representing the distance from the unit area UAI and UA2 on the curved surface to the viewpoint is used to select the curved surface with the shortest distance. By determining that only the image data of 1 is valid and displaying it, hidden surface processing can be performed reliably without confusion, and thus an image with a clear sense of perspective can be obtained on the display screen of the display. I can do it.

また第1図の画像表示方法によれば、2次元平面に透視
変換されて得られる三角形領域UAXについて補間演算
をするにつき、現在処理しているピクセルに相当する処
理点pcがどの三角形領域UAXに属するものであるか
を検出するにつき、当該三角形領域UAXの3辺を構成
する直線DLL DL2、DL3と、当該三角形領域U
AXの重心P0とを用いて、処理点P、が重心P、側に
あるか否かを判断するだけの演算処理によって容易に確
認することができるので、全体としての演算処理時間を
一段と短縮することができる。
Furthermore, according to the image display method shown in FIG. 1, when performing interpolation calculations on the triangular area UAX obtained by perspective transformation into a two-dimensional plane, the processing point pc corresponding to the pixel currently being processed is located in which triangular area UAX. In order to detect whether it belongs to the triangular area UAX, the straight lines DLL DL2 and DL3 that constitute the three sides of the triangular area UAX and the triangular area U
Using the center of gravity P0 of AX, it can be easily confirmed by arithmetic processing that simply determines whether the processing point P is on the side of the center of gravity P, which further reduces the overall calculation processing time. be able to.

そしてかかる画像変換処理を実行するに当って、指定さ
れた視点から見た3次元空間の物体に関するデータを2
次元平面に透視変換した結果、変換されたデータがある
表示領域ARE (第11図)を決定し、この表示領域
に限って、以後の一連の画像表示処理演算(すなわち、
処理点がある三角形領域の決定、可視−不可視の決定、
視点からの距離の決定、可視表面の決定など)を実行す
るようにしたことにより、全体としての演算時間を一段
と短縮し得る。
In executing such image conversion processing, data regarding objects in a three-dimensional space viewed from a specified viewpoint are
As a result of perspective transformation to a dimensional plane, a display area ARE (Fig. 11) in which the converted data is located is determined, and a series of subsequent image display processing operations (i.e.,
Determining the triangular area where the processing point is located, determining whether it is visible or invisible,
(determination of the distance from the viewpoint, determination of the visible surface, etc.), the overall calculation time can be further reduced.

(G5)変形例 なお上述の実施例においては、3次元空間の物体に関す
るデータとして曲面で囲まれた物体の表面を表すデータ
を用いた場合について述べたが、これに限らず、平面で
囲まれた物体の表面を表すデータを用いる場合にも、同
様にして本発明を適用し得る。
(G5) Modification In the above embodiment, data representing the surface of an object surrounded by a curved surface is used as data regarding an object in a three-dimensional space. However, the present invention is not limited to this. The present invention can be similarly applied to the case of using data representing the surface of an object.

H発明の効果 以上のように本発明によれば、3次元空間にある物体の
表面を三角形の単位領域UAI及びυA2に切出すと共
に、各頂点pxにおいて視線方向のベクトル及び表面の
法線単位ベクトルの内積を演算することによって、当該
単位領域UAI及びUA2が視点から見て可視領域であ
るか、又は不可視領域であるかを内積演算結果の符号に
よって単純に表すことができるので、2次元表示画面上
に透視変換された画像の陰面処理を極めて簡易な演算に
よって実行し得る。かくするにつき同一のピクセルにつ
いて複数の可視判定結果が得られた場合には、各表面か
ら視点までの距離を表す距離データの大きい方を陰面で
あると判定したことにより、陰面処理を一段と確実にし
得る。
H Effects of the Invention As described above, according to the present invention, the surface of an object in a three-dimensional space is cut out into triangular unit areas UAI and υA2, and at each vertex px, a vector in the viewing direction and a unit vector normal to the surface are By calculating the inner product of , it is possible to simply express whether the unit areas UAI and UA2 are visible areas or invisible areas from the viewpoint by the sign of the inner product calculation result. Hidden surface processing of the above perspective-transformed image can be performed by extremely simple calculations. Therefore, when multiple visibility determination results are obtained for the same pixel, the one with the larger distance data representing the distance from each surface to the viewpoint is determined to be a hidden surface, making hidden surface processing more reliable. obtain.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は本発明による画像表示方法の一実施例を示すフ
ローチャート、第2図はその陰影処理方法の原理を示す
路線図、第3図及び第4図は陰面処理方法の原理を示す
路線図、第5図は三角形単位領域の切出し手順を示す路
線図、第6図は可視−不可視データの生成手順を示す路
線図、第7図は3次元空間にある物体の曲面から得た画
像情報を格納するテーブルを示す路線図、第8図は距離
データの生成手順を示す路線図、第9図は輝度データの
生成手順を示す路線図、第10図は透視変換手順を示す
路線図、第11図は表示領域の決定手順を示す路線図、
第12図は表示領域内の頂点データの抽出手順を示す路
線図、第13図は処理点が三角形領域にあるか否かの判
定をする手順を示す路線図、第14図は可視−不可視デ
ータの補間手順を示す路線図、第15図は輝度データの
補間手順を示す路線図、第16図は距離データの補間手
順を示す路線図である。 1.4.6・・・・・・物体、IA、4A、6A・・・
・・・曲面、2・・・・・・光源、3・・・・・・視点
、11・・・・・・表示画面。
FIG. 1 is a flowchart showing an embodiment of the image display method according to the present invention, FIG. 2 is a route map showing the principle of the shadow processing method, and FIGS. 3 and 4 are route maps showing the principle of the hidden surface processing method. , Fig. 5 is a route map showing the procedure for cutting out a triangular unit area, Fig. 6 is a route map showing the procedure for generating visible-invisible data, and Fig. 7 is a route map showing the procedure for generating visible-invisible data. FIG. 8 is a route map showing the distance data generation procedure; FIG. 9 is the route map showing the brightness data generation procedure; FIG. 10 is the route map showing the perspective conversion procedure; The figure shows a route map showing the procedure for determining the display area.
Figure 12 is a route map showing the procedure for extracting vertex data within the display area, Figure 13 is a route map showing the procedure for determining whether a processing point is in a triangular area, and Figure 14 is visible-invisible data. FIG. 15 is a route map showing the interpolation procedure for luminance data, and FIG. 16 is a route map showing the interpolation procedure for distance data. 1.4.6...Object, IA, 4A, 6A...
... Curved surface, 2 ... Light source, 3 ... Viewpoint, 11 ... Display screen.

Claims (2)

【特許請求の範囲】[Claims] (1)3次元空間にある物体の表面を所定の視点位置か
ら見たときの当該表面に関するデータを、ディスプレイ
の2次元表示画面上に変換表示する画像表示方法におい
て、 (a)上記物体の表面を三角形の単位領域に切出し、(
b)当該三角形の単位領域の3つの頂点でなる第1の頂
点の位置を表す第1の位置データと、当該第1の頂点位
置における視線方向のベクトル及び表面の法線単位ベク
トルの内積を演算して当該演算結果の符号によつて可視
又は不可視領域であることを表す可視−不可視データと
を求め、 (c)上記第1の位置データを、上記視点位置に基づい
て、ディスプレイの表示画面に相当する2次元平面に透
視変換して、上記第1の頂点に対応する上記2次元平面
上の第2の頂点の位置を表す第2の位置データを得、 (d)上記2次元平面上の上記第2の頂点位置に上記可
視−不可視データを垂直に立てて、その先端に三角形の
可視−不可視データ平面を張り、(e)上記2次元平面
の上記第2の頂点で囲まれた三角形領域に含まれるピク
セルでなる処理点に垂直に立てた直線と、上記可視−不
可視データ平面との交点を補間演算によつて求め、 (f)上記交点における上記可視−不可視データ平面の
データの内容が不可視であるとき、上記単位領域の表面
は陰面であると判断して上記処理点に画像データを表示
しないようにする ことを特徴とする画像表示方法。
(1) In an image display method for converting and displaying data regarding the surface of an object in a three-dimensional space when viewed from a predetermined viewpoint position on a two-dimensional display screen of a display, (a) the surface of the object; Cut out into a triangular unit area, and (
b) Calculate the inner product of the first position data representing the position of the first vertex consisting of the three vertices of the unit area of the triangle, the vector in the line of sight direction at the position of the first vertex, and the normal unit vector of the surface. (c) Display the first position data on the display screen of the display based on the viewpoint position. (d) obtaining second position data representing the position of a second vertex on the two-dimensional plane corresponding to the first vertex by performing perspective transformation to a corresponding two-dimensional plane; The visible-invisible data is vertically erected at the second vertex position, and a triangular visible-invisible data plane is stretched at the tip of the visible-invisible data plane, and (e) a triangular area surrounded by the second apex of the two-dimensional plane is formed. (f) Find the intersection point of the visible-invisible data plane with a straight line perpendicular to the processing point made up of pixels included in the data plane by interpolation, and (f) determine the content of the data in the visible-invisible data plane at the intersection point. An image display method characterized in that when the unit area is invisible, the surface of the unit area is determined to be a hidden surface and image data is not displayed at the processing point.
(2)3次元空間にある物体の表面を所定の視点位から
見たときの当該表面に関するデータを、ディスプレイの
2次元表示画面上に変換表示する画像表示方法において
、 (a)上記物体の表面を三角形の単位領域に切出し、(
b)当該三角形の単位領域の3つの頂点でなる第1の頂
点の位置を表す第1の位置データと、当該第1の頂点位
置における視線方向のベクトル及び表面の法線単位ベク
トルの内積を演算することにより得られかつ当該演算結
果の符号によつて可視又は不可視領域であることを表す
可視−不可視データと、上記第1の頂点位置から視点ま
での距離を表す距離データとを求め、 (c)上記第1の位置データを、上記視点位置に基づい
て、ディスプレイの表示画面に相当する2次元平面に透
視変換して、上記第1の頂点に対応する上記2次元平面
上の第2の頂点の位置を表す第2の位置データを得、 (d)上記2次元平面上の上記第2の頂点位置に上記可
視−不可視データを垂直に立てて、その先端に三角形の
可視−不可視データ平面を張り、上記2次元平面の上記
第2の頂点で囲まれた三角形領域に含まれるピクセルで
なる処理点に垂直に立てた直線と、上記可視−不可視デ
ータ平面との第1の交点を補間演算によつて求め、上記
第1の交点における上記可視−不可視データ平面のデー
タの内容が不可視であるとき、上記単位領域の表面は陰
面であると判断して上記処理点に画像データを表示しな
いようにすると共に、 (e)同一の上記処理点について上記第1の交点におけ
る上記可視−不可視データの内容が可視であると判断さ
れる表面が複数個あるときには、当該複数の表面につい
てそれぞれ、上記2次元平面上の上記第2の頂点位置に
上記距離データを垂直に立ててその先端に三角形の距離
データ平面を張り、上記2次元平面の上記第2の頂点で
囲まれた三角形領域に含まれる上記処理点に垂直に立て
た直線と、上記距離データ平面との第2の交点を補間演
算によつて求め、上記表面のうち上記第2の交点におけ
る上記距離データ平面のデータの内容が最も小さい表面
についてのデータ以外のデータについては、上記単位領
域の表面が陰面であると判断して上記処理点に画像デー
タを表示しないようにする ことを特徴とする画像表示方法。
(2) An image display method for converting and displaying data regarding the surface of an object in three-dimensional space when viewed from a predetermined viewpoint on a two-dimensional display screen of a display, comprising: (a) the surface of the object; Cut out into a triangular unit area, and (
b) Calculate the inner product of the first position data representing the position of the first vertex consisting of the three vertices of the unit area of the triangle, the vector in the line of sight direction at the position of the first vertex, and the normal unit vector of the surface. (c ) The first position data is perspectively transformed into a two-dimensional plane corresponding to the display screen of the display based on the viewpoint position, and a second vertex on the two-dimensional plane corresponding to the first vertex is obtained. (d) Stand the visible-invisible data vertically at the second vertex position on the two-dimensional plane, and place a triangular visible-invisible data plane at the tip of the visible-invisible data. The first intersection of the visible-invisible data plane and a straight line perpendicular to the processing point made up of pixels included in the triangular area surrounded by the second vertices of the two-dimensional plane is used for interpolation calculation. When the content of the data on the visible-invisible data plane at the first intersection point is invisible, the surface of the unit area is determined to be a hidden surface and image data is not displayed at the processing point. and (e) when there are multiple surfaces for which the content of the visible-invisible data at the first intersection point is determined to be visible for the same processing point, the two-dimensional data for each of the plurality of surfaces is determined to be visible. The distance data is vertically erected at the second vertex position on the plane, a triangular distance data plane is stretched at the tip of the distance data plane, and the above processing is included in a triangular area surrounded by the second vertices of the two-dimensional plane. A second intersection between a straight line perpendicular to the point and the distance data plane is determined by interpolation, and the surface has the smallest data content on the distance data plane at the second intersection among the surfaces. An image display method characterized in that for data other than the data, the surface of the unit area is determined to be a hidden surface, and the image data is not displayed at the processing point.
JP3707885A 1985-02-26 1985-02-26 Picture displaying method Pending JPS61195468A (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
JP3707885A JPS61195468A (en) 1985-02-26 1985-02-26 Picture displaying method
EP86102358A EP0193151B1 (en) 1985-02-26 1986-02-24 Method of displaying image
US06/832,990 US4819192A (en) 1985-02-26 1986-02-24 Method of displaying image
CA000502519A CA1260638A (en) 1985-02-26 1986-02-24 Method of displaying image
AT86102358T ATE97246T1 (en) 1985-02-26 1986-02-24 IMAGE DISPLAY PROCEDURE.
DE86102358T DE3689271T2 (en) 1985-02-26 1986-02-24 Image display procedure.

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3707885A JPS61195468A (en) 1985-02-26 1985-02-26 Picture displaying method

Publications (1)

Publication Number Publication Date
JPS61195468A true JPS61195468A (en) 1986-08-29

Family

ID=12487513

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3707885A Pending JPS61195468A (en) 1985-02-26 1985-02-26 Picture displaying method

Country Status (1)

Country Link
JP (1) JPS61195468A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH051069U (en) * 1991-06-25 1993-01-08 エヌオーケー株式会社 Sealing device
JP2007322351A (en) * 2006-06-05 2007-12-13 Mitsubishi Electric Corp Three-dimensional object collating device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH051069U (en) * 1991-06-25 1993-01-08 エヌオーケー株式会社 Sealing device
JP2007322351A (en) * 2006-06-05 2007-12-13 Mitsubishi Electric Corp Three-dimensional object collating device

Similar Documents

Publication Publication Date Title
JP4774187B2 (en) Occlusion reduction transform for observing details in a three-dimensional context
JP6260924B2 (en) Image rendering of laser scan data
JP4392507B2 (en) 3D surface generation method
US6529207B1 (en) Identifying silhouette edges of objects to apply anti-aliasing
US8884947B2 (en) Image processing apparatus and image processing method
JP5055214B2 (en) Image processing apparatus and image processing method
EP3340183B1 (en) Graphics processing employing cube map texturing
JP2009525526A (en) Method for synthesizing virtual images by beam emission
JPH0757117A (en) Forming method of index to texture map and computer control display system
JPH06130881A (en) Formation of hologram information
Chen et al. Manipulation, display, and analysis of three-dimensional biological images
US9401044B1 (en) Method for conformal visualization
CN111009033B (en) OpenGL-based lesion area visualization method and system
US5793372A (en) Methods and apparatus for rapidly rendering photo-realistic surfaces on 3-dimensional wire frames automatically using user defined points
JPH03202981A (en) Three-dimensional graphic dis- play method and system
JP4584956B2 (en) Graphics processor and drawing processing method
CN114972612B (en) Image texture generation method based on three-dimensional simplified model and related equipment
JPS61195468A (en) Picture displaying method
US20070008316A1 (en) Computer graphics rendering method and apparatus
KR101227155B1 (en) Graphic image processing apparatus and method for realtime transforming low resolution image into high resolution image
Dong et al. Resolving incorrect visual occlusion in outdoor augmented reality using TOF camera and OpenGL frame buffer
JP4060375B2 (en) Spotlight characteristic forming method and image processing apparatus using the same
KR100848687B1 (en) 3-dimension graphic processing apparatus and operating method thereof
KR102083558B1 (en) A method and program for modeling three-dimension object by using voxelygon
JPWO2013038548A1 (en) Drawing apparatus, drawing method, and drawing program