JP3363611B2 - Graphic information processing method and apparatus - Google Patents

Graphic information processing method and apparatus

Info

Publication number
JP3363611B2
JP3363611B2 JP22959094A JP22959094A JP3363611B2 JP 3363611 B2 JP3363611 B2 JP 3363611B2 JP 22959094 A JP22959094 A JP 22959094A JP 22959094 A JP22959094 A JP 22959094A JP 3363611 B2 JP3363611 B2 JP 3363611B2
Authority
JP
Japan
Prior art keywords
ellipse
straight lines
axis
display
rotation
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 - Fee Related
Application number
JP22959094A
Other languages
Japanese (ja)
Other versions
JPH0896158A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP22959094A priority Critical patent/JP3363611B2/en
Publication of JPH0896158A publication Critical patent/JPH0896158A/en
Application granted granted Critical
Publication of JP3363611B2 publication Critical patent/JP3363611B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、図形情報処理方法及び
装置に関し、例えば楕円の形状情報を入力して修正など
の処理を行う図形情報処理方法及び装置に関するもので
ある。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a graphic information processing method and apparatus, and more particularly to a graphic information processing method and apparatus for inputting elliptical shape information and performing processing such as correction.

【0002】[0002]

【従来の技術】従来、互いに直交する2直線に接する楕
円を入力する時、一旦、これら2直線に接する適当な楕
円を生成した後、ユーザにより、その楕円の回転、移動
量を指定して、その楕円の形状を修正していた。
2. Description of the Related Art Conventionally, when an ellipse tangent to two straight lines orthogonal to each other is input, an appropriate ellipse tangent to these two straight lines is once generated, and then the user specifies the rotation and movement amount of the ellipse. The shape of the ellipse was corrected.

【0003】[0003]

【発明が解決しようとする課題】このため従来の方法に
よれば、互いに直交する2直線に接する楕円情報を入力
する時、及び楕円を回転して微妙な形状の修正を行うと
きは、オペレータによる操作の熟練を要するためユーザ
に負担がかかり、なおかつ直交する2直線に接する楕円
を精度良く描くのが難しいという問題があった。
Therefore, according to the conventional method, when the ellipse information which is in contact with two straight lines which are orthogonal to each other is inputted and when the ellipse is rotated to make a subtle correction of the shape, it is required by the operator. There is a problem in that it requires a high level of skill to operate, which imposes a burden on the user, and it is difficult to draw an ellipse that is in contact with two orthogonal straight lines with high accuracy.

【0004】本発明は上記従来例に鑑みてなされたもの
で、微妙な楕円形状の入力・修正を簡単に、しかも正確
にできる図形処理方法及び装置を提供することを目的と
する。
The present invention has been made in view of the above-mentioned conventional example, and an object of the present invention is to provide a graphic processing method and apparatus capable of easily and accurately inputting / correcting a subtle elliptical shape.

【0005】[0005]

【0006】[0006]

【0007】[0007]

【課題を解決するための手段】上記目的を達成するため
に本発明の図形処理装置は以下のような構成を備える。
即ち、楕円に関する情報及び前記楕円に接する互いに直
交する2直線の情報を記憶する記憶手段と、前記記憶手
段に記憶された前記楕円及び2直線の情報に基づき、表
示画面上に楕円と2直線を表示する表示制御手段と、
記2直線の交点を中心として、前記2直線がX軸とY軸
にそれぞれ平行となるように回転した楕円及び2直線を
算出する算出手段と、 前記表示制御手段により前記楕円
及び2直線を前記表示画面上に表示した状態で指示され
る前記楕円の移動基準点及び移動先指示点に基づいて、
前記楕円の中心と前記移動基準点及び前記移動先点との
なす角度だけ前記算出手段により算出した楕円を回転さ
せる回転手段と、前記回転手段により回転された楕円に
接する互いに直交するそれぞれX軸とY軸に平行な2直
線と前記回転手段による回転前の楕円に接している2直
線との位置ずれを求める手段と、前記位置ずれの量に応
じて、前記算出手段で算出した楕円の位置を移動する移
動手段と、前記移動手段で移動した楕円を前記算出手段
による回転と逆回りに回転した楕円を算出する手段と、
前記算出する手段で算出した楕円を前記表示画面に表示
する表示手段と、を有することを特徴とする。上記目的
を達成するために本発明の図形処理方法は以下のような
工程を備える。即ち、記憶部、表示部及び入力部を具備
する図形処理装置における図形処理方法であって、 前記
記憶部に記憶された楕円及び該楕円に接する互いに直交
する2直線を読み出す読出工程と、前記読出工程で読み
出した楕円及び2直線を前記表示部の表示画面に表示す
る表示工程と、前記表示画面に表示された2直線が含ま
れる平面上で前記入力部により指示された移動基準点を
認識する工程と、前記平面上で前記入力部により指示さ
れた移動先指示点を認識する工程と、前記2直線の交点
を中心として前記2直線がX軸とY軸にそれぞれ平行と
なるように回転した楕円及び2直線を算出する算出工程
と、前記読出工程で読み出した楕円の中心と前記移動基
準点及び前記移動先点とのなす角度だけ前記算出工程で
算出した回転後の楕円を回転する回転工程と、前記回転
工程により回転された楕円に接する互いに直交するそれ
ぞれX軸とY軸に平行な2直線と前記回転工程による
転前の楕円に接している2直線との位置ずれを求める工
程と、前記位置ずれの量に応じて、前記算出工程で算出
した楕円の位置を移動する移動工程と、前記移動工程で
移動した楕円を前記算出工程による回転と逆回りに回転
した楕円を算出する工程と、 前記算出する工程で算出し
た楕円を前記表示画面に表示する工程と、を有すること
を特徴とする。
In order to achieve the above object, the graphic processing apparatus of the present invention has the following configuration.
In other words, storage means for storing information of two straight lines that are perpendicular to each other contact with the information and the ellipse about an ellipse, the storage Hand
Based on the information of the ellipse and the two straight lines stored in the column, a table
Display control means for displaying the ellipse and two straight lines in示画plane, before
With the intersection of the two straight lines as the center, the two straight lines are the X axis and the Y axis.
An ellipse and two straight lines rotated so that they are parallel to
Based on a calculation means for calculating and a movement reference point and a movement destination instruction point of the ellipse indicated by the display control means in a state where the ellipse and two straight lines are displayed on the display screen,
Rotation means for rotating the ellipse calculated by the calculation means by an angle formed by the center of the ellipse and the movement reference point and the movement destination point, and X-axes that are in contact with the ellipse rotated by the rotation means and are orthogonal to each other. A means for obtaining a positional deviation between two straight lines parallel to the Y axis and two straight lines in contact with the ellipse before the rotation by the rotating means, and a position of the ellipse calculated by the calculating means according to the amount of the positional deviation. The moving means for moving and the ellipse moved by the moving means are calculated by the calculating means.
Means for calculating an ellipse rotated in the opposite direction to the rotation by
Display the ellipse calculated by the calculating means on the display screen
And a display unit for displaying . In order to achieve the above object, the graphic processing method of the present invention includes the following steps. That is, it has a storage unit, a display unit, and an input unit.
A graphic processing method in a graphic processing device, comprising:
A reading step of reading the mutually orthogonal two linear contact with the ellipse and the ellipse stored in the storage unit, read in the reading step
Display the drawn ellipse and two straight lines on the display screen of the display unit.
And a step of recognizing a movement reference point designated by the input unit on a plane including the two straight lines displayed on the display screen, and a destination designation designated by the input unit on the plane. Step of recognizing points and intersection of the two straight lines
And the two straight lines are parallel to the X-axis and the Y-axis, respectively.
Calculation process for calculating an ellipse and two straight lines rotated so that
In the calculation step, only the angle formed by the center of the ellipse read in the read step and the movement reference point and the movement destination point.
Rotation step of rotating the calculated ellipse after rotation, and the rotation
That are orthogonal to each other tangent to the ellipse rotated by the process
The step of obtaining the positional deviation between the two straight lines parallel to the X-axis and the Y-axis and the two straight lines in contact with the ellipse before the rotation by the rotating step , and Calculated in the calculation process
A moving step of moving the position of the ellipse, in the moving step
Rotate the moved ellipse in the opposite direction to the rotation in the above calculation process
Calculating a ellipse, calculated in said step of calculating
And displaying the ellipse on the display screen .

