JPH07200852A - Graphic transformation device - Google Patents
Graphic transformation deviceInfo
- Publication number
- JPH07200852A JPH07200852A JP5334152A JP33415293A JPH07200852A JP H07200852 A JPH07200852 A JP H07200852A JP 5334152 A JP5334152 A JP 5334152A JP 33415293 A JP33415293 A JP 33415293A JP H07200852 A JPH07200852 A JP H07200852A
- Authority
- JP
- Japan
- Prior art keywords
- frame
- deformation
- point
- line drawing
- graphic
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Controls And Circuits For Display Device (AREA)
- Processing Or Creating Images (AREA)
- Image Processing (AREA)
Abstract
(57)【要約】
【目的】 画像処理において、任意の線画を変形させる
ことのできる図形変形装置に関し、任意の線画を少ない
変形情報のみで変形可能とし、かつ変形情報の作成を容
易にすることを目的とする。
【構成】 図3(a) の変形前の線画図形上の点P1を通
り辺T1−T2に平行な直線W11−W12が点P1で
分割される場合の分割比と、図3(b) の変形後の線画図
形上の点P1′を通り辺T1′−T2′に平行な直線W
11′−W12′が点P1′で分割される場合の分割比
とが等しくなるように、点P1′が算出される。点P2
とP2′についても、辺T1−T3に平行な直線W21
−W22と辺T1′−T3′に平行な直線W21′−W
22′との関係において、上述の場合と同様の関係のも
とで、点P2′が算出される。この結果、点P1、P2
を含む線画図形が点P1′、P2′を含む線画図形に変
形される。
(57) [Abstract] [Purpose] To a graphic deforming device capable of deforming an arbitrary line drawing in image processing, capable of deforming an arbitrary line drawing with a small amount of deformation information, and facilitating creation of deformation information. With the goal. [Structure] A division ratio when a straight line W11-W12 passing through a point P1 on the line drawing figure before deformation in FIG. 3 (a) and parallel to the sides T1-T2 is divided at a point P1, and FIG. A straight line W passing through the point P1 'on the transformed line drawing figure and parallel to the side T1'-T2'
The point P1 'is calculated so that the division ratio when 11'-W12' is divided at the point P1 'is equal. Point P2
And P2 ', a straight line W21 parallel to the side T1-T3
-W22 and a straight line W21'-W parallel to the side T1'-T3 '
Regarding the relation with 22 ', the point P2' is calculated under the same relation as the above case. As a result, points P1 and P2
The line drawing figure including "" is transformed into a line drawing figure including points P1 'and P2'.
Description
【0001】[0001]
【産業上の利用分野】本発明は、画像処理において、任
意の線画を変形させることのできる図形変形装置に関す
る。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a graphic transformation device capable of transforming an arbitrary line drawing in image processing.
【0002】[0002]
【従来の技術及び発明が解決しようとする課題】コンピ
ュータ画像処理において、アニメーション処理を行うこ
となどを目的として、点描画、直線、曲線関数などによ
って描かれた線画を変形させる処理が多く行われる。2. Description of the Related Art In computer image processing, a lot of processing is performed for transforming a line drawing drawn by a point drawing, a straight line, a curve function or the like for the purpose of performing animation processing.
【0003】しかし、従来は、線画を変形させるため
に、線画を構成する各点の変形情報、各直線の始点及び
終点の変形情報、又は曲線関数の各パラメータの変形情
報などが必要であり、線画といえども、それを変形させ
るためには大量のデータが必要であるという問題点を有
していた。However, conventionally, in order to deform a line drawing, the deformation information of each point forming the line drawing, the deformation information of the start point and the end point of each straight line, or the deformation information of each parameter of the curve function is required. Even a line drawing has a problem that a large amount of data is required to deform it.
【0004】本発明の課題は、任意の線画を少ない変形
情報のみで変形可能とし、かつ変形情報の作成を容易に
することにある。An object of the present invention is to make it possible to transform an arbitrary line drawing with a small amount of transformation information and to facilitate the creation of the transformation information.
【0005】[0005]
【課題を解決するための手段】本発明はまず、線画図形
を表示する図形表示手段(表示装置104)を有する。The present invention firstly has graphic display means (display device 104) for displaying a line drawing graphic.
【0006】次に、図形表示手段における表示画面上
で、線画図形を囲む任意の三角形のフレームを決定する
フレーム決定手段(CPU101によって実行される図
2のステップ202)を有する。Next, the graphic display means has a frame determination means (step 202 of FIG. 2 executed by the CPU 101) for determining an arbitrary triangular frame surrounding the line drawing figure on the display screen.
【0007】次に、図形表示手段における表示画面上
で、フレーム決定手段で決定された三角形のフレームを
変形させるフレーム変形手段(CPU101によって実
行される図2のステップ203)を有する。Next, there is a frame transforming means (step 203 in FIG. 2 executed by the CPU 101) for transforming the triangular frame determined by the frame determining means on the display screen of the graphic display means.
【0008】そして、フレーム決定手段で決定された変
形前の三角形のフレームを構成する3つの頂点とフレー
ム変形手段で変形された後の三角形のフレームを構成す
る3つの頂点との位置関係に基づき、線画図形を変形さ
せる図形変形演算手段(CPU101によって実行され
る図2のステップ204)を有する。この図形変形演算
手段は、例えば、変形前の線画図形上の任意の点につ
き、その任意の点を通り変形前の三角形の任意の辺に平
行な直線上において、その直線と変形前の三角形の辺と
が交わる2点を端点とする線分が任意の点によって分割
される場合の分割比と、変形前の線画図形上の任意の点
に対応する変形後の線画図形上の点について、その変形
後の線画図形上の点を通り変形前の三角形の任意の辺に
対応する変形後の三角形の辺に平行な直線上において、
その直線と変形後の三角形の辺とが交わる2点を端点と
する線分が変形後の線画図形上の点によって分割される
場合の分割比とが等しくなるように、変形前の線画図形
上の任意の点に対応する変形後の線画図形上の点を算出
する。Then, based on the positional relationship between the three vertices forming the triangular frame before deformation determined by the frame determining means and the three vertices forming the triangular frame deformed by the frame deforming means, It has a graphic transformation calculation means (step 204 in FIG. 2 executed by the CPU 101) for transforming a line drawing graphic. For example, the figure deformation calculation means may be configured such that, for any point on the line drawing figure before deformation, on that straight line that passes through that point and is parallel to any side of the triangle before deformation, the straight line and the triangle before deformation are The division ratio when a line segment whose two end points intersect with a side is divided by arbitrary points, and the points on the line drawing figure after deformation corresponding to the arbitrary points on the line drawing figure before deformation, On a straight line passing through the points on the transformed line drawing figure and corresponding to any side of the untransformed triangle, parallel to the sides of the transformed triangle,
On the line drawing figure before the deformation, the line segment having two points where the straight line and the side of the triangle after the deformation intersect as the end points are equal to the division ratio when the points on the line drawing figure after the transformation are divided. The point on the transformed line drawing figure corresponding to the arbitrary point of is calculated.
【0009】上述の発明の構成において、フレーム変形
手段は、図形表示手段における表示画面上で、フレーム
決定手段で決定された三角形のフレームの任意の1つの
頂点を固定した状態で、フレーム決定手段で決定された
三角形のフレームを変形させるように、構成することが
できる。In the above-mentioned configuration of the invention, the frame deforming means is a frame determining means while fixing any one vertex of the triangular frame determined by the frame determining means on the display screen of the graphic displaying means. It can be configured to deform the determined triangular frame.
【0010】また、フレーム決定手段において決定され
る三角形のフレームは、直角三角形のフレームであるよ
うに、発明を構成することができる。Further, the invention can be configured such that the triangular frame determined by the frame determining means is a right triangle frame.
【0011】[0011]
【作用】フレーム決定手段で決定された変形前の三角形
のフレームを構成する3つの頂点と前記フレーム変形手
段で変形された後の三角形のフレームを構成する3つの
頂点との位置関係のみとして、線画図形の変形情報を作
成できるため、図形変形処理の処理量が少なくて済む。The line drawing is only the positional relationship between the three vertices forming the triangular frame before the deformation determined by the frame determining means and the three vertices forming the triangular frame after the deformation by the frame deforming means. Since the transformation information of the figure can be created, the processing amount of the figure transformation process can be small.
【0012】また、そのような位置関係が保存されるよ
うに線画図形を変形するだけで、線画図形の変形を簡単
に実現できる。ここで、フレーム決定手段で決定された
三角形のフレームの任意の1つの頂点を固定した状態で
三角形のフレームを変形させることにより、線画図形の
変形時の演算量を削減できる。Further, the transformation of the line drawing figure can be easily realized only by transforming the line drawing figure so that such positional relationship is preserved. Here, by deforming the triangular frame in a state where any one of the vertices of the triangular frame determined by the frame determining means is fixed, it is possible to reduce the calculation amount when the line drawing figure is deformed.
【0013】更に、フレーム決定手段において決定され
る三角形のフレームが直角三角形のフレームとなるよう
に構成されることにより、線画図形の変形時の演算量を
更に削減できる。Further, since the triangular frame determined by the frame determining means is a right-angled triangular frame, the amount of calculation at the time of transformation of the line drawing figure can be further reduced.
【0014】[0014]
【実施例】以下、図面を参照しながら本発明の3つの実
施例につき詳細に説明する。第1の実施例 図1は、図形変形装置の第1の実施例の構成図である。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Three embodiments of the present invention will be described in detail below with reference to the drawings. First Embodiment FIG. 1 is a configuration diagram of a first embodiment of a graphic transformation device.
【0015】CPU101は、ROM102に記憶され
た制御プログラムに従ってRAM103をワークメモリ
として使用しながら動作し、図形変形のための全ての動
作を制御する。The CPU 101 operates while using the RAM 103 as a work memory according to a control program stored in the ROM 102, and controls all operations for graphic transformation.
【0016】表示装置104は、変形前の図形と変形後
の図形を表示するための例えばCRTディスプレイであ
る。この場合、図形を三角形のフレーム(後述する)で
囲むための、マウスなどによる表示位置のポイント機能
も含む。The display device 104 is, for example, a CRT display for displaying a figure before transformation and a figure after transformation. In this case, it also includes a point function of a display position with a mouse or the like for enclosing a figure in a triangular frame (described later).
【0017】図2は、第1の実施例における図形変形処
理の概略を示す動作フローチャートである。まず、ステ
ップ201では、ユーザが、表示装置104上で、変形
を行いたい元図形を選択する。具体的には、ユーザは、
表示装置104上に表示されているマウスカーソルを選
択したい元図形(線画)上に移動しマウスボタンをクリ
ックすることによって、その元図形を選択する。又は、
ユーザは、複数の元図形(線画)を含む範囲を、マウス
を使ってボックスで囲むようにしてもよい。これに反応
して、CPU101は、RAM103上に展開されてい
る図形データ上において、選択された元図形の座標値、
具体的には選択された線画を構成する各座標値を計算す
る。これらの処理の結果、例えば図3(a) に示されるよ
うに、点P1とP2を両端とする直線図形lが選択さ
れ、点P1とP2の座標値が演算されて、RAM103
に保持される。FIG. 2 is an operation flow chart showing the outline of the graphic transformation process in the first embodiment. First, in step 201, the user selects an original figure to be transformed on the display device 104. Specifically, the user
The original cursor is selected by moving the mouse cursor displayed on the display device 104 to the original figure (line drawing) to be selected and clicking the mouse button. Or
The user may enclose a range including a plurality of original figures (line drawings) with a box using a mouse. In response to this, the CPU 101 causes the coordinate values of the selected original graphic on the graphic data developed on the RAM 103,
Specifically, each coordinate value forming the selected line drawing is calculated. As a result of these processes, for example, as shown in FIG. 3 (a), the straight line figure 1 having the points P1 and P2 at both ends is selected, the coordinate values of the points P1 and P2 are calculated, and the RAM 103
Held in.
【0018】次に、ステップ202では、ユーザが、表
示装置104上で、ステップ201で選択した元図形を
囲む三角形のフレームを決定する。具体的には、ユーザ
は、表示装置104上に表示されているマウスカーソル
により、例えば図3(a) のT1、T2、T3という三角
形を構成する3頂点をクリックすることによって、フレ
ームを決定する。これに反応して、CPU101は、R
AM103上に展開されている図形データ上において、
決定されたフレームを構成する三角形の3頂点の座標を
計算し、RAM103に保持する。Next, in step 202, the user determines on the display device 104 a triangular frame surrounding the original graphic selected in step 201. Specifically, the user determines the frame by clicking the three vertices forming the triangles T1, T2, and T3 in FIG. 3A with the mouse cursor displayed on the display device 104. . In response to this, the CPU 101 causes the R
On the graphic data developed on AM103,
The coordinates of the three vertices of the triangle forming the determined frame are calculated and stored in the RAM 103.
【0019】次に、ステップ203では、ユーザが、表
示装置104上で、ステップ202において決定したフ
レームを変形させる。具体的には、ユーザは、ステップ
202で決定した三角形のフレームの3頂点の1つであ
る例えば図3(a) の点T1上でマウスボタンをクリック
し、そのまま変形先の位置までドラッグした後に、マウ
スボタンを離す。この結果、これに反応して、CPU1
01は、RAM103上に展開されている図形データ上
において、変形後の三角形のフレームの3頂点の1つで
ある例えば図3(b) の点T1′の座標値を計算し、RA
M103に保持すると共に、表示装置104に表示す
る。ユーザは、ステップ202で決定した三角形のフレ
ームの3頂点の他の2つである例えば図3(a) の点T
2、T3についても同様の変形を行うことにより、CP
U101が、変形後の三角形のフレームの3頂点の他の
2つである例えば図3(b) の点T2′、T3′の座標値
を計算し、それらをRAM103に保持すると共に、表
示装置104に表示する。Next, in step 203, the user transforms the frame determined in step 202 on the display device 104. Specifically, the user clicks the mouse button on one of the three vertices of the triangular frame determined in step 202, for example, the point T1 in FIG. , Release the mouse button. As a result, in response to this, the CPU1
01 is one of the three vertices of the deformed triangular frame on the graphic data developed in the RAM 103, for example, the coordinate value of the point T1 'in FIG.
It is held in M103 and displayed on the display device 104. The user selects the other two of the three vertices of the triangular frame determined in step 202, such as the point T in FIG. 3 (a).
By applying the same modification to 2 and T3, CP
U101 calculates the coordinate values of the other two of the three vertices of the deformed triangular frame, for example, points T2 'and T3' in FIG. 3 (b), stores them in the RAM 103, and stores them in the display device 104. To display.
【0020】ステップ204においては、CPU101
は、ステップ202でRAM103に保持した、変形前
のフレームを構成する三角形の3頂点である例えば図3
(a)の点T1、T2、T3の座標値と、ステップ203
でRAM103に保持した、変形後のフレームを構成す
る三角形の3頂点である例えば図3(b) の点T1′、T
2′、T3′の座標値との位置関係に基づき、ステップ
201でRAM103に保持した元図形を構成する例え
ば図3(a) の点P1、P2の座標値を変形することによ
り、例えば図3(b) に示される点P1′、P2′を計算
する。In step 204, the CPU 101
Are the three vertices of the triangles that make up the frame before deformation, which are held in the RAM 103 in step 202, as shown in FIG.
The coordinate values of points T1, T2, and T3 in (a) and step 203
The three vertices of the triangle which compose the frame after deformation and which are held in the RAM 103 at, for example, points T1 'and T in FIG.
Based on the positional relationship with the coordinate values of 2'and T3 ', for example, by transforming the coordinate values of the points P1 and P2 of the original figure stored in the RAM 103 in step 201, for example, as shown in FIG. The points P1 'and P2' shown in (b) are calculated.
【0021】ステップ205においては、CPU101
は、ステップ204で計算された例えば図3(b) の点P
1′、P2′によって構成される変形後の図形l′を、
表示装置104に表示させる。In step 205, the CPU 101
Is the point P calculated in step 204, for example, in FIG.
1 ′ and P2 ′ are the transformed figures l ′,
It is displayed on the display device 104.
【0022】次に、ステップ204の図形変形演算の具
体的な処理について説明する。例えば図3(a) におい
て、元図形である直線lを構成する各点P1、P2につ
いて、それぞれの点を通り点T1、T2、T3を3頂点
とする三角形の任意の辺に平行な直線が算出される。図
3(a) の例では、点P1については辺T1−T2に平行
な直線W11−W12が算出され、点P2については辺
T1−T3に平行な直線W21−W22が算出される。
ここで、W11、W12、W21、及びW22は、各平
行線と三角形の各辺とが交わる点である。なお、三角形
の各辺に対する平行線の引き方は全部で3通りあるた
め、図3(a) に示されるように、点P2については、辺
T1−T2に平行な直線(W21)−(W22)が算出
されてもよい。Next, the specific processing of the graphic transformation calculation in step 204 will be described. For example, in FIG. 3 (a), for each point P1 and P2 forming the straight line 1 which is the original figure, a straight line passing through each point and parallel to any side of a triangle having points T1, T2 and T3 as three vertices It is calculated. In the example of FIG. 3A, a straight line W11-W12 parallel to the side T1-T2 is calculated for the point P1, and a straight line W21-W22 parallel to the side T1-T3 is calculated for the point P2.
Here, W11, W12, W21, and W22 are points where each parallel line intersects each side of the triangle. Since there are three ways of drawing a parallel line with respect to each side of the triangle, as shown in FIG. 3A, for the point P2, a straight line (W21)-(W22 parallel to the sides T1-T2 is used. ) May be calculated.
【0023】次に、元の三角形の3頂点T1、T2、T
3が3頂点T1′、T2′、T3′に変形された場合、
平行線W11−W12とW21−W22が、直線W1
1′−W12′とW21′−W22′に変形される。こ
の場合の制限条件は、直線W11′−W12′とW2
1′−W22′が、それぞれ辺T1′−T2′とT1′
−T3′に平行であることである。Next, the three vertices T1, T2, T of the original triangle
When 3 is transformed into three vertices T1 ', T2', T3 ',
Parallel lines W11-W12 and W21-W22 are straight lines W1
It is transformed into 1'-W12 'and W21'-W22'. The limiting conditions in this case are straight lines W11'-W12 'and W2.
1'-W22 'are sides T1'-T2' and T1 ', respectively.
-Parallel to T3 '.
【0024】この制限条件より、変形後の4点W1
1′、W12′、W21′、W22′は次式で示される
4元連立1次方程式を解くことにより、算出される。According to these limiting conditions, the four points W1 after deformation are
1 ', W12', W21 ', and W22' are calculated by solving a simultaneous four-dimensional linear equation represented by the following equation.
【0025】[0025]
【数1】 [Equation 1]
【0026】この式に基づき変形後の4点W11′、W
12′、W21′、W22′が算出された後、元図形で
ある直線lを構成する各点P1、P2が、点P1′、P
2′に変形される。この場合の制限条件は、図形を構成
する点を通る前述の平行線上において、その平行線と三
角形の辺とが交わる2点を端点とする線分が当該図形を
構成する点によって分割される場合の分割比が、変形前
と変形後とで等しいことである。Based on this equation, four points W11 ', W after deformation are obtained.
After 12 ', W21' and W22 'are calculated, the points P1 and P2 forming the straight line l which is the original figure are changed to points P1' and P
It is transformed into 2 '. The limiting condition in this case is that, on the above-mentioned parallel line passing through the points forming the figure, a line segment whose two end points intersect the parallel line and the sides of the triangle is divided by the points forming the figure. That is, the division ratio of is equal before and after deformation.
【0027】この制限条件より、変形後の点P1′、P
2′は、次式で示される2元連立1次方程式を解くこと
により、算出される。According to this restriction condition, the points P1 'and P after deformation are changed.
2'is calculated by solving a simultaneous binary linear equation represented by the following equation.
【0028】[0028]
【数2】 [Equation 2]
【0029】以上のようにして、図形変形演算が実現さ
れる。第2の実施例 次に、図形変形装置の第2の実施例につき説明する。The graphic transformation operation is realized as described above. Second Embodiment Next, a second embodiment of the graphic transformation device will be described.
【0030】まず、第2の実施例の構成は、第1の実施
例の場合と同様に、図1により示される。また、第2の
実施例における図形変形処理の概略も、第1の実施例の
場合と同様に、図2により示される。First, the structure of the second embodiment is shown in FIG. 1 as in the case of the first embodiment. Further, the outline of the graphic transformation processing in the second embodiment is also shown in FIG. 2 as in the case of the first embodiment.
【0031】次に、第2の実施例の動作が第1の実施例
の動作と異なる点は、始めに、図2のステップ203の
フレーム変形処理において、例えば図4の変形前のフレ
ームを構成する三角形の3頂点T1、T2、T3と変形
後のフレームを構成する三角形の3頂点T1′、T
2′、T3を比較するとわかるように、3頂点のうち1
つの例えば点T3が固定される点である。そして、元図
形を構成する1点Pは、点P′に変換される。元図形を
構成する点が複数点になっても、全く同様の変換規則で
各点について変換が行われる。Next, the operation of the second embodiment is different from that of the first embodiment. First, in the frame modification processing of step 203 of FIG. 2, for example, the frame before modification of FIG. 4 is constructed. 3 vertices T1, T2, T3 of the triangle to be formed and 3 vertices T1 ', T of the triangle constituting the frame after deformation
As can be seen by comparing 2'and T3, one of the three vertices
For example, the point T3 is a fixed point. Then, one point P constituting the original figure is converted into a point P '. Even if there are a plurality of points forming the original figure, conversion is performed for each point according to exactly the same conversion rule.
【0032】続いて、第2の実施例における図2のステ
ップ204の図形変形演算の具体的な処理について説明
する。例えば図4において、元図形を構成する点Pにつ
いて、その点を通り点T1、T2、T3を3頂点とする
三角形の任意の辺に平行な直線が1つ算出される。図4
の例では、点Pについて、辺T1−T2に平行な直線が
算出される。ここで、V1、V2は、上記平行線と三角
形の各辺T1−T3、T2−T3とが交わる点である。Next, the specific processing of the graphic transformation operation of step 204 of FIG. 2 in the second embodiment will be described. For example, in FIG. 4, with respect to the point P constituting the original figure, one straight line passing through the point and parallel to arbitrary sides of a triangle having three vertices at points T1, T2, and T3 is calculated. Figure 4
In the example, for the point P, a straight line parallel to the sides T1-T2 is calculated. Here, V1 and V2 are points at which the parallel line and the sides T1-T3 and T2-T3 of the triangle intersect.
【0033】次に、元の三角形の2頂点T1、T2が2
頂点T1′、T2′に変形された場合、平行線V1−V
2が、直線V1′−V2′に変形される。この場合の制
限条件は、直線V1′−V2′が、辺T1′−T2′に
平行であることである。Next, the two vertices T1 and T2 of the original triangle are 2
When transformed into vertices T1 'and T2', parallel lines V1-V
2 is transformed into a straight line V1'-V2 '. The limiting condition in this case is that the straight line V1'-V2 'is parallel to the side T1'-T2'.
【0034】この制限条件より、変形後の2点V1′、
V2′は次式で示される2元連立1次方程式を解くこと
により、算出される。According to this restriction condition, two points V1 'after deformation,
V2 'is calculated by solving a simultaneous binary linear equation shown by the following equation.
【0035】[0035]
【数3】 [Equation 3]
【0036】この式に基づき変形後の2点V1′、V
2′が算出された後、元図形を構成する点Pが、点P′
に変形される。この場合の制限条件は、第1の実施例の
場合と同様に、図形を構成する点を通る前述の平行線上
において、その平行線と三角形の辺とが交わる2点を端
点とする線分が当該図形を構成する点によって分割され
る場合の分割比が、変形前と変形後とで等しいことであ
る。Based on this equation, two points V1 'and V1 after deformation are obtained.
After 2 ′ is calculated, the point P that constitutes the original figure is changed to the point P ′.
Is transformed into. Similar to the case of the first embodiment, the limiting condition in this case is that, on the above-mentioned parallel line that passes through the points forming the figure, a line segment whose end points are two points where the parallel line and the sides of the triangle intersect. That is, the division ratio in the case of being divided by the points forming the figure is equal before and after the deformation.
【0037】この制限条件より、変形後の点P′は、次
式で示される1次方程式を解くことにより、算出され
る。Under this restriction condition, the deformed point P'is calculated by solving the linear equation shown by the following equation.
【0038】[0038]
【数4】 [Equation 4]
【0039】以上のようにして、図形変形演算が実現さ
れる。第3の実施例 次に、図形変形装置の第3の実施例につき説明する。The graphic transformation operation is realized as described above. Third Embodiment Next, a third embodiment of the graphic transformation apparatus will be described.
【0040】まず、第3の実施例の構成は、第1又は第
2の実施例の場合と同様に、図1により示される。ま
た、第3の実施例における図形変形処理の概略も、第1
又は第2の実施例の場合と同様に、図2により示され
る。First, the configuration of the third embodiment is shown in FIG. 1 as in the case of the first or second embodiment. In addition, the outline of the graphic transformation processing in the third embodiment is also described in the first
Or as in the case of the second embodiment, illustrated by FIG.
【0041】次に、第3の実施例の動作が第1又は第2
の実施例の動作と異なる点は、始めに、図2のステップ
202のフレーム決定処理において、ユーザが、表示装
置104上で、ステップ201において選択した元図形
を囲む三角形のフレームを決定する場合に、例えば図5
の点T1、T2、T3を3頂点とする三角形が直角三角
形(頂点T3における角度が直角)として決定される点
である。具体的には、ユーザは、表示装置104上に表
示されているマウスカーソルにより、三角形を構成する
3頂点をクリックすることで、フレームを決定する。こ
れに反応して、CPU101は、RAM103上に展開
されている図形データ上において、決定されたフレーム
を構成する三角形に最も近い直角三角形の3頂点の座標
T1、T2、T3を計算し、RAM103に保持する。Next, the operation of the third embodiment is the first or second operation.
The difference from the operation of the first embodiment is that, in the frame determination processing of step 202 of FIG. 2, first, when the user determines a triangular frame surrounding the original graphic selected in step 201 on the display device 104. , For example in FIG.
A triangle whose three vertices are points T1, T2, and T3 is a point that is determined as a right triangle (the angle at the vertex T3 is a right angle). Specifically, the user determines the frame by clicking the three vertices forming the triangle with the mouse cursor displayed on the display device 104. In response to this, the CPU 101 calculates the coordinates T1, T2, and T3 of the three vertices of the right-angled triangle closest to the triangle forming the determined frame on the graphic data developed in the RAM 103, and stores them in the RAM 103. Hold.
【0042】図2のステップ203のフレーム変形処理
で、第2の実施例の場合と同様に、例えば図5の変形前
のフレームを構成する直角三角形の3頂点T1、T2、
T3と変形後のフレームを構成する三角形の3頂点T
1′、T2′、T3を比較するとわかるように、3頂点
のうち1つの例えば点T3が固定される。そして、元図
形を構成する1点Pは、点P′に変換される。元図形を
構成する点が複数点になっても、全く同様の変換規則で
各点について変換が行われる。In the frame modification process of step 203 of FIG. 2, three vertices T1, T2 of the right triangle forming the frame before modification of FIG. 5, for example, as in the case of the second embodiment.
T3 and the three vertices T of the triangle that makes up the transformed frame
As can be seen by comparing 1 ', T2' and T3, one of the three vertices, for example point T3, is fixed. Then, one point P constituting the original figure is converted into a point P '. Even if there are a plurality of points forming the original figure, conversion is performed for each point according to exactly the same conversion rule.
【0043】続いて、第3の実施例における図2のステ
ップ204の図形変形演算の具体的な処理について説明
する。例えば図5において、第2の実施例に関する図4
の場合と同様に、元図形を構成する点Pについて、その
点を通り点T1、T2、T3を3頂点とする直角三角形
の任意の辺に平行な直線が1つ算出される。図5の例で
は、点Pについて、辺T1−T2に平行な直線が算出さ
れる。ここで、V1、V2は、上記平行線と三角形の各
辺T1−T3、T2−T3とが交わる点である。Next, the specific processing of the graphic transformation operation of step 204 of FIG. 2 in the third embodiment will be described. For example, referring to FIG. 5, FIG. 4 relating to the second embodiment.
As in the case of, for the point P that constitutes the original figure, one straight line that passes through that point and that is parallel to any side of a right-angled triangle whose three vertices are points T1, T2, and T3 is calculated. In the example of FIG. 5, for the point P, a straight line parallel to the sides T1-T2 is calculated. Here, V1 and V2 are points at which the parallel line and the sides T1-T3 and T2-T3 of the triangle intersect.
【0044】次に、元の直角三角形の2頂点T1、T2
が2頂点T1′、T2′に変形された場合、平行線V1
−V2が、直線V1′−V2′に変形される。この場合
の制限条件は、第2の実施例の場合と同様に、直線V
1′−V2′が、辺T1′−T2′に平行であることで
ある。Next, the two vertices T1 and T2 of the original right triangle
Is transformed into two vertices T1 'and T2', the parallel line V1
-V2 is transformed into a straight line V1'-V2 '. The limiting condition in this case is the straight line V, as in the case of the second embodiment.
1'-V2 'is parallel to the side T1'-T2'.
【0045】この制限条件と、点T1、T2、T3を3
頂点とする三角形が直角三角形であるという条件より、
次式の関係が成立する。This limiting condition and points T1, T2, T3 are set to 3
From the condition that the triangle that is the vertex is a right triangle,
The following relationship holds.
【0046】[0046]
【数5】 [Equation 5]
【0047】この数5式では、辺T1−T3がxy座標
軸上のy軸に平行で、辺T1−T2がx軸に平行である
と仮定されている。そして、点Pのx座標及びy座標は
Px及びPy、同様に、点P′のx座標及びy座標はP
x′及びPy′として表されている。また、2頂点T
1、T2の各x座標及びy座標は、T1x及びT1y、
T2x及びT2y、同様に、2頂点T1′、T2′の各
x座標及びy座標は、T1x′及びT1y′、T2x′
及びT2y′として表されている。更に、点V1及びV
2のx座標及びy座標は、V1x及びV1y、V2x及
びV2y、同様に、点V1′及びV2′のx座標及びy
座標は、V1x′及びV1y′、V2x′及びV2y′
として表されている。In the equation (5), it is assumed that the side T1-T3 is parallel to the y-axis on the xy coordinate axes and the side T1-T2 is parallel to the x-axis. The x coordinate and the y coordinate of the point P are Px and Py, and similarly, the x coordinate and the y coordinate of the point P ′ are P
Represented as x'and Py '. 2 vertices T
The x and y coordinates of 1 and T2 are T1x and T1y,
Similarly, T2x and T2y, as well as the x and y coordinates of the two vertices T1 'and T2' are T1x 'and T1y', T2x '.
And T2y '. Furthermore, points V1 and V
The x and y coordinates of 2 are V1x and V1y, V2x and V2y, as well as the x and y coordinates of points V1 ′ and V2 ′.
The coordinates are V1x 'and V1y', V2x 'and V2y'.
Is represented as.
【0048】ここで、更に、第1及び第2の実施例の場
合と同様に、図形を構成する点を通る前述の平行線上に
おいて、その平行線と三角形の辺とが交わる2点を端点
とする線分が当該図形を構成する点によって分割される
場合の分割比が、変形前と変形後とで等しい、という制
限条件が付加される。Here, as in the case of the first and second embodiments, further, on the above-mentioned parallel line passing through the points forming the figure, the two points where the parallel line and the sides of the triangle intersect are the end points. A restriction condition is added that the division ratio when the line segment is divided by the points forming the figure is equal before and after the deformation.
【0049】この制限条件と数5式より、変形後の点
P′のx座標は、次式により算出することができる。From this limiting condition and the equation (5), the x coordinate of the deformed point P'can be calculated by the following equation.
【0050】[0050]
【数6】 [Equation 6]
【0051】同様に、変形後の点P′のy座標は、次式
により算出することができる。Similarly, the y coordinate of the deformed point P'can be calculated by the following equation.
【0052】[0052]
【数7】 [Equation 7]
【0053】以上のようにして、図形変形演算が実現さ
れる。As described above, the graphic transformation operation is realized.
【0054】[0054]
【発明の効果】本発明によれば、フレーム決定手段で決
定された変形前の三角形のフレームを構成する3つの頂
点と前記フレーム変形手段で変形された後の三角形のフ
レームを構成する3つの頂点との位置関係のみとして、
線画図形の変形情報を作成できるため、図形変形処理の
処理量が少なくて済むという効果が生ずる。According to the present invention, the three vertices forming the triangular frame before the deformation determined by the frame determining means and the three vertices forming the triangular frame after the deformation by the frame deforming means. As a positional relationship with
Since the deformation information of the line drawing figure can be created, there is an effect that the processing amount of the figure changing process is small.
【0055】更に、ユーザは、3つの頂点を移動させる
という簡単な操作で線画図形を変形することが可能とな
る。また、上述のような位置関係が保存されるように線
画図形を変形するだけで、線画図形の変形を簡単に実現
することが可能となる。Further, the user can transform the line drawing figure by a simple operation of moving the three vertices. Further, it is possible to easily realize the deformation of the line drawing figure only by changing the line drawing figure so that the positional relationship as described above is preserved.
【0056】ここで、フレーム決定手段で決定された三
角形のフレームの任意の1つの頂点を固定した状態で三
角形のフレームを変形させることにより、線画図形の変
形時の演算量を削減することが可能となる。Here, by deforming the triangular frame with any one of the vertices of the triangular frame determined by the frame determining means fixed, it is possible to reduce the amount of calculation when deforming the line drawing figure. Becomes
【0057】更に、フレーム決定手段において決定され
る三角形のフレームが直角三角形のフレームとなるよう
に構成されることにより、線画図形の変形時の演算量を
更に削減することが可能となる。Further, since the triangular frame determined by the frame determining means is configured as a right-angled triangle frame, it is possible to further reduce the amount of calculation when transforming the line drawing figure.
【図1】図形変形装置の実施例(第1〜第3の実施例)
の構成図である。FIG. 1 is an embodiment of a graphic transformation device (first to third embodiments).
It is a block diagram of.
【図2】図形変形装置の実施例(第1〜第3の実施例)
の処理を示す動作フローチャートである。FIG. 2 is an embodiment (first to third embodiments) of a graphic transformation device.
3 is an operation flowchart showing the processing of FIG.
【図3】図形変形装置の第1の実施例の説明図である。FIG. 3 is an explanatory diagram of a first embodiment of a graphic transformation device.
【図4】図形変形装置の第2の実施例の説明図である。FIG. 4 is an explanatory diagram of a second embodiment of the graphic transformation device.
【図5】図形変形装置の第3の実施例の説明図である。FIG. 5 is an explanatory diagram of a third embodiment of the graphic transformation device.
101 CPU 102 ROM 103 RAM 104 表示装置 101 CPU 102 ROM 103 RAM 104 Display Device
───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 // G06F 17/50 7623−5L G06F 15/60 330 ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification number Office reference number FI technical display location // G06F 17/50 7623-5L G06F 15/60 330
Claims (4)
を囲む任意の三角形のフレームを決定するフレーム決定
手段と、 前記図形表示手段における表示画面上で、前記フレーム
決定手段で決定された前記三角形のフレームを変形させ
るフレーム変形手段と、 前記フレーム決定手段で決定された変形前の三角形のフ
レームを構成する3つの頂点と前記フレーム変形手段で
変形された後の三角形のフレームを構成する3つの頂点
との位置関係に基づき、前記線画図形を変形させる図形
変形演算手段と、 を有することを特徴とする図形変形装置。1. A graphic display means for displaying a line drawing graphic, a frame determining means for deciding an arbitrary triangular frame surrounding the line drawing graphic on the display screen of the graphic display means, and a display screen for the graphic display means. Above, the frame deforming means for deforming the triangular frame determined by the frame determining means, the three vertices constituting the untransformed triangular frame determined by the frame determining means, and the frame deforming means The graphic transformation device for transforming the line drawing graphic based on the positional relationship with the three vertices that form the triangular frame after the drawing.
手段における表示画面上で、前記フレーム決定手段で決
定された前記三角形のフレームの任意の1つの頂点を固
定した状態で、前記フレーム決定手段で決定された前記
三角形のフレームを変形させる、 ことを特徴とする請求項1に記載の図形変形装置。2. The frame deforming means, in the frame determining means, fixes any one vertex of the triangular frame determined by the frame determining means on a display screen of the graphic displaying means. The figure transformation device according to claim 1, wherein the determined frame of the triangle is transformed.
る前記三角形のフレームは、直角三角形のフレームであ
る、 ことを特徴とする請求項1又は2の何れか1項に記載の
図形変形装置。3. The graphic transformation apparatus according to claim 1, wherein the triangular frame determined by the frame determining means is a right triangle frame.
線画図形上の任意の点について、該任意の点を通り前記
変形前の三角形の任意の辺に平行な直線上において、該
直線と前記変形前の三角形の辺とが交わる2点を端点と
する線分が前記任意の点によって分割される場合の分割
比と、前記変形前の線画図形上の任意の点に対応する前
記変形後の線画図形上の点について、該変形後の線画図
形上の点を通り前記変形前の三角形の任意の辺に対応す
る前記変形後の三角形の辺に平行な直線上において、該
直線と前記変形後の三角形の辺とが交わる2点を端点と
する線分が前記変形後の線画図形上の点によって分割さ
れる場合の分割比とが等しくなるように、前記変形前の
線画図形上の任意の点に対応する前記変形後の線画図形
上の点を算出する、 ことを特徴とする請求項1乃至3の何れか1項に記載の
図形変形装置。4. The figure deformation calculation means, for an arbitrary point on the line drawing figure before the deformation, on the straight line passing through the arbitrary point and parallel to the arbitrary side of the triangle before the deformation, A division ratio in the case where a line segment whose two end points intersect the sides of the undeformed triangle are divided by the arbitrary point, and the after-deformation corresponding to an arbitrary point on the line drawing figure before the deformation Of the point on the line drawing figure, the straight line and the deformation on a straight line passing through the point on the line drawing figure after the deformation and corresponding to an arbitrary side of the triangle before the deformation. Arbitrary on the pre-deformation line drawing figure so that the line segment whose two end points intersect the sides of the subsequent triangle are divided by the points on the post-deformation line drawing figure are equal. Calculating points on the transformed line drawing figure corresponding to the points The graphic transformation device according to any one of claims 1 to 3, wherein:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP5334152A JPH07200852A (en) | 1993-12-28 | 1993-12-28 | Graphic transformation device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP5334152A JPH07200852A (en) | 1993-12-28 | 1993-12-28 | Graphic transformation device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH07200852A true JPH07200852A (en) | 1995-08-04 |
Family
ID=18274119
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP5334152A Pending JPH07200852A (en) | 1993-12-28 | 1993-12-28 | Graphic transformation device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH07200852A (en) |
-
1993
- 1993-12-28 JP JP5334152A patent/JPH07200852A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH05165459A (en) | Enlarging display system | |
| EP0402475A1 (en) | Method of determining expanded shape of a product in a cad system | |
| JP3486937B2 (en) | Figure transformation device | |
| JPH07200852A (en) | Graphic transformation device | |
| JP3451292B2 (en) | Figure transformation device | |
| CN114463467B (en) | Coordinate conversion method and device for graphics device interface plus drawing | |
| JP3451293B2 (en) | Figure transformation device | |
| JPH0765205A (en) | 3D shape display | |
| JPH07200857A (en) | Graphic transformation device | |
| JPH04373084A (en) | Character/graphic deformation processing device | |
| US5444831A (en) | Developed product shape deciding method for a computer-aided design system | |
| JPH11219441A (en) | Image editing apparatus, image editing method, and recording medium storing image editing processing program | |
| JPH03198167A (en) | Method and device for deforming two-dimensional bit map image | |
| JP2854860B2 (en) | Shape mounting method | |
| JPH04110999A (en) | Scroll controller | |
| JP2904994B2 (en) | Coordinate connection display method | |
| JPH08212390A (en) | Image processing method and apparatus | |
| JP2854859B2 (en) | Shape mounting method | |
| CN121210016A (en) | Image rendering methods, apparatus, computer equipment, storage media and software products | |
| JP2830550B2 (en) | Integrated circuit layout design equipment | |
| JPH04247581A (en) | How to arrange shapes in computer graphics | |
| JPH05150757A (en) | Display device for coordinate value | |
| JPS62219181A (en) | Graphic drawing method | |
| JPS619688A (en) | Diagram generation system | |
| JPH0283589A (en) | Character size representation system for display device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20030930 |