JPH0554151A - Stereoscopic graphic processor - Google Patents

Stereoscopic graphic processor

Info

Publication number
JPH0554151A
JPH0554151A JP3210966A JP21096691A JPH0554151A JP H0554151 A JPH0554151 A JP H0554151A JP 3210966 A JP3210966 A JP 3210966A JP 21096691 A JP21096691 A JP 21096691A JP H0554151 A JPH0554151 A JP H0554151A
Authority
JP
Japan
Prior art keywords
shadow
contour
coordinate
sphere
mouse
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP3210966A
Other languages
Japanese (ja)
Inventor
Yoshihisa Kayanaka
良久 茅中
Takeshi Kawaguchi
猛 川口
Katsumi Iida
克己 飯田
Kazuyo Takeuchi
一代 武内
Michiyo Amano
美智代 天野
Ritsuko Kagami
律子 加賀美
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.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP3210966A priority Critical patent/JPH0554151A/en
Publication of JPH0554151A publication Critical patent/JPH0554151A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To efficiently draw a sphere by calculating the contour of shadow formed in the case of irradiating a stereoscopic graphic with light in a direction designated by a direction designating means, and attaching shadow along the contour of the calculated shadow. CONSTITUTION:In the case of drawing the spere, a CPU 1 displays a message so as to designate the direction of irradiating the graphic with light while using a mouse 6 after drawing a circle as the origin of the sphere. A mouse cursor is moved to a suitable position and when a left button 6a of the mouse 6 is pushed, a position fixing code is outputted. Next, the CPU 1 calculates the current coordinate of the mouse cursor and when the coordinate is within the range of the drawn circle, an angle theta formed between a straight line, which connects a designated coordinate A and a center 0 of the drawn circle, and an X axis is calculated. Then, coordinate transformation is executed to rotationally move the coordinate only for the angle thetaand to set it on the X axis. Next, the contour of the shadow is calculated and drawn and afterwards, the contour is painted out so as to attach the gradation of the shadow. Then, the sphere attached the shadow is reversely rotationally moved only for the angle theta and defined as the shadow formed on the spherical face in the case of irradiating the coordinate with light.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、いろいろな図形を描画
する図形処理装置に関し、更に詳細には立体図形を描画
する立体図形処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a figure processing apparatus for drawing various figures, and more particularly to a three-dimensional figure processing apparatus for drawing three-dimensional figures.

【0002】[0002]

【従来の技術】従来、図形処理装置で球のような立体図
形を描画する場合、球の元になる円を描画した後に球に
見えるようにオペレーターが適当に影を付けるか、あら
かじめ登録されている部品の中から球のデータを呼び出
して球を描画していた。
2. Description of the Related Art Conventionally, when a three-dimensional figure such as a sphere is drawn by a figure processing device, an operator appropriately casts a circle which is a base of the sphere and makes it look like the sphere, or it is registered in advance. I was drawing the sphere by calling the sphere data from the existing parts.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、光の当
たる方向を考えて球の表面のような曲面に影を付ける場
合は、影の輪郭が直線状でなく、また影の濃度も一様で
なく場所によって異なるなどの理由で容易ではなく、非
常に手間がかかった。
However, when a shadow is cast on a curved surface such as the surface of a sphere in consideration of the direction of light, the outline of the shadow is not linear and the density of the shadow is not uniform. It was not easy due to the fact that it varied from place to place, and it took a lot of work.

【0004】本発明は、上述した問題点を解決するため
になされたものであり、光の当たる方向を指定すると立
体図形上の影の輪郭と影の濃度を計算することによって
能率的に球の描画を行うものである。
The present invention has been made to solve the above-mentioned problems, and when the direction of light is designated, the outline of the shadow and the density of the shadow on the three-dimensional figure are calculated, so that the sphere can be efficiently projected. It is for drawing.

【0005】[0005]

【課題を解決するための手段】この目的を達成するため
に本発明の図形処理装置は、影を付ける前の立体図形を
描画する第1の描画手段Aと、前記描画手段Aによって
描画された図形に光を当てる方向を指定する方向指定手
段Bと、前記方向指定手段によって指定された方向で光
が立体図形上に当たった時にできる影の輪郭を計算する
輪郭計算手段Cと、前記輪郭計算手段Cによって求めら
れた影の輪郭に沿って影を付ける第2の描画手段Dとを
備えている。
In order to achieve this object, the graphic processing apparatus of the present invention draws a first drawing means A for drawing a three-dimensional figure before a shadow is cast, and the drawing means A. Direction designating means B for designating a direction of illuminating a figure, contour calculating means C for computing a contour of a shadow formed when light hits a three-dimensional figure in the direction designated by the direction designating means, and the contour calculation And a second drawing means D for drawing a shadow along the contour of the shadow obtained by the means C.

【0006】[0006]

【作用】上記の構成を有する本発明の図形処理装置は、
第1の描画手段Aは影を付ける前の立体図形を描画す
る。方向指定手段Bは光を立体図形に当てる方向を指定
する。輪郭計算手段Cは前記方向指定手段によって指定
された方向で光が立体図形上に当たった時にできる影の
輪郭を計算する。第2の描画手段2は前記輪郭計算手段
によって求められた輪郭に沿って影を付ける。
The graphic processing apparatus of the present invention having the above-mentioned configuration is
The first drawing means A draws a solid figure before adding a shadow. The direction designating means B designates the direction in which light is applied to the three-dimensional figure. The contour calculating means C calculates the contour of the shadow formed when the light hits the solid figure in the direction designated by the direction designating means. The second drawing means 2 casts a shadow along the contour obtained by the contour calculating means.

【0007】[0007]

【実施例】以下、本発明を具体化した一実施例を図面を
参照して説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

【0008】図2は本発明を具体化した一実施例のハー
ドウェア構成を示すブロック図である。
FIG. 2 is a block diagram showing a hardware configuration of an embodiment embodying the present invention.

【0009】同図に示されるように、装置全体を統括制
御する中央処理装置(CPU)1には、読み出し専用記
憶装置(ROM)2、読み書き可能記憶装置(RAM)
3、補助記憶装置(ハードディスク:HD)4、キー入
力装置(キーボード:KB)5、マウス6、表示装置7
(CRT)が接続されている。
As shown in FIG. 1, a central processing unit (CPU) 1 that controls the entire apparatus has a read-only storage device (ROM) 2 and a readable / writable storage device (RAM).
3, auxiliary storage device (hard disk: HD) 4, key input device (keyboard: KB) 5, mouse 6, display device 7
(CRT) is connected.

【0010】周知のように、CPU1ではROM2ある
いは補助記憶装置4からRAM3に読み込んだデータコ
ードを解読しながら処理を実行するものである。
As is well known, the CPU 1 executes the processing while decoding the data code read from the ROM 2 or the auxiliary storage device 4 into the RAM 3.

【0011】次に図3は本実施例の動作を示すフローチ
ャートであり、以下にこのフローチャートを参照しなが
ら本実施例装置の動作を系統的に説明する。
Next, FIG. 3 is a flowchart showing the operation of this embodiment, and the operation of the apparatus of this embodiment will be systematically described below with reference to this flowchart.

【0012】ステップ1(以下S1と略す。以下のステ
ップも同様である。)でCPU1は影を付ける前の立体
図形(ここでは球の元となる円)を描画する(図4参
照)。S2でCPU1は光を当てる方向(球面上におい
て光が垂直にあたる位置)をマウス6を用いて指定する
ようにメッセージを表示する(図5参照)。次にCPU
1はマウス6からの位置確定コードの入力待ちを行なう
(S3、S4:NO)。ここでオペレーターがマウス6
を動かすとマウス6の動きに対応したマウスカーソルが
CRT7の画面上を移動する。
In step 1 (hereinafter abbreviated as S1; the same applies to the following steps), the CPU 1 draws a three-dimensional figure (here, a circle which is the origin of a sphere) before shadowing (see FIG. 4). In S2, the CPU 1 displays a message for designating the direction of the light (the position on the spherical surface where the light is perpendicular) using the mouse 6 (see FIG. 5). Next CPU
1 waits for the position confirmation code to be input from the mouse 6 (S3, S4: NO). Here the operator is mouse 6
When is moved, the mouse cursor corresponding to the movement of the mouse 6 moves on the screen of the CRT 7.

【0013】オペレーターが適当な位置までマウスカー
ソルを動かしてマウス6の左ボタン6aを押すとマウス
6から位置確定コードが出力される。マウス6の左ボタ
ン6aが押されてマウス6から位置確定コードが出力さ
れると(S4:YES)、CPU1はマウスカーソルの
現在の座標を求め、S1で描画した円の図形内の座標か
どうか判断する(S5)。マウスで指定された座標がS
1で描画した円の範囲外であった場合(S5:NO)は
S6へ進み、マウスで指定された座標がS1で描画した
円の範囲内であった場合(S5:YES)はS7に進
む。S6でCPU1は図形内部の座標を指定するように
エラーメッセージを表示し、S3に戻る。S7でCPU
1は次のS8で行なう計算を容易にするために図6に示
すように、指定した座標(点A)とS1で描画した円の
中心Oを結ぶ直線とX軸とのなす角度θを求め、指定し
た座標を円の中心Oを回転の中心として角度θだけ回転
移動し、指定した座標がX軸上にくるように座標変換を
行なう。
When the operator moves the mouse cursor to an appropriate position and presses the left button 6a of the mouse 6, the mouse 6 outputs a position fixing code. When the left button 6a of the mouse 6 is pressed and the position fixing code is output from the mouse 6 (S4: YES), the CPU 1 obtains the current coordinates of the mouse cursor and determines whether the coordinates are within the figure of the circle drawn in S1. Judge (S5). The coordinate specified by the mouse is S
If it is outside the range of the circle drawn in 1 (S5: NO), the process proceeds to S6, and if the coordinates designated by the mouse is within the range of the circle drawn in S1 (S5: YES), the process proceeds to S7. .. In S6, the CPU 1 displays an error message so as to specify the coordinates inside the figure, and returns to S3. CPU at S7
As shown in FIG. 6, 1 is the angle θ formed between the X-axis and the straight line connecting the designated coordinate (point A) and the center O of the circle drawn in S1 in order to facilitate the calculation in S8. , The specified coordinates are rotated by the angle θ with the center O of the circle as the center of rotation, and coordinate conversion is performed so that the specified coordinates are on the X axis.

【0014】S8でCPU1は影の輪郭を計算する。球
面の明るさは場所によって異なり、光が球の表面に垂直
に当たった場所が最も明るく、光が表面に当たる角度が
浅くなるほど暗くなる。実際には球の表面の明るさは連
続的に変化するが、本実施例ではだんだん暗くなってい
く部分から光が全く当たらなくて最も暗い部分までの間
の明るさを何段階かに分けてその境界を影の輪郭として
計算する。なお球の場合の見かけ上の境界は楕円弧にな
る。
In S8, the CPU 1 calculates the outline of the shadow. The brightness of the sphere varies depending on the place, and the place where the light hits the surface of the sphere perpendicularly is the brightest, and the place where the light hits the surface becomes darker as it becomes shallow. Actually, the brightness of the surface of the sphere changes continuously, but in this embodiment, the brightness from the gradually darker part to the darkest part where no light hits is divided into several levels. The boundary is calculated as the outline of the shadow. The apparent boundary of a sphere is an elliptical arc.

【0015】S9でCPU1はS8で計算した輪郭を描
画する(図7参照)。S10でCPU1はS9で描画し
た輪郭に沿って塗りつぶしを行い影の濃淡を付ける(図
8参照)。S11でCPU1はS10までで描画した影
のついた球を球の中心を回転の中心としS7で行なった
回転移動の角度θだけ反対方向に回転移動してS2から
S6までで指定された座標に光を当てたときに球面上に
できる影とする(図9参照)。
In S9, the CPU 1 draws the contour calculated in S8 (see FIG. 7). In S10, the CPU 1 paints along the contour drawn in S9 to shade the shadow (see FIG. 8). In S11, the CPU 1 rotationally moves the shaded sphere drawn in S10 in the opposite direction by the angle θ of the rotational movement performed in S7 with the center of the sphere as the center of rotation, and moves to the coordinates specified in S2 to S6. The shadow is formed on the spherical surface when light is applied (see FIG. 9).

【0016】本発明は以上詳述した実施例に限定される
ものではなく、その趣旨を逸脱しない範囲において種々
の変更を加えることができる。
The present invention is not limited to the embodiments described in detail above, and various modifications can be made without departing from the spirit of the invention.

【0017】例えば本実施例においては立体図形に光を
当てたときに立体図形上にできる影の輪郭を計算して立
体図形上に影を付けたが、立体図形がある平面上に置か
れていると仮定して立体図形に光を当てたときにその平
面へ投影される立体図形の影の輪郭を求めて平面上の影
を描画することもできる。
For example, in the present embodiment, the outline of the shadow formed on the three-dimensional figure when the three-dimensional figure is illuminated is calculated and the shadow is cast on the three-dimensional figure. It is also possible to draw the shadow on the plane by obtaining the contour of the shadow of the solid figure projected on the plane when the solid figure is illuminated with light.

【0018】[0018]

【発明の効果】以上説明したことから明らかなように、
本発明の図形処理装置は立体図形の元になる図形に立体
図形に光を当てたときにできる影を描画することによっ
て簡単により実物に近い立体図形を描画することができ
る。
As is clear from the above description,
The graphic processing apparatus of the present invention can easily draw a solid figure that is closer to the real thing by drawing a shadow formed when the solid figure is illuminated by illuminating the original figure.

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

【図1】本発明の構成図である。FIG. 1 is a configuration diagram of the present invention.

【図2】立体図形処理装置のハードウェア構成を示すブ
ロック図である。
FIG. 2 is a block diagram showing a hardware configuration of a three-dimensional figure processing device.

【図3】立体図形処理装置の動作を示すフローチャート
である。
FIG. 3 is a flowchart showing an operation of the three-dimensional figure processing device.

【図4】立体図形処理装置の動作時の画面を示す図であ
る。
FIG. 4 is a diagram showing a screen during operation of the three-dimensional figure processing device.

【図5】立体図形処理装置の動作時の画面を示す図であ
る。
FIG. 5 is a diagram showing a screen during operation of the three-dimensional figure processing device.

【図6】計算の都合上指定した座標を回転移動する処理
を説明した図である。
FIG. 6 is a diagram illustrating a process of rotating and moving a designated coordinate for convenience of calculation.

【図7】影の輪郭を描画した図である。FIG. 7 is a diagram in which a contour of a shadow is drawn.

【図8】影の輪郭に沿って影を描画した図である。FIG. 8 is a diagram in which a shadow is drawn along the outline of the shadow.

【図9】影を描画した球の図を回転移動した図である。FIG. 9 is a diagram in which a diagram of a sphere in which a shadow is drawn is rotated and moved.

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

1 中央処理装置(CPU)(描画手段1、輪郭計算手
段、描画手段2) 6 マウス(方向指定手段)
1 Central Processing Unit (CPU) (Drawing Means 1, Outline Calculation Means, Drawing Means 2) 6 Mouse (Direction Designating Means)

───────────────────────────────────────────────────── フロントページの続き (72)発明者 武内 一代 名古屋市瑞穂区苗代町15番1号ブラザー工 業株式会社内 (72)発明者 天野 美智代 名古屋市瑞穂区苗代町15番1号ブラザー工 業株式会社内 (72)発明者 加賀美 律子 名古屋市瑞穂区苗代町15番1号ブラザー工 業株式会社内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Ichiyo Takeuchi, 15-1 Naeshiro-cho, Mizuho-ku, Nagoya-shi Brother Industrial Co., Ltd. (72) Inventor Michiyo Amano, 15-1 Naeshiro-cho, Mizuho-ku, Nagoya-shi Brother Engineering Incorporated (72) Inventor Ritsuko Kagami 15-1 Naeshiro-cho, Mizuho-ku, Nagoya-shi Brother Industries Ltd.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 影を付ける前の立体図形を描画する第1
の描画手段と、前記描画手段によって描画された図形に
光を当てる方向を指定する方向指定手段と、前記方向指
定手段によって指定された方向で光が立体図形上に当た
った時にできる影の輪郭を計算する輪郭計算手段と、前
記輪郭計算手段によって求められた影の輪郭に沿って影
を付ける第2の描画手段とを備えることを特徴とする立
体図形処理装置。
1. A first method for drawing a three-dimensional figure before applying a shadow
Drawing means, a direction designating means for designating a direction of illuminating the figure drawn by the drawing means, and a contour of a shadow formed when light hits the three-dimensional figure in the direction designated by the direction designating means. A three-dimensional figure processing device comprising: a contour calculating means for calculating; and a second drawing means for drawing a shadow along the contour of the shadow obtained by the contour calculating means.
JP3210966A 1991-08-22 1991-08-22 Stereoscopic graphic processor Pending JPH0554151A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3210966A JPH0554151A (en) 1991-08-22 1991-08-22 Stereoscopic graphic processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3210966A JPH0554151A (en) 1991-08-22 1991-08-22 Stereoscopic graphic processor

Publications (1)

Publication Number Publication Date
JPH0554151A true JPH0554151A (en) 1993-03-05

Family

ID=16598070

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3210966A Pending JPH0554151A (en) 1991-08-22 1991-08-22 Stereoscopic graphic processor

Country Status (1)

Country Link
JP (1) JPH0554151A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998046011A1 (en) * 1997-04-10 1998-10-15 Sony Corporation Special effect apparatus and special effect method
KR101880507B1 (en) * 2017-04-21 2018-07-20 주식회사 한글과컴퓨터 Client terminal device that supports resizing of a figure embedded in a web document and operating method thereof
KR101880508B1 (en) * 2017-04-27 2018-07-20 주식회사 한글과컴퓨터 Web document editing support apparatus and method for supporting list generation in web documents

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998046011A1 (en) * 1997-04-10 1998-10-15 Sony Corporation Special effect apparatus and special effect method
GB2329312A (en) * 1997-04-10 1999-03-17 Sony Corp Special effect apparatus and special effect method
KR101880507B1 (en) * 2017-04-21 2018-07-20 주식회사 한글과컴퓨터 Client terminal device that supports resizing of a figure embedded in a web document and operating method thereof
KR101880508B1 (en) * 2017-04-27 2018-07-20 주식회사 한글과컴퓨터 Web document editing support apparatus and method for supporting list generation in web documents

Similar Documents

Publication Publication Date Title
JPH05266146A (en) Representing device for body shape
JPH0554151A (en) Stereoscopic graphic processor
CN116797701A (en) Diffusion effect rendering method and device, storage medium and electronic equipment
JPH08287291A (en) Image display system
JPH0660164A (en) Three-dimensional shape processing system
WO2007063586A1 (en) Three-dimensional graphic apparatus, three-dimensional graphic method, three-dimensional program, and recording medium
JPH09245181A (en) Anti-aliasing
EP0439332B1 (en) Electronic image creation tools
JPH04218877A (en) Method and apparatus for correcting electronic image
JPH04127386A (en) Image display processor
JPH11203473A (en) Coordinate system setting method and image measuring device
JPH03273455A (en) Method and device for generating rubber and for circle
JPH06124112A (en) Data confirmation system for numerical controller
JPH0520404A (en) Three-dimensional graphic processing system
JP3502901B2 (en) Three-dimensional graphics image display apparatus and method
JPH07141524A (en) Plotting processor
JPH0425983A (en) Graphic plotting device
JPH0695645A (en) Method for processing character shadowing in full dot character
JPS63241625A (en) Line drawing input device
JPH01166171A (en) Picking method for ellipse in graphic operation
JPH0740285A (en) Device for originating cutting data
JPS6238908A (en) Numerical controller
JPH0375973A (en) Trimming generating device
JPH0773335A (en) Painting-out method
JPH02259884A (en) Image processing system