【0008】[0008]

【作用】以上の構成において、記憶部に記憶された楕円
及び該楕円に接する互いに直交する2直線を読み出し、
その読み出した楕円及び2直線を表示部の表示画面に表
示し、その表示された2直線が含まれる平面上で入力部
により指示された移動基準点と移動先指示点を認識す
る。そして算出工程(手段)で、2直線の交点を中心と
して2直線がX軸とY軸にそれぞれ平行となるように回
転した楕円及び2直線を算出し、読み出した楕円の中心
と移動基準点及び移動先点とのなす角度だけ、算出した
回転後の楕円を回転し、その回転した楕円に接する互い
に直交するそれぞれX軸とY軸に平行な2直線と、その
回転前の楕円に接している2直線との位置ずれを求め、
その位置ずれの量に応じて、前記算出工程(手段)で回
転した楕円の位置を移動し、その移動した楕円を、前記
算出工程(手段)による回転と逆回りに回転した楕円を
算出する。
[Operation] With the above configuration, the ellipse stored in the storage unit
And read out two mutually orthogonal straight lines that contact the ellipse,
Display the read ellipse and two straight lines on the display screen of the display.
Show the input section on the plane containing the two displayed straight lines
Recognize the movement reference point and the movement destination designated point by
It Then, in the calculation step (means), the intersection of the two straight lines is centered
And rotate so that the two straight lines are parallel to the X and Y axes, respectively.
The center of the read ellipse after calculating the rolled ellipse and two straight lines
Calculated only for the angle between the movement reference point and the movement destination point
Rotate the rotated ellipse so that it touches the rotated ellipse.
2 straight lines that are respectively parallel to the X-axis and the Y-axis, and
Find the positional deviation from the two straight lines that touch the ellipse before rotation,
Depending on the amount of the positional deviation, the calculation step (means)
Move the position of the rolled ellipse,
The ellipse rotated in the opposite direction to the rotation by the calculation process (means)
calculate.

【0009】[0009]

【実施例】以下、添付図面を参照して本発明の好適な実
施例を詳細に説明する。 [第1実施例]図1は、本発明の第1実施例の図形処理
装置における動作の流れを説明するフローチャート、図
2は第1実施例の図形処理装置の概略構成を示すブロッ
ク図である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT A preferred embodiment of the present invention will now be described in detail with reference to the accompanying drawings. [First Embodiment] FIG. 1 is a flow chart for explaining the flow of operations in the graphic processing apparatus of the first embodiment of the present invention, and FIG. 2 is a block diagram showing a schematic configuration of the graphic processing apparatus of the first embodiment. .

【0010】まず図2において、バス1(制御線、デー
タ線及びアドレス線を含む)には、中央処理装置(CP
U)2、図1のフローチャートで示された制御プログラ
ム等を記憶するリード・オンリ・メモリ(ROM)3、
ランダム・アクセス・メモリ(RAM)4、及び入力イ
ンターフエース部5、CRTインターフェース部7、外
部記憶インターフェース部9が接続されている。入力イ
ンターフェース部5は、キーボードやポインティングデ
バイス等を備えた入力部6とバス1との間の信号のやり
取りを制御し、入力部6より入力された信号をバス1に
出力している。CRTインターフエース部7はバス1よ
りの表示データを受取り、CRTや液晶等の表示部8に
表示している。外部記憶装置インターフェース部9は、
磁気ディスク、磁気テープ等の外部記憶装置10にデー
タを記憶したり、記憶装置10に記憶されているデータ
を読み出してバス1に出力している。
First, in FIG. 2, a bus 1 (including a control line, a data line and an address line) is connected to a central processing unit (CP).
U) 2, a read only memory (ROM) 3, which stores the control program shown in the flowchart of FIG.
A random access memory (RAM) 4, an input interface unit 5, a CRT interface unit 7, and an external storage interface unit 9 are connected. The input interface unit 5 controls the exchange of signals between the input unit 6 including a keyboard and a pointing device and the bus 1, and outputs the signal input from the input unit 6 to the bus 1. The CRT interface unit 7 receives the display data from the bus 1 and displays it on the display unit 8 such as a CRT or liquid crystal. The external storage device interface unit 9
Data is stored in the external storage device 10 such as a magnetic disk or a magnetic tape, or the data stored in the storage device 10 is read and output to the bus 1.

【0011】CPU2は、ROM3に記憶された制御プ
ログラムに従って、RAM4をワークエリアとして使用
しながら、種々の処理及び制御、例えば図形入力制御、
図形表示、ピック処理、隠面処理、内外判定等を行って
いる。入力部6は、例えばキーボード、タブレット(デ
ジタイザ)、マウス等を含み、図形データを入力するこ
とができる。尚、この図形データは、例えば図示しない
ホストコンピュータから入力しても良い。表示部8は、
必要に応じて複数のビット・マップ・プレーン等を含ん
でおり、複数のウインドウに各種図形を表示することが
できる。
The CPU 2 uses the RAM 4 as a work area in accordance with a control program stored in the ROM 3 while performing various processes and controls such as graphic input control.
Graphic display, pick processing, hidden surface processing, inside / outside determination, etc. are performed. The input unit 6 includes, for example, a keyboard, a tablet (digitizer), a mouse, etc., and can input graphic data. The graphic data may be input from, for example, a host computer (not shown). The display unit 8 is
If necessary, a plurality of bit map planes and the like are included, and various figures can be displayed in a plurality of windows.

【0012】次に図3を参照して、楕円を以下の構成要
素に基づいて定義する。 (1)楕円の中心(O) (2)楕円の長軸ベクトル(a) 楕円の長軸方向と同一方向で、楕円の長軸と同一の長さ
を持つベクトル (3)楕円の短軸ベクトル(b) 楕円の短軸方向と同一方向で、楕円の短軸と同一の長さ
を持つベクトル次に、図1及び図2〜図9を参照して本
発明の第1実施例を説明するが、以下に述べる処理及び
判断は、CPU2がROM3に記憶されているプログラ
ムに従って行う。
Next, referring to FIG. 3, an ellipse is defined based on the following components. (1) Center of the ellipse (O) (2) Long axis vector of the ellipse (a) Vector having the same direction as the long axis of the ellipse and the same length as the long axis of the ellipse (3) Short axis vector of the ellipse (B) Vector having the same direction as the minor axis of the ellipse and the same length as the minor axis of the ellipse Next, a first embodiment of the present invention will be described with reference to FIGS. 1 and 2 to 9. However, the processing and judgment described below are performed by the CPU 2 according to the program stored in the ROM 3.

【0013】以下に図1のフローチャートの順番に従っ
て、第1実施例における楕円形状入力方法について説明
する。この処理は、例えば図3に示すような楕円を表す
データ及び、その楕円に接する2つの直線のデータが外
部記憶装置10に記憶されているものとする。まずステ
ップS1で、その楕円と、その楕円に接する垂直な2直
線のデータを外部記憶装置10より読み出し、それら2
直線がそれぞれX軸、Y軸に平行になるように回転させ
たときの、2つの接線と楕円とを求める。
The elliptical shape inputting method according to the first embodiment will be described below in the order of the flowchart of FIG. In this processing, it is assumed that data representing an ellipse as shown in FIG. 3 and data of two straight lines in contact with the ellipse are stored in the external storage device 10. First, in step S1, the ellipse and the data of two vertical straight lines in contact with the ellipse are read from the external storage device 10, and the two
Two tangent lines and an ellipse when the straight line is rotated so as to be parallel to the X axis and the Y axis are obtained.

【0014】この処理を図4を参照して説明する。図4
において、楕円C0と、楕円C0に対する2つの接線4
01,402のデータが外部記憶装置10より読み出さ
れ、これら2つの接線401,402のそれぞれを点4
10を中心としてX軸、Y軸に平行になるように回転さ
せたときの、楕円C1と2つの直線403,404が示
されている。具体的には、X軸と直線401とのなす角
度φを求めて、楕円C0の中心、及び楕円C0の短軸、
長軸ベクトルを角度φだけ時計回り方向に回転する。こ
の変換後の楕円C1が、第1,2,3,4象限のいずれ
かにあるかによって、ケース(case)1,2,3,4と区
別する。
This process will be described with reference to FIG. Figure 4
, An ellipse C0 and two tangents 4 to the ellipse C0
The data 01 and 402 are read from the external storage device 10, and each of these two tangents 401 and 402 is changed to a point 4
An ellipse C1 and two straight lines 403 and 404 when rotated so as to be parallel to the X axis and the Y axis around 10 are shown. Specifically, the angle φ formed by the X axis and the straight line 401 is obtained, and the center of the ellipse C0 and the minor axis of the ellipse C0 are calculated.
Rotate the major axis vector clockwise by an angle φ. The converted ellipse C1 is distinguished from the cases 1, 2, 3, and 4 depending on whether it is in the first, second, third, or fourth quadrant.

【0015】尚、この元の楕円C0及び2つの直線40
1,402は、例えば入力部6より入力されたものであ
っても良い。こうして変換された楕円C1、接線40
3,404のデータをRAM4に格納する。
The original ellipse C0 and the two straight lines 40
1, 402 may be input from the input unit 6, for example. Ellipse C1 and tangent line 40 thus transformed
The data of 3,404 are stored in the RAM 4.

【0016】次に図1のステップS2に進み、変換後の
X軸、Y軸に平行な直線403,404の原点410の
y座標、x座標を(y0,x0)にセットする。即ち、R
AM4から直線403,404のデータを取り出して、
CPU2により、直線403の式をy=yyで表わし、
直線404をx=xxで表すと、 y0←yy x0←xx となり、これをRAM4に格納する。
Next, in step S2 of FIG. 1, the y and x coordinates of the origin 410 of the straight lines 403 and 404 parallel to the converted X and Y axes are set to (y0, x0). That is, R
Extract the data of straight lines 403 and 404 from AM4,
The CPU 2 expresses the equation of the straight line 403 as y = yy,
When the straight line 404 is represented by x = xx, y0 ← yy x0 ← xx, which is stored in the RAM 4.

【0017】次にステップS3に進み、ユーザの指示し
た移動基準点Pを認識する。即ち、図5において、例え
ばユーザが、入力部6のペン、デジタイザ、マウス等の
ポインティングデバイスにより指示した移動基準点、ま
たはキーボードから数値で入力した移動基準点をPにセ
ットして、RAM4に格納する。
Next, in step S3, the movement reference point P designated by the user is recognized. That is, in FIG. 5, for example, a user sets a movement reference point designated by a pointing device such as a pen, digitizer, or mouse of the input unit 6 or a movement reference point input by a numerical value from the keyboard to P and stores it in the RAM 4. To do.

【0018】次にステップS4において、ユーザの指示
した移動先指定点Qを認識する。これも図5に示すよう
に、ユーザが入力部6のペン、デジタイザ、マウス等の
ポインティングティデバイスを用いて指示した点、また
はキーボードから数値で入力された移動先指定点をQに
セットして、RAM4に格納する。
Next, in step S4, the destination designation point Q designated by the user is recognized. Also, as shown in FIG. 5, a point designated by the user using a pointing device such as a pen, digitizer, or mouse of the input unit 6 or a designated destination point numerically input from the keyboard is set to Q. , RAM4.

【0019】こうしてステップS5に進み、楕円C0の
中心をOとした時、角度θ=∠POQを算出する。即
ち、RAM4より、移動基準点P,移動先指定点Q、元
の楕円C0のデータを取り出して、CPU2により楕円
C0の中心をOとした時の角度θ=∠POQを算出し
て、RAM4に格納する。
Thus, in step S5, when the center of the ellipse C0 is O, the angle θ = ∠POQ is calculated. That is, the data of the movement reference point P, the movement destination designation point Q, and the original ellipse C0 are fetched from the RAM 4, and the CPU 2 calculates the angle θ = ∠POQ when the center of the ellipse C0 is O, and then the RAM 4 stores it. Store.

【0020】ステップS6では、ステップS1で求めた
変換後の楕円C1を、角度θだけPQ方向に回転した楕
円C2(図6)を算出する。即ち、RAM4より、ステ
ップS1で求めた変換後の楕円C1のデータを取り出
し、CPU2により楕円C1を、図6に示すように、角
度θだけPQ方向に回転した楕円C2のデータを求めて
RAM4に格納する。
In step S6, an ellipse C2 (FIG. 6) obtained by rotating the converted ellipse C1 obtained in step S1 in the PQ direction by an angle θ is calculated. That is, the data of the converted ellipse C1 obtained in step S1 is taken out from the RAM 4, and the CPU 2 obtains the data of the ellipse C2 obtained by rotating the ellipse C1 in the PQ direction by the angle θ as shown in FIG. Store.

【0021】具体的には、例えば図5及び図6におい
て、回転の向きを V=(ベクトル)OP×(ベクトル)PQとしたとき、
VとZ方向(XY平面に垂直な上向き方向)が同一なら
ば、反時計回り方向一方、VとZ方向が逆ならば、時計
回り方向と判定する。こうして判定された回転方向に、
楕円C0の中心を中心として楕円C0の長軸及び短軸を
角度θだけ回転する。
Specifically, for example, in FIGS. 5 and 6, when the direction of rotation is V = (vector) OP × (vector) PQ,
If the V and Z directions (upward direction perpendicular to the XY plane) are the same, the counterclockwise direction is determined. On the other hand, if the V and Z directions are opposite, the clockwise direction is determined. In the rotation direction determined in this way,
The major axis and minor axis of the ellipse C0 are rotated about the center of the ellipse C0 by an angle θ.

【0022】次にステップS7に進み、こうして回転さ
れた楕円C2のx,y座標のそれぞれの最小値または最
大値(x1,y1)を算出する。
Next, in step S7, the minimum or maximum value (x1, y1) of the x and y coordinates of the thus rotated ellipse C2 is calculated.

【0023】これらx,y座標の最小値及び最大値の算
出法について以下に説明する。
The method of calculating the minimum and maximum values of these x and y coordinates will be described below.

【0024】まずステップS1の処理で判定された結果
に基づいて、ケース1の場合には、 楕円C2のx座標の最小値(min)x1、y座標の最小値y
1 ケース2の場合には、 楕円C2のx座標の最大値(max)x1、y座標の最小値y
1 ケース3の場合には、 楕円C2のx座標の最大値x1、y座標の最大値y1 ケース4の場合には、 楕円C2のx座標の最小値x1、y座標の最大値y1 をCPU2によって求め、RAM4に格納する。(図7
参照) 図7の例では、楕円C2は第1象限に位置しているので
上述のケース1に該当し、x座標の最小値x1とy座標
の最小値y1が求められる。
First, based on the result determined in the processing of step S1, in case 1, the minimum value (min) x1 of the x coordinate and the minimum value y of the y coordinate of the ellipse C2.
1 In case 2, the maximum value (max) x1 of the x coordinate and the minimum value y of the y coordinate of the ellipse C2.
1 In the case of Case 3, the maximum value x1 of the x coordinate of the ellipse C2 and the maximum value of the y coordinate y1 In the case of Case 3, the minimum value x1 of the x coordinate of the ellipse C2 and the maximum value y1 of the y coordinate are set by CPU2. Calculated and stored in RAM4. (Fig. 7
In the example of FIG. 7, since the ellipse C2 is located in the first quadrant, it corresponds to case 1 described above, and the minimum value x1 of the x coordinate and the minimum value y1 of the y coordinate are obtained.

【0025】これら座標値x1,y1求める方法は、楕円
の式を、 P(t)= C + a・cos(t) + b・sin(t) (0≦ t <2*π) とし、ここでC:楕円の中心、a:楕円の長軸ベクト
ル、b:楕円の短軸ベクトル、t:パラメータとし、 a=(ax,ay),b=(bx,by) P(t)x=(P(t)のx座標) P(t)y=(P(t)のy座標) としたとき、 ax≠0の場合、 x1=min(P(arctan(bx/ax))x,P(arctan(bx/ax)+π)x) (case1,case4) x1=max(P(arctan(bx/ax))x,P(arctan(bx/ax)+π)x) (case2,case3) y1=min(P(arctan(by/ay))y,P(arctan(by/ay)+π)y) (case1,case2) y1=max(P(arctan(by/ay))y,P(arctan(by/ay)+π)y) (case3,case4) ax=0の場合、 x1=min(bx,-bx) (case1,case4) x1=max(bx,-bx) (case2,case3) y1=min(ay,-ay) (case1,case2) y1=max(ay,-ay) (case3,case4) により求める。
In order to obtain these coordinate values x1 and y1, the ellipse formula is set to P (t) = C + a.cos (t) + b.sin (t) (0≤t <2 * π), where Where C: center of ellipse, a: major axis vector of ellipse, b: minor axis vector of ellipse, t: parameter, a = (ax, ay), b = (bx, by) P (t) x = ( X (coordinate of P (t)) P (t) y = (y coordinate of P (t)) When ax ≠ 0, x1 = min (P (arctan (bx / ax)) x, P ( arctan (bx / ax) + π) x) (case1, case4) x1 = max (P (arctan (bx / ax)) x, P (arctan (bx / ax) + π) x) (case2, case3) y1 = min (P (arctan (by / ay)) y, P (arctan (by / ay) + π) y) (case1, case2) y1 = max (P (arctan (by / ay)) y, P (arctan (by / ay) + π) y) (case3, case4) When ax = 0, x1 = min (bx, -bx) (case1, case4) x1 = max (bx, -bx) (case2, case3) y1 = min (ay, -ay) (case1, case2) y1 = max (ay, -ay) (case3, case4)

【0026】次にステップS8に進み、ベクトルV=
(x0−x1,y0−y1)を求める。即ち、x0,x1,y
0,y1の各データをRAM4から取り出し、CPU2に
よりベクトルV=(x0−x1,y0−y1)を算出して、
その結果をRAM4に格納する。
Next, in step S8, the vector V =
(X0-x1, y0-y1) is calculated. That is, x0, x1, y
Each data of 0 and y1 is taken out from the RAM 4, and the CPU 2 calculates the vector V = (x0-x1, y0-y1),
The result is stored in the RAM 4.

【0027】次にステップS9に進み、楕円C2をベク
トルVだけ平行移動させた楕円をC3とする(図8)。
即ち、RAM4より、ベクトルV、楕円C2のデータを
取り出し、CPU2により楕円C2にベクトルVだけ平
行移動をかけた楕円C3のデータを算出して、RAM4
に格納する。
Next, in step S9, an ellipse obtained by translating the ellipse C2 by the vector V is set as C3 (FIG. 8).
That is, the data of the vector V and the ellipse C2 is taken out from the RAM 4, and the CPU 2 calculates the data of the ellipse C3 obtained by moving the ellipse C2 in parallel by the vector V, and the RAM 4
To store.

【0028】具体的には、楕円C2の中心をO2、楕円
C3の中心をO3とした時、 O3←(ベクトル)O2+(ベクトル)V とする。
Specifically, when the center of the ellipse C2 is O2 and the center of the ellipse C3 is O3, O3 ← (vector) O2 + (vector) V.

【0029】次にステップS10に進み、楕円C3にス
テップS1でかけた回転と逆の回転をかけた楕円を移動
後の楕円とする。これには、楕円C3のデータ、角度φ
の値をRAM4により取り出し、CPU2により楕円C
3に、角度φだけ逆方向に回転変換をかけた楕円のデー
タを算出し、これを移動後の楕円C4のデータとしてR
AM4に格納する(図9参照)。
Next, in step S10, the ellipse obtained by rotating the ellipse C3 in the opposite direction to the rotation obtained in step S1 is set as the moved ellipse. This includes data for ellipse C3, angle φ
The value of is taken out by RAM4, and the ellipse C is made by CPU2.
3 is used to calculate the data of the ellipse that is rotationally converted in the opposite direction by the angle φ, and R is used as the data of the ellipse C4 after the movement.
It is stored in AM4 (see FIG. 9).

【0030】次にステップS11に進み、移動後の楕円
C4を画面に表示する。即ち、移動後の楕円データをR
AM4より取り出して表示部8の画面に表示する。そし
てステップS12に進み、ユーザが移動指示を継続して
いるか判定する。即ち、ユーザが入力部6のポインティ
ングデバイス等を押したままであるかなどを認識して、
移動指示を継続しているかどうかを判定する。移動指示
が継続していればステップS4からのステップを実行
し、継続していなかったら移動後の楕円データを外部記
憶装置10に格納して、本処理を終了する。
Next, in step S11, the moved ellipse C4 is displayed on the screen. That is, the ellipse data after movement is R
It is taken out from AM4 and displayed on the screen of the display unit 8. Then, the process proceeds to step S12, and it is determined whether the user continues to issue the movement instruction. That is, by recognizing whether the user is pressing the pointing device or the like of the input unit 6,
It is determined whether the movement instruction is continued. If the movement instruction is continued, the steps from step S4 are executed, and if it is not continued, the ellipse data after the movement is stored in the external storage device 10, and this processing is ended.

【0031】以上説明したように本発明の第1実施例に
よれば、垂直な2直線に接する楕円を垂直な2直線に接
したまま回転させることにより、2直線が交差する角を
保持するような楕円弧を入力するときのように、微妙な
楕円形状の入力・修正を簡単に、しかも正確にできると
いう効果がある。 [第2実施例]次に本発明の第2実施例を説明する。第
2実施例の図形処理装置の構成は、基本的に前述の第1
実施例の構成と同様であるので、その説明を省略する。
As described above, according to the first embodiment of the present invention, an ellipse which is in contact with two vertical lines is rotated while being in contact with two vertical lines so that the angle at which the two lines intersect is maintained. There is an effect that it is possible to easily and accurately input and correct a subtle elliptical shape such as when inputting an elliptical arc. [Second Embodiment] Next, a second embodiment of the present invention will be described. The configuration of the graphic processing device of the second embodiment is basically the same as that of the first embodiment described above.
Since the configuration is the same as that of the embodiment, its description is omitted.

【0032】この第2実施例は、CAD等のような2次
元図形を処理する装置において、楕円の分割点を立体角
度で指定して、容易に楕円を所望の領域に分割すること
にある。以下、この処理を図10のフローチャートを参
照して説明する。
The second embodiment is to easily divide an ellipse into a desired area by designating a division point of the ellipse by a solid angle in an apparatus for processing a two-dimensional figure such as CAD. Hereinafter, this processing will be described with reference to the flowchart in FIG.

【0033】まず、最初にオペレータは、分割点を指定
したい楕円を入力部6のポインティングデバイスなどに
よりクリックして指定するとステップS21に進み、分
割対象となる楕円情報を抽出し、その楕円情報をRAM
4に格納する。次にステップS22に進み、オペレータ
は入力部6を用いて、楕円の分割の開始点、終了点を指
示する。また、分割数を入力部6より入力する。これは
例えば、図11において、分割の開始点111、終了点
112、分割区間113を表し、分割点は楕円の円周上
の点とする。ここで分割数とは、その分割区間113を
幾つに分割するかを指示する値であり、作成される分割
点の数と一致する。即ち、いま分割数を“2”と指示す
ると、分割点は開始点111、終了点112と一致す
る。こうして指示された分割開始点111、終了点11
2、分割数を、それぞれRAM4に格納する。
First, when the operator clicks and specifies an ellipse for which a division point is to be specified with the pointing device of the input unit 6, the operator proceeds to step S21, extracts ellipse information to be divided, and stores the ellipse information in the RAM.
Store in 4. Next, in step S22, the operator uses the input unit 6 to instruct the start point and end point of the ellipse division. Also, the number of divisions is input from the input unit 6. This represents, for example, the start point 111, the end point 112, and the division section 113 of the division in FIG. 11, and the division points are points on the circumference of the ellipse. Here, the number of divisions is a value that indicates how many divisions the divided section 113 should be divided into, and matches the number of division points to be created. That is, when the number of divisions is designated as "2", the division points coincide with the start point 111 and the end point 112. The division start point 111 and end point 11 thus designated
2 and the number of divisions are stored in the RAM 4, respectively.

【0034】続いてステップS23に進み、オペレータ
は分割を行う平面を指示する。これは図12において、
指示可能な平面は立体図の作図の際、最も使用頻度の高
い3つの等測面、即ちX面114、Y面115、Z面1
16である。ステップS23の分割平面抽出ステップで
は、これを受けて指示された平面をRAM4に格納す
る。
Then, in step S23, the operator designates a plane to be divided. This is shown in FIG.
The planes that can be designated are the three most frequently used isometric planes when drawing a three-dimensional drawing, namely the X plane 114, the Y plane 115, and the Z plane 1.
Sixteen. In the division plane extraction step of step S23, the plane instructed upon receiving this is stored in the RAM 4.

【0035】以上の情報の処理が終了するとステップS
24に進み、分割点の計算及び表示を行ない、分割点の
計算をCPU2にて実行する。まず、ステップS23の
平面抽出ステップで、RAM4に格納した平面情報を参
照し、そのX軸、Y軸、Z軸方向余弦から4×4行列を
計算する。この4×4行列と、ステップS22の分割方
法抽出ステップでRAM4に格納した開始点111、終
了点112の座標値との積を取り、それぞれを3次元座
標に変換する。またここで、楕円の中心点も同様に3次
元座標に変換しておく。
When the processing of the above information is completed, step S
In step 24, the division points are calculated and displayed, and the division points are calculated by the CPU 2. First, in the plane extraction step of step S23, the plane information stored in the RAM 4 is referred to, and a 4 × 4 matrix is calculated from the X-axis, Y-axis, and Z-axis direction cosine. The product of this 4 × 4 matrix and the coordinate values of the start point 111 and the end point 112 stored in the RAM 4 in the division method extraction step of step S22 is taken, and each is converted into three-dimensional coordinates. Also, here, the center point of the ellipse is similarly converted into three-dimensional coordinates.

【0036】次に変換した開始点111、終了点112
のなす角度αを計算し、それをステップS22の分割方
法抽出ステップでRAM4に格納した分割数で割り、角
度βを求める(図13参照)。続いて図13に示すよう
に、楕円の中心点120と開始点111とを結んだ線分
121を定義し、それを楕円の中心点120の回りに角
度βずつ、終了点112まで回転させた線分群122を
求める。これら線分群122が求まると、先程求めた4
×4行列の逆行列を求め、その逆行列と計算した線分座
標との積をとり、2次元平面へ変換する。この2次元平
面への変換が終了したならば、その平面上で、ステップ
S21の楕円抽出ステップでRAM4に格納した楕円
と、今回求めた線分群122の各線分との交点を求め
る。ここで算出した点が立体角度での楕円分割点とな
る。これを表示部8へ表示する。
Next, the converted start point 111 and end point 112
Is calculated and divided by the number of divisions stored in the RAM 4 in the division method extraction step of step S22 to obtain the angle β (see FIG. 13). Subsequently, as shown in FIG. 13, a line segment 121 connecting the center point 120 of the ellipse and the start point 111 is defined, and is rotated by an angle β around the center point 120 of the ellipse to the end point 112. The line segment group 122 is obtained. When these line segment groups 122 are obtained, the 4
An inverse matrix of a × 4 matrix is obtained, and the product of the inverse matrix and the calculated line segment coordinates is obtained and converted into a two-dimensional plane. When the conversion to the two-dimensional plane is completed, the intersection of the ellipse stored in the RAM 4 in the ellipse extraction step of step S21 and each line segment of the line segment group 122 obtained this time is obtained on that plane. The point calculated here becomes an ellipse division point at the solid angle. This is displayed on the display unit 8.

【0037】以上説明したように第2実施例によれば、
平面角度で楕円の分割点を指示し、それに基づいてその
楕円を立体角度で分割できる効果がある。 [第3実施例]前述の実施例では、ステップS23の平
面抽出ステップで、指定可能な平面を、立体図の作図の
際に最も使用頻度の高い3つの等測面即ち、X面、Y
面、Z面であるとしたが、以下に示すような3次元格子
点入力方式によって実現しても構わない。この場合、い
かなる平面も指定可能となる。
As described above, according to the second embodiment,
There is an effect that the division point of the ellipse can be designated by the plane angle and the ellipse can be divided by the solid angle based on the point. [Third Embodiment] In the above-described embodiment, in the plane extraction step of step S23, the planes that can be designated are the three isometric planes most frequently used in drawing a three-dimensional drawing, that is, the X plane, the Y plane.
Although it is assumed that the plane is the Z plane, it may be realized by a three-dimensional lattice point input method as described below. In this case, any plane can be designated.

【0038】図14から図22を参照して、本発明の第
3実施例の処理を説明する。
The processing of the third embodiment of the present invention will be described with reference to FIGS. 14 to 22.

【0039】まずステップS31で、例えば図16に示
すように、初期グリッドを表示する。即ち、表示部8に
グリッドを表示する。ここでグリッドの視線ベクトルは
(1,1,1)の方向を指す。
First, in step S31, an initial grid is displayed, for example, as shown in FIG. That is, the grid is displayed on the display unit 8. Here, the line-of-sight vector of the grid points in the (1,1,1) direction.

【0040】次にステップS32に進み、グリッドを変
更するように指示されたか否かを判断する。変更すると
きはステップS33に進み、変更種別を判定するが、変
更しないときは作図する図形種別を抽出する。ステップ
S33では、グリッドの変更が、並進・回転・間隔変更
・表示/非表示モード切替え・適合/不適合モード切替
えのいずれであるかを判定する。
Next, in step S32, it is determined whether or not an instruction to change the grid has been given. If it is changed, the process proceeds to step S33 to determine the change type, but if it is not changed, the figure type to be drawn is extracted. In step S33, it is determined whether the grid change is translation / rotation / interval change / display / non-display mode switching / adaptive / incompatible mode switching.

【0041】変更種別が並進であればステップS38に
進み、入力並進量の抽出を行ない、入力部6のキーボー
ドあるいはポインティングデバイス等を用いて入力され
た並進量を抽出する。そしてステップS41の並進処理
では、ステップS38で抽出された並進量に基づいて、
並進後のグリッドの計算を行なう。そしてステップS4
3に進み、その計算された値に基づいて、表示部8にグ
リッドを再表示する。この時、表示部8の表示は、図1
7に示すような状態となる。この図17は、図16の初
期グリッドに対し、並進量として、X=15,Y=−4
5を指定した状態を表している。
If the change type is translation, the process proceeds to step S38, the input translation amount is extracted, and the translation amount input using the keyboard of the input unit 6 or the pointing device is extracted. Then, in the translation process of step S41, based on the translation amount extracted in step S38,
Calculate the grid after translation. And step S4
Then, the process proceeds to step 3, and the grid is redisplayed on the display unit 8 based on the calculated value. At this time, the display on the display unit 8 is as shown in FIG.
The state becomes as shown in 7. In this FIG. 17, with respect to the initial grid of FIG. 16, as translation amounts, X = 15, Y = −4.
This indicates a state in which 5 is designated.

【0042】又ステップS33で、変更種別が回転であ
ったならばステップS37に進み、入力部6のキーボー
ドあるいはポインティングデバイスを用いて入力された
回転軸を抽出する。この場合の回転軸は、絶対座標系の
X,Y,Z軸およびグリッド平面のX,Y,Z軸、ある
いは任意の1軸のうちいずれかを指定できる。各X,
Y,Z軸は入力部6のポインティングデバイスによるク
リック操作、あるいは入力部6のキーボードによる名称
の入力で指示される。その場合、指定された軸の表示色
を赤に変更する。任意の1軸については、キーボードに
より、例えばベクトルを数値で入力したり、或はは表示
部8に表示されている線分をポインティングデバイス等
で指示する。この時、キーボードによる指示であれば、
そのベクトルに応じた線分を新規に生成して赤色で表示
し、ポインティングデバイスを用いたクリック操作によ
るものならば、クリックされた線分の表示色を赤に変更
する。
If the change type is rotation in step S33, the flow advances to step S37 to extract the rotation axis input using the keyboard of the input unit 6 or the pointing device. In this case, the rotation axis can be designated as the X, Y, Z axes of the absolute coordinate system and the X, Y, Z axes of the grid plane, or any one axis. Each X,
The Y and Z axes are instructed by a click operation by the pointing device of the input unit 6 or a name input by the keyboard of the input unit 6. In that case, the display color of the specified axis is changed to red. For an arbitrary one axis, for example, a vector is numerically input with a keyboard, or a line segment displayed on the display unit 8 is designated by a pointing device or the like. At this time, if it is an instruction from the keyboard,
A line segment corresponding to the vector is newly generated and displayed in red, and if the click operation is performed using the pointing device, the display color of the clicked line segment is changed to red.

【0043】次にステップS40に進み、入力部6によ
り入力される回転角を取り込む。そしてステップS42
に進み、ステップS37で入力された回転軸、およびス
テップS40で入力された回転角に基づいてグリッドを
回転させた時の、その回転後のグリッドの位置を求め
る。そしてステップS43に進み、その計算された値に
基づいて、グリッドを表示部8に再表示する。この時、
表示部8の表示は、例えば図18に示すような状態とな
る。この図18は、図17の状態にあるグリッドに対
し、回転軸をグリッド平面座標系Z軸とし、回転角とし
て−15゜を指定した状態を表している。
Next, in step S40, the rotation angle input by the input unit 6 is fetched. And step S42
Then, the position of the grid after the rotation is obtained when the grid is rotated based on the rotation axis input in step S37 and the rotation angle input in step S40. Then, in step S43, the grid is displayed again on the display unit 8 based on the calculated value. This time,
The display on the display unit 8 is in a state as shown in FIG. 18, for example. FIG. 18 shows a state where the rotation axis is the grid plane coordinate system Z-axis and the rotation angle is -15 ° with respect to the grid in the state shown in FIG.

【0044】又ステップS33の判定において、変更種
別がグリッドの間隔値の変更であったならばステップS
36に進み、入力部6より入力された間隔値を入力す
る。そしてステップS39に進み、ステップS36で入
力された間隔値に基づいて、その新たな間隔値に基づく
グリッドの計算を行なう。そしてステップS43に進
み、その計算された値に基づいて、グリッドを表示部8
に再表示する。この時、表示部8の表示結果は、例えば
図19のような状態となる。この図19は、図18の初
期グリッドに対し、グリッド間の間隔値が“30”に指
定された状態を表している。
If it is determined in step S33 that the change type is a change in the grid interval value, step S33.
Proceeding to 36, the interval value input from the input unit 6 is input. Then, the process proceeds to step S39, and the grid is calculated based on the new interval value based on the interval value input in step S36. Then, in step S43, the grid is displayed on the display unit 8 based on the calculated value.
To display again. At this time, the display result of the display unit 8 is, for example, as shown in FIG. This FIG. 19 shows a state in which the interval value between grids is designated as “30” for the initial grid of FIG.

【0045】更にステップS33で、変更種別が表示/
非表示モードの切替えであったならばステップS35に
進み、現在、表示状態なのか非表示状態なのかをRAM
4に格納されている表示/非表示フラグにより判定し、
非表示状態であったならばRAM4の非表示フラグを反
転してステップS43に進み、グリッドの表示を行な
う。一方、そうではなくて表示状態であったならば、R
AM4の表示フラグをオフしてグリッドの表示を消去す
る。
Further, in step S33, the change type is displayed /
If it is the switching of the non-display mode, the process proceeds to step S35 to determine whether the display state or the non-display state is currently in the RAM.
Determined by the display / non-display flag stored in 4,
If it is in the non-display state, the non-display flag of the RAM 4 is inverted and the process proceeds to step S43 to display the grid. On the other hand, if the display state is not the case, R
The display flag of AM4 is turned off and the display of the grid is erased.

【0046】更に又ステップS33で、変更種別が適合
/不適合モードの切替えであったならばステップS34
に進み、現在の状態をRAM4に格納されている適合/
不適合フラグにより判定し、適合状態であったならば不
適合に、不適合状態であったならば適合に、そのフラグ
の状態を反転する。これと同時にRAM4に格納されて
いる適合/不適合フラグの値も変更する。
Furthermore, if it is determined in step S33 that the change type is switching between conforming / nonconforming modes, step S34.
To the current state stored in RAM4
The determination is made based on the non-conformity flag, and the state of the flag is inverted to non-conformance if it is a conforming state and to conforming if it is a non-conforming state. At the same time, the value of the conformity / nonconformity flag stored in the RAM 4 is also changed.

【0047】前述のステップS32でグリッドを変更し
ないときはステップS44に進み、これ以後に作図する
要素の種別を入力部6により選択する。こうして選択さ
れた結果の作図図形種別を表すデータをRAM4に格納
する。
When the grid is not changed in step S32 described above, the process proceeds to step S44, and the type of element to be plotted thereafter is selected by the input unit 6. The RAM 4 stores the data representing the type of drawing figure resulting from the selection.

【0048】ステップS45では、実施された入力がキ
ーボードによるものなのか、ポインティングデバイスに
よるかを判断し、キーボードからの入力であればステッ
プS48に進み、キーボードにより入力された数値を抽
出し、現在表示部8に表示されているグリッドとは無関
係に、その入力された値をそのまま指示座標と認識しR
AM4に格納する。一方、ポインティングデバイスによ
る入力のときはステップS47に進み、ポインティング
デバイスを用いて入力された、表示部8上の座標を抽出
する。続いてステップS49に進み、現在の状態がグリ
ッド適合モードであるか否かを、RAM4に格納されて
いる適合/不適合フラグにより判別する。判別の結果、
グリッド適合モードであるならばステップS50に進
み、そうでなければステップS51に進む。
In step S45, it is determined whether the input performed is from the keyboard or the pointing device. If the input is from the keyboard, the process proceeds to step S48 to extract the numerical value input from the keyboard and display the present value. Regardless of the grid displayed on the part 8, the input value is directly recognized as the designated coordinate and R
Store in AM4. On the other hand, when the input is made by the pointing device, the process proceeds to step S47, and the coordinates input by the pointing device on the display unit 8 are extracted. Succeedingly, in a step S49, it is determined whether or not the current state is the grid matching mode by the matching / non-matching flag stored in the RAM 4. As a result of the determination,
If it is the grid fitting mode, the process proceeds to step S50, and if not, the process proceeds to step S51.

【0049】ステップS50ではステップS47で抽出
した表示部8上の座標に最も近いグリッド点を計算し、
その点の座標を指示座標と認識する。この時の表示部8
は、図20に示すような状態となっている。図20にお
いて、画面下方の十字マークが、ポインティングデバイ
スの操作により移動するカーソルを示している。図20
の場合では、最も近いグリッド点は、カーソルの下方向
の点と計算され、その点を指示座標と認識してRAM4
に格納する。
In step S50, the grid point closest to the coordinates on the display unit 8 extracted in step S47 is calculated,
The coordinates of that point are recognized as the designated coordinates. Display unit 8 at this time
Is in a state as shown in FIG. In FIG. 20, a cross mark at the bottom of the screen indicates a cursor that is moved by operating the pointing device. Figure 20
In the case of, the closest grid point is calculated as the point in the downward direction of the cursor, and that point is recognized as the designated coordinate and RAM4
To store.

【0050】グリッド不適合モードのときはステップS
51に進み、ステップS47で抽出した表示部8上の座
標をそのまま指示座標と認識してRAM4に格納する。
In the grid incompatible mode, step S
In step 51, the coordinates on the display unit 8 extracted in step S47 are recognized as designated coordinates and stored in the RAM 4 as they are.

【0051】こうしてステップS52に進み、RAM4
に格納されている指示座標を図形の要素点と認識してR
AM4に格納する。ここで、図形の要素点とは、その図
形を顕著に表す点のことで、線分ならば始・終点に該当
し、円ならば中心点および円周上の一点、円弧ならば中
心点および円弧の始・終点を示す。これらの要素点は作
図する図形によって変化するわけであるが、ステップS
53では、要素点の指定が終了したかどうかを、RAM
4に格納されている作図図形種別を参照して、その図形
種別に応じて、要素点の指定が全て終了したか否かを判
別する。要素点の指定が終了していない、例えば図形種
別が線分で、かつ始点の指定のみで終わっている場合は
ステップS45の座標指示方法の判定ステップへ戻る。
Thus, the process proceeds to step S52 and the RAM 4
Recognize the designated coordinates stored in
Store in AM4. Here, the element point of a figure is a point that remarkably represents the figure. If it is a line segment, it corresponds to the start and end points, if it is a circle, the center point and one point on the circumference, if it is an arc, the center point and Indicates the start and end points of the arc. These element points change depending on the figure to be drawn, but step S
In 53, it is determined whether or not the designation of the element points is completed in the RAM.
Referring to the drawing figure type stored in 4, it is determined whether all the element points have been designated according to the figure type. If the designation of the element points is not completed, for example, if the figure type is a line segment and it is finished only by designating the start point, the process returns to the determination step of the coordinate designating method in step S45.

【0052】こうして要素点が全て指定されるとステッ
プS53からステップS54に進み、RAM4に格納さ
れている作図図形種別と各要素点とを基に、図形を表示
部8に表示するとともに、RAM4に格納する。
When all the element points are designated in this way, the process proceeds from step S53 to step S54, and the figure is displayed on the display unit 8 based on the drawing figure type and each element point stored in the RAM 4, and the RAM 4 is also displayed. Store.

【0053】図21は、グリッド適合モードにおいて、
ポインティングデバイスを用いて円弧の作画を実施した
際の表示部8の表示状態を表す。
FIG. 21 shows that in the grid fitting mode,
7 shows a display state of the display unit 8 when an arc is drawn by using a pointing device.

【0054】この実施例に従って、グリッドの回転・並
進などを行なって作図した立体図の一例を図22に示
す。
FIG. 22 shows an example of a three-dimensional drawing produced by rotating and translating the grid in accordance with this embodiment.

【0055】以上説明したように第3実施例によれば、
分割する平面を、前述の3つの等測面だけでなく、任意
の平面を基準として指定できる効果がある。
As described above, according to the third embodiment,
There is an effect that a plane to be divided can be designated based on not only the above-mentioned three isometric planes but also any plane.

【0056】尚、本発明は、複数の機器から構成される
システムに適用しても1つの機器から成る装置に適用し
ても良い。また、本発明は、システム或は装置に本発明
を実施するプログラムを供給することによって達成され
る場合にも適用できる。
The present invention may be applied to a system composed of a plurality of devices or an apparatus composed of one device. The present invention can also be applied to the case where it is achieved by supplying a program for implementing the present invention to a system or an apparatus.

【0057】[0057]

【発明の効果】以上説明したように本発明によれば、微
妙な楕円形状の入力・修正を簡単に、しかも正確にでき
る。
As described above, according to the present invention, it is possible to easily and accurately input / correct a subtle elliptical shape.

【0058】[0058]

【0059】[0059]

【0060】[0060]

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

【図1】本発明の第1実施例の図形処理を示すフローチ
ャートである。
FIG. 1 is a flowchart showing graphic processing according to a first embodiment of the present invention.

【図2】本実施例の図形処理装置の概略構成を示すブロ
ック図である。
FIG. 2 is a block diagram showing a schematic configuration of a graphic processing device of this embodiment.

【図3】楕円の構成要素を説明する図である。FIG. 3 is a diagram illustrating components of an ellipse.

【図4】楕円に接する2つの直線を、x,y軸に平行に
なるように座標変換をかける状態を説明する図である。
FIG. 4 is a diagram illustrating a state in which coordinate conversion is performed so that two straight lines in contact with an ellipse are parallel to the x and y axes.

【図5】楕円の移動基準点、移動先指示点が指示された
とき、その移動回転角度を説明する図である。
FIG. 5 is a diagram illustrating a movement rotation angle when an elliptical movement reference point and a movement destination designation point are designated.

【図6】第4図の楕円を図5に示すようにして指示され
た角度だけ回転させることを説明する図である。
FIG. 6 is a diagram illustrating that the ellipse shown in FIG. 4 is rotated by the designated angle as shown in FIG.

【図7】図6の楕円のX座標、Y座標の最大、最小値の
定義を説明する図である。
FIG. 7 is a diagram illustrating the definitions of the maximum and minimum values of the X coordinate and Y coordinate of the ellipse in FIG.

【図8】図7の楕円をx,y軸に平行な直線に接するよ
うに楕円に平行移動をかけることを説明する図である。
FIG. 8 is a diagram for explaining parallel translation of the ellipse of FIG. 7 so as to contact a straight line parallel to the x and y axes.

【図9】図8の楕円を図4に示す元の座標系に戻す処理
を説明する図である。
9 is a diagram illustrating a process of returning the ellipse of FIG. 8 to the original coordinate system shown in FIG.

【図10】本発明の第2実施例の処理を示すフローチャ
ートである。
FIG. 10 is a flowchart showing the processing of the second embodiment of the present invention.

【図11】楕円に対して開始点、終了点及び分割区間の
指示例を示す図である。
FIG. 11 is a diagram showing an example of designation of a start point, an end point, and a division section for an ellipse.

【図12】第2実施例における分割平面の一例を示す図
である。
FIG. 12 is a diagram showing an example of a division plane in the second embodiment.

【図13】第2実施例における分割点の計算を説明する
図である。
FIG. 13 is a diagram for explaining calculation of division points in the second embodiment.

【図14】本発明の第3実施例の処理の流れを示すフロ
ーチャートである。
FIG. 14 is a flowchart showing a processing flow of a third embodiment of the present invention.

【図15】本発明の第3実施例の処理の流れを示すフロ
ーチャートである。
FIG. 15 is a flow chart showing a processing flow of a third embodiment of the present invention.

【図16】第3実施例のグリッドの表示例を示す図であ
る。
FIG. 16 is a diagram showing a display example of a grid according to the third embodiment.

【図17】グリッドの並進処理を行ったときの表示例を
示す図である。
FIG. 17 is a diagram showing a display example when a grid translation process is performed.

【図18】グリッドの回転処理を行ったときの表示例を
示す図である。
FIG. 18 is a diagram showing a display example when grid rotation processing is performed.

【図19】グリッドの間隔の変更処理を行ったときの表
示例を示す図である。
FIG. 19 is a diagram showing a display example when a grid interval changing process is performed.

【図20】グリッド上での座標指示を説明する図であ
る。
FIG. 20 is a diagram illustrating coordinate designation on a grid.

【図21】グリッド適合モードで、ポインティングデバ
イスを用いて円弧を作画した状態を示す図である。
FIG. 21 is a diagram showing a state in which an arc is drawn using a pointing device in the grid fitting mode.

【図22】第3実施例により立体図を作図した例を示す
図である。
FIG. 22 is a diagram showing an example in which a three-dimensional drawing is drawn according to the third embodiment.

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

2 CPU 3 ROM 4 RAM 6 入力部 8 表示部 10 外部記憶装置 111 開始点 112 終了点 401,402,403,404 接線 410 原点 2 CPU 3 ROM 4 RAM 6 Input section 8 Display 10 External storage device 111 starting point 112 end point Tangent line 401, 402, 403, 404 410 origin

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平3−192471(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06T 1/00 G06T 11/60 - 17/50 G06T 17/50 ─────────────────────────────────────────────────── ─── Continuation of the front page (56) Reference JP-A-3-192471 (JP, A) (58) Fields investigated (Int.Cl. 7 , DB name) G06T 1/00 G06T 11/60-17 / 50 G06T 17/50

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 記憶部、表示部及び入力部を具備する図
形処理装置における図形処理方法であって、 前記記憶部に記憶された楕円及び該 楕円に接する互いに
直交する2直線を読み出す読出工程と、前記読出工程で読み出した楕円及び2直線を前記表示部
の表示画面に表示する表示工程と、 前記表示画面に表示された2直線が含まれる平面上で
記入力部により指示された移動基準点を認識する工程
と、 前記平面上で前記入力部により指示された移動先指示点
を認識する工程と、前記2直線の交点を中心として前記2直線がX軸とY軸
にそれぞれ平行となるように回転した楕円及び2直線を
算出する算出工程と、 前記読出工程で読み出した楕円の中心と前記移動基準点
及び前記移動先点とのなす角度だけ前記算出工程で算出
した回転後の楕円を回転する回転工程と、前記回転工程により 回転された楕円に接する互いに直交
するそれぞれX軸とY軸に平行な2直線と前記回転工程
による回転前の楕円に接している2直線との位置ずれを
求める工程と、 前記位置ずれの量に応じて、前記算出工程で算出した
円の位置を移動する移動工程と、前記移動工程で移動した楕円を前記算出工程による回転
と逆回りに回転した楕円を算出する工程と、 前記算出する工程で算出した楕円を前記表示画面に表示
する工程と、 を有することを特徴とする図形情報処理方
法。
1. A diagram including a storage unit, a display unit, and an input unit.
A figure processing method in a shape processing apparatus , comprising: a reading step of reading an ellipse stored in the storage section and two straight lines which are in contact with the ellipse and which are orthogonal to each other; and the ellipse and the two straight lines read in the reading step are displayed in the display section.
A display step of displaying on the display screen, before in a plane that contains the two lines displayed on the display screen
The step of recognizing the movement reference point designated by the input unit , the step of recognizing the movement destination designated point designated by the input unit on the plane, and the two straight lines being centered on the intersection of the two straight lines. Axis and Y axis
An ellipse and two straight lines rotated so that they are parallel to
A calculation step of calculating, and an angle formed between the center of the ellipse read in the reading step and the movement reference point and the movement destination point are calculated in the calculation step.
Rotation step and, said rotation step and two straight lines parallel to the X-axis and Y-axis respectively orthogonal to each other in contact to the spheroid by rotating step of rotating an ellipse after the rotation was
A step of obtaining a positional deviation from two straight lines in contact with the ellipse before rotation, and a step of moving the position of the ellipse calculated in the calculating step according to the amount of the positional deviation. Rotate the ellipse moved in the moving step by the calculation step
And a step of calculating an ellipse rotated in the opposite direction, and displaying the ellipse calculated in the calculating step on the display screen
Graphic processing method characterized by comprising the steps of, a.
【請求項2】 楕円に関する情報及び前記楕円に接する
互いに直交する2直線の情報を記憶する記憶手段と、前記記憶手段に記憶された前記楕円及び2直線の情報に
基づき、表示画面上に楕円と2直線を表示する表示制御
手段と、 前記2直線の交点を中心として、前記2直線がX軸とY
軸にそれぞれ平行となるように回転した楕円及び2直線
を算出する算出手段と、 前記表示制御手段により 前記楕円及び2直線を前記表示
画面上に表示した状態で指示される前記楕円の移動基準
点及び移動先指示点に基づいて、前記楕円の中心と前記
移動基準点及び前記移動先点とのなす角度だけ前記算出
手段により算出した楕円を回転させる回転手段と、 前記回転手段により回転された楕円に接する互いに直交
するそれぞれX軸とY軸に平行な2直線と前記回転手段
による回転前の楕円に接している2直線との位置ずれを
求める手段と、 前記位置ずれの量に応じて、前記算出手段で算出した
円の位置を移動する移動手段と、前記移動手段で移動した楕円を前記算出手段による回転
と逆回りに回転した楕円を算出する手段と、 前記算出する手段で算出した楕円を前記表示画面に表示
する表示手段と、 を有することを特徴とする図形情報処
理装置。
2. Storage means for storing information on an ellipse and information on two straight lines in contact with the ellipse and orthogonal to each other, and information on the ellipse and two straight lines stored in the storage means.
Display control that displays an ellipse and two straight lines on the display screen based on
Means and the two straight lines centering on the intersection of the two straight lines
Ellipse and two straight lines rotated so that they are parallel to each axis
Based on a movement reference point and a movement destination designation point of the ellipse designated by the display control means in a state where the ellipse and two straight lines are displayed on the display screen. The calculation is performed only for the angle formed by the center of the ellipse and the movement reference point and the movement destination point.
Rotation means for rotating the ellipse calculated by the means, and orthogonal to each other contacting the ellipse rotated by the rotation means
2 straight lines respectively parallel to the X-axis and the Y-axis and the rotating means
Means for determining the positional deviation between the two straight lines in contact with the ellipse before rotation by a moving means in accordance with an amount of the positional deviation, moving the position of the elliptic <br/> circles calculated by the calculating means, Rotate the ellipse moved by the moving means by the calculating means
And a means for calculating an ellipse rotated in the opposite direction, and the ellipse calculated by the means for calculating is displayed on the display screen.
A graphic information processing apparatus, comprising:
JP22959094A 1994-09-26 1994-09-26 Graphic information processing method and apparatus Expired - Fee Related JP3363611B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22959094A JP3363611B2 (en) 1994-09-26 1994-09-26 Graphic information processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22959094A JP3363611B2 (en) 1994-09-26 1994-09-26 Graphic information processing method and apparatus

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2002218579A Division JP3684218B2 (en) 2002-07-26 2002-07-26 Graphic information processing method and apparatus

Publications (2)

Publication Number Publication Date
JPH0896158A JPH0896158A (en) 1996-04-12
JP3363611B2 true JP3363611B2 (en) 2003-01-08

Family

ID=16894573

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22959094A Expired - Fee Related JP3363611B2 (en) 1994-09-26 1994-09-26 Graphic information processing method and apparatus

Country Status (1)

Country Link
JP (1) JP3363611B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4498534B2 (en) * 2000-04-17 2010-07-07 インターグラフ ソフトウェア テクノロジーズ カンパニー CAD
CN112785638A (en) * 2020-01-02 2021-05-11 珠海金山办公软件有限公司 Graph processing method and device

Also Published As

Publication number Publication date
JPH0896158A (en) 1996-04-12

Similar Documents

Publication Publication Date Title
JP3363611B2 (en) Graphic information processing method and apparatus
JP3599198B2 (en) Figure editing device
JP3357760B2 (en) Character / graphic input editing device
JP3684218B2 (en) Graphic information processing method and apparatus
JP3727975B2 (en) Graphic processing method and apparatus
JPH06215074A (en) Graphic processor
JPH087120A (en) Device and method for processing image
JP2663967B2 (en) Information storage control method
JPH04163592A (en) Method of window display
JP3036813B2 (en) Plotting device
JPS63118882A (en) Image editing device
JP2571178B2 (en) 3D graphics processor
JP2880605B2 (en) Graphic display device
JP2812861B2 (en) Graphic specific part movement control method
JP3703814B2 (en) How to create a circle
JP2997600B2 (en) Display control device
JPH02250178A (en) Graphic generator
JPS60188987A (en) Display unit
JPH05314269A (en) Graph preparing device
JPS6155728A (en) Coordinate input device
JP2669366B2 (en) Line-symmetric figure input device
JP2832007B2 (en) Information processing device
JPH07200862A (en) Graphic input device
JPH0620022A (en) Data preparing device
JPH07200863A (en) Graphic input method

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20020927

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071025

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081025

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091025

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091025

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101025

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101025

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111025

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111025

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121025

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131025

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees