JP3502901B2 - Three-dimensional graphics image display apparatus and method - Google Patents

Three-dimensional graphics image display apparatus and method

Info

Publication number
JP3502901B2
JP3502901B2 JP1394197A JP1394197A JP3502901B2 JP 3502901 B2 JP3502901 B2 JP 3502901B2 JP 1394197 A JP1394197 A JP 1394197A JP 1394197 A JP1394197 A JP 1394197A JP 3502901 B2 JP3502901 B2 JP 3502901B2
Authority
JP
Japan
Prior art keywords
point
arc
sequence
coordinate
ellipse
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.)
Expired - Lifetime
Application number
JP1394197A
Other languages
Japanese (ja)
Other versions
JPH10208069A (en
Inventor
豊 上野
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.)
National Institute of Advanced Industrial Science and Technology AIST
Original Assignee
National Institute of Advanced Industrial Science and Technology AIST
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 National Institute of Advanced Industrial Science and Technology AIST filed Critical National Institute of Advanced Industrial Science and Technology AIST
Priority to JP1394197A priority Critical patent/JP3502901B2/en
Publication of JPH10208069A publication Critical patent/JPH10208069A/en
Application granted granted Critical
Publication of JP3502901B2 publication Critical patent/JP3502901B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、3次元グラフィッ
クスにおいて、球の隠面処理及び陰影表示を行う場合に
好適な3次元グラフィックス画像表示装置及び方法に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a three- dimensional graphics image display device and method suitable for performing hidden surface processing and shadow display of a sphere in three-dimensional graphics .

【0002】[0002]

【従来の技術】3次元グラフィックスにおいて球の隠面
処理及び陰影表示を行うのには、従来は球を多面体で近
似し、面となるポリゴンの陰影表示をなめらかにするス
ムースシェーディング法によって球を近似して表示して
いた。しかしながら、この方法では球の輪郭が多角形に
なることが避けられないことと、それを円に近づけて品
質を上げるとポリゴンの数が多くなるため描画時間が長
くかかるという問題があった。
2. Description of the Related Art The hidden surface of a sphere in three-dimensional graphics
In order to perform processing and shading display, conventionally, a sphere is approximated by a polyhedron, and a sphere is approximated and displayed by a smooth shading method that smoothes shading display of polygons to be surfaces. However, this method has a problem that the contour of the sphere is inevitable to be polygonal and that if the quality is approximated to a circle and the quality is increased, the number of polygons is increased and thus the drawing time is long.

【0003】一方、円弧の描画方法としてこれまでにも
様々なアルゴリズムが報告されているが、それは球の
面処理及び陰影表示には利用されていない。たとえばブ
レセンハムのアルゴリズムでは、整数演算のみを用いて
継ぎ目のない点列を発生させている。特開平7−935
69号のアルゴリズムでは、上記プレセンハムのアルゴ
リズムを改良して、太さのある円弧と楕円について高速
に行えるようにしている。
Meanwhile, although the arc so far different even algorithms as a drawing method have been reported, it hidden spheres
It is not used for surface processing and shading display. For example, Bresenham's algorithm uses only integer arithmetic to generate seamless point sequences. JP-A-7-935
In the No. 69 algorithm, the above-mentioned Presenham's algorithm is improved so that it can be performed at high speed for thick arcs and ellipses.

【0004】Dieter W. Fellner & Christoph Helmberg
は整数演算とシフト演算のみを用いる新しい方法で一般
的な楕円弧を描画する方法を発表している。(ACM Tran
sactions on Graphics,Vol.12,No.3,(1993)"Rubust Ren
dering of General Ellipsesand Elliptical Arc
s.")。
Dieter W. Fellner & Christoph Helmberg
Has published a new method for drawing general elliptic arcs using only integer and shift operations. (ACM Tran
sactions on Graphics, Vol.12, No.3, (1993) "Rubust Ren
dering of General Ellipsesand Elliptical Arc
s. ").

【0005】[0005]

【発明が解決しようとする課題】これらのアルゴリズム
を使用した表示方法は、専用のハードウェアで実施する
ことによって高速な処理が可能である。しかしながら、
いずれの方法も球の隠面 処理及び陰影表示に適用するこ
とについて考慮されておらず、実際に適用された例は報
告されていない。
The display method using these algorithms enables high-speed processing by being implemented by dedicated hardware. However,
Neither method is considered for application to hidden surface treatment and shading of spheres, and no actual application example has been reported.

【0006】そこで、本発明の目的は、球の隠面処理及
陰影表示適用可能で円弧の描画時間を高速化できる
次元グラフィックス画像表示装置及び方法を提供するこ
とにある。
Therefore, an object of the present invention is to provide a hidden surface treatment for spheres.
And shadow display can be applied to speed up arc drawing time 3
A three-dimensional graphics image display device and method are provided.

【0007】[0007]

【課題を解決するための手段】このような問題を達成す
るために、請求項1に記載の画像表示装置は、円弧を構
成する点列に関して表示画面上の前記点列のn+1番目
の点の座標x(n+1),y(n+1)を
In order to achieve such a problem, an image display device according to a first aspect of the present invention relates to a point sequence constituting an arc, of the (n + 1) th point of the point sequence on the display screen. Coordinates x (n + 1), y (n + 1)

【0008】[0008]

【数9】 x(n+1)=x(n)・cos(t)-y(n)・sin(t) y(n+1)=x(n)・sin(t)+y(n)・cos(t)[Equation 9] x (n + 1) = x (n) ・ cos (t) -y (n) ・ sin (t) y (n + 1) = x (n) ・ sin (t) + y (n) ・ cos (t)

【0009】(ここで、tはn番目の点をn+1番目の
点に回転移動させる角度、円の中心を座標原点とする)
(Where t is the n + 1th point of the n + 1th point
The angle to rotate and move to a point, and the center of the circle as the coordinate origin)

【0010】の漸化式で表し、円弧の中心、該円弧の始
点および終点位置を示す情報を指示する指示手段と、当
該指示された情報に基き、前記漸化式により円弧の点列
の表示画面上の各座標を取得する演算処理手段と、当該
取得した各座標の位置に前記点列を表示することにより
円弧を表示すると共に、球面を表す円の、走査線に沿っ
た水平なピクセルの点列の法線ベクトルと深さ座標を求
めながら次々に塗りつぶしを行うことにより球の隠面処
理及び陰影処理を実現する表示制御手段とを具えたこと
を特徴とする。
Representation by the recurrence formula, indicating means for indicating the center of the arc, the start point and the end position of the arc, and the display of the arc point sequence by the recurrence formula based on the instructed information. Arithmetic processing means for acquiring each coordinate on the screen, and displaying the arc by displaying the point sequence at the position of each acquired coordinate, and along a scanning line of a circle representing a spherical surface.
The normal vector and depth coordinate of the point sequence of horizontal pixels
The sphere's hidden area is treated by filling it one after another while
And display control means for realizing the processing of shadow and shadow processing .

【0011】請求項2の発明は、請求項1に記載の3次
元グラフィックス画像表示装置において、前記円弧は円
であり、前記漸化式の中のsin(t),cos(t)
The invention of claim 2 is the third order of claim 1.
In the original graphics image display device, the arc is a circle, and sin (t), cos (t) in the recurrence formula
To

【0012】[0012]

【数10】 sin(t)=t cos(t)=1-t2/2 で近似することを特徴とする。Equation 10], characterized in that approximated by sin (t) = t cos ( t) = 1-t 2/2.

【0013】請求項3に記載の3次元グラフィックス画
像表示装置は、楕円円弧を構成する点列に関して表示画
面上の前記点列のn+1番目の点の座標x(n+1),
u(n+1)を
A three-dimensional graphics image according to claim 3
The image display device has a coordinate x (n + 1) of the (n + 1) th point of the point sequence on the display screen with respect to the point sequence forming the elliptical arc.
u (n + 1)

【0014】[0014]

【数11】 x(n+1)=x(n)・cos(t)-y(n)・sin(t) y(n+1)=x(n)・sin(t)+y(n)・cos(t) u(n+1)=b/a・y(n+1)[Equation 11] x (n + 1) = x (n) ・ cos (t) -y (n) ・ sin (t) y (n + 1) = x (n) ・ sin (t) + y (n) ・ cos (t) u (n + 1) = b / a ・ y (n + 1)

【0015】(ここで、aは楕円のx軸の長さ、bはy
軸の長さ、楕円の中心を原点とする)の漸化式で表わ
し、楕円の中心、該楕円の円弧の始点、終点位置を示す
情報を指示する指示手段と、当該指示された情報に基
き、前記漸化式により楕円の点列の表示画面上の各座標
を取得する演算処理手段と、当該取得した各座標の位置
に前記点列を表示することにより楕円を表示すると共
に、球面を表す円の、走査線に沿った水平なピクセルの
点列の法線ベクトルと深さ座標を求めながら次々に塗り
つぶしを行うことにより球の隠面処理及び陰影処理を実
現する画像表示制御手段とを具えたことを特徴とする。
(Where a is the length of the x-axis of the ellipse, and b is y.
The length of the axis, the origin of the ellipse is used as the origin), and the instruction means for instructing the information indicating the center of the ellipse, the starting point and the ending point of the arc of the ellipse, and the information based on the indicated information. an arithmetic processing means for obtaining respective coordinates on the display screen of the point sequence of the ellipse by the recurrence formula, when you view the ellipse by displaying the point sequence to the positions of the coordinates of the acquired co
Of the horizontal pixel along the scan line of the circle representing the sphere
Paint one after another while obtaining the normal vector and depth coordinate of the point sequence
Performs hidden surface processing and shadow processing for the sphere by performing crushing.
And an image display control unit that appears.

【0016】請求項4の発明は、表示のための円弧を構
成する点列の座標を計算して表示する3次元グラフィッ
クス画像表示方法において、円弧を構成する点列に関し
て表示画面上の前記点列のn+1番目の点で座標x(n
+1),y(n+1)を
According to a fourth aspect of the present invention , a three-dimensional graphic for calculating and displaying coordinates of a sequence of points forming an arc for display.
In the cursor image display method, the coordinate x (n) at the (n + 1) th point of the point sequence on the display screen with respect to the point sequence forming the arc.
+1), y (n + 1)

