JPH07160905A - Drawing method and drawing apparatus for contour line and edge line - Google Patents
Drawing method and drawing apparatus for contour line and edge lineInfo
- Publication number
- JPH07160905A JPH07160905A JP30771993A JP30771993A JPH07160905A JP H07160905 A JPH07160905 A JP H07160905A JP 30771993 A JP30771993 A JP 30771993A JP 30771993 A JP30771993 A JP 30771993A JP H07160905 A JPH07160905 A JP H07160905A
- Authority
- JP
- Japan
- Prior art keywords
- polygon
- line
- contour line
- polygons
- display
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Image Generation (AREA)
Abstract
(57)【要約】
【目的】計算機による3次元図形表示において、物体形
状をわかりやすく、かつ物体形状を損なうことなく表示
するために、輪郭線および稜線を誤りなく検出し、表示
図形に付加する方法およびその装置を提供すること。
【構成】多面体近似で与えられる3次元物体形状から、
CPUにより多角形と多角形との接続具合の情報を作成
し、同時に法線ベクトルを基にその辺の種別を判定し、
辺に対応させて記憶する。また、表示画面の各画素にど
の多角形が表示されているかを記憶しておく。そして、
辺をたどり、表示されている多角形が辺の両側で接続具
合を保っていない場合を輪郭線として検出、描画する。
また、接続具合を保っている場合には、辺の種別が稜線
の場合のみ稜線として検出、描画する。
(57) [Abstract] [Purpose] In order to display the object shape in a three-dimensional figure display by a computer in an easy-to-understand manner without damaging the object shape, the contour line and the ridge line are detected without error and added to the displayed figure. To provide a method and an apparatus thereof. [Structure] From the three-dimensional object shape given by the polyhedron approximation,
The CPU creates information on the degree of connection between polygons and polygons, and at the same time determines the type of the side based on the normal vector,
Memorize in correspondence with the side. Further, which polygon is displayed in each pixel of the display screen is stored. And
Tracing the side, the case where the displayed polygon does not maintain connection on both sides of the side is detected and drawn as a contour line.
Further, when the connection condition is maintained, only when the side type is a ridge line, it is detected and drawn as a ridge line.
Description
【0001】[0001]
【産業上の利用分野】本発明は、計算機を用いた図形表
示法に係り、特に物体形状を理解しやすく表示するため
の輪郭線および稜線の描画方法およびその装置に関す
る。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a graphic display method using a computer, and more particularly to a contour line and edge drawing method and apparatus for displaying an object shape in an easily understandable manner.
【0002】[0002]
【従来の技術】従来より、計算機によって3次元物体形
状を2次元の画像として表示する場合、物体形状は多角
形近似したデータで与えられ、この与えられた多角形の
輪郭を線で表示する方法(線画による表示法)や、多角
形内部を濃淡や色を変えて塗りつぶして描画する方法
(面画による表示法)などがとられてきた。2. Description of the Related Art Conventionally, when a three-dimensional object shape is displayed as a two-dimensional image by a computer, the object shape is given as data that approximates a polygon, and the contour of the given polygon is displayed as a line. (Display method by line drawing) and a method of drawing by painting the inside of the polygon by changing the shading and color (display method by plane drawing) have been adopted.
【0003】写実的な画像を生成することが目的の場
合、光源の位置や物体表面の反射率などを基に、物体表
面上の各点の輝度を計算し、陰影付けされた画面として
表示する方法が通常用いられている。代表的な方法とし
ては、Z−バッファ法(電子情報通信学会 編、ニュー
メディア技術シリーズ コンピュータグラフィックス、
P121-P122)やレイトレーシング法(日本図学会、CG
ハンドブック、P417-P418参照)などがあげられる。For the purpose of generating a realistic image, the brightness of each point on the object surface is calculated based on the position of the light source, the reflectance of the object surface, etc., and displayed as a shaded screen. Methods are commonly used. As a typical method, the Z-buffer method (edited by the Institute of Electronics, Information and Communication Engineers, New Media Technology Series computer graphics,
P121-P122) and ray tracing method (The Japanese Society for Graphic Studies, CG)
Handbook, see P417-P418).
【0004】また、Z−バッファ法などによって生成さ
れた画像においては、光源の位置や反射率等によって、
物体の形状や、複数の物体が並んでいるときの配置状況
等が認識し難くなる場合がある。これを解消するために
は、輪郭線および稜線の強調が効果的であることが従来
から知られており、計算機によって、輪郭線および稜線
を自動的に付加する方法が提案されてきた。すなわち、
特公平3−123985号公報記載のように、Z−バッ
ファ法によって生成された距離画像を基に、輪郭線およ
び稜線を検出し、輪郭線および稜線を付加し表示する方
法が提案されている。ここで、輪郭線とは、ある物体の
見えている部分と見えていない部分との境界線を、稜線
とは輪郭線以外の物体の角ばった部分を表す内形線をそ
れぞれ指すものとする。Further, in an image generated by the Z-buffer method or the like, depending on the position of the light source, the reflectance, etc.,
In some cases, it may be difficult to recognize the shape of an object, the arrangement state when a plurality of objects are arranged, and the like. In order to solve this, it has been conventionally known that emphasis on contour lines and ridge lines is effective, and a method of automatically adding contour lines and ridge lines by a computer has been proposed. That is,
As described in JP-B-3-123985, a method has been proposed in which a contour line and a ridge line are detected based on a distance image generated by the Z-buffer method, and the contour line and the ridge line are added and displayed. Here, the contour line refers to a boundary line between a visible portion and a non-visible portion of a certain object, and the ridge line refers to an inner shape line representing an angular portion of the object other than the contour line.
【0005】[0005]
【発明が解決しようとする課題】上記従来技術の距離画
像を基にした輪郭線および稜線を検出する方法には、以
下の問題点が存在する。The method of detecting the contour line and the ridge line based on the range image of the above-mentioned prior art has the following problems.
【0006】(1)距離画像の1次微分値および2次微分
値をとり、これらの値がピーク値をとるところを輪郭線
および稜線として検出している。しかし、この距離画像
は通常整数値にしているために量子化誤差を含んでい
る。例えば、画面に平行に近い平面の距離画像は、ある
部分でステップ状の変化を生じる。このようにステップ
状に変化している部分では微分値がピーク値をとり、輪
郭線または稜線として検出されるので、検出に誤りが生
じてしまう。(1) First-order differential values and second-order differential values of a distance image are taken, and the peaks of these values are detected as contour lines and ridge lines. However, since this range image is usually an integer value, it contains a quantization error. For example, in a range image of a plane that is nearly parallel to the screen, a stepwise change occurs at a certain portion. In such a portion that changes stepwise, the differential value takes a peak value and is detected as a contour line or a ridge line, so an error occurs in the detection.
【0007】(2)輪郭線が物体境界の内側と外側の両側
で検出されるために、表示物体の形状や大きさによらず
一様に太くなる。このために、例えば輪郭線の色を背景
と同色にすると、表示物体が一回り小さく見え、また輪
郭線の色が背景と大きく異なる(例えば輪郭線が黒で背
景が白の場合など)と、人によっては、物体の境界を線
の外側または内側と見てしまい、一回り大きくまたは小
さく見てしまう。このことは、物体が小さく表示される
程、表示物体の面積に占める輪郭線および稜線の割合が
大きくなるため、顕著に現れる。(2) Since the contour line is detected on both the inside and outside of the object boundary, the outline becomes thick regardless of the shape and size of the display object. For this reason, for example, if the color of the contour line is the same as the background, the display object looks a little smaller, and the color of the contour line is significantly different from the background (for example, when the contour line is black and the background is white). Some people see the boundary of an object as the outside or inside of the line, and see it as one size larger or smaller. This is remarkable as the smaller the object is displayed, the larger the proportion of the contour line and the ridge line in the area of the display object becomes.
【0008】本発明の目的は、上記の問題を解決し、表
示物体の輪郭線および稜線を誤りなく検出し、また、太
くならないように輪郭線および稜線を付加することによ
り、物体形状がわかりやすい画像を生成する方法を提供
することにある。An object of the present invention is to solve the above problems, detect the contour line and the ridge line of a display object without error, and add the contour line and the ridge line so as not to make the image thick, thereby making it easy to understand the object shape. Is to provide a method of generating.
【0009】[0009]
【課題を解決するための手段】上記目的を達成するため
に、本発明では、多面体近似で与えられる3次元物体形
状データから、多角形と多角形との連続性すなわち、ど
の多角形とどの多角形とが互いに接しているかを調べ、
この連続性のデータを多角形の辺に対応させると同時
に、この辺が角張った辺(稜線)なのか、多面体近似に
よって平面または曲面が分割された線(以後近似線と呼
ぶ)なのかも判定し、これらを辺属性テーブルとして記
憶しておく。そして、これらの辺を表示する際に、表示
画像上においてこの辺の両脇で、多角形の連続性を満足
していない辺が輪郭線となる。また、連続性を満足して
いる場合には、稜線か近似線なのかは先に判定済みなの
で、稜線も検出できる。そしてまた、辺の描画を1画素
幅とすれば、線幅は太くならない。これにより先の目的
を達成している。In order to achieve the above object, according to the present invention, the continuity between polygons and polygons, that is, which polygons and which polygons are calculated from the three-dimensional object shape data given by the polyhedral approximation. Check if the polygon and the square touch each other,
At the same time as making this continuity data correspond to the sides of a polygon, it is also determined whether this side is an angled side (ridge line) or whether a plane or curved surface is divided by polyhedral approximation (hereinafter referred to as an approximate line). These are stored as an edge attribute table. Then, when these sides are displayed, on both sides of this side on the display image, the sides that do not satisfy the continuity of the polygon are contour lines. If the continuity is satisfied, it is already determined whether the line is the ridge line or the approximate line, so the ridge line can be detected. Also, if the drawing of the side is one pixel wide, the line width does not become thick. This achieves the above purpose.
【0010】[0010]
【作用】本発明ではまず、前記辺属性テーブルを作成
し、通常の表示画像および色の代りに多角形の識別子を
記憶した画像すなわち、多角形ID画像を作成する。そ
して、辺属性テーブルと多角形ID画像とを照合するこ
とにより、多角形の連続性を判定し、不連続ならば輪郭
線と判定し、輪郭線として通常の表示画像に他の部分と
は異なった色で付加する。また、連続である場合には稜
線であるか否をみて、稜線ならば稜線として通常の表示
画像に他の部分とは異なった色で付加する。このように
して物体の輪郭線、稜線を誤りなく検出し、付加するこ
とができ、線幅も1画素幅で表示することができ物体形
状も損なうことはない。In the present invention, first, the side attribute table is created, and an image in which the polygon identifier is stored instead of the normal display image and color, that is, a polygon ID image is created. Then, by comparing the side attribute table with the polygon ID image, the continuity of the polygon is determined, and if it is discontinuous, it is determined as a contour line, and as a contour line, a normal display image differs from other portions. Add in different colors. If it is continuous, it is checked whether it is a ridge line, and if it is a ridge line, it is added as a ridge line to a normal display image in a color different from that of other portions. In this way, the contour line and the ridge line of the object can be detected and added without error, the line width can be displayed with one pixel width, and the object shape is not damaged.
【0011】[0011]
【実施例】以下本発明の実施例を図1〜図11により説
明する。Embodiments of the present invention will be described below with reference to FIGS.
【0012】図1に本発明の全体の処理の流れを示す流
れ図を示す。初めに、全体処理100の概要を示し、詳
細については後に説明することにする。まず初めに、与
えられた3次元形状データから、ステップ101によ
り、輪郭線、稜線を検出するために必要な辺属性テーブ
ルを作成する。次に、ステップ102により隠面消去さ
れた画像を生成する。次に、ステップ103によって多
角形ID画像を作成する。そして、ステップ104によ
って、ステップ101で作成された辺属性テーブルとス
テップ103で作成された多角形ID画像と照合するこ
とにより、各画素が輪郭線か稜線かが判定できる。そし
てステップ105によって、これら輪郭線、稜線を、先
の隠面消去された画像に合成することにより、物体形状
がわかりやすい画像が生成される。また、検出した輪郭
線、稜線のみを表示することにより隠線消去されたワイ
ヤフレーム画像も生成できる。FIG. 1 is a flowchart showing the overall processing flow of the present invention. First, an outline of the overall process 100 will be shown, and details will be described later. First, in step 101, a side attribute table necessary for detecting a contour line and a ridge line is created from the given three-dimensional shape data. Next, in step 102, an image with hidden surfaces removed is generated. Next, in step 103, a polygonal ID image is created. Then, in step 104, by comparing the edge attribute table created in step 101 with the polygon ID image created in step 103, it is possible to determine whether each pixel is a contour line or a ridge line. Then, in step 105, an image in which the object shape is easy to understand is generated by synthesizing the contour line and the ridge line with the image in which the hidden surface is removed. Further, by displaying only the detected contour line and ridge line, a wire frame image with hidden lines removed can be generated.
【0013】次に、本発明を組み込んだシステムの一実
施例について、図10を用いて説明する。このシステム
は、CPU1001、主メモリ1002、グラフィック
スプロセッサ1005、Z−バッファ1008、フレー
ムメモリ1009、多角形IDメモリ1010、表示装
置1011、システムバス1012からなる。Next, an embodiment of a system incorporating the present invention will be described with reference to FIG. This system comprises a CPU 1001, a main memory 1002, a graphics processor 1005, a Z-buffer 1008, a frame memory 1009, a polygon ID memory 1010, a display device 1011 and a system bus 1012.
【0014】ここで、CPU1001は、グラフィック
スプロセッサ1005への描画命令を出したり、辺属性
テーブルの作成(ステップ101)等の処理を行い、主
メモリ1002は表示のためのプログラム、図形データ
の保存エリア1003、辺属性テーブルエリア1004
を含む。グラフィックスプロセッサ1005は、CPU
1001から受けた描画命令を実行し、フレームメモリ
1009および多角形IDメモリ1010に画像を生成
し、通常描画部1006と輪郭線稜線発生部1007を
含む。Z−バッファ1008は隠面消去を実行するため
に必要なデータを記憶し、フレームメモリ1009は図
形を表示するための色情報を記憶し、多角形IDメモリ
1010は輪郭線、稜線を検出するために必要な多角形
ID画像を記憶し、表示装置1011は、フレームメモ
リ1009上の画像を表示する。Here, the CPU 1001 issues a drawing command to the graphics processor 1005 and performs processing such as creation of an edge attribute table (step 101), and the main memory 1002 stores a program for display and graphic data. Area 1003, side attribute table area 1004
including. The graphics processor 1005 is a CPU
The drawing command received from 1001 is executed to generate an image in the frame memory 1009 and the polygon ID memory 1010, and the normal drawing unit 1006 and the contour line ridge line generation unit 1007 are included. The Z-buffer 1008 stores data necessary for executing hidden surface removal, the frame memory 1009 stores color information for displaying a figure, and the polygon ID memory 1010 detects contour lines and ridge lines. The display device 1011 displays the image on the frame memory 1009.
【0015】以下に、全体処理100の各ステップの詳
細を説明する。The details of each step of the overall process 100 will be described below.
【0016】ステップ101の説明:次に辺属性テーブ
ルの作成ステップ101について図2、図4〜図7を用
いて説明する。Description of Step 101: Next, Step 101 of creating an edge attribute table will be described with reference to FIGS. 2 and 4 to 7.
【0017】図2は、立方体の構成を示しており、V1〜
V8は立方体の頂点を示し、P1〜P6は立方体を構成する多
角形(ここでは正方形)を示す。このような立方体は、
例えば図4に示したように、いくつかの多角形の集合
で、それぞれの多角形の頂点(V1,V2など)と各頂点の
法線ベクトル(n1,n2など)で与えられる。ただし、こ
こには図2の立方体のうちの多角形P1〜P3のデータのみ
を示した。一方、図5は、複数の多角形に分割して与え
られた曲面を示し、実線および破線で区切られた部分が
分割された多角形を示し、矢印は各頂点の法線ベクトル
を示す。また、図6は、ここで用いた辺属性テーブルの
構成と、図2の立方体をこの辺属性テーブルに展開した
ものを示す。ただし、図2の立方体は図4のような図形
データで与えられるとする。ここで、辺属性テーブル
の、座標1、法線ベクトル1、座標2、法線ベクトル2
はそれぞれ、辺の始点の座標、始点の法線ベクトル、終
点の座標、終点の法線ベクトルを示し、座標1と座標2
は輪郭線、稜線を検出する際の始点と終点になり、法線
ベクトル1と2は稜線と近似線とを判定する際に用い
る。多角形IDとは、例えば図2に示した多角形P1,P
2,…を識別するための番号であり、多角形ID1と2
はその辺を境に接している多角形の識別子を入力し、こ
の値は輪郭線、稜線の判定時に用いる。辺種別とは、多
角形を構成する辺がどのように2つの多角形を接続して
いるかを示す。ここでは変種別を、単独の辺、多角形と
多角形とを接属する稜線、近似線の3種類に分類し、そ
れぞれ0,1,2とする。ここで、単独の辺とは、図5
の実線で示したような多角形にはさまれていない辺を、
稜線とは、図2の立方体を構成するような辺で、多角形
にはさまれ、その辺の始点と終点のそれぞれの点で2方
向の法線を有する辺を、また、近似線とは、図5の破線
で示したような辺で、多角形にはさまれ、その辺の始点
と終点のそれぞれの点で1方向のみの法線を有する辺を
それぞれ示す。FIG. 2 shows the configuration of a cube, which has V1 ...
V8 indicates the vertices of a cube, and P1 to P6 indicate the polygons (squares here) that make up the cube. A cube like this
For example, as shown in FIG. 4, a set of several polygons is given by the vertices (V1, V2, etc.) of each polygon and the normal vector (n1, n2, etc.) of each vertex. However, only the data of the polygons P1 to P3 of the cube in FIG. 2 are shown here. On the other hand, FIG. 5 shows a curved surface given by dividing it into a plurality of polygons, and shows a polygon obtained by dividing a part delimited by a solid line and a broken line, and an arrow shows a normal vector of each vertex. FIG. 6 shows the structure of the side attribute table used here and the cube of FIG. 2 expanded into this side attribute table. However, it is assumed that the cube of FIG. 2 is given by the graphic data as shown in FIG. Here, in the side attribute table, coordinate 1, normal vector 1, coordinate 2, normal vector 2
Indicates the coordinates of the start point of the side, the normal vector of the start point, the coordinates of the end point, and the normal vector of the end point, respectively.
Indicates the starting point and the ending point when detecting the contour line and the ridge line, and the normal vectors 1 and 2 are used when determining the ridge line and the approximate line. The polygon ID is, for example, the polygons P1 and P shown in FIG.
Numbers for identifying 2, ..., Polygon IDs 1 and 2
Enter the identifier of the polygon that touches that edge, and use this value when determining the contour line or ridge line. The edge type indicates how the edges forming the polygon connect the two polygons. Here, the variants are classified into three types, that is, a single side, a ridge line that polygons are in contact with a polygon, and an approximate line, and are 0, 1 and 2, respectively. Here, the single side is shown in FIG.
The side that is not sandwiched by polygons as shown by the solid line of
A ridge line is a side that forms the cube of FIG. 2, is sandwiched by polygons, and has sides having normals in two directions at the start point and the end point of the side, and the approximate line is The sides as indicated by the broken lines in FIG. 5 are respectively sandwiched by polygons and have a normal line in only one direction at each of the start point and the end point of the side.
【0018】図7は、これら図2、図4、図5に示した
データから図6の辺属性テーブルを作成する処理の流れ
を示している。なお、この処理は、図10におけるCP
U1001で実行され、図4、図5の等の図形データは
図形データエリア1003に、図6の辺属性テーブルは
辺属性テーブルエリア1004に保存される。まず、現
在判定の対象となる辺と、始点と終点の座標が一致する
辺が今までに登録されているかを、判定701で調べ
る。一致する辺が存在しない場合は、新たな辺として追
加する処理707,708を実行する。一致する辺が存
在した場合には、一致した辺に関して処理702を実行
し、続いて判定703により稜線か、近似線なのかを判
定し、稜線であれば処理705を、近似線(この辺は表
示しない)の場合には処理704を実行する。この判定
は、図4および図5に示したように、始点と終点の法線
ベクトルが異なる値(図4)の場合には稜線とし、同じ
値(図5)の場合には近似線とする。これらの処理を全
ての面の全ての辺に関して実行すれば辺属性テーブルが
完成する。FIG. 7 shows the flow of processing for creating the edge attribute table of FIG. 6 from the data shown in FIGS. 2, 4 and 5. It should be noted that this process corresponds to the CP in FIG.
This is executed in U1001, and the graphic data shown in FIGS. 4 and 5 are stored in the graphic data area 1003, and the side attribute table shown in FIG. 6 is stored in the side attribute table area 1004. First, in the determination 701, it is checked whether or not the side that is the target of the current determination and the side whose coordinates of the start point and the end point match have been registered so far. If there is no matching edge, processing 707 and 708 for adding as a new edge is executed. If there is a matching side, the process 702 is executed for the matched side, and then it is determined by the determination 703 whether it is a ridge line or an approximate line. If it is a ridge line, the process 705 is performed. If not), process 704 is executed. As shown in FIGS. 4 and 5, this determination is made to be a ridge line when the normal vectors of the start point and the end point are different values (FIG. 4), and an approximate line when they are the same value (FIG. 5). . The edge attribute table is completed by executing these processes for all the edges of all the surfaces.
【0019】図2に示した立方体に前記の処理を施すと
以下のようになる。辺V1V2に関しては座標1、座標2は
それぞれV1,V2となり、多角形ID1、多角形ID2は
それぞれP1,P2となる。また図4より、多角形P1の頂点
V1の法線ベクトルn1と、多角形P2の頂点V1の法線ベクト
ルn1' とは方向が違い、また、多角形P1の頂点V2の法線
ベクトルn2と、多角形P2の頂点V2の法線ベクトルn2' と
は方向が違うので、辺種別は1となる。一方、図5で与
えられた曲面データの場合には、破線部分では辺種別は
2であり、実線部分では辺種別は0となる。When the above-mentioned treatment is applied to the cube shown in FIG. 2, it becomes as follows. Regarding sides V1 and V2, coordinates 1 and coordinates 2 are V1 and V2, respectively, and polygon ID1 and polygon ID2 are P1 and P2, respectively. Also from FIG. 4, the vertex of the polygon P1
The normal vector n1 of V1 and the normal vector n1 'of the vertex V1 of the polygon P2 have different directions, and the normal vector n2 of the vertex V2 of the polygon P1 and the normal vector of the vertex V2 of the polygon P2. Since the direction is different from the vector n2 ', the edge type is 1. On the other hand, in the case of the curved surface data given in FIG. 5, the side type is 2 in the broken line portion and the side type is 0 in the solid line portion.
【0020】ステップ102の説明:ステップ102
は、Z−バッファ法により、隠面消去とスムーズシェー
ディングが施された画像の生成であり、図形データエリ
ア1003に保存されている図形データをCPU100
1が描画命令に変換し、この描画命令をグラフィックス
プロセッサ1005に送り、グラフィックスプロセッサ
1005内の通常描画部1006で画像を生成し、フレ
ームメモリ1009に色情報を記憶する。なお、Z−バ
ッファ法による多角形の表示については、前記ニューメ
ディア技術シリーズ コンピュータグラフィックスを参
照されたい。Description of step 102: step 102
Is generation of an image subjected to hidden surface removal and smooth shading by the Z-buffer method, and the graphic data stored in the graphic data area 1003 is processed by the CPU 100.
1 converts it into a drawing command, sends this drawing command to the graphics processor 1005, the normal drawing unit 1006 in the graphics processor 1005 generates an image, and stores the color information in the frame memory 1009. For the display of polygons by the Z-buffer method, refer to the above New Media Technology Series Computer Graphics.
【0021】ステップ103の説明:ステップ103
は、Z−バッファ法を用い、色情報の代りに各画素に表
示されている多角形IDを情報とする多角形ID画像を
生成する。図3は、この多角形ID画像を示しており、
図2に示した立方体をある方向から見た表示例を示し、
P1,P2,P3は実線で囲まれた部分の多角形IDを示す。
この画像の生成は、従来の画像生成法と同じであり、図
形データエリア1003に保存されている図形データを
CPU1001が描画命令に変換し、この描画命令をグ
ラフィックスプロセッサ1005に送り、グラフィック
スプロセッサの通常描画部1005内の通常描画部10
06で画像を生成し、色情報のかわりに多角形IDを多
角形IDメモリ1010に記憶する。Description of step 103: step 103
Uses the Z-buffer method to generate a polygon ID image having the polygon ID displayed in each pixel as information instead of color information. FIG. 3 shows this polygonal ID image,
2 shows a display example of the cube shown in FIG. 2 viewed from a certain direction,
P1, P2, and P3 indicate polygon IDs of the part surrounded by the solid line.
This image generation is the same as the conventional image generation method. The CPU 1001 converts the graphic data stored in the graphic data area 1003 into a drawing command, and sends this drawing command to the graphics processor 1005. Normal drawing unit 10 in the normal drawing unit 1005
An image is generated in 06, and the polygon ID is stored in the polygon ID memory 1010 instead of the color information.
【0022】ステップ104,105の説明:次に、ス
テップ104の輪郭線、稜線の検出処理、ステップ10
5の合成処理について説明する。それにさきだち、図1
0の輪郭線稜線発生部1007の詳細を図11を用いて
説明する。これは、線描画部1103、周囲画素読み込
み部1104、輪郭線稜線判定部1105、輪郭線稜線
書き込み部1106からなる。図8は、輪郭線、稜線の
検出処理の流れ図である。Description of steps 104 and 105: Next, the contour line and ridge line detection processing of step 104, step 10
The combination processing of No. 5 will be described. Before that, Fig. 1
Details of the contour line ridge line generation unit 1007 of 0 will be described with reference to FIG. 11. This includes a line drawing unit 1103, a surrounding pixel reading unit 1104, a contour line ridge line determination unit 1105, and a contour line ridge line writing unit 1106. FIG. 8 is a flowchart of a contour line / ridge line detection process.
【0023】まず、処理801で辺属性テーブルエリア
1004内の辺iの辺属性テーブルをCPU1001が
描画命令に変換し、グラフィックスプロセッサ1005
内の輪郭線稜線発生部1007がこの命令を受け取る。First, in process 801, the CPU 1001 converts the side attribute table of the side i in the side attribute table area 1004 into a drawing command, and the graphics processor 1005.
The contour line ridge generation unit 1007 inside receives this command.
【0024】次に、この辺iの画素発生処理802を線
描画部1103が実行する。線描画部1103は、終点
と始点の座標1101を受け取り、描線アルゴリズム
(DDA等)を用いて画素アドレスを発生する。そし
て、その画素位置の周囲8画素に対応する画素アドレス
の多角形IDを、周囲画素読み込み部1104が多角形
IDメモリ1010から読み込む。ここで、画素位置の
周囲8画素とは、図3の301の拡大図図9において、
画素位置が901であるときに、四角形902の901
以外の8画素を示す。Next, the line drawing unit 1103 executes the pixel generation processing 802 for the side i. The line drawing unit 1103 receives the coordinates 1101 of the end point and the start point and generates a pixel address using a drawing algorithm (DDA or the like). Then, the surrounding pixel reading unit 1104 reads the polygon IDs of the pixel addresses corresponding to the eight pixels around the pixel position from the polygon ID memory 1010. Here, the eight pixels around the pixel position are the enlarged view 301 of FIG.
When the pixel position is 901, 901 of the square 902
8 pixels other than are shown.
【0025】そして、輪郭線稜線判定部1105が、周
囲画素読み込み部1104が読み込んだ周囲8画素の多
角形IDと、CPU1001から受け取った辺属性テー
ブルの多角形ID1,2とを比較する判定803を実行
する。そして、周囲8画素のなかに辺属性テーブルの多
角形ID1と2のどちらも含まない場合には、輪郭線稜
線判定部1105は輪郭線稜線書き込み部1106に描
画命令を出さない、すなわち、表示しない処理805を
実行する。しかし、どちらか一方を含むならば輪郭線と
して画像に付加する処理807を実行し、両方を含む場
合には辺種別の判定処理804を実行し、この値が1な
らば稜線として表示する処理806を、2ならば表示し
ない処理805を実行するので、この場合には、輪郭線
稜線判定部1105は輪郭線稜線書き込み部1106に
輪郭線または稜線の描画命令を出す。Then, the contour line ridge determining unit 1105 compares the polygon ID of the surrounding 8 pixels read by the surrounding pixel reading unit 1104 with the polygon IDs 1 and 2 of the side attribute table received from the CPU 1001. Run. If neither of the polygon IDs 1 and 2 of the side attribute table is included in the surrounding 8 pixels, the contour line ridge determination unit 1105 does not issue a drawing command to the contour line ridge writing unit 1106, that is, does not display. The process 805 is executed. However, if one of them is included, the processing 807 of adding it to the image as an outline is executed, and if both are included, the edge type determination processing 804 is executed. If the value is 2, the process 805 of not displaying is executed, and in this case, the contour line ridge line determination unit 1105 issues a contour line or ridge line drawing command to the contour line ridge line writing unit 1106.
【0026】稜線の検出例として、図3の301の拡大
図を図9に示す。この図において、,はそれぞれP
1,P2の多角形IDを示し、左下から右上に引かれてい
る直線は図2の辺V1V2に対応する。この辺属性テーブル
は、図6の辺1に登録されている。いま、図6の辺1を
描画しており、図9の画素901が発生されたとする。
この時、発生画素の周囲8画素は、四角形902で囲ま
れた901を除く8画素である。この画素901は周囲
の8画素に辺1の辺属性テーブルの多角形ID1,2の
両方を含み、この辺の辺種別が1なので稜線となる。As an example of ridge line detection, an enlarged view of 301 in FIG. 3 is shown in FIG. In this figure, and are respectively P
The polygon IDs 1 and P2 are shown, and the straight line drawn from the lower left to the upper right corresponds to the side V1V2 in FIG. This side attribute table is registered in side 1 of FIG. It is now assumed that the side 1 in FIG. 6 is drawn and the pixel 901 in FIG. 9 is generated.
At this time, 8 pixels around the generated pixel are 8 pixels except 901 surrounded by a square 902. The pixel 901 includes both the polygon IDs 1 and 2 of the side attribute table of side 1 in the surrounding 8 pixels, and since the side type of this side is 1, it becomes a ridge.
【0027】フレームメモリに、この装置を用いて検出
した輪郭線、稜線のみを描画すれば、隠線消去されたワ
イヤフレーム画像が作成でき、また、フレームメモリに
スムーズシェーディングが施された画像と、この輪郭
線、稜線を他の部分と異なる色で合成して書き込めば、
物体形状が理解しやすい画像が生成できる。By drawing only the contour lines and ridge lines detected by using this apparatus in the frame memory, a wire frame image with hidden lines removed can be created, and an image with smooth shading in the frame memory, If you combine this contour line and ridge line with a color different from other parts and write it,
An image in which the shape of an object is easy to understand can be generated.
【0028】以上の処理を全ての辺について実施すれ
ば、間違えなく輪郭線、稜線が検出でき、また、物体形
状が理解しやすい画像が生成できる。If the above processing is performed for all sides, the contour line and the ridge line can be detected without mistake, and an image in which the object shape is easy to understand can be generated.
【0029】[0029]
【発明の効果】以上述べたように、本発明によれば、輪
郭線、稜線の検出に必要なデータを作成し、輪郭線、稜
線を検出するので、微分値などによりノイズを拾うこと
もなく、検出誤りはない。また、輪郭線、稜線は1画素
幅の直線として取り扱っているので、これらの線は太く
なることはない。As described above, according to the present invention, the data necessary for detecting the contour line and the ridge line is created and the contour line and the ridge line are detected, so that noise is not picked up by the differential value or the like. , There is no detection error. Further, since the contour line and the ridge line are treated as a straight line having a width of 1 pixel, these lines are not thickened.
【図1】本発明の処理の流れを示す図である。FIG. 1 is a diagram showing a flow of processing of the present invention.
【図2】立方体の構成図である。FIG. 2 is a configuration diagram of a cube.
【図3】多角形ID画像を示す図である。FIG. 3 is a diagram showing a polygon ID image.
【図4】与えられた立方体のデータを示す図である。FIG. 4 is a diagram showing data of a given cube.
【図5】与えられた曲面のデータを示す図である。FIG. 5 is a diagram showing data of a given curved surface.
【図6】辺属性テーブルの構成図である。FIG. 6 is a configuration diagram of an edge attribute table.
【図7】辺属性テーブルの作成処理の流れを示す図であ
る。FIG. 7 is a diagram showing a flow of processing for creating an edge attribute table.
【図8】輪郭線、稜線の検出処理の流れを示す図であ
る。FIG. 8 is a diagram showing a flow of processing for detecting a contour line and a ridge line.
【図9】301の拡大図である。FIG. 9 is an enlarged view of 301.
【図10】本発明の一実施例を示すシステム構成図であ
る。FIG. 10 is a system configuration diagram showing an embodiment of the present invention.
【図11】輪郭線、稜線発生部の詳細図である。FIG. 11 is a detailed view of a contour line / ridge line generation unit.
100…全体処理を示す、 101〜105…本発明の処理手順概要を示す、 301…稜線となる部分の画素の並び、 701〜708…辺属性テーブル作成の処理手順を示
す、 801〜809…輪郭線、稜線の検出処理手順を示す、 901…例として用いた画素、 902…画素901の周囲8画素を示す、 1001…CPU、 1002…主メモリ、 1003…図形データエリア、 1004…辺属性テーブルエリア、 1005…グラフィックスプロセッサ、 1006…通常描画部、 1007…輪郭線稜線発生部、 1008…Z−バッファ、 1009…フレームメモリ、 1010…多角形IDメモリ、 1011…表示装置、 1012…システムバス、 1101,1102…輪郭線稜線発生部が受けるデー
タ、 1103…線描画部、 1104…周囲画素読み込み部、 1105…輪郭線稜線判定部、 1106…輪郭線稜線書き込み部。Reference numeral 100 indicates the overall processing, 101 to 105 indicates the outline of the processing procedure of the present invention, 301 indicates the arrangement of the pixels of the ridge line, 701 to 708 indicates the processing procedure for creating the edge attribute table, 801 to 809 indicates the contour. 901 ... Pixels used as an example, 902 ... 8 pixels surrounding pixel 901, 1001 ... CPU, 1002 ... Main memory, 1003 ... Graphic data area, 1004 ... Edge attribute table area , 1005 ... Graphics processor, 1006 ... Normal drawing unit, 1007 ... Contour line ridge generation unit, 1008 ... Z-buffer, 1009 ... Frame memory, 1010 ... Polygon ID memory, 1011 ... Display device, 1012 ... System bus, 1101 , 1102 ... Data received by the contour line ridge generation unit, 1103 ... Line drawing unit, 1 04 ... peripheral pixel reading unit, 1105 ... contour ridge determination unit, 1106 ... contour ridge write unit.
Claims (8)
を2次元画像として表示する場合において、与えられた
多角形の接続具合の情報、すなわち、多面体近似データ
上で、どの多角形とどの多角形とが互いに接しているか
の情報を得、図形表示がその接続具合を保っていないと
ころを輪郭線として検出し、輪郭線として他の部分とは
異なった色で表示する方法。1. When displaying a three-dimensional object given by polygon approximation data as a two-dimensional image, which polygon is connected to the polygon approximation information, that is, which polygon on the polyhedron approximation data? A method to obtain information on whether polygons are in contact with each other, detect where the graphic display does not maintain the connection condition as a contour line, and display it as a contour line in a different color from other parts.
て、与えられた全ての多角形の全ての辺をたどり多角形
と多角形との接続具合の情報を多角形の辺に対応させて
記憶し、また、画面の各画素に表示されている多角形の
識別子を記憶した画像を生成し、辺をたどり、今たどっ
ている画素の周囲画素に記憶された多角形の識別子が、
接続具合を保っているかどうかを判定し、保っていない
部分を輪郭線とする方法。2. The method for detecting a contour line according to claim 1, wherein all the sides of all the given polygons are traced, and the information on the degree of connection between the polygons is associated with the sides of the polygon. A polygon identifier stored in pixels surrounding the pixel that is being traced is generated by generating an image in which the polygon identifier stored in each pixel of the screen is stored.
A method that determines whether the connection is maintained and uses the outline that is not maintained.
の接続具合を判定する方法において、この接続具合を画
素単位で判定し、判定する画素の周囲8画素に接続した
2つの多角形が両方とも1画素以上表示されていれば接
続具合を保っているとし、どちらか一方の多角形のみが
1画素以上表示されていれば保っていないとする判定方
法。3. A method for determining the connection degree of an image storing the polygon identifier according to claim 2, wherein the connection degree is determined in pixel units, and two polygons connected to eight pixels around the pixel to be determined. If both are displayed with 1 pixel or more, it is determined that the connection is maintained, and if only one of the polygons is displayed with 1 pixel or more, it is not maintained.
を2次元画像として表示する場合において、多角形間の
接線がもともと角張っている線なのか近似によって現れ
る線なのかを分類し、もともと角張っている線のみを稜
線として検出し、稜線として他の部分とは異なった色で
表示する方法。4. When a three-dimensional object given by polygon approximation data is displayed as a two-dimensional image, it is classified whether the tangent line between polygons is originally an angular line or a line appearing by approximation, and is originally classified. A method in which only angular lines are detected as ridgelines and displayed as a ridgeline in a different color from other parts.
て、多角形と多角形との接線上で2方向の法線が存在す
る場合を稜線、法線が1方向のみ存在する場合を近似に
よって現れる線と分類する方法。5. The method for classifying tangents between polygons according to claim 4, wherein there are two directional normals on the tangents between the polygons, and only one ridge is present. To classify as a line that appears by approximation.
と、請求項4の稜線を検出、表示する方法の両者を同時
に実現する方法。6. A method for simultaneously realizing both the method for detecting and displaying a contour line according to claim 2 and the method for detecting and displaying a ridge line according to claim 4.
を2次元画像として表示するための図形生成装置および
表示装置であって、図形データを描画命令に変換する手
段と、前記描画命令を受けて表示画面を生成するグラフ
ィックスプロセッサと、これに命令を送る手段と、表示
するための色情報を記憶するフレームメモリと、前記フ
レームメモリの色情報を表示するための手段と表示多角
形の多角形識別子を表示画面の各画素ごとに記憶するた
めのメモリと、与えられた多面体近似データから多角形
の接続具合の情報を多角形の辺に対応させて生成する手
段と、多角形の接続具合の情報と多角形IDを記憶した
メモリとを照合し輪郭線または稜線を検出し、これら輪
郭線または稜線を他の部分とは異なった色で表示画像に
付加する手段と、を有することを特徴とする図形生成装
置。7. A graphic generation device and a display device for displaying a three-dimensional object given by polyhedral approximation data as a two-dimensional image, and means for converting the graphic data into a drawing command and receiving the drawing command. A graphics processor for generating a display screen, a means for sending a command thereto, a frame memory for storing color information for display, a means for displaying the color information of the frame memory and a display polygon. A memory for storing the polygon identifier for each pixel of the display screen, a means for generating polygon connection information from the given polyhedron approximation data in correspondence with the sides of the polygon, and a polygon connection condition. And the memory storing the polygon ID to detect the contour line or the ridge line, and add the contour line or the ridge line to the display image in a color different from that of the other portions, Figure generating apparatus characterized by having.
れら輪郭線または稜線を他の部分とは異なった色で表示
画像に付加する手段において、直線の画素を発生する手
段と、発生した画素の周囲画素の多角形IDを読み込む
手段と、前記多角形IDが多角形の接続具合の情報を満
足しているかどうかを判定する事により輪郭線または稜
線であるかを判定、検出する手段と、前記輪郭線または
稜線を他の部分とは異なった色で表示画像に付加する手
段と、を有することを特徴とする装置。8. A means for detecting a contour line or a ridge line according to claim 7, and adding the contour line or the ridge line to a display image in a color different from that of other portions, the means for generating straight line pixels, and the generating means. Means for reading the polygon IDs of the pixels surrounding the selected pixel, and means for determining and detecting whether the polygon ID is a contour line or a ridge line by determining whether the polygon ID satisfies the information of the connection condition of the polygon. And a means for adding the contour line or the ridge line to a display image in a color different from that of other portions.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP30771993A JPH07160905A (en) | 1993-12-08 | 1993-12-08 | Drawing method and drawing apparatus for contour line and edge line |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP30771993A JPH07160905A (en) | 1993-12-08 | 1993-12-08 | Drawing method and drawing apparatus for contour line and edge line |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH07160905A true JPH07160905A (en) | 1995-06-23 |
Family
ID=17972428
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP30771993A Pending JPH07160905A (en) | 1993-12-08 | 1993-12-08 | Drawing method and drawing apparatus for contour line and edge line |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH07160905A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6980214B2 (en) | 1999-12-28 | 2005-12-27 | Square Co., Ltd. | Methods and apparatus for shading object drawings in video games |
| US6988059B1 (en) | 1999-09-14 | 2006-01-17 | Kabushiki Kaisha Square Enix | Rendering method and device, game device, and computer-readable recording medium for storing program to render stereo model |
| JP2009031949A (en) * | 2007-07-25 | 2009-02-12 | Square Enix Holdings Co Ltd | Image generating apparatus and method, program, and recording medium |
| JP2009031948A (en) * | 2007-07-25 | 2009-02-12 | Square Enix Holdings Co Ltd | Image generating apparatus and method, program, and recording medium |
-
1993
- 1993-12-08 JP JP30771993A patent/JPH07160905A/en active Pending
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6988059B1 (en) | 1999-09-14 | 2006-01-17 | Kabushiki Kaisha Square Enix | Rendering method and device, game device, and computer-readable recording medium for storing program to render stereo model |
| US6980214B2 (en) | 1999-12-28 | 2005-12-27 | Square Co., Ltd. | Methods and apparatus for shading object drawings in video games |
| JP2009031949A (en) * | 2007-07-25 | 2009-02-12 | Square Enix Holdings Co Ltd | Image generating apparatus and method, program, and recording medium |
| JP2009031948A (en) * | 2007-07-25 | 2009-02-12 | Square Enix Holdings Co Ltd | Image generating apparatus and method, program, and recording medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6600485B1 (en) | Polygon data generation method and image display apparatus using same | |
| US7348989B2 (en) | Preparing digital images for display utilizing view-dependent texturing | |
| US6144387A (en) | Guard region and hither plane vertex modification for graphics rendering | |
| US20090115786A1 (en) | Drawing device, and drawing method | |
| US11651533B2 (en) | Method and apparatus for generating a floor plan | |
| US6686924B1 (en) | Method and apparatus for parallel processing of geometric aspects of video graphics data | |
| CN111985036B (en) | House type frame line drawing method and device, storage medium and electronic equipment | |
| CN114972612B (en) | A kind of image texture generation method and related equipment based on three-dimensional simplified model | |
| US6515658B1 (en) | 3D shape generation apparatus | |
| US6512524B1 (en) | Method and apparatus for object element attribute determination using barycentric coordinates | |
| US6459438B1 (en) | Method and apparatus for determining clipping distance | |
| JPH07200218A (en) | Method and equipment for interlocking of graphical object | |
| US6774897B2 (en) | Apparatus and method for drawing three dimensional graphics by converting two dimensional polygon data to three dimensional polygon data | |
| US5577176A (en) | Method and apparatus for displaying a cursor along a two dimensional representation of a computer generated three dimensional surface | |
| US20030043148A1 (en) | Method for accelerated triangle occlusion culling | |
| JPH07160905A (en) | Drawing method and drawing apparatus for contour line and edge line | |
| JP3703073B2 (en) | Graphic display device and method thereof | |
| JP3586871B2 (en) | 3D CT image display method | |
| TWI874095B (en) | Image displaying method, electronic device, and non-transitory computer readable storage medium | |
| WO2000072269A1 (en) | Method and apparatus for generating outlines | |
| JP3375879B2 (en) | Graphic processing method and apparatus | |
| CN120219597B (en) | Point cloud rendering methods, apparatus and equipment | |
| US12254585B2 (en) | System, information processing apparatus, and method for generating mesh data from two-dimensional point cloud data | |
| JPH11203486A (en) | Display method of translucent object and image display device using the same | |
| JP5321385B2 (en) | Image processing program and computer-readable recording medium |