【0017】[0017]

【数12】 x(n+1)=x(n)・cos(t)-y(n)・sin(t) y(n+1)=x(n)・sin(t)+y(n)・cos(t)[Equation 12] x (n + 1) = x (n) ・ cos (t) -y (n) ・ sin (t) y (n + 1) = x (n) ・ sin (t) + y (n) ・ cos (t)

【0018】(ここでtはn番目の点をn+1番目の点
に回転移動させる角度、円の中心を座標原点とする)
(Where t is the nth point and the (n + 1) th point
The angle to rotate and move , the center of the circle is the coordinate origin)

【0019】の漸化式で表し、円弧の中心、該円弧の始
点および終点位置を示す情報を指示し、当該指示された
情報に基き、前記漸化式により円弧の点列の表示画面上
の各座標を取得し、当該取得した各座標の位置に前記点
列を表示することにより円弧を表示すると共に、球面を
表す円の、走査線に沿った水平なピクセルの点列の法線
ベクトルと深さ座標を求めながら次々に塗りつぶしを行
うことにより球の隠面処理及び陰影処理を実現すること
を特徴とする。
The information indicating the center of the arc, the starting point and the end point of the arc is indicated by the recurrence formula of, and based on the instructed information, the point sequence of the arc is displayed on the display screen by the recurrence formula. Acquire each coordinate and display the above-mentioned point sequence at the position of each acquired coordinate to display an arc and
The normal of the point array of horizontal pixels along the scanline of the representing circle.
Fill one after another while obtaining the vector and depth coordinates.
It is characterized in that the hidden surface processing and the shadow processing of the sphere are realized by carrying out.

【0020】請求項5の発明は、請求項4に記載の3次
元グラフィックス画像表示方法において、前記円弧は円
であり、前記漸化式の中のsin(t),cos(t)
The invention of claim 5 is the third order of claim 4.
In the original graphics image display method, the arc is a circle, and sin (t), cos (t) in the recurrence formula
To

【0021】[0021]

【数13】 sin(t)=t cos(t)=1-t2/2 で近似することを特徴とする。Equation 13], characterized in that approximated by sin (t) = t cos ( t) = 1-t 2/2.

【0022】請求項6の発明は、表示のための楕円の円
弧を構成する点列の座標を計算して表示する3次元グラ
フィックス画像表示方法において、楕円円弧を構成する
点列に関して表示画面上の前記点列のn+1番目の点の
座標x(n+1),u(n+1)を
The invention of claim 6 is a three-dimensional graph for calculating and displaying the coordinates of a sequence of points forming an arc of an ellipse for display.
In the fixed image display method, the coordinates x (n + 1), u (n + 1) of the (n + 1) th point of the point sequence on the display screen with respect to the point sequence forming the elliptic arc are calculated.

【0023】[0023]

【数14】 x(n+1)=x(n)・cos(t)-y(n)・sin(t) y(n+1)=x(n)・sin(t)+y(n)・cos(t) u(n+1)=b/a・y(n+1)[Equation 14] x (n + 1) = x (n) ・ cos (t) -y (n) ・ sin (t) y (n + 1) = x (n) ・ sin (t) + y (n) ・ cos (t) u (n + 1) = b / a ・ y (n + 1)

【0024】(ここで、aは楕円のx軸の長さ、bはy
軸の長さ、楕円の中心を原点とする)の漸化式で表わ
し、楕円の中心、該楕円の円弧の始点,終点位置を示す
情報を指示し、当該指示された情報に基き、前記漸化式
により楕円の点列の表示画面上の各座標を取得し、当該
取得した各座標の位置に前記点列を表示することにより
楕円を表示すると共に、球面を表す円の、走査線に沿っ
た水平なピクセルの点列の法線ベクトルと深さ座標を求
めながら次々に塗りつぶしを行うことにより球の隠面処
理及び陰影処理を実現することを特徴とする。
(Where a is the length of the x-axis of the ellipse, b is y
The length of the axis and the center of the ellipse are used as the origin) and the information indicating the center of the ellipse, the starting point and the end point of the arc of the ellipse is designated, and based on the designated information, the Acquire each coordinate on the display screen of the point sequence of the ellipse by the chemical formula, and display the ellipse by displaying the point sequence at the position of each obtained coordinate, and display the ellipse along the scanning line of the circle representing the spherical surface.
The normal vector and depth coordinate of the point sequence of horizontal pixels
The sphere's hidden area is treated by filling it one after another while
It is characterized in that it realizes processing and shadow processing .

【0025】[0025]

【発明の実施の形態】以下、図面を参照して本発明の実
施の形態を詳細に説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

【0026】図1は本発明を適用したグラフィック用L
SIの回路構成を示す。
FIG. 1 shows a graphic L to which the present invention is applied.
The circuit configuration of SI is shown.

【0027】グラフィックLSIはパーソナルコンピュ
ータ等の画像処理装置(ホストシステム)内に搭載され
る。図1において、パーソナルコンピュータ等のホスト
システムのシステムバス1にグラフィック用LSIが接
続される。グラフィックLSIは、DDA(デジタル微
分解析器によって描画すべき図形の点列を発生する点で
は従来のLSIと同様であり、既存の技術の範囲内で作
成することができる。
The graphic LSI is mounted in an image processing device (host system) such as a personal computer. In FIG. 1, a graphic LSI is connected to a system bus 1 of a host system such as a personal computer. The graphic LSI is similar to the conventional LSI in that it generates a point sequence of a figure to be drawn by a DDA (digital differential analyzer), and can be created within the range of existing technology.

【0028】描画命令、すなわち、円,楕円,球など、
描画すべき命令の種類、中心位置や始点,終点位置等の
描画に必要なパラメータ情報を含む描画命令が上記ホス
トシステムからシステムバス1を介してグラフィック命
令コントロールユニット2に送られる。描画命令に含ま
れるパラメータ情報はRAM3に一時保存される。
Drawing commands, ie circles, ellipses, spheres, etc.
A drawing command including parameter information necessary for drawing such as the type of command to be drawn, center position, start point, end point position, etc. is sent from the host system to the graphic command control unit 2 via the system bus 1. The parameter information included in the drawing command is temporarily stored in the RAM 3.

【0029】DDA(デジタル微分解析器)ユニット4
は予め搭載した画像処理プログラムに従って描画すべき
図形の画素位置を計算し、ピクセルコントロールユニッ
ト5を介してビデオフレームバッファ7に図形を描画す
る。
DDA (digital differential analyzer) unit 4
Calculates the pixel position of the figure to be drawn according to the image processing program installed in advance, and draws the figure in the video frame buffer 7 via the pixel control unit 5.

【0030】ALU(論理演算ユニット)10は、RA
M3に格納されたパラメータ情報を使用して、描画命令
で指示された図形の各画素位置を計算する。この計算方
法については後で詳しく説明する。
The ALU (logical operation unit) 10 is an RA
Using the parameter information stored in M3, each pixel position of the figure designated by the drawing command is calculated. This calculation method will be described in detail later.

【0031】この計算のために、レジスタ群11が変数
の値を保持し、フラグレジスタ12がフラグ情報を保持
する。レジスタ13はRAM3に対して、データを読み
/書きするためのアドレスを保持する。
For this calculation, the register group 11 holds the value of the variable and the flag register 12 holds the flag information. The register 13 holds an address for reading / writing data in the RAM 3.

【0032】RAM3内には上記画素位置計算で使用す
る変数の値および計算結果を記憶する領域21と、計算
結果を順次にピクセルコントロールユニット5に引渡す
ための記憶領域(ピクセルライトFIFO)22が設け
られている。本実施の形態では、計算結果は描画する点
列の座標(X,Y,Z)と、法線ベクトルから求められ
る輝度Bとが得られる。
The RAM 3 is provided with an area 21 for storing the values of the variables used in the pixel position calculation and the calculation result, and a storage area (pixel light FIFO) 22 for sequentially transferring the calculation result to the pixel control unit 5. Has been. In the present embodiment, as the calculation result, the coordinates (X, Y, Z) of the drawn point sequence and the brightness B obtained from the normal vector are obtained.

【0033】ピクセルライトコントロールユニット5は
ピクセルライトFIFO22から座標データと輝度デー
タを読み出し、ビデオフレームバッファ7にZバッファ
法を用いて描画する。これにより、描画された点列の画
像データの示すZ値がZバッファ8のZ値よりも前面に
ある点のみが輝度Bで描画される。ビデオフレームバッ
ファ7の画像データはビデオコントロールユニット6に
おいてデジタル/アナログ変換されて、ビデオ信号とし
てモニタ9に送られる。
The pixel light control unit 5 reads the coordinate data and the luminance data from the pixel light FIFO 22 and draws them in the video frame buffer 7 using the Z buffer method. As a result, only the point whose Z value indicated by the drawn image data of the point sequence is in front of the Z value of the Z buffer 8 is drawn with the brightness B. The image data in the video frame buffer 7 is digital-to-analog converted in the video control unit 6 and sent to the monitor 9 as a video signal.

【0034】これによりモニタ9では描画命令で指示さ
れた図形が表示される。
As a result, the monitor 9 displays the figure designated by the drawing command.

【0035】(1)円弧の点列を発生する方法 離散的な点列で図8のような円の円弧を表わす時に、そ
の点列は次の式で表されるX(n),Y(n)を整数化
して対応する格子上の座標を得る(図9参照)。簡単の
ため、円の中心を原点にとる。
(1) Method for generating a point sequence of circular arcs When a circular arc of a circle as shown in FIG. 8 is represented by a discrete sequence of points, the sequence of points is expressed by the following equation X (n), Y ( n) is converted into an integer to obtain the coordinate on the corresponding grid (see FIG. 9). For simplicity, the center of the circle is taken as the origin.

【0036】[0036]

【数17】 x(n)=r・cos(t・n) y(n)=r・sin(t・n) tは点のなす角度であり、t=1/rとおくと、格子上
につなぎ目のない点列が得られる。この点列は、2次元
座標の回転行列を使って次のような漸化式で表わすこと
ができる。
X (n) = r ・ cos (t ・ n) y (n) = r ・ sin (t ・ n) t is the angle formed by the points, and if t = 1 / r, then on the grid A seamless point sequence is obtained. This sequence of points can be expressed by the following recurrence formula using a rotation matrix of two-dimensional coordinates.

【0037】[0037]

【数18】 x(n+1)=x(n)・cos(t)-y(n)・sin(t) y(n+1)=x(n)・sin(t)+y(n)・cos(t) sin()およびcos()を近似して、数2式の漸化
式を円弧の1回転分実施する場合は、すなわち、円周の
長さ2πR回程度実行する場合は、数2式はテイラー展
開により数19式を得る。なおt3 より高次の項は無視
できる。
(18) x (n + 1) = x (n) ・ cos (t) -y (n) ・ sin (t) y (n + 1) = x (n) ・ sin (t) + y (n ) ・ Cos (t) sin () and cos () are approximated to execute the recurrence formula of Formula 2 for one rotation of the arc, that is, to execute the circumference length of about 2πR times. , Formula 2 obtains Formula 19 by Taylor expansion. Note that terms higher than t 3 can be ignored.

【0038】[0038]

【数19】 sin(t)≒t cos(t)≒1-t2/2 これによって、点列の差分を計算すると、By Equation 19] sin (t) ≒ t cos ( t) ≒ 1-t 2/2 This is calculated the difference of the point sequence,

【0039】[0039]

【数20】 Δx=x(n+1)-x(n)=-y/r-1/2r2x Δy=y(n+1)-y(n)=+x/r-1/2r2y 円弧の1/8回転分実施する場合は、t2 の項がx=
0,y=0の時以外は無視できて、
[Expression 20] Δx = x (n + 1) -x (n) =-y / r-1 / 2r 2 x Δy = y (n + 1) -y (n) = + x / r-1 / 2r When performing 1/8 rotation of 2 y arc, the term of t 2 is x =
It can be ignored except when 0 and y = 0,

【0040】[0040]

【数21】 Δx=-y/r (ただしy=0 の時は-1/2r2x ) Δy=x/r xおよびyは実数であるが、その整数部分が変化したと
きに描画する点が移動することになるので、整数部と少
数部を別々の整数変数として持ち、少数部がオーバーフ
ロー、アンダーフローしたときに整数部の値を増加およ
び減少させて、同時に点列の格子点上の位置を変化させ
ればよい。この少数部をrを分母とする分数の分子で表
すとX(n)=[X(n)の整数部]+fX(n)/r
である。この少数部分の変数をxおよびyについてそれ
ぞれfx,fyとすると、数21式からΔxおよびΔy
は絶対値が1を越えないことがわかるので、数20式に
おける漸化式の計算においては少数部分fxとfyにつ
いてだけ計算すればよい。数20式の両辺にrをかける
とrでの割り算はなくなり、次の式を得る。
[Expression 21] Δx = -y / r (however, -1 / 2r 2 x when y = 0) Δy = x / r x and y are real numbers, but the points to draw when the integer part changes Since the integer part and the decimal part are separate integer variables, the value of the integer part is increased and decreased when the decimal part overflows and underflows, and at the same time You can change the position. When this fractional part is expressed by a numerator of a fraction with r as a denominator, X (n) = [integer part of X (n)] + fX (n) / r
Is. Assuming that the variables of this minority part are fx and fy for x and y, respectively, from equation (21), Δx and Δy
Since it can be seen that the absolute value does not exceed 1, only the minority parts fx and fy need to be calculated in the calculation of the recurrence formula in Formula 20. When r is applied to both sides of the equation (20), division by r is lost and the following equation is obtained.

【0041】[0041]

【数22】 fx(n+1)=fx(n)-y(n) fy(n+1)=fy(n)+x(n) この少数部の変数は0〜(r−1)の値を取り、その範
囲を超えた場合に整数部分を変化させる。
[Mathematical formula-see original document] fx (n + 1) = fx (n) -y (n) fy (n + 1) = fy (n) + x (n) This fractional part variable is 0- (r-1). Takes a value and changes the integer part when it exceeds that range.

【0042】この処理のフローチャートを図2に示し
た。図2の処理を説明する。ステップ101において円
の中心座標を(x0,y0)とした円弧の座標の初期値
を設定している。ステップ102において原点を中心と
する円の座標(rX,rY)と少数部分変数を初期化し
てステップ103で少数部分の計算を繰り返す。ステッ
プ104においてr以上になったときに座標をインクリ
メント、ステップ107において0以下になったときに
座標をデクリメントする。ステップ111においてrX
>rYとなるまで繰り返すことによって1/8の円弧、
すなわちt=0〜45度の点列を得る。円弧はx軸y軸
に対して対称であるので、得られる1/8の円弧を使っ
て全部の円を描画できる。
A flowchart of this process is shown in FIG. The process of FIG. 2 will be described. In step 101, the initial value of the coordinate of the arc whose center coordinate of the circle is (x0, y0) is set. In step 102, the coordinates (rX, rY) of the circle centered on the origin and the minority part variables are initialized, and in step 103, the calculation of the minority part is repeated. In step 104, the coordinate is incremented when r or more, and in step 107, the coordinate is decremented when 0 or less. RX in step 111
By repeating until rY> 1/8 arc,
That is, a point sequence of t = 0 to 45 degrees is obtained. Since the circular arc is symmetric with respect to the x-axis and the y-axis, the entire 1/8 circle can be drawn using the obtained 1/8 circular arc.

【0043】描画したい円弧の大きさによっては凹凸の
ない円弧を得るために、次のような工夫が必要である。
円弧の直径が偶数の場合は、円の中心を格子からx,y
共に0.5づつずらし、角度tの初期値を0として発生
させた点列の少数点以下を切捨てた点列を利用する。中
心がずれているので点列X(n),Y(n)は初めから
少数部を持ち、それに対応してその少数部変数fx,f
yの初期値に0.5に対応する値(r/2)を設定して
おく。直径が奇数の場合は、半径は少数部を持つことに
なるので、それに対応して、X(n)の少数部fxの初
期値に0.5に対応する値(r/2)を設定し、円の中
心を格子と一致させ、角度tの初期値を1/2rとして
発生させた点列の少数点以下を切捨てた点列を利用す
る。
Depending on the size of the arc to be drawn, the following measures are necessary to obtain an arc having no unevenness.
If the diameter of the circular arc is even, the center of the circle is x, y from the grid.
Both are shifted by 0.5, and the point sequence generated by setting the initial value of the angle t to 0 and cutting off the decimal point or less is used. Since the centers are offset, the point sequences X (n) and Y (n) have a decimal part from the beginning, and correspondingly, the decimal part variables fx and f
A value (r / 2) corresponding to 0.5 is set as the initial value of y. If the diameter is odd, the radius will have a fractional part, so correspondingly, set a value (r / 2) corresponding to 0.5 to the initial value of the fractional part fx of X (n). , The center of the circle is matched with the lattice, and the point sequence generated by setting the initial value of the angle t to ½r is truncated.

【0044】Fellner らの報告では(数21式)による
計算は誤差が大きいと指摘しているが、1/8の円弧を
考える場合には誤差は無視できる範囲であり、また次に
述べる(数20式)に基づく計算は、彼らの方法と同じ
精度がある。さらに球を描画する場合に利用しても誤差
は十分小さく実用的である。
In Fellner et al.'S report, the calculation by (Equation 21) has a large error, but when considering a 1/8 circular arc, the error is in a negligible range. Calculations based on (20) are as accurate as their method. Further, even if it is used for drawing a sphere, the error is sufficiently small and practical.

【0045】(2)楕円弧の点列を発生する方法 図10に示すような楕円円弧の点列はy座標について新
しい変数U(n)を使うことにする。xおよびy方向の
軸の長さをa,bとして
(2) Method for generating a sequence of points of an elliptical arc A sequence of points of an elliptical arc as shown in FIG. 10 uses a new variable U (n) for the y coordinate. Let the lengths of the axes in the x and y directions be a and b

【0046】[0046]

【数23】 x(n)=a・cos(n・t) U(n)=b・sin(n・t) ここで、Y(n)=a/b・U(n)とおくと点列(X
(n),Y(n))は半径aの円弧であり、U(n)は
円弧の点列から求められるが、次のようにして除算と積
算を省略することができる。
X (n) = a · cos (n · t) U (n) = b · sin (n · t) where Y (n) = a / b · U (n) Column (X
(N) and Y (n) are arcs having a radius a, and U (n) is obtained from the point sequence of the arcs, but division and integration can be omitted as follows.

【0047】変数U(n)についてX,Yと同じように
整数部と少数部の変数に分けて、少数部を分母がbの分
数として点列の計算を繰り返す。すなわち、(数22
式)と同時にUの少数部の分子fUについて次の式も計
算する。
The variable U (n) is divided into an integer part and a decimal part as in the case of X and Y, and the calculation of the point sequence is repeated with the decimal part as the fraction of b. That is, (Equation 22
At the same time, the following equation is calculated for the numerator fU of the minority part of U.

【0048】[0048]

【数24】fU(n)=fU(n)+x(n) fUに加算される値x(n)は少数点以下にaを積載し
た大きさなので、これをa2 /bで割り算すれば求めた
い値U(n)=y・b/aが得られる。すなわち、(数
24式)で計算したfU(n)をa2 /bを分母とする
分数の分子とみなして、オーバーフローおよびアンダー
フローを適用することでU(n)の整数部が得られる。
[Equation 24] fU (n) = fU (n) + x (n) Since the value x (n) added to fU is the size in which a is loaded below the decimal point, divide this by a 2 / b. Thus, the desired value U (n) = y · b / a can be obtained. That is, the integer part of U (n) is obtained by regarding the fU (n) calculated by (Equation 24) as the numerator of the fraction with a 2 / b as the denominator and applying overflow and underflow.

【0049】結局、初めに1回だけa2 /bを求めるの
に除算と積算が必要であるが、繰り返し演算は加減算と
比較処理だけで行うことができる。さらに、a<bの時
は、X(n),Y(n)の円弧を計算するときの少数部
の分母をaでなくbにすると、U(n)の少数部の分母
はaにすることができ、除算と積算はなくなる。
After all, although division and integration are required to obtain a 2 / b only once at the beginning, the repetitive calculation can be performed only by addition and subtraction and comparison processing. Further, when a <b, if the denominator of the decimal part when calculating the arcs of X (n) and Y (n) is b instead of a, the denominator of the decimal part of U (n) is a. You can, and you will not be able to divide and integrate.

【0050】楕円の場合は、XとYの入れ替えについて
対称性がないので、円周の1/4の点列を求める必要が
あり、(数20式)に基づいた計算が必要である。それ
には(数21式)の計算に加えて1/2r2 のかかる2
つの項についても計算する。これらについてもこれまで
と同様に分数で扱う。分母を2r2 とする分数で表現し
てその分子を整数変数としてgXとgYに持ち、同様に
オーバーフロー、アンダーフローを上位の項であるfX
とfYに繰り上げ、または借り上げをする。数4式から
gX,gYについて次の式を得る。
In the case of an ellipse, since there is no symmetry in the exchange of X and Y, it is necessary to find a point sequence of 1/4 of the circumference, and calculation based on (Equation 20) is necessary. To it in addition to the calculation of the equation (21 formula) 1 / 2r 2-consuming 2
We also calculate for one term. These are also treated as fractions as before. The denominator is expressed as a fraction with 2r 2 and its numerator is an integer variable in gX and gY. Similarly, overflow and underflow are the higher terms fX.
And fY, or borrow. From the equation (4), the following equations are obtained for gX and gY.

【0051】[0051]

【数25】 gX(n+1)=gx(n)-2*fy-rX gY(n+1)=gy(n)+2*fx-rY 変数Uについての式はYについての式と同じになるので
省略できて、gYのオーバーフローとアンダーフローを
fUにも適用すればよい。
GX (n + 1) = gx (n) -2 * fy-rX gY (n + 1) = gy (n) + 2 * fx-rY The formula for the variable U is the same as the formula for Y. Therefore, it can be omitted and the overflow and underflow of gY can be applied to fU.

【0052】汎用性のために、この楕円弧の点列を発生
させる方法を使った発生器とみなし、これを使って呼ぶ
ことに次の点を得るサブルーチンとして利用できるよう
にする。この楕円弧発生サブルーチンとそれを利用した
楕円の描画フローチャートを図3〜図5に示した。簡単
のために全楕円の1/4の点列を発生する部分を示し
た。図3のステップ201において、楕円の主軸aとも
う一つの軸の半径の長さbと、楕円弧の点列の初期値の
整数部、およびそれぞれの少数部分の初期値はaおよび
bを分母とする分数の分子の値で楕円弧発生器の初期値
を設定する。詳細を図6に示しておく。ステップ202
において楕円弧発生サブルーチンを呼び、円および楕円
弧を表わす次の点を得る。点列のデータとして、円弧と
なる点列の2つの座標軸XとY、そしてXと合わせて楕
円弧となる変数Uの合計3つの整数値と、楕円の中心か
らのベクトルrX,rY,rUが得られる。
For the sake of versatility, it is regarded as a generator using the method of generating the point sequence of this elliptic arc, and it can be used as a subroutine for obtaining the next point by calling it. This elliptic arc generation subroutine and the ellipse drawing flow chart using it are shown in FIGS. For the sake of simplicity, the part that generates a point sequence of 1/4 of the full ellipse is shown. In step 201 of FIG. 3, the main axis a of the ellipse, the radius length b of the other axis, the integer part of the initial value of the point sequence of the elliptic arc, and the initial values of the respective minor parts are a and b as denominators. Set the initial value of the elliptic arc generator by the value of the numerator of the fraction. Details are shown in FIG. Step 202
Call the elliptic arc generation subroutine in to get the next point representing the circle and elliptical arc. As data of the point sequence, a total of three integer values of two coordinate axes X and Y of the point sequence forming an arc, and a variable U forming an elliptic arc by combining X, and vectors rX, rY, rU from the center of the ellipse are obtained. To be

【0053】上記楕円弧発生サブルーチンは図5のステ
ップ220以下になるが、図2の円弧発生の処理と比べ
てステップ221において(数25式)の計算を加え、
gX,gYのオーバーフロー、アンダーフローをステッ
プ222−229に加えたものである。そして、楕円軸
の直径が奇数の場合にも円の場合と同様に各パラメータ
の初期値を考慮することが有効である。
The elliptic arc generation subroutine is step 220 and subsequent steps in FIG. 5, but in comparison with the arc generation processing in FIG. 2, the calculation of (Equation 25) is added in step 221.
The overflow and underflow of gX and gY are added to steps 222-229. Then, even when the diameter of the elliptic axis is an odd number, it is effective to consider the initial value of each parameter as in the case of the circle.

【0054】(3)球の陰影表示をする方法 球の陰影表示は、球をあらわす円の内部を指定した色で
塗りつぶす際に、球面の法線ベクトルに対応してピクセ
ルの輝度を変化させることによって立体的な球を表現す
る方法である。同時にzバッファを用いた隠面処理を適
用するためには、球面が深さ方向についての変化も計算
して塗りつぶす各ピクセルにおけるZ値を設定すること
も必要となる。
(3) Method of displaying shadow of sphere In displaying the shadow of a sphere, when the inside of a circle representing the sphere is filled with a specified color, the brightness of the pixel is changed corresponding to the normal vector of the sphere. Is a method of expressing a three-dimensional sphere. At the same time, in order to apply the hidden surface processing using the z buffer, it is also necessary to calculate the change in the depth direction of the spherical surface and set the Z value in each pixel to be filled.

【0055】この方法では、球面をあらわす円の、走査
線に沿った水平なピクセルの点列の法線ベクトルと深さ
座標Zを求めながら次々に塗りつぶしを行なう。この
時、走査線にそったX座標と深さ座標Zは円弧を描いて
おり、法線ベクトルも円弧状に変化しているので、前に
述べた楕円弧の高速描画方法を利用して行うことができ
る。そして、これを球を表している円の内部すべての走
査線について行うことで球全体を塗りつぶすすべてのピ
クセルを描画する。このために必要な計算のほとんどを
整数の加減算と比較演算のみであるため高速に実行でき
る点が本方法の特徴である。
In this method, filling is performed one after another while obtaining a normal vector and a depth coordinate Z of a point sequence of horizontal pixels along a scanning line of a circle representing a spherical surface. At this time, the X coordinate and the depth coordinate Z along the scanning line draw a circular arc, and the normal vector also changes in a circular arc. Therefore, use the above-mentioned high-speed elliptic arc drawing method. You can Then, by performing this for all the scanning lines inside the circle representing the sphere, all the pixels that fill the entire sphere are drawn. It is a feature of this method that most of the calculations required for this purpose can be executed at high speed because only integer addition and subtraction and comparison operations are performed.

【0056】この処理の流れは大きく2つに分けられ
る。球の外周をあらわす円弧と、球を塗りつぶす一つの
走査線に沿った水平なピクセル列を求める部分と、水平
なピクセル列にZ座標成分と陰影成分を計算してピクセ
ルを塗りつぶす部分の2つのフローチャートを図6およ
び図7に示した。またこの処理によって描かれるピクセ
ルの輝度を1〜9の数値にして模式的に表している。こ
の2つの両方において、先に述べた楕円弧発生のサブル
ーチンを利用する。
The flow of this processing is roughly divided into two. Two flowcharts: an arc that represents the outer circumference of the sphere, a part that finds a horizontal pixel row along one scanning line that fills the sphere, and a part that fills the pixel by calculating the Z coordinate component and shadow component in the horizontal pixel row. Is shown in FIGS. 6 and 7. In addition, the brightness of the pixel drawn by this processing is schematically represented as a numerical value of 1 to 9. In both of these two, the elliptic arc generation subroutine described above is utilized.

【0057】このため、点列を発生させるために必要な
パラメータの全てをメモリに待避させるサブルーチン
と、後でその途中から点列の計算を再開できるようにパ
ラメータを復帰するサブルーチンも用意しておく。
Therefore, a subroutine for saving all the parameters required for generating the point sequence in the memory and a subroutine for restoring the parameters so that the calculation of the point sequence can be restarted from the middle later are prepared. .

【0058】まず始めに球をあらわす円の点列を求める
ために、ステップ301において楕円弧発生サブルーチ
ンを初期化し、ステップ302において楕円弧発生サブ
ルーチンを呼んで、走査線にそった水平なピクセル列の
開始点と長さを求める。そしてステップ303でこの楕
円弧発生サブルーチンのパラメータを一度保存して後で
円弧の次の点をすぐ得られるようにする。
First, in order to obtain a point sequence of a circle representing a sphere, an elliptic arc generation subroutine is initialized in step 301, and the elliptical arc generation subroutine is called in step 302 to start the horizontal pixel array starting point along the scanning line. And ask for the length. Then, in step 303, the parameters of this elliptic arc generation subroutine are once saved so that the next point of the arc can be immediately obtained later.

【0059】ステップ320以下の水平ピクセル列描画
サブルーチンは3次元グラフィックスにおける隠面処理
と陰影処理を考慮した描画を行う。求めた水平なピクセ
ル列の各点におけるZ値および法線ベクトルを計算する
のに、ステップ321において再び楕円弧発生サブルー
チンを初期化し、ステップ322で楕円弧の点列を求め
て水平なピクセル列におけるZ値と法線ベクトルを求め
る。隠面処理のためのZバッファ法においては、ピクセ
ルの解像度よりも細かい単位のZ値を利用することが効
果的で一般的になっているため、Xに対するZ値は楕円
弧の点列となる。XとUで表される楕円弧の点列を求め
てZ値を待つ3次元のピクセルを描画する。
The horizontal pixel string drawing subroutine in and after step 320 performs drawing in consideration of hidden surface processing and shadow processing in three-dimensional graphics. In order to calculate the Z value and the normal vector at each point of the obtained horizontal pixel row, the elliptic arc generation subroutine is initialized again in step 321, and the point value of the elliptic arc is obtained in step 322 to obtain the Z value in the horizontal pixel row. And obtain the normal vector. In the Z-buffer method for hidden surface processing, it is effective and common to use a Z value in a unit smaller than the pixel resolution, so the Z value for X is a point sequence of an elliptic arc. A three-dimensional pixel waiting for a Z value is obtained by obtaining a point sequence of an elliptic arc represented by X and U.

【0060】陰影処理では物体の法線ベクトルと光源ベ
クトルの内積の大きさに比例してピクセルの値から設定
すべき輝度を決めるので、ここでは各ピクセルにおける
法線ベクトルを求める。球の表面の法線ベクトルは単純
に球の中心から球面までのベクトルに等しく、楕円弧の
点列を求める際に得られている円弧の点列(X,Y)が
利用できる。求めたピクセルのZ値と法線ベクトルの値
から設定すべき輝度でピクセルが描画できるサブルーチ
ンを利用して描画する。この描画により得られる画像デ
ータを図11に示す。球の切片である水平ピクセル列は
左右対称なので、ステップ323,324において左右
の点を描画する。球の表面の法線ベクトルについては球
の対称性があるが、求めた法線ベクトルと光源ベクトル
の向きによって各ピクセルの輝度を計算して表示するの
で、最終的には陰影表示に対称性のない球も描画するこ
とが可能である。
In the shadow processing, the brightness to be set is determined from the pixel value in proportion to the inner product of the normal vector of the object and the light source vector, and therefore the normal vector for each pixel is obtained here. The normal vector of the surface of the sphere is simply equal to the vector from the center of the sphere to the sphere, and the point sequence (X, Y) of the arc obtained when obtaining the point sequence of the elliptic arc can be used. Drawing is performed using a subroutine that can draw a pixel with the brightness to be set based on the obtained Z value and normal vector value of the pixel. The image data obtained by this drawing is shown in FIG. Since the horizontal pixel column, which is the segment of the sphere, is bilaterally symmetric, the left and right points are drawn in steps 323 and 324. The surface normal vector of the sphere has symmetry of the sphere, but since the brightness of each pixel is calculated and displayed according to the obtained normal vector and the direction of the light source vector, the symmetry is finally displayed in the shaded display. It is also possible to draw an empty sphere.

【0061】球の上下の対称性と、X座標Y座標に対す
る対称性を利用して、4つの水平なピクセル列が求めら
れるので、ステップ305,306,308,309で
それぞれ描画サブルーチンを呼ぶことで、球全体を描画
できる。
Since four horizontal pixel rows are obtained by utilizing the symmetry of the upper and lower sides of the sphere and the symmetry with respect to the X coordinate and the Y coordinate, the drawing subroutines are called in steps 305, 306, 308 and 309, respectively. , The entire sphere can be drawn.

【0062】次の走査線における水平なピクセル列の開
始点と長さを求めるのには、ステップ310で先に保存
した楕円弧発生サブルーチンのパラメータを復帰して続
行させることで得られる。そして円周の1/8の円弧に
ついて計算することで、すべての領域を塗りつぶすこと
ができる。
The starting point and length of the horizontal pixel row in the next scan line is obtained by returning the parameters of the elliptic arc generation subroutine previously saved in step 310 and continuing. Then, by calculating the arc of 1/8 of the circumference, all the areas can be filled.

【0063】以上、述べた実施の形態の他に次の形態を
実施できる。
In addition to the embodiments described above, the following modes can be implemented.

【0064】1)上述の実施形態では、円,楕円,球の
描画のための画像処理をLSIにより行う例を示した
が、汎用のパーソナルコンピュータで描画処理を行う場
合には、CPUに図2〜図7の処理手順を実行させれば
よい。図2〜図7の処理手順はハードディスク記憶装置
などの記録媒体に記録する。
1) In the above embodiment, an example in which image processing for drawing a circle, an ellipse, and a sphere is performed by an LSI has been described. However, when the drawing processing is performed by a general-purpose personal computer, the CPU shown in FIG. ~ The processing procedure of FIG. 7 may be executed. 2 to 7 are recorded in a recording medium such as a hard disk storage device.

【0065】2)上述の実施形態において、円,楕円,
球の描画に要する半径、描画の始点,終点位置等の情報
はコマンドの形態では指示しているが、キーボードの入
力からや図形作成プログラムからこれらの情報を指示す
ることができる。
2) In the above embodiment, a circle, an ellipse,
Although information such as the radius required for drawing the sphere, the starting point and the ending point of the drawing, etc. is specified in the form of a command, these information can be specified from the keyboard input or from the graphic creation program.

【0066】[0066]

【発明の効果】以上、説明したように、本発明では、
化式の中のcos(t),sin(t)は定数であり、
x(n+1),y(n+1)の座標は、x(n),y
(n)の値と上記定数を使用した四則演算により簡単に
求まる。これにより、座標計算時間が短縮化される。
As described above, in the present invention, cos (t) and sin (t) in the recurrence formula are constants,
The coordinates of x (n + 1), y (n + 1) are x (n), y
It can be easily obtained by four arithmetic operations using the value of (n) and the above constant. This shortens the coordinate calculation time.

【0067】また、本発明はさらに円弧が円の場合にs
in(t),cos(t)の計算をt,1−t2 /2の
近似で行なえるので、さらに座標計算時間が短くなる。
Further , the present invention further applies s when the arc is a circle.
in (t), since performed the calculation of cos (t) approximation of t, 1-t 2/2 , further coordinate calculation time is shortened.

【0068】さらに、本発明は円の図形に隠面処理や陰
影処理を施すことで球の表示が得られ、球の表示処理も
短縮される。
Further, according to the present invention , the sphere display can be obtained by performing the hidden surface processing or the shadow processing on the circle figure, and the sphere display processing can be shortened.

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

【図1】本発明実施の形態の回路構成を示すブロック図
である。
FIG. 1 is a block diagram showing a circuit configuration of an embodiment of the present invention.

【図2】円弧の点列を発生する処理手順を示すフローチ
ャートである。
FIG. 2 is a flowchart showing a processing procedure for generating a point sequence of arcs.

【図3】楕円の円弧の点列を発生する処理手順を示すフ
ローチャートである。
FIG. 3 is a flowchart showing a processing procedure for generating a point sequence of an elliptic arc.

【図4】楕円の円弧の点列を発生する処理手順を示すフ
ローチャートである。
FIG. 4 is a flowchart showing a processing procedure for generating a point sequence of an elliptic arc.

【図5】楕円の円弧の点列を発生する処理手順を示すフ
ローチャートである。
FIG. 5 is a flowchart showing a processing procedure for generating a point sequence of an elliptic arc.

【図6】楕円の円弧の点列を発生する処理手順を示すフ
ローチャートである。
FIG. 6 is a flowchart showing a processing procedure for generating a point sequence of an elliptic arc.

【図7】楕円の円弧の点列を発生する処理手順を示すフ
ローチャートである。
FIG. 7 is a flowchart showing a processing procedure for generating a point sequence of an elliptic arc.

【図8】円の描画手順を説明するための説明図である。FIG. 8 is an explanatory diagram illustrating a procedure for drawing a circle.

【図9】円の点列を示す説明図である。FIG. 9 is an explanatory diagram showing a dot sequence of circles.

【図10】楕円の描画手順を説明するための説明図であ
る。
FIG. 10 is an explanatory diagram for explaining a procedure for drawing an ellipse.

【図11】球の表示のための画像データを示す説明図で
ある。
FIG. 11 is an explanatory diagram showing image data for displaying a sphere.

【符号の説明】[Explanation of symbols]

1 システムバス 2 グラフィック命令コントロールユニット 3 RAM 4 DDAユニット 5 ピクセルライトコントロールユニット 6 ビデオコントロールユニット 7 ビデオフレームバッファ 8 Zバッファ 9 モニタ 1 system bus 2 Graphic command control unit 3 RAM 4 DDA unit 5 pixel light control unit 6 Video control unit 7 video frame buffer 8 Z buffer 9 monitors

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平7−93569(JP,A) 特開 平7−29033(JP,A) 特開 平2−69882(JP,A) 特開 昭60−114969(JP,A) 山口富士夫著「コンピュータ グラフ ィックス」(昭和54年5月30日),日刊 工業新聞社,pp.112−113 穂坂 衛著「コンピュータ・グラフィ ックス」(昭和49年1月28日),産業図 書株式会社,pp.81−82 ACM Transactions on Graphics,Vol.12, No.3,(1993),“Robust Rendering of Gener al Ellipsesand Ell iptical Arcs."   ─────────────────────────────────────────────────── ─── Continued front page       (56) References JP-A-7-93569 (JP, A)                 JP-A-7-29033 (JP, A)                 JP-A-2-69882 (JP, A)                 JP 60-114969 (JP, A)                 Fujio Yamaguchi "Computer Graph               Six "(May 30, 1979), daily publication               Kogyo Shimbun, pp. 112-113                 Hosaka Mamoru "Computer Graphics"               X "(January 28, 1974), industrial map               Sho Co., pp. 81-82                 ACM Transactions               on Graphics, Vol. 12,               No. 3, (1993), "Robust               Rendering of Generator               al Ellipse sand Ell               optical Arcs. "

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 円弧を構成する点列に関して表示画面上
の前記点列のn+1番目の点の座標x(n+1),y
(n+1)を 【数1】 x(n+1)=x(n)・cos(t)-y(n)・sin(t) y(n+1)=x(n)・sin(t)+y(n)・cos(t) (ここで、tはn番目の点をn+1番目の点に回転移動
させる角度、円の中心を座標原点とする)の漸化式で表
し、 円弧の中心、該円弧の始点および終点位置を示す情報を
指示する指示手段と、 当該指示された情報に基き、前記漸化式により円弧の点
列の表示画面上の各座標を整数の加減算のみを用いて
得する演算処理手段と、 当該取得した各座標の位置に前記点列を表示することに
より円弧を表示すると共に、球面を表す円の、走査線に
沿った水平なピクセルの点列の法線ベクトルと深さ座標
を求めながら次々に塗りつぶしを行うことにより球の隠
面処理及び陰影処理を実現する表示制御手段とを具えた
ことを特徴とする3次元グラフィックス画像表示装置。
1. The coordinates x (n + 1), y of the (n + 1) th point of the point sequence on the display screen with respect to the point sequence forming an arc.
(N + 1) is given by [Formula 1] x (n + 1) = x (n) ・ cos (t) -y (n) ・ sin (t) y (n + 1) = x (n) ・ sin (t) + y (n) ・ cos (t) (where t is the angle to rotate the nth point to the n + 1th point, the center of the circle is the coordinate origin), and the center of the arc , Instruction means for instructing information indicating the starting point and the end point position of the arc, and based on the instructed information, each coordinate on the display screen of the point sequence of the arc is calculated using only integer addition and subtraction by the recurrence formula. Obtained arithmetic processing means and a point sequence of horizontal pixels along a scanning line of a circle representing a spherical surface while displaying an arc by displaying the point sequence at the position of each acquired coordinate. Three-dimensional graphics image display device comprising display control means for realizing hidden surface processing and shading processing of a sphere by successively filling the same while obtaining the normal vector and depth coordinates of .
【請求項2】 請求項1に記載の3次元グラフィックス
画像表示装置において、前記円弧は円であり、前記漸化
式の中のsin(t),cos(t)を 【数2】 sin(t)=t cos(t)=1-t/2 で近似することを特徴とする3次元グラフィックス画像
表示装置。
2. The three-dimensional graphics image display device according to claim 1, wherein the arc is a circle, and sin (t) and cos (t) in the recurrence formula are expressed by the following formula: sin (t) t) = t cos (t) = 3 -dimensional graphic image display apparatus characterized by approximated by 1-t 2/2.
【請求項3】 楕円円弧を構成する点列に関して表示画
面上の前記点列のn+1番目の点の座標x(n+1),
u(n+1)を 【数3】 x(n+1)=x(n)・cos(t)-y(n)・sin(t) y(n+1)=x(n)・sin(t)+y(n)・cos(t) u(n+1)=b/a・y(n+1) (ここで、aは楕円のx軸の長さ、bはy軸の長さ、楕
円の中心を原点とする)の漸化式で表わし、 楕円の中心、該楕円の円弧の始点、終点位置を示す情報
を指示する指示手段と、 当該指示された情報に基き、前記漸化式により楕円の点
列の表示画面上の各座標を整数の加減算のみを用いて
得する演算処理手段と、 当該取得した各座標の位置に前記点列を表示することに
より楕円を表示すると共に、球面を表す円の、走査線に
沿った水平なピクセルの点列の法線ベクトルと深さ座標
を求めながら次々に塗りつぶしを行うことにより球の隠
面処理及び陰影処理を実現する画像表示制御手段とを具
えたことを特徴とする3次元グラフィックス画像表示装
置。
3. The coordinates x (n + 1) of the (n + 1) th point of the point sequence on the display screen with respect to the point sequence forming the elliptical arc.
u (n + 1) can be expressed by [Formula 3] x (n + 1) = x (n) ・ cos (t) -y (n) ・ sin (t) y (n + 1) = x (n) ・ sin (t ) + y (n) ・ cos (t) u (n + 1) = b / a ・ y (n + 1) (where a is the length of the x-axis of the ellipse, b is the length of the y-axis, The center of the ellipse is used as the origin) and the instruction means for instructing the information indicating the center of the ellipse, the start point and the end point of the arc of the ellipse, and the recurrence equation based on the instructed information. The arithmetic processing means for obtaining each coordinate on the display screen of the point sequence of the ellipse using only addition and subtraction of integers, and displaying the ellipse by displaying the point sequence at the position of each obtained coordinate. An image that realizes hidden surface processing and shading processing of the sphere by successively filling the circle representing the spherical surface while obtaining the normal vector and depth coordinate of the point sequence of horizontal pixels along the scanning line. A three-dimensional graphics image including display control means Display devices.
【請求項4】 表示のための円弧を構成する点列の座標
を計算して表示する3次元グラフィックス画像表示方法
において、 円弧を構成する点列に関して表示画面上の前記点列のn
+1番目の点で座標x(n+1),y(n+1)を 【数4】 x(n+1)=x(n)・cos(t)-y(n)・sin(t) y(n+1)=x(n)・sin(t)+y(n)・cos(t) (ここでtはn番目の点をn+1番目の点に回転移動さ
せる角度、円の中心を座標原点とする)の漸化式で表
し、 円弧の中心、該円弧の始点および終点位置を示す情報を
指示し、 当該指示された情報に基き、前記漸化式により円弧の点
列の表示画面上の各座標を整数の加減算のみを用いて
得し、 当該取得した各座標の位置に前記点列を表示することに
より円弧を表示すると共に、球面を表す円の、走査線に
沿った水平なピクセルの点列の法線ベクトルと深さ座標
を求めながら次々に塗りつぶしを行うことにより球の隠
面処理及び陰影処理を実現することを特徴とする3次元
グラフィックス画像表示方法。
4. A three-dimensional graphics image display method for calculating and displaying the coordinates of a sequence of points forming an arc for display, wherein n of said sequence of points on the display screen is related to the sequence of points forming the arc.
The coordinates x (n + 1) and y (n + 1) at the + 1st point are expressed by the following equation: x (n + 1) = x (n) ・ cos (t) -y (n) ・ sin (t) y (n + 1) = x (n) ・ sin (t) + y (n) ・ cos (t) (where t is the angle to rotate and move the nth point to the n + 1th point, and the center of the circle is the coordinate origin. ) Is indicated by the recurrence formula, the information indicating the center of the arc, the start point and the end point of the arc is designated, and based on the designated information, the coordinates of the point sequence of the arc are displayed by the recurrence formula. Is obtained using only addition and subtraction of integers, and the arc is displayed by displaying the point sequence at the position of each obtained coordinate, and the circle representing the spherical surface is horizontally aligned along the scanning line. Three-dimensional graphics image display method, characterized in that the sphere hidden surface processing and the shadow processing are realized by successively performing the filling while obtaining the normal vector and the depth coordinate of the point sequence of various pixels.
【請求項5】 請求項4に記載の3次元グラフィックス
画像表示方法において、前記円弧は円であり、前記漸化
式の中のsin(t),cos(t)を 【数5】 sin(t)=t cos(t)=1-t/2 で近似することを特徴とする3次元グラフィックス画像
表示方法。
5. The three-dimensional graphics image display method according to claim 4, wherein the arc is a circle, and sin (t) and cos (t) in the recurrence formula are expressed by t) = t cos (t) = 3 -dimensional graphic image display method characterized by approximated by 1-t 2/2.
【請求項6】 表示のための楕円の円弧を構成する点列
の座標を計算して表示する3次元グラフィックス画像表
示方法において、楕円円弧を構成する点列に関して表示
画面上の前記点列のn+1番目の点の座標x(n+
1),u(n+1)を 【数6】 x(n+1)=x(n)・cos(t)-y(n)・sin(t) y(n+1)=x(n)・sin(t)+y(n)・cos(t) u(n+1)=b/a・y(n+1) (ここで、aは楕円のx軸の長さ、bはy軸の長さ、楕
円の中心を原点とする)の漸化式で表わし、 楕円の中心、該楕円の円弧の始点,終点位置を示す情報
を指示し、 当該指示された情報に基き、前記漸化式により楕円の点
列の表示画面上の各座標を整数の加減算のみを用いて
得し、 当該取得した各座標の位置に前記点列を表示することに
より楕円を表示すると共に、球面を表す円の、走査線に
沿った水平なピクセルの点列の法線ベクトルと深さ座標
を求めながら次々に塗りつぶしを行うことにより球の隠
面処理及び陰影処理を実現することを特徴とする3次元
グラフィックス画像表示方法。
6. A three-dimensional graphics image display method for calculating and displaying coordinates of a sequence of points forming an elliptical arc for display, wherein the sequence of points on the display screen is related to the sequence of points forming the elliptical arc. The coordinate x (n +
1) and u (n + 1) are expressed by the following equation x (n + 1) = x (n) ・ cos (t) -y (n) ・ sin (t) y (n + 1) = x (n) ・sin (t) + y (n) ・ cos (t) u (n + 1) = b / a ・ y (n + 1) (where a is the length of the x-axis of the ellipse and b is the y-axis) The length and the center of the ellipse are used as the origin), and the information indicating the center of the ellipse, the starting point and the end point of the arc of the ellipse is designated, and the recurrence formula is based on the designated information. With each coordinate on the display screen of the point sequence of the ellipse is obtained using only addition and subtraction of integers, the ellipse is displayed by displaying the point sequence at the position of each obtained coordinate, It is characterized by realizing the hidden surface processing and the shadow processing of the sphere by successively filling the circle representing the sphere while obtaining the normal vector and the depth coordinate of the point sequence of horizontal pixels along the scanning line. 3D graphics image display method.
JP1394197A 1997-01-28 1997-01-28 Three-dimensional graphics image display apparatus and method Expired - Lifetime JP3502901B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1394197A JP3502901B2 (en) 1997-01-28 1997-01-28 Three-dimensional graphics image display apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1394197A JP3502901B2 (en) 1997-01-28 1997-01-28 Three-dimensional graphics image display apparatus and method

Publications (2)

Publication Number Publication Date
JPH10208069A JPH10208069A (en) 1998-08-07
JP3502901B2 true JP3502901B2 (en) 2004-03-02

Family

ID=11847242

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1394197A Expired - Lifetime JP3502901B2 (en) 1997-01-28 1997-01-28 Three-dimensional graphics image display apparatus and method

Country Status (1)

Country Link
JP (1) JP3502901B2 (en)

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ACM Transactions on Graphics,Vol.12,No.3,(1993),"Robust Rendering of General Ellipsesand Elliptical Arcs."
山口富士夫著「コンピュータ グラフィックス」(昭和54年5月30日),日刊工業新聞社,pp.112−113
穂坂 衛著「コンピュータ・グラフィックス」(昭和49年1月28日),産業図書株式会社,pp.81−82

Also Published As

Publication number Publication date
JPH10208069A (en) 1998-08-07

Similar Documents

Publication Publication Date Title
US5973705A (en) Geometry pipeline implemented on a SIMD machine
US4600919A (en) Three dimensional animation
EP0360155B1 (en) Image transformation method and device
US5193145A (en) Method and apparatus for producing a visually improved image in a computer system
JPH05307610A (en) Texture mapping method and its device
JP2001512265A (en) Texture mapping in 3D computer graphics
JPH0916806A (en) Stereoscopic image processor
JPH03500697A (en) Quadratic interpolation for shadow image generation
JPH0660173A (en) Method and apparatus for reducing picture
JP3089792B2 (en) Hidden surface discrimination method for image data
JP2957511B2 (en) Graphic processing unit
JPH03119387A (en) Method and apparatus for forming contour of digital type surface
JP3502901B2 (en) Three-dimensional graphics image display apparatus and method
JPH09134452A (en) High-speed interpolation method for depth buffer value in computer graphics display system and graphics system
EP0389890B1 (en) Method and apparatus for generating figures with three degrees of freedom
JPH0721407A (en) Method for displaying picture
JPH0696231A (en) Method and device for graphic display
JPS595905B2 (en) Surface brightness generation method in display devices
JP3312560B2 (en) Texture mapping device
JPH07105404A (en) Stereoscopic image processor and its processing method
JP3132220B2 (en) 3D model shape creation method
JP3278828B2 (en) Translucent stereoscopic image processing device
JP2897441B2 (en) Image processing method and apparatus
JPH0346826B2 (en)
JPH01241681A (en) Image processor

Legal Events

Date Code Title Description
S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

EXPY Cancellation because of completion of term