JP3923262B2 - Graphic processing apparatus, recording medium, and program - Google Patents

Graphic processing apparatus, recording medium, and program Download PDF

Info

Publication number
JP3923262B2
JP3923262B2 JP2001014730A JP2001014730A JP3923262B2 JP 3923262 B2 JP3923262 B2 JP 3923262B2 JP 2001014730 A JP2001014730 A JP 2001014730A JP 2001014730 A JP2001014730 A JP 2001014730A JP 3923262 B2 JP3923262 B2 JP 3923262B2
Authority
JP
Japan
Prior art keywords
rotation angle
vector
graphic
graphic element
feature vector
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
JP2001014730A
Other languages
Japanese (ja)
Other versions
JP2001283239A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2001014730A priority Critical patent/JP3923262B2/en
Publication of JP2001283239A publication Critical patent/JP2001283239A/en
Application granted granted Critical
Publication of JP3923262B2 publication Critical patent/JP3923262B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Controls And Circuits For Display Device (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は図形処理装置、記録媒体、および、プログラムに関し、特に、図形要素を入力して所望の図形を作成し、表示装置へ出力する図形処理装置、記録媒体、および、プログラムに関する。
【0002】
【従来の技術】
例えば、CAD(Computer Aided Design)等の図形処理装置では、作成された図形の表示形態を頻繁に変更する必要が生ずる。
【0003】
図63は、従来における2次元図形の表示形態の変更方法の一例を示す図である。この図の例では、対象となる図形1を回転する際の中心軸となる中心点2と回転角度とが指定され、これらに基づいて図形1が回転される。
【0004】
図64は、3次元図形の表示形態の変更方法の一例を示す図である。この例では、「ビュー情報一覧」と題されたウィンドウが表示されており、その内部の表示領域10aには、視点の候補が表示されている。このようなウィンドウにおいて所望の視点を選択した後、終了ボタン10dが操作されると、例えば、図65に示すように、選択された視点から眺めた図形15が表示される。なお、図64に示すウィンドウにおいて、緯度および経度をテキストボックス10b,10cに直接入力することによっても、所望の視点を指定することができる。
【0005】
図66は、3次元図形の表示形態の他の変更方法の一例を示す図である。この例では、ポインタ16の動きに比例して図形15が回転される様子が示されている。
【0006】
図67は、3次元図形の表示形態の更に他の変更方法の一例を示す図である。この例では、図形15の特定の面15aがポインタ16によって指定されており、この面15aを正面に向けるように図形の表示が変更されている。
【0007】
【発明が解決しようとする課題】
ところで、従来の2次元の図形を表示する図形処理システムの場合、利用者がある図形に着目し、その図形が特徴的な状態で表示される状態を望んだ場合、利用者がその形状から、回転角度を計算して入力しなければならず、非常に煩雑であるという問題点があった。
【0008】
また、従来の3次元の形状を表示する図形処理システムの場合、例えば、図64に示す例では、予め決められた複数の視点の中からしか選択できないので、選択範囲が狭いという問題点があった。
【0009】
また、図66に示す方法では、任意の方向から眺めた図形を表示させることが可能であるが微調整が困難であるという問題点があった。
更に、図67に示す方法では、やはり図64に示す場合と同様に、選択可能な範囲が限定されるという問題点があった。
【0010】
本発明はこのような点に鑑みてなされたものであり、所望の視点から眺めた図形を簡単に表示させることが可能な図形処理装置を提供することを目的とする。
【0011】
【課題を解決するための手段】
本発明では上記課題を解決するために、図1に示す、図形要素を入力して所望の図形を作成し、表示装置へ出力する図形処理装置30において、表示装置32に表示されている所定の図形要素を指定する図形要素指定手段30aと、図形要素指定手段30aによって指定された図形要素が有する特徴ベクトルを抽出する特徴ベクトル抽出手段30bと、表示系が有する基底ベクトルの何れかと特徴ベクトルとを一致させるための回転角度を算定する回転角度算定手段30cと、図形要素を含む図形の一部または全部を、表示系において回転角度算定手段30cによって算定された回転角度だけ回転させる回転手段30dと、回転手段30dによって図形の一部または全部を回転する前に、図形要素のみを回転角度算定手段30cによって算定された角度だけ回転させる図形要素回転手段30eと、を有することを特徴とする図形処理装置30が提供される。
【0012】
ここで、図形要素指定手段30aは、表示装置32に表示されている所定の図形要素を指定する。特徴ベクトル抽出手段30bは、図形要素指定手段30aによって指定された図形要素が有する特徴ベクトルを抽出する。回転角度算定手段30cは、表示系が有する基底ベクトルの何れかと特徴ベクトルとを一致させるための回転角度を算定する。回転手段30dは、図形要素を含む図形の一部または全部を、表示系において回転角度算定手段30cによって算定された回転角度だけ回転させる。図形要素回転手段30eは、回転手段30dによって図形の一部または全部を回転する前に、図形要素のみを回転角度算定手段30cによって算定された角度だけ回転させる。
【0013】
【発明の実施の形態】
以下、本発明の実施の形態を図面を参照して説明する。
図1は、本発明の動作原理を説明する原理図である。この図において、図形処理装置30は、図形要素指定手段30a、特徴ベクトル抽出手段30b、回転角度算定手段30c、回転手段30d、図形要素回転手段30e、および、回転角度指定手段30fによって構成されており、入力装置31から入力された図形要素を組み合わせることによって生成された図形を表示装置32に対して表示出力するとともに、所定の図形要素が指定された場合にはその図形要素が有する特徴ベクトルを抽出し、特徴ベクトルを基準にして図形全体または図形の一部を回転する。なお、図形要素とは、図形を構成する基本単位であり、例えば、直線、円、楕円等をいう。
【0014】
ここで、図形要素指定手段30aは、表示装置32に表示されている所定の図形要素を指定する。
特徴ベクトル抽出手段30bは、図形要素指定手段30aによって指定された図形要素が有する特徴ベクトルを抽出する。
【0015】
回転角度算定手段30cは、表示系が有する基底ベクトルの何れかと特徴ベクトルとを一致させるために必要な回転角度を算定する。
回転手段30dは、図形要素を含む図形の一部または全部を、表示系において回転角度算定手段30cによって算定された回転角度だけ回転させる。
【0016】
図形要素回転手段30eは、回転手段30dによって図形の一部または全部を回転する前に、指定された図形要素のみを回転角度算定手段30cによって算定された角度だけ回転させる。
【0017】
回転角度指定手段30fは、図形要素回転手段30eによって回転された図形要素を参照して特定の回転角度を指定する。
入力装置31は、例えば、キーボードやマウスによって構成されており、操作者の操作に応じた情報を生成して図形処理装置30に供給する。
【0018】
表示装置32は、例えば、CRT(Cathode Ray Tube)モニタによって構成されており、図形処理装置30から出力された画像を表示出力する。
次に、以上の原理図の動作について説明する。
【0019】
いま、図2に示すように、正方形35a、楕円35b、対角線35c、および、対角線35dから構成される図形35が入力装置31から入力され、表示装置32に表示されているとする。
【0020】
このような状態において、入力装置31が操作され、正方形35aの上部に位置する辺がポインタによって指定されたとすると、図形処理装置30の図形要素指定手段30aは、正方形35aを構成する辺を処理の対象として指定する。
【0021】
特徴ベクトル抽出手段30bは、図形要素指定手段30aによって指定された正方形35aの上部に位置する辺の特徴ベクトルを抽出する。この例では、図3に示すように、辺に平行な特徴ベクトル35eが抽出されることになる。
【0022】
回転角度算定手段30cは、表示系が有する基底ベクトルの何れかと特徴ベクトルとを一致させるために必要な回転角度を算定する。例えば、この例では、表示系が有する基底ベクトルは、図3の左下に示すX,Yであるので、特徴ベクトル35eがX方向、Y方向、−X方向、および、−Y方向の基底ベクトル(それぞれ、Xベクトル、Yベクトル、−Xベクトル、および、−Yベクトルと称す)と一致する回転角度を算定する。
【0023】
回転手段30dは、回転角度算定手段30cによって算定された複数の回転角度の候補を順番に選択し、選択した回転角度に応じて図形を回転させる。なお、この選択の順番としては、回転角度が少ない順に選択する方法があり、その場合には、先ず、図4に示す図形が表示装置32に表示されることになる。図4に示すような図形が表示装置32に表示されている状態において、この状態を選択する操作が入力装置31に対してなされた場合には、表示状態が固定される。
【0024】
また、同様にして、図5に示すような状態において、対角線35dが選択された場合には、図形要素指定手段30aは、対角線35dを処理の対象として指定し、特徴ベクトル抽出手段30bは、対角線35dの特徴ベクトル35fを抽出する。
【0025】
回転角度算定手段30cは、特徴ベクトル35fと基底ベクトルとを一致させるための回転角度の候補を算出して、回転手段30dに供給する。回転手段30dは、供給された回転角度の候補を、その値が最も小さいものから順に選択し、図形を回転させる。
【0026】
例えば、図5の例では、Xベクトルとの間の角度が最も小さいので、図6に示す図形が最初に表示されることになる。
以上の例では、図形全体を回転して表示するようにしたが、指定された図形要素のみを回転して表示させ、所定の回転状態において確定する操作がなされた場合には、図形全体を回転して表示するようにしてもよい。そのような場合の処理について以下に説明する。
【0027】
いま、図2に示す表示状態において、正方形35aの上部に位置する辺がポインタ36によって指定されたとすると、図形要素指定手段30aは、この辺を処理の対象として指定する。
【0028】
特徴ベクトル抽出手段30bは、指定された辺から特徴ベクトル35eを抽出する。
回転角度算定手段30cは、特徴ベクトル35eと基底ベクトルとを一致させるための回転角度を算定し、回転手段30dと図形要素回転手段30eに供給する。
【0029】
図形要素回転手段30eは、供給された回転角度に応じて、指定された図形要素である辺を構成する直線を回転させ、表示装置32に表示させる。いまの例では、例えば、図7に示すように、Xベクトルと一致するように回転された辺35gが表示されることになる。
【0030】
このような状態において、操作者が入力装置31を操作して、回転角度を指定する操作を行った場合には、回転角度指定手段30fは、回転手段30dに対して回転角度が指定された旨を通知する。通知を受けた回転手段30dは、全ての図形要素を指定された回転角度で回転する。その結果、表示装置32には、図4に示すような図形が表示されることになる。
【0031】
以上に説明したように、本発明に係る図形処理装置によれば、指定された図形要素が有する特徴ベクトルと、基底ベクトルとを一致させる回転角度を算定し、その回転角度だけ図形を回転して順次表示するようにしたので、簡単な操作により図形を所望の方向に回転させることが可能となる。
【0032】
また、図形要素回転手段30eにより、指定された図形要素のみを回転させた状態を表示し、その状態で固定する場合には回転角度指定手段30fに指示するようにすれば、候補が変更される度に図形全体を回転する必要がなくなるので、処理速度を向上させることが可能となる。
【0033】
次に、本発明の実施の形態について説明する。
図8は、本発明の実施の形態の構成例を示すブロック図である。この図に示すように、本発明に係る図形処理装置50は、CPU(Central Processing Unit)50a、ROM(Read Only Memory)50b、RAM(Random Access Memory)50c、HDD(Hard Disk Drive)50d、GC(Graphics Card)50e、I/F(Interface)50fによって構成されており、その外部には表示装置51および入力装置52が接続されている。
【0034】
CPU50aは、HDD50d等に格納されているプログラムに応じて、各種演算処理を実行するとともに、装置の各部を制御する。
ROM50bは、CPU50aが実行する基本的なプログラムやデータ等を格納している。
【0035】
RAM50cは、CPU50aが実行中のプログラムや演算途中のデータ等を一時的に格納する。
HDD50dは、CPU50aが実行するプログラムやデータを格納するとともに、入力装置52から入力された図形要素やその配置状態に関する情報を格納する。
【0036】
GC50eは、CPU50aから供給された描画命令に応じて描画処理を実行し、生成した画像を映像信号に変換して表示装置51に出力する。
I/F50fは、入力装置52からの情報を入力する。
【0037】
表示装置51は、例えば、CRTモニタや液晶ディスプレイ等によって構成されており、GC50eから出力された映像信号を表示出力する。
入力装置52は、キーボードやマウスによって構成されており、操作者の操作に応じた情報を生成して、I/F50fに対して供給する。
【0038】
次に、以上の実施の形態の動作について説明する。
本発明では、2次元および3次元双方の図形の処理が可能であるが、以下では先ず2次元図形に関する処理について説明した後、3次元図形に関する処理について説明する。
【0039】
先ず、2次元図形に対する処理について説明する前に、2次元図形の各図形要素が有する特徴ベクトルと、基準点について説明する。
図9は、2次元図形要素の基準点と特徴ベクトルを説明する図である。また、図10および図11は、図9に示す図形要素の特徴ベクトルと基準点を具体的に示した図である。
【0040】
図9および図10(A)に示すように、図形要素「直線」の場合、始点を(x1,y1)とし、終点を(x2,y2)とした場合に、基準点は中点P((x1+x2)/2,(y1+y2)/2)と定義され、また、特徴ベクトルは方向ベクトルV1(x2−x1,y2−y1)と定義される。
【0041】
また、図形要素「円弧」の場合では、図10(B)に示すように、中心を(Ox,Oy)とし、始点を(x1,y1)、終点を(x2,y2)とした場合に、基準点は中点P(Ox,Oy)と定義され、また、特徴ベクトルはローカルX軸V1(1,0)、始点ベクトル(x1−Ox,y1−Oy)、終点ベクトル(X2−Ox,y2−Oy)の3つと定義される。
【0042】
図形要素「楕円弧」の場合では、図10(C)に示すように、中心を(Ox,Oy)とし、ローカルX軸を(Lx,Ly)、始点を(x1,y1)、終点を(x2,y2)とした場合に、基準点は中点P(Ox,Oy)と定義され、また、特徴ベクトルはローカルX軸V1(Lx,Ly)、始点ベクトル(x1−Ox,y1−Oy)、終点ベクトル(X2−Ox,y2−Oy)の3つと定義される。
【0043】
図形要素「放物線」の場合では、図11(A)に示すように、基準点は焦点P(Fx,Fy)と定義され、また、特徴ベクトルは軸ベクトルV1(Ax,Ay)と定義される。
【0044】
図形要素「双曲線」の場合では、図11(B)に示すように、基準点は中心P(Ox,Oy)と定義され、また、特徴ベクトルは実軸ベクトルV1(Ax,Ay)と、漸近線ベクトルV2(Tx,Ty)と定義される。
【0045】
更に、図形要素「自由曲線」の場合では、図11(C)に示すように、基準点は指示された点である指示点P(p,q)と定義され、また、特徴ベクトルは接ベクトルV1(Tx,Ty)と定義される。
【0046】
なお、以上はほんの一例であり、このような場合にのみ限定されるものではない。
次に、本発明の実施の形態の動作について説明する。
【0047】
図12は、図8に示す実施の形態において、2次元図形を回転させる場合に実行される処理の一例を説明するフローチャートである。このフローチャートが開始されると、以下の処理が実行されることになる。
[S10]CPU50aは、入力装置52が操作されて指定された図形要素を特定する。
【0048】
例えば、表示装置51に表示されている図形要素「円弧」が入力装置52によって指定されたとすると、CPU50aは、「円弧」を指定された図形要素と特定する。
[S11]CPU50aは、特定された図形要素の基準点および特徴ベクトルを抽出する処理を実行する。なお、この処理の詳細は、図13を参照して後述する。
[S12]CPU50aは、指定された図形要素を含む図形の回転角度の候補を推論する処理を実行する。なお、この処理の詳細は、図14を参照して後述する。
[S13]CPU50aは、ステップS12において算出された回転角度の候補のそれぞれに対応する分だけ図形を回転する処理を実行する。なお、この処理の詳細は、図15を参照して後述する。
[S14]CPU50aは、変数iを値“1”に初期設定する。
[S15]CPU50aは、ステップS13において算出された、第i番目の回転角度の候補に対応して回転された図形を表示装置51に表示させる。
[S16]CPU50aは、入力装置52から所定の情報が入力され、現在表示されている図形でOKである旨が指示された場合には処理を終了し、それ以外の場合にはステップS17に進む。
[S17]CPU50aは、変数iを“1”だけインクリメントする。
[S18]CPU50aは、変数iの値が回転角度の候補数以下である場合にはステップS15に戻って同様の処理を繰り返し、それ以外の場合にはステップS19に進む。
[S19]CPU50aは、変数iを“1”に再度初期設定した後、ステップS15に戻って同様の処理を繰り返す。
【0049】
次に、図13を参照して、図12に示す「基準点および特徴ベクトル抽出処理」の詳細について説明する。このフローチャートが開始されると、以下の処理が実行される。
[S20]CPU50aは、ステップS10において特定された図形要素を取得する。
[S21]CPU50aは、特定された図形の基準点を図9に示すテーブルを参照して取得する。
【0050】
例えば、図形要素として円弧が指定された場合には、円弧の中心P(Ox,Oy)が基準点として取得されることになる。
[S22]CPU50aは、特定された図形の特徴ベクトルを図9に示すテーブルを参照して取得する。
【0051】
いまの例では、対象となる図形要素は円弧であるので、図9に示すように、ローカルX軸V1、始点ベクトルV2、および、終点ベクトルV3が特徴ベクトルとして抽出されることになる。
[S23]CPU50aは、取得した基準点と特徴ベクトルを、HDD50dのベクトル情報テーブルへ格納し、もとの処理へ復帰する(リターン)。
【0052】
図16は、ベクトル情報テーブルの一例を示す図である。この図では、ベクトル番号1〜3までの3種類の基準ベクトルと、それぞれのベクトルの基準点が格納されている。
【0053】
次に、図14を参照して、図12に示す「回転角度候補推論処理」の詳細な処理について説明する。このフローチャートが開始されると、以下の処理が実行されることになる。
[S30]CPU50aは、変数iを“1”に初期設定する。
[S31]CPU50aは、1次元配列Vの第i番目の要素として、第i番目の特徴ベクトルを代入する。
[S32]CPU50aは、2次元配列Thの第(i,0)番目の要素として、基底ベクトルであるXベクトル(1,0)と特徴ベクトルV[i]とが成す角度を代入する。
[S33]CPU50aは、2次元配列Thの第(i,1)番目の要素として、基底ベクトルであるYベクトル(0,1)と特徴ベクトルV[i]とが成す角度を代入する。
[S34]CPU50aは、2次元配列Thの第(i,2)番目の要素として、基底ベクトルであるXベクトルを180°回転させたベクトル(−1,0)(以下、−Xベクトルと称す)と特徴ベクトルV[i]とが成す角度を代入する。
[S35]CPU50aは、2次元配列Thの第(i,3)番目の要素として、基底ベクトルであるYベクトルを180°回転させたベクトル(0,−1)(以下、−Yベクトルと称す)と特徴ベクトルV[i]とが成す角度を代入する。
[S36]CPU50aは、変数iの値を“1”だけインクリメントする。
[S37]CPU50aは、変数iの値が特徴ベクトル数以下である場合にはステップS31に戻って同様の処理を繰り返し、それ以外の場合にはステップS38に進む。
[S38]CPU50aは、2次元配列Thに格納されている全ての要素を、昇順にソートする。
【0054】
その結果、回転角度が少ない順に並べ換えが行われることになる。
[S39]CPU50aは、配列に格納されている要素に重複が生じている場合には、これを排除する。
[S40]CPU50aは、ソートされた結果を、HDD50dの回転角度候補テーブルに格納する。
【0055】
図17は、回転角度候補テーブルの一例を示す図である。この例では、特徴ベクトルのベクトル番号と、その回転角度とが対応付けられて格納されている。なお、ベクトル番号が“1”の特徴ベクトルは、第1番目と第3番目に登場しているが、これは同一の特徴ベクトルであっても対象となる基底ベクトルが異なる場合があるからである。
【0056】
次に、図15を参照して、図12に示す「図形回転処理」の詳細について説明する。このフローチャートが開始されると、以下の処理が実行されることになる。
[S50]CPU50aは、変数iを値“1”に初期設定する。
[S51]CPU50aは、回転角度候補テーブルから第i番目の回転角度を取得する。
[S52]CPU50aは、取得した角度だけ図形を回転し、得られた図形を、例えば、HDD50dに格納する。
[S53]CPU50aは、変数iの値を“1”だけインクリメントする。
[S54]CPU50aは、変数iの値が回転角度の候補数以下である場合にはステップS51に戻って同様の処理を繰り返し、それ以外の場合には元の処理に復帰する。
【0057】
次に、以上の処理の具体的な動作を、円弧を例に挙げて説明する。
図18は、処理の対象となる円弧の一例を示す図である。このような円弧60にポインタ61が配置された状態において入力装置52が操作され、図形を回転する指示がなされたとすると、CPU50aは、円弧60を処理の対象として特定する。そして、ローカルX軸ベクトルV1、始点ベクトルV2、および、終点ベクトルV3を特徴ベクトルとして抽出し、また、中心Pを基準点として抽出する。
【0058】
次に、CPU50aは、各特徴ベクトルを基底ベクトルと一致するように回転させた場合の回転角度を算出する処理を実行する。ここでは、始点ベクトルV2を例に挙げて説明する。
【0059】
いま、始点ベクトルV2を、基底ベクトルであるXベクトル、Yベクトル、−Xベクトル、および、−Yベクトルとそれぞれ一致させるために必要な回転角度を算出する。なお、実際には、始点ベクトルV2だけでなく、ローカルX軸V1、終点ベクトルV3に対しても同様の処理が行われ、それぞれのベクトルを基底ベクトルに一致させるための回転角度が算出される。
【0060】
次に、CPU50aは、算出された角度を、昇順に並べ換える。例えば、始点ベクトルV2のみを例に挙げると、先ず、図19に示すように、ベクトルV2をYベクトルと一致させる回転角度が最先に選択され、次に、図20に示すように、始点ベクトルV2をXベクトルと一致させる回転角度が選択され、続いて、図21に示すように、始点ベクトルV2を−xベクトルと一致させる回転角度が選択され、最後に、図22に示すように、始点ベクトルV2を−Yベクトルと一致させる回転角度が選択されることになる。
【0061】
次に、CPU50aは、回転角度のうち重複するものを削除する。例えば、始点ベクトルV2をYベクトルと一致させる回転角度と、終点ベクトルV3をXベクトルに一致させる回転角度とは同一であるので、重複を排除するために、これらの何れか一方が削除される。
【0062】
続いて、CPU50aは、並べ換えが行われた回転角度のそれぞれに対応して図形を回転させる。例えば、始点ベクトルV2のみに注目すると、回転の結果として、図19〜22に示すような状態の図形が表示されることになる。
【0063】
次に、CPU50aは、作成された図を操作者の操作に応じて表示装置51に順次表示させる。そして、全ての図形の表示が終了した場合には、もとの図形に戻って表示を繰り返す。例えば、マウスの右クリックに応じて図形の候補が表示装置51に順次表示されることになる。そして、所定の図形が表示されている場合において、その図形を選択する操作が入力装置52に対してなされた場合には、その時点において表示されている図形をそのまま表示装置51に表示させ続ける結果となる。以上のように所定の図形要素が指定されて、図形の回転が指示された場合には、指定された図形要素を特徴的に示す表示状態が基底ベクトルと特徴ベクトルとから算定され、算定された候補が順に表示されるので、操作者は簡単な操作により、所望の表示形態を選択することが可能となる。
【0064】
次に、複数の図形要素が表示されている場合における処理について説明する。図23は、複数の図形要素が表示されている場合において、直線71がポインタ70によって指示された場合の一例を示している。この例では、直線71、円弧72、楕円弧73、双曲線74、および、放物線75が表示されており、直線71の上にポインタ70が移動されて、図形を回転させる操作が入力装置52に対して行われたとする。すると、CPU50aは、指示された図形要素が直線であることを特定し、その特徴ベクトルと基準点とを抽出する。いまの例では、直線71の中点が基準点であり、また、直線71の左端を基点とし、右端を先端とするベクトルを特徴ベクトルとして抽出する。そして、CPU50aは、抽出した特徴ベクトルと基底ベクトルを一致させるための回転角度を算出し、昇順にソートする。
【0065】
いまの例では、直線を水平方向、即ち、Xベクトル方向に向ける回転角度が最小であるので、先ず、図24に示す画面が表示装置51に表示されることになる。このような状態において、表示を確定する操作(例えば、マウスの左ボタンの操作)がなされると、図24に示す画面が表示装置51に継続して表示されることになる。また、次の画面を表示する操作(例えば、マウスの右ボタンの操作)がなされると、直線71が上下に向くような回転(直線71の右端が上を向く回転)が施されることになる。
【0066】
引き続いて、次の画面を表示する操作がなされたとすると、直線71の右端が下を向く回転が施され、更に、操作が繰り返されたとすると、直線71の右端が左を向く回転が施されることになる。
【0067】
次に、図25を参照して、円弧72が指定された場合における処理について説明する。
図25に示すように、円弧72がポインタ70によって指定されたとすると、CPU50aは、指定された図形要素が円弧であることを特定し、特徴ベクトルと基準点とを抽出する。円弧の場合は、基準点は円の中心であり、また、特徴ベクトルはローカルX軸V1、始点ベクトルV2、および、終点ベクトルV3であるので、CPU50aはこれらを図形要素から抽出する。そして、抽出した特徴ベクトルが基底ベクトルに一致する回転角度を算出して昇順にソートし、全ての図形要素を各回転角度に応じて回転する。
【0068】
いまの例では、ローカルX軸V1を水平方向に向ける回転角度(0°)が最小であるが、これは回転したことにはならないので除外され、始点ベクトルV2を水平方向に向ける回転角度が最小であるので、先ず、図26に示す画面が表示装置51に表示されることになる。それ以降は、始点ベクトル、終点ベクトル、および、ローカルX軸ベクトルと、基底ベクトルとを一致させるための回転角度が小さい順に図形が回転されて表示されることになる。
【0069】
次に、図27を参照して、楕円弧73が指定された場合における処理について説明する。
図27に示すように、楕円弧73がポインタ70によって指定されたとすると、CPU50aは、指定された図形要素が楕円弧であることを特定し、特徴ベクトルと基準点を抽出する。楕円弧の場合は、基準点は楕円の中心であり、また、特徴ベクトルはローカルX軸V1、始点ベクトルV2、および、終点ベクトルV3であるので、CPU50aはこれらを図形要素から抽出する。そして、抽出した特徴ベクトルが基底ベクトルに一致する回転角度を算出して昇順にソートし、全ての図形要素を各回転角度に応じて回転する。
【0070】
いまの例では、始点ベクトルおよび終点ベクトルはそれぞれ0°および360°であり、ともにローカルX軸ベクトルと一致しているので、例えば、これらのベクトルを基底ベクトルに一致させる回転角度が算出され、その値を昇順に並べ換えたものに応じて図形が回転されることになる。その結果、図28に示す画面が表示装置51に表示されることになる。
【0071】
次に、図29を参照して、双曲線74が指定された場合における処理について説明する。
図29に示すように、双曲線74がポインタ70によって指定されたとすると、CPU50aは、指定された図形要素が双曲線であることを特定し、特徴ベクトルと基準点を抽出する。双曲線の場合は、基準点は原点であり、また、特徴ベクトルは実軸ベクトルV1、および、漸近線ベクトルV2であるので、CPU50aはこれらを図形要素から抽出する。そして、抽出した特徴ベクトルが基底ベクトルに一致する回転角度を算出して昇順にソートし、全ての図形要素を各回転角度に応じて回転する。
【0072】
いまの例では、漸近線ベクトルV2を上方向に向ける回転角度が最初に選択され、図30に示すような画面が表示装置51に最初に表示されることになる。
次に、図31を参照して、放物線75が指定された場合における処理について説明する。
【0073】
図31に示すように、放物線75がポインタ70によって指定されたとすると、CPU50aは、指定された図形要素が放物線であることを特定し、特徴ベクトルと基準点を抽出する。放物線の場合は、基準点は焦点であり、また、特徴ベクトルは軸ベクトルV1であるので、CPU50aはこれらを図形要素から抽出する。そして、抽出した特徴ベクトルが基底ベクトルに一致する回転角度を算出して昇順にソートし、全ての図形要素を各回転角度に応じて回転する。
【0074】
いまの例では、軸ベクトルV1を上方向に向ける回転角度が最初に選択され、図32に示すような画面が表示装置51に表示されることになる。
次に、図33を参照して、自由曲線80が指定された場合における処理について説明する。
【0075】
図33に示すように、自由曲線80がポインタ70によって指定されたとすると、CPU50aは、指定された図形要素が自由曲線であることを特定し、特徴ベクトルと基準点を抽出する。自由曲線の場合は、基準点は指示点であり、また、特徴ベクトルは接ベクトルV1であるので、CPU50aはこれらを図形要素から抽出する。そして、抽出した特徴ベクトルが基底ベクトルに一致する回転角度を算出して昇順にソートし、全ての図形要素を各回転角度に応じて回転する。
【0076】
いまの例では、接ベクトルV1を水平方向に向ける回転角度が最初に選択され、図34に示すような画面が表示装置51に最初に表示されることになる。
以上に説明したように、本発明の実施の形態によれば、画面上に表示されている2次元図形の図形要素が指定された場合には、その基準点と特徴ベクトルを抽出し、特徴ベクトルが基底ベクトルと一致する回転角度を算出してその値が小さいものから順に選択して図形を回転するようにしたので、簡単な操作により図形を所望の方向に回転させることが可能となる。
【0077】
次に、3次元図形の場合について説明する。
図35は、3次元図形において図形要素を回転する場合の座標系の関係を示す図である。図35(A)に示すように、3次元図形を処理する図形処理装置には、図形が有する座標系(X,Y,Z)と、視野を示す座標系(Xv,Yv,Zv)の2種類が存在している。表示装置51に対して表示する際には、図35(B)に示すように、視野を示す座標系のZv軸が画面の奥行き方向へ、Yv軸が画面の上下方向へ、また、Xv軸が画面の左右方向へ向くように回転させた場合における図形の形態が表示されることになる。従って、3次元図形の場合では、視野を示す座標系を基準として図形の回転がなされることから、2次元図形のような基準点は存在しない。また、3次元図形では、視野を示す座標系を基底ベクトルとする。
【0078】
図36は、ベクトルを回転させる際の処理について説明する図である。この図に示すように、ベクトルV1をベクトルV2へ移動(回転)させる場合には、先ず、ベクトルV1とベクトルV2の外積からベクトルAxを求める。そして、このベクトルAxを回転の中心軸としてベクトルV1を角度θだけ回転させることによりベクトルV2へ移動させる。
【0079】
図37は、3次元図形要素の特徴ベクトルを説明する図である。この図に示すように、始点および終点が(x1,y1,z1)、(x2,y2,z2)である3次元の図形要素「直線」に対しては、方向ベクトルV1(x2−x1,y2−y1,z2−z1)を特徴ベクトルとして定義する。なお、直線の具体例を図38(A)に示す。
【0080】
また、円または円弧に対しては、軸ベクトル(Ax,Ay,Az)を特徴ベクトルとして定義する。図38(B)は、円または円弧と軸ベクトルとの関係を示す図である。
【0081】
楕円または楕円弧に対しては、軸ベクトル(Ax,Ay,Az)を特徴ベクトルとして定義する。図38(C)は、楕円または楕円弧と軸ベクトルとの関係を示す図である。
【0082】
自由曲線に対しては、接ベクトルV1(Tx,Ty,Tz)を特徴ベクトルとして定義する。図39(A)は、自由曲線と接ベクトルV1の関係を示す図である。
【0083】
平面に対しては、法線ベクトルV1(Nx,Ny,Nz)を特徴ベクトルとして定義する。図39(B)は、平面と法線ベクトルの関係を示す図である。
円筒面に対しては、軸ベクトルV1(Ax,Ay,Az)を特徴ベクトルとして定義する。図39(C)は、円筒面と軸ベクトルの関係を示す図である。
【0084】
円錐面に対しては、軸ベクトルV1(Ax,Ay,Az)を特徴ベクトルとして定義する。図40(A)は、円錐面と軸ベクトルの関係を示す図である。
球面に対しては、軸ベクトルV1(Ax,Ay,Az)を特徴ベクトルとして定義する。図40(B)は、球面と軸ベクトルの関係を示す図である。
【0085】
トーラス面に対しては、軸ベクトルV1(Ax,Ay,Az)を特徴ベクトルとして定義する。図40(C)は、トーラス面と軸ベクトルの関係を示す図である。
【0086】
掃引面に対しては、掃引方向ベクトルV1(Sx,Sy,Sz)を特徴ベクトルとして定義する。図41(A)は、掃引面と掃引方向ベクトルとの関係を示す図である。
【0087】
回転面に対しては、回転軸ベクトルV1(Ax,Ay,Az)を特徴ベクトルとして定義する。図41(B)は、回転面と回転軸ベクトルの関係を示す図である。
【0088】
自由曲面に対しては、法線ベクトルV1(Nx,Ny,Nz)を特徴ベクトルとして定義する。図41(C)は、自由曲面と法線ベクトルの関係を示す図である。
【0089】
次に、図42を参照して、3次元図形を回転する場合の処理について説明する。このフローチャートが開始されると、以下の処理が実行されることになる。
[S70]CPU50aは、入力装置52によって指定された図形要素を特定する。
[S71]CPU50aは、特定された図形要素の特徴ベクトルを抽出する処理である「特徴ベクトル抽出処理」を実行する。なお、この処理の詳細は、図43を参照して後述する。
[S72]CPU50aは、指定された図形要素の回転角度の候補を推論する処理である「回転角度候補推論処理」を実行する。なお、この処理の詳細は、図44を参照して後述する。
[S73]CPU50aは、ステップS72において算出した回転角度の候補のそれぞれに対応する分だけ図形を回転する処理である「図形回転処理」を実行する。なお、この処理の詳細は、図45を参照して後述する。
[S74]CPU50aは、変数iを値“1”に初期設定する。
[S75]CPU50aは、ステップS73において算出された第i番目の回転角度の候補に対応して回転された図形を表示装置51に表示させる。
[S76]CPU50aは、入力装置52から所定の情報が入力され、現在表示されている図形でOKである旨が指示された場合には処理を終了し、それ以外の場合にはステップS77に進む。
[S77]CPU50aは、変数iを“1”だけインクリメントする。
[S78]CPU50aは、変数iの値が候補数以下である場合にはステップS75に戻って同様の処理を繰り返し、それ以外の場合にはステップS79に進む。
[S79]CPU50aは、変数iを“1”に再度設定した後、ステップS75に戻って同様の処理を繰り返す。
【0090】
次に、図43を参照して、図42に示す「特徴ベクトル抽出処理」の詳細について説明する。このフローチャートが開始されると、以下の処理が実行される。
[S80]CPU50aは、ステップS70において特定された図形要素を取得する。
[S81]CPU50aは、特定された図形の特徴ベクトルを図37に示すテーブルを参照して取得する。
[S82]CPU50aは、取得した特徴ベクトルをHDD50dのベクトル情報テーブルへ格納し、もとの処理へ復帰する。
【0091】
図46は、ベクトル情報テーブルの一例を示す図である。この図では、ベクトル番号1〜3の3種類の特徴ベクトルが格納されている。
次に、図44を参照して、図42に示す「回転角度候補推論処理」の詳細な処理について説明する。このフローチャートが開始されると、以下の処理が実行される。
[S90]CPU50aは、変数iを“1”に初期設定する。
[S91]CPU50aは、現在の視野座標に関する情報を視野座標テーブルに格納する。
【0092】
図47は、視野座標テーブルの一例を示す図である。この例では、視野を示す座標系(Xv,Yv,Zv)の基底ベクトルが格納されている。
[S92]CPU50aは、1次元配列Vの第i番目の要素として、第i番目の特徴ベクトルを代入する。
[S93]CPU50aは、2次元配列Thの第(i,0)番目の要素として、基底ベクトルであるXベクトル(1,0,0)と特徴ベクトルV[i]とが成す角度を代入する。
[S94]CPU50aは、2次元配列Thの第(i,1)番目の要素として、基底ベクトルであるYベクトル(0,1,0)と特徴ベクトルV[i]とが成す角度を代入する。
[S95]CPU50aは、2次元配列Thの第(i,2)番目の要素として、基底ベクトルであるZベクトル(0,0,1)と特徴ベクトルV[i]とが成す角度を代入する。
[S96]CPU50aは、2次元配列Thの第(i,3)番目の要素として、基底ベクトルであるXベクトルを180°回転させたベクトル(−1,0,0)と特徴ベクトルV[i]とが成す角度を代入する。
[S97]CPU50aは、2次元配列Thの第(i,4)番目の要素として、基底ベクトルであるYベクトルを180°回転させたベクトル(0,−1,0)と特徴ベクトルV[i]とが成す角度を代入する。
[S98]CPU50aは、2次元配列Thの第(i,5)番目の要素として、基底ベクトルであるZベクトルを180°回転させたベクトル(0,0,−1)と特徴ベクトルV[i]とが成す角度を代入する。
[S99]CPU50aは、変数iの値を“1”だけインクリメントする。
[S100]CPU50aは、変数iの値が特徴ベクトル数以下である場合にはステップS92に戻って同様の処理を繰り返し、それ以外の場合にはステップS101に進む。
[S101]CPU50aは、2次元配列Thに格納されている全ての要素を、昇順にソートする。
[S102]CPU50aは、重複が生じている場合には、これを排除する。
[S103]CPU50aは、ソートされた結果を、HDD50dの回転角度候補テーブルに格納する。
【0093】
図48は、回転角度候補テーブルの一例を示す図である。この例では、特徴ベクトルのベクトル番号と、合わせる基底ベクトルと、その回転角度とが対応付けられている。
【0094】
次に、図45を参照して、図42に示す「図形回転処理」の詳細について説明する。このフローチャートが開始されると、以下の処理が実行されることになる。
[S110]CPU50aは、変数iを値“1”に初期設定する。
[S111]CPU50aは、回転角度候補テーブルから第i番目の回転角度を取得する。
[S112]CPU50aは、取得した角度だけ図形を回転し、得られた図形を、例えば、HDD50dに格納する。
[S113]CPU50aは、変数iの値を“1”だけインクリメントする。
[S114]CPU50aは、変数iの値が回転角度の候補数以下である場合にはステップS111に戻って同様の処理を繰り返し、それ以外の場合には元の処理に復帰する。
【0095】
次に、以上の処理の具体的な動作について説明する。
いま、図49に示すような3次元図形100が表示装置51に表示されているとする。その場合に、ポインタ90が3次元図形100を構成する辺100a上に移動され、図形を回転する指示がなされたとすると、CPU50aは、指定された図形要素を特定し、その特徴ベクトルを抽出する。いまの例では、図形要素は直線であるので、直線の始点と終点を結ぶ方向ベクトルV1が特徴ベクトルとして抽出される。
【0096】
次に、CPU50aは、抽出した特徴ベクトルを各基底ベクトルに一致させるための回転角度を算出し、昇順にソートする。いまの例では、特徴ベクトルをXvベクトルに一致させる回転角度が最小であることから、この回転角度が最先に配置されることになる。
【0097】
続いて、CPU50aは、ソートされた回転角度の候補に応じて図形を回転し、表示装置51に対して表示する。そして、所定の回転角度によって回転された図形を選択する操作がなされた場合には、その回転角度における図形の状態が継続して表示されることになる。図50は、ソートによって最先に配置された回転角度(特徴ベクトルとXvベクトルを一致させる回転角度)だけ3次元図形100を回転させた場合の表示例である。
【0098】
また、図51に示すような表示画面において、3次元図形100の円100b上へポインタ90を移動し、図形を回転させる操作を行ったとすると、CPU50aは、指定された図形要素が円であることを特定するとともに、その特徴ベクトルとして軸ベクトルを抽出する。
【0099】
そして、CPU50aは、特徴ベクトルと基底ベクトルを一致させる回転角度を算出し、昇順にソートする。次に、CPU50aは、ソートされた回転角度に応じて3次元図形100を回転させ、操作者の操作に応じて表示装置51に逐次表示させる。図52〜54は、このとき表示装置51に表示される画像の一例を示す図である。図52は、円の軸ベクトルをYvベクトルと一致させる方向に回転した場合の表示例である。また、図53はZvベクトル、図54はXvベクトルとそれぞれ一致するように回転させた場合の表示例である。なお、図には示していないが、−Xv,−Yv,−Zvベクトルと一致させるように回転した図形も候補として表示する。
【0100】
そして、このような表示候補の中から所定の候補を選択する操作がなされた場合にはその画面が継続的に表示されることになる。
更に、図55に示すような表示画面において、3次元図形100の楕円100c上へポインタ90を移動させ、図形を回転させる操作を行ったとすると、CPU50aは、指定された図形要素が楕円であることを特定するとともに、その特徴ベクトルとして軸ベクトルを抽出する。
【0101】
CPU50aは、特徴ベクトルと基底ベクトルを一致させる回転角度を算出し、昇順にソートする。続いて、CPU50aは、ソートされた回転角度に応じて3次元図形100を回転させ、操作者の操作に応じて表示装置51に逐次表示させる。図56〜58は、このとき表示装置51に表示される画像の一例を示す図である。図56は、楕円の軸ベクトルをZvベクトルと一致させる方向に回転した場合の表示例である。また、図57はXvベクトル、図58はYvベクトルとそれぞれ一致するように回転させた場合の表示例である。なお、図には示していないが、−Xv,−Yv,−Zvベクトルと一致させるように回転した図形も候補として表示する。
【0102】
更に、図59に示すような表示画面において、3次元図形100の自由曲線100d上へポインタ90を移動させ、図形を回転させる操作を行ったとすると、CPU50aは、指定された図形要素が自由曲線であることを特定するとともに、その特徴ベクトルとして接ベクトルを抽出する。
【0103】
CPU50aは、特徴ベクトルと基底ベクトルを一致させる回転角度を算出し、昇順にソートする。続いて、CPU50aは、ソートされた回転角度に応じて3次元図形100を回転させ、操作者の操作に応じて表示装置51に逐次表示させる。図60〜62は、このとき表示装置51に表示される画面の一例を示す図である。図60は、自由曲線の接ベクトルをYvベクトルと一致させる方向に回転した場合の表示例である。また、図61はXvベクトル、図62はZvベクトルとそれぞれ一致するように回転させた場合の表示例である。なお、図には示していないが、−Xv,−Yv,−Zvベクトルと一致させるように回転した図形も候補として表示する。
【0104】
以上に示したように、本発明の実施の形態によれば、3次元図形の表示形態を変更する場合には、所定の図形要素を指定し、その図形要素が有する特徴ベクトルを基底ベクトルに一致させる回転角度を算定し、その回転角度が小さいものから選択して、図形を回転させるようにしたので、少ない操作で図形を所望の方向へ回転させることが可能となる。
【0105】
なお、以上の実施の形態では、回転角度が小さい順に回転角度の候補をソートするようにしたが、これは一例であって、それ以外のソート方法を採用することも可能であることはいうまでもない。
【0106】
また、単に回転角度の大小に応じてソートするだけでなく、各図形要素毎に選択される傾向の高い方向を学習することにより、操作者の意図を反映したソートを行うことも可能である。
【0107】
更に、以上の実施の形態では、画面上に表示されている全ての図形要素を回転するようにしたが、例えば、予め選択された図形要素のみを回転させるようにしてもよい。
【0108】
なお、上記の処理機能は、コンピュータによって実現することができる。その場合、図形処理装置が有すべき機能の処理内容は、コンピュータで読み取り可能な記録媒体に記録されたプログラムに記述されており、このプログラムをコンピュータで実行することにより、上記処理がコンピュータで実現される。コンピュータで読み取り可能な記録媒体としては、磁気記録装置や半導体メモリ等がある。市場へ流通させる場合には、CD−ROM(Compact Disk Read Only Memory)やフロッピーディスク等の可搬型記録媒体にプログラムを格納して流通させたり、ネットワークを介して接続されたコンピュータの記憶装置に格納しておき、ネットワークを通じて他のコンピュータに転送することもできる。コンピュータで実行する際には、コンピュータ内のハードディスク装置等にプログラムを格納しておき、メインメモリにロードして実行する。
【0109】
【発明の効果】
以上説明したように本発明では、図形要素を入力して所望の図形を作成し、表示装置へ出力する図形処理装置において、表示装置に表示されている所定の図形要素を指定する図形要素指定手段と、図形要素指定手段によって指定された図形要素が有する特徴ベクトルを抽出する特徴ベクトル抽出手段と、表示系が有する基底ベクトルの何れかと特徴ベクトルとを一致させるための回転角度を算定する回転角度算定手段と、図形要素を含む図形の一部または全部を、表示系において回転角度算定手段によって算定された回転角度だけ回転させる回転手段と、回転手段によって図形の一部または全部を回転する前に、図形要素のみを回転角度算定手段によって算定された角度だけ回転させる図形要素回転手段と、を有するようにしたので、簡単な操作で図形を所望の角度に回転させることが可能になる。
【図面の簡単な説明】
【図1】本発明の動作原理を説明する原理図である。
【図2】図1に示す原理図の動作を説明するための図である。
【図3】図2において四角形の上辺を指定した場合における特徴ベクトルの一例を示す図である。
【図4】図3に示す四角形を、特徴ベクトルを基底ベクトルに一致させるように回転させた場合の図である。
【図5】図2において四角形の対角線を指定した場合における特徴ベクトルの一例を示す図である。
【図6】図5に示す四角形を、特徴ベクトルを基底ベクトルに一致させるように回転させた場合の図である。
【図7】図3において、四角形の上辺のみを回転して表示した場合の一例である。
【図8】本発明の実施の形態の構成例を示すブロック図である。
【図9】図形種毎の基準点と特徴ベクトルの一例を示す図である。
【図10】図10(A)は直線の特徴ベクトルと基準点、図10(B)は円弧の特徴ベクトルと基準点、図10(C)は楕円弧の特徴ベクトルと基準点を示す図である。
【図11】図11(A)は放物線の特徴ベクトルと基準点、図11(B)は双曲線の特徴ベクトルと基準点、図11(C)は自由曲線の特徴ベクトルと基準点を示す図である。
【図12】図8に示す実施の形態において実行される処理の一例を説明するフローチャートである。
【図13】図12に示す「基準点および特徴ベクトル抽出処理」の詳細を説明するフローチャートである。
【図14】図12に示す「回転角度候補推論処理」の詳細を説明するフローチャートである。
【図15】図12に示す「図形回転処理」の詳細を説明するフローチャートである。
【図16】ベクトル情報テーブルの一例を示す図である。
【図17】回転角度候補テーブルの一例を示す図である。
【図18】図8に示す実施の形態の具体的な動作を説明するための図である。
【図19】図18に示す円弧の始点ベクトルV2をYベクトルに一致させるように回転した図である。
【図20】図18に示す円弧の始点ベクトルV2をXベクトルに一致させるように回転した図である。
【図21】図18に示す円弧の始点ベクトルV2を−Xベクトルに一致させるように回転した図である。
【図22】図18に示す円弧の始点ベクトルV2を−Yベクトルに一致させるように回転した図である。
【図23】複数の図形要素が表示された場合における本発明の具体的な動作を説明するための図である。
【図24】図23において直線が指定され、回転が指示された場合に最初に表示される画面の一例である。
【図25】円弧が指定された場合の表示画面の一例である。
【図26】図25において円弧が指定され、回転が指示された場合に最初に表示される画面の一例である。
【図27】楕円弧が指定された場合の表示画面の一例である。
【図28】図27において楕円弧が指定され、回転が指示された場合に最初に表示される画面の一例である。
【図29】双曲線が指定された場合の表示画面の一例である。
【図30】図29において双曲線が指定され、回転が指示された場合に最初に表示される画面の一例である。
【図31】放物線が指定された場合の表示画面の一例である。
【図32】図31において放物線が指定され、回転が指示された場合に最初に表示される画面の一例である。
【図33】自由曲線が指定された場合の表示画面の一例である。
【図34】図33において自由曲線が指定され、回転が指示された場合に最初に表示される画面の一例である。
【図35】3次元図形が有する座標系と、視野座標系との関係を示す図である。
【図36】ベクトルを回転させる際の処理について説明する図である。
【図37】3次元図形の各図形要素の特徴ベクトルを説明する図である。
【図38】図38(A)は直線の特徴ベクトルを、図38(B)は円または円弧の特徴ベクトルを、図38(C)は楕円または楕円弧の特徴ベクトルを説明する図である。
【図39】図39(A)は自由曲線の特徴ベクトルを、図39(B)は平面の特徴ベクトルを、図39(C)は円筒面の特徴ベクトルを説明する図である。
【図40】図40(A)は円錐面の特徴ベクトルを、図40(B)は球面の特徴ベクトルを、図40(C)はトーラス面の特徴ベクトルを説明する図である。
【図41】図41(A)は掃引面の特徴ベクトルを、図41(B)は回転面の特徴ベクトルを、図41(C)は自由曲面の特徴ベクトルを説明する図である。
【図42】図8に示す実施の形態において、3次元図形を回転させる場合に実行される処理の一例を説明するフローチャートである。
【図43】図42に示す「特徴ベクトル抽出処理」の詳細を説明するフローチャートである。
【図44】図42に示す「特徴ベクトル抽出処理」の詳細を説明するフローチャートである。
【図45】図42に示す「図形回転処理」の詳細を説明するフローチャートである。
【図46】ベクトル情報テーブルの一例を示す図である。
【図47】視野座標テーブルの一例を示す図である。
【図48】回転角度候補テーブルの一例を示す図である。
【図49】3次元図形を回転させる場合の具体的な動作を説明するための図である。
【図50】図49において、立方体上部の辺が指定され、図形の回転が指示された場合に最初に表示される画面の一例である。
【図51】円柱上部の円が指定された場合の表示例である。
【図52】図51において、円柱上部の円が指定され、図形の回転が指示された場合に最初に表示される画面の一例である。
【図53】図52の次に表示される画面の一例である。
【図54】図53の次に表示される画面の一例である。
【図55】立方体側面の楕円が指定された場合の表示例である。
【図56】図55において、立方体側面の楕円が指定され、図形の回転が指示された場合に最初に表示される画面の一例である。
【図57】図56の次に表示される画面の一例である。
【図58】図57の次に表示される画面の一例である。
【図59】立方体側面の自由曲線が指定された場合の表示例である。
【図60】図59において、立方体側面の自由曲線が指定され、図形の回転が指示された場合に最初に表示される画面の一例である。
【図61】図60の次に表示される画面の一例である。
【図62】図61の次に表示される画面の一例である。
【図63】従来における2次元図形の表示形態の変更方法の一例を示す図である。
【図64】従来における3次元図形の表示形態の変更方法の一例を示す図である。
【図65】図64に示す画面において所定の視点が指定された場合の表示例である。
【図66】3次元図形の表示形態の他の変更方法の一例を示す図である。
【図67】3次元図形の表示形態の更に他の変更方法の一例を示す図である。
【符号の説明】
30 図形処理装置
30a 図形要素指定手段
30b 特徴ベクトル抽出手段
30c 回転角度算定手段
30d 回転手段
30e 図形要素指定手段
30f 回転角度指定手段
31 入力装置
32 表示装置
50 図形処理装置
50a CPU
50b ROM
50c RAM
50d HDD
50e GC
50f I/F
51 表示装置
52 入力装置
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a graphic processing device, a recording medium, and a program, and more particularly, to a graphic processing device, a recording medium, and a program for inputting a graphic element to create a desired graphic and outputting it to a display device.
[0002]
[Prior art]
For example, in a graphics processing device such as CAD (Computer Aided Design), it is necessary to frequently change the display form of the created graphics.
[0003]
FIG. 63 is a diagram showing an example of a conventional method for changing the display form of a two-dimensional figure. In the example of this figure, the center point 2 and the rotation angle that are the central axes when rotating the target graphic 1 are specified, and the graphic 1 is rotated based on these.
[0004]
FIG. 64 is a diagram illustrating an example of a method for changing the display form of a three-dimensional figure. In this example, a window entitled “View Information List” is displayed, and viewpoint candidates are displayed in the display area 10a therein. When the end button 10d is operated after selecting a desired viewpoint in such a window, for example, as shown in FIG. 65, a graphic 15 viewed from the selected viewpoint is displayed. In the window shown in FIG. 64, a desired viewpoint can also be designated by directly inputting latitude and longitude into the text boxes 10b and 10c.
[0005]
FIG. 66 is a diagram showing an example of another method for changing the display form of a three-dimensional figure. In this example, a state in which the figure 15 is rotated in proportion to the movement of the pointer 16 is shown.
[0006]
FIG. 67 is a diagram showing an example of still another method for changing the display form of a three-dimensional figure. In this example, a specific surface 15a of the graphic 15 is designated by the pointer 16, and the graphic display is changed so that the surface 15a faces the front.
[0007]
[Problems to be solved by the invention]
By the way, in the case of a conventional graphics processing system for displaying a two-dimensional figure, when a user pays attention to a certain figure and desires a state in which the figure is displayed in a characteristic state, the user can There is a problem that the rotation angle must be calculated and input, which is very complicated.
[0008]
Further, in the case of a conventional graphics processing system that displays a three-dimensional shape, for example, the example shown in FIG. 64 has a problem that the selection range is narrow because only a plurality of predetermined viewpoints can be selected. It was.
[0009]
In addition, the method shown in FIG. 66 has a problem that it is possible to display a figure viewed from an arbitrary direction, but fine adjustment is difficult.
Further, the method shown in FIG. 67 has a problem that the selectable range is limited as in the case shown in FIG.
[0010]
The present invention has been made in view of such a point, and an object thereof is to provide a graphic processing apparatus capable of easily displaying a graphic viewed from a desired viewpoint.
[0011]
[Means for Solving the Problems]
  In the present invention, in order to solve the above-mentioned problem, a predetermined graphic displayed on the display device 32 is displayed in the graphic processing device 30 shown in FIG. Graphic element specifying means 30a for specifying a graphic element, feature vector extracting means 30b for extracting a feature vector of the graphic element specified by the graphic element specifying means 30a, one of the base vectors of the display system and the feature vector A rotation angle calculation means 30c for calculating a rotation angle for matching, a rotation means 30d for rotating a part or all of a graphic including graphic elements by a rotation angle calculated by the rotation angle calculation means 30c in the display system,Before rotating part or all of the figure by the rotating means 30d, the figure element rotating means 30e for rotating only the figure element by the angle calculated by the rotation angle calculating means 30c;A graphic processing device 30 is provided.
[0012]
  Here, the graphic element designating unit 30 a designates a predetermined graphic element displayed on the display device 32. The feature vector extraction unit 30b extracts a feature vector included in the graphic element designated by the graphic element designation unit 30a. The rotation angle calculation means 30c calculates a rotation angle for making any of the basis vectors of the display system coincide with the feature vector. The rotating means 30d rotates part or all of the graphic including graphic elements by the rotation angle calculated by the rotation angle calculating means 30c in the display system.The graphic element rotating means 30e rotates only the graphic element by the angle calculated by the rotation angle calculating means 30c before rotating the part or all of the graphic by the rotating means 30d.
[0013]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a principle diagram illustrating the operating principle of the present invention. In this figure, the graphic processing device 30 is constituted by a graphic element specifying means 30a, a feature vector extracting means 30b, a rotation angle calculating means 30c, a rotating means 30d, a graphic element rotating means 30e, and a rotation angle specifying means 30f. A graphic generated by combining graphic elements input from the input device 31 is displayed and output to the display device 32. When a predetermined graphic element is designated, a feature vector of the graphic element is extracted. Then, the whole figure or a part of the figure is rotated with reference to the feature vector. Note that the graphic element is a basic unit constituting a graphic, for example, a straight line, a circle, an ellipse, or the like.
[0014]
Here, the graphic element designating unit 30 a designates a predetermined graphic element displayed on the display device 32.
The feature vector extraction unit 30b extracts a feature vector included in the graphic element designated by the graphic element designation unit 30a.
[0015]
The rotation angle calculation means 30c calculates a rotation angle necessary for matching any one of the basis vectors of the display system with the feature vector.
The rotating means 30d rotates part or all of the graphic including graphic elements by the rotation angle calculated by the rotation angle calculating means 30c in the display system.
[0016]
The graphic element rotation means 30e rotates only the designated graphic element by the angle calculated by the rotation angle calculation means 30c before rotating part or all of the graphic by the rotation means 30d.
[0017]
The rotation angle designation means 30f designates a specific rotation angle with reference to the graphic element rotated by the graphic element rotation means 30e.
The input device 31 is constituted by, for example, a keyboard and a mouse, generates information corresponding to the operation of the operator, and supplies it to the graphic processing device 30.
[0018]
The display device 32 is configured by, for example, a CRT (Cathode Ray Tube) monitor, and displays and outputs an image output from the graphic processing device 30.
Next, the operation of the above principle diagram will be described.
[0019]
Now, as shown in FIG. 2, it is assumed that a graphic 35 composed of a square 35 a, an ellipse 35 b, a diagonal 35 c, and a diagonal 35 d is input from the input device 31 and displayed on the display device 32.
[0020]
In such a state, if the input device 31 is operated and the side located at the top of the square 35a is designated by the pointer, the graphic element designating means 30a of the graphic processing device 30 processes the sides constituting the square 35a. Specify as target.
[0021]
The feature vector extraction unit 30b extracts a feature vector of a side located above the square 35a designated by the graphic element designation unit 30a. In this example, as shown in FIG. 3, a feature vector 35e parallel to the side is extracted.
[0022]
The rotation angle calculation means 30c calculates a rotation angle necessary for matching any one of the basis vectors of the display system with the feature vector. For example, in this example, the basis vectors of the display system are X and Y shown in the lower left of FIG. 3, and therefore the feature vector 35e is a basis vector (X direction, Y direction, −X direction, and −Y direction basis vectors ( Rotation angles that coincide with the X vector, Y vector, -X vector, and -Y vector, respectively, are calculated.
[0023]
The rotation unit 30d sequentially selects a plurality of rotation angle candidates calculated by the rotation angle calculation unit 30c, and rotates the figure according to the selected rotation angle. In addition, there exists the method of selecting in order with few rotation angles as an order of this selection. In that case, the figure shown in FIG. In the state where the graphic as shown in FIG. 4 is displayed on the display device 32, when an operation for selecting this state is performed on the input device 31, the display state is fixed.
[0024]
Similarly, in the state shown in FIG. 5, when the diagonal line 35d is selected, the graphic element designation unit 30a designates the diagonal line 35d as a processing target, and the feature vector extraction unit 30b A feature vector 35f of 35d is extracted.
[0025]
The rotation angle calculation unit 30c calculates a rotation angle candidate for matching the feature vector 35f and the base vector, and supplies the rotation angle candidate to the rotation unit 30d. The rotation means 30d selects the supplied rotation angle candidates in order from the smallest value, and rotates the figure.
[0026]
For example, in the example of FIG. 5, since the angle with the X vector is the smallest, the graphic shown in FIG. 6 is displayed first.
In the above example, the entire figure is rotated and displayed, but only the specified figure element is rotated and displayed, and if the operation is confirmed in a predetermined rotation state, the entire figure is rotated. May be displayed. Processing in such a case will be described below.
[0027]
Now, in the display state shown in FIG. 2, if the side located above the square 35a is designated by the pointer 36, the graphic element designating means 30a designates this side as a processing target.
[0028]
The feature vector extraction unit 30b extracts the feature vector 35e from the designated side.
The rotation angle calculation means 30c calculates a rotation angle for matching the feature vector 35e and the base vector, and supplies the rotation angle to the rotation means 30d and the graphic element rotation means 30e.
[0029]
The graphic element rotating means 30e rotates the straight line constituting the side that is the designated graphic element in accordance with the supplied rotation angle, and displays it on the display device 32. In the present example, for example, as shown in FIG. 7, the side 35g rotated so as to coincide with the X vector is displayed.
[0030]
In such a state, when the operator operates the input device 31 and designates the rotation angle, the rotation angle designation unit 30f indicates that the rotation angle is designated with respect to the rotation unit 30d. To be notified. The rotating means 30d that has received the notification rotates all the graphic elements at the specified rotation angle. As a result, a graphic as shown in FIG. 4 is displayed on the display device 32.
[0031]
As described above, according to the graphic processing apparatus according to the present invention, the rotation angle that matches the feature vector and the base vector of the specified graphic element is calculated, and the graphic is rotated by the rotation angle. Since the images are sequentially displayed, the figure can be rotated in a desired direction by a simple operation.
[0032]
Further, when the graphic element rotating means 30e displays a state where only the designated graphic element is rotated and is fixed in that state, the candidate is changed by instructing the rotation angle specifying means 30f. Since it is not necessary to rotate the entire figure every time, the processing speed can be improved.
[0033]
Next, an embodiment of the present invention will be described.
FIG. 8 is a block diagram showing a configuration example of the embodiment of the present invention. As shown in the figure, a graphic processing device 50 according to the present invention includes a CPU (Central Processing Unit) 50a, a ROM (Read Only Memory) 50b, a RAM (Random Access Memory) 50c, an HDD (Hard Disk Drive) 50d, a GC. (Graphics Card) 50e and I / F (Interface) 50f. A display device 51 and an input device 52 are connected to the outside.
[0034]
The CPU 50a executes various arithmetic processes according to programs stored in the HDD 50d and the like, and controls each unit of the apparatus.
The ROM 50b stores basic programs and data executed by the CPU 50a.
[0035]
The RAM 50c temporarily stores programs being executed by the CPU 50a, data being calculated, and the like.
The HDD 50d stores programs and data executed by the CPU 50a, and stores information regarding graphic elements input from the input device 52 and their arrangement states.
[0036]
The GC 50e executes a drawing process according to a drawing command supplied from the CPU 50a, converts the generated image into a video signal, and outputs the video signal to the display device 51.
The I / F 50 f inputs information from the input device 52.
[0037]
The display device 51 is composed of, for example, a CRT monitor, a liquid crystal display, or the like, and displays and outputs the video signal output from the GC 50e.
The input device 52 is configured by a keyboard and a mouse, generates information corresponding to the operation of the operator, and supplies the information to the I / F 50f.
[0038]
Next, the operation of the above embodiment will be described.
In the present invention, both two-dimensional and three-dimensional graphics can be processed. In the following, first, processing related to two-dimensional graphics will be described, and then processing related to three-dimensional graphics will be described.
[0039]
First, before describing the processing for a two-dimensional graphic, the feature vector and the reference point of each graphic element of the two-dimensional graphic will be described.
FIG. 9 is a diagram for explaining a reference point and a feature vector of a two-dimensional graphic element. 10 and 11 are diagrams specifically showing the feature vectors and reference points of the graphic elements shown in FIG.
[0040]
As shown in FIGS. 9 and 10A, in the case of the graphic element “straight line”, when the start point is (x1, y1) and the end point is (x2, y2), the reference point is the middle point P ((( x1 + x2) / 2, (y1 + y2) / 2), and the feature vector is defined as a direction vector V1 (x2-x1, y2-y1).
[0041]
In the case of the graphic element “arc”, as shown in FIG. 10B, when the center is (Ox, Oy), the start point is (x1, y1), and the end point is (x2, y2), The reference point is defined as the midpoint P (Ox, Oy), and the feature vector is the local X axis V1 (1, 0), the start point vector (x1-Ox, y1-Oy), and the end point vector (X2-Ox, y2). -Oy).
[0042]
In the case of the graphic element “elliptical arc”, as shown in FIG. 10C, the center is (Ox, Oy), the local X axis is (Lx, Ly), the start point is (x1, y1), and the end point is (x2). , Y2), the reference point is defined as the midpoint P (Ox, Oy), and the feature vector is the local X axis V1 (Lx, Ly), the start point vector (x1-Ox, y1-Oy), The end point vector (X2-Ox, y2-Oy) is defined as three.
[0043]
In the case of the graphic element “parabola”, as shown in FIG. 11A, the reference point is defined as the focal point P (Fx, Fy), and the feature vector is defined as the axis vector V1 (Ax, Ay). .
[0044]
In the case of the graphic element “hyperbola”, as shown in FIG. 11B, the reference point is defined as the center P (Ox, Oy), and the feature vector is asymptotic to the real axis vector V1 (Ax, Ay). It is defined as a line vector V2 (Tx, Ty).
[0045]
Further, in the case of the graphic element “free curve”, as shown in FIG. 11C, the reference point is defined as a designated point P (p, q) that is the designated point, and the feature vector is a tangent vector. It is defined as V1 (Tx, Ty).
[0046]
The above is only an example, and the present invention is not limited to such a case.
Next, the operation of the embodiment of the present invention will be described.
[0047]
FIG. 12 is a flowchart for explaining an example of processing executed when a two-dimensional figure is rotated in the embodiment shown in FIG. When this flowchart is started, the following processing is executed.
[S10] The CPU 50a identifies the graphic element designated by operating the input device 52.
[0048]
For example, if the graphic element “arc” displayed on the display device 51 is designated by the input device 52, the CPU 50a identifies “arc” as the designated graphic element.
[S11] The CPU 50a executes a process of extracting a reference point and a feature vector of the specified graphic element. Details of this processing will be described later with reference to FIG.
[S12] The CPU 50a executes a process of inferring a rotation angle candidate of a graphic including the specified graphic element. Details of this process will be described later with reference to FIG.
[S13] The CPU 50a executes a process of rotating the figure by an amount corresponding to each of the rotation angle candidates calculated in step S12. Details of this processing will be described later with reference to FIG.
[S14] The CPU 50a initializes the variable i to the value “1”.
[S15] The CPU 50a causes the display device 51 to display a figure rotated in accordance with the i-th rotation angle candidate calculated in step S13.
[S16] The CPU 50a ends the process when predetermined information is input from the input device 52 and is instructed that the currently displayed graphic is OK, and otherwise proceeds to step S17. .
[S17] The CPU 50a increments the variable i by “1”.
[S18] When the value of the variable i is equal to or less than the number of rotation angle candidates, the CPU 50a returns to step S15 and repeats the same processing, and otherwise proceeds to step S19.
[S19] The CPU 50a initializes the variable i to “1” again, and then returns to step S15 to repeat the same processing.
[0049]
Next, details of the “reference point and feature vector extraction process” shown in FIG. 12 will be described with reference to FIG. When this flowchart is started, the following processing is executed.
[S20] The CPU 50a acquires the graphic element specified in step S10.
[S21] The CPU 50a obtains the reference point of the specified figure with reference to the table shown in FIG.
[0050]
For example, when an arc is designated as the graphic element, the center P (Ox, Oy) of the arc is acquired as the reference point.
[S22] The CPU 50a acquires the feature vector of the specified figure with reference to the table shown in FIG.
[0051]
In the present example, since the target graphic element is an arc, as shown in FIG. 9, the local X axis V1, the start point vector V2, and the end point vector V3 are extracted as feature vectors.
[S23] The CPU 50a stores the acquired reference point and feature vector in the vector information table of the HDD 50d, and returns to the original process (return).
[0052]
FIG. 16 is a diagram illustrating an example of a vector information table. In this figure, three types of reference vectors of vector numbers 1 to 3 and reference points of the respective vectors are stored.
[0053]
Next, detailed processing of the “rotation angle candidate inference processing” shown in FIG. 12 will be described with reference to FIG. When this flowchart is started, the following processing is executed.
[S30] The CPU 50a initializes the variable i to “1”.
[S31] The CPU 50a substitutes the i-th feature vector as the i-th element of the one-dimensional array V.
[S32] The CPU 50a substitutes the angle formed by the X vector (1, 0) as the basis vector and the feature vector V [i] as the (i, 0) -th element of the two-dimensional array Th.
[S33] The CPU 50a substitutes the angle formed by the Y vector (0, 1), which is a base vector, and the feature vector V [i] as the (i, 1) th element of the two-dimensional array Th.
[S34] The CPU 50a, as the (i, 2) th element of the two-dimensional array Th, is a vector (−1, 0) obtained by rotating the X vector, which is a base vector, by 180 ° (hereinafter referred to as “−X vector”). And the angle formed by the feature vector V [i].
[S35] The CPU 50a uses, as the (i, 3) th element of the two-dimensional array Th, a vector (0, -1) obtained by rotating the Y vector, which is a base vector, by 180 ° (hereinafter referred to as a -Y vector). And the angle formed by the feature vector V [i].
[S36] The CPU 50a increments the value of the variable i by “1”.
[S37] If the value of the variable i is equal to or less than the number of feature vectors, the CPU 50a returns to step S31 and repeats the same processing, and otherwise proceeds to step S38.
[S38] The CPU 50a sorts all the elements stored in the two-dimensional array Th in ascending order.
[0054]
As a result, rearrangement is performed in ascending order of rotation angle.
[S39] The CPU 50a eliminates the duplication of elements stored in the array.
[S40] The CPU 50a stores the sorted result in the rotation angle candidate table of the HDD 50d.
[0055]
FIG. 17 is a diagram illustrating an example of the rotation angle candidate table. In this example, the vector number of the feature vector and its rotation angle are stored in association with each other. Note that the feature vector with the vector number “1” appears in the first and third features because the target base vectors may be different even for the same feature vector. .
[0056]
Next, the details of the “figure rotation process” shown in FIG. 12 will be described with reference to FIG. When this flowchart is started, the following processing is executed.
[S50] The CPU 50a initializes the variable i to the value “1”.
[S51] The CPU 50a acquires the i-th rotation angle from the rotation angle candidate table.
[S52] The CPU 50a rotates the figure by the acquired angle, and stores the obtained figure in, for example, the HDD 50d.
[S53] The CPU 50a increments the value of the variable i by “1”.
[S54] If the value of the variable i is less than or equal to the number of rotation angle candidates, the CPU 50a returns to step S51 and repeats the same processing, and otherwise returns to the original processing.
[0057]
Next, a specific operation of the above processing will be described by taking an arc as an example.
FIG. 18 is a diagram illustrating an example of an arc to be processed. If the input device 52 is operated in such a state that the pointer 61 is arranged on the arc 60 and an instruction to rotate the figure is given, the CPU 50a specifies the arc 60 as a processing target. Then, the local X-axis vector V1, the start point vector V2, and the end point vector V3 are extracted as feature vectors, and the center P is extracted as a reference point.
[0058]
Next, the CPU 50a executes processing for calculating a rotation angle when each feature vector is rotated so as to coincide with the base vector. Here, the start point vector V2 will be described as an example.
[0059]
Now, the rotation angle required to match the starting point vector V2 with the X vector, Y vector, -X vector, and -Y vector, which are the basis vectors, is calculated. Actually, the same processing is performed not only on the start point vector V2 but also on the local X axis V1 and the end point vector V3, and a rotation angle for making each vector coincide with the base vector is calculated.
[0060]
Next, the CPU 50a rearranges the calculated angles in ascending order. For example, taking only the start point vector V2 as an example, first, as shown in FIG. 19, the rotation angle that matches the vector V2 with the Y vector is selected first, and then, as shown in FIG. 20, the start point vector The rotation angle that matches V2 with the X vector is selected, and then the rotation angle that matches the start point vector V2 with the -x vector is selected as shown in FIG. 21, and finally, as shown in FIG. The rotation angle that matches the vector V2 with the -Y vector is selected.
[0061]
Next, the CPU 50a deletes overlapping ones of the rotation angles. For example, since the rotation angle at which the start point vector V2 matches the Y vector and the rotation angle at which the end point vector V3 matches the X vector are the same, either one of them is deleted in order to eliminate duplication.
[0062]
Subsequently, the CPU 50a rotates the figure corresponding to each of the rotation angles subjected to the rearrangement. For example, when attention is paid only to the starting point vector V2, as a result of the rotation, a figure as shown in FIGS. 19 to 22 is displayed.
[0063]
Next, the CPU 50a sequentially displays the created drawings on the display device 51 in accordance with the operation of the operator. When the display of all the figures is completed, the display is returned to the original figure and repeated. For example, graphic candidates are sequentially displayed on the display device 51 in response to a right mouse click. When a predetermined graphic is displayed and an operation for selecting the graphic is performed on the input device 52, the result of continuing to display the graphic displayed at that time on the display device 51 as it is. It becomes. When a predetermined graphic element is specified as described above and rotation of the graphic is instructed, a display state that uniquely indicates the specified graphic element is calculated from the base vector and the feature vector, and is calculated. Since the candidates are displayed in order, the operator can select a desired display form with a simple operation.
[0064]
Next, a process when a plurality of graphic elements are displayed will be described. FIG. 23 shows an example where a straight line 71 is indicated by the pointer 70 when a plurality of graphic elements are displayed. In this example, a straight line 71, an arc 72, an elliptical arc 73, a hyperbola 74, and a parabola 75 are displayed, and an operation for rotating the figure by moving the pointer 70 on the straight line 71 is performed on the input device 52. Suppose it was done. Then, the CPU 50a specifies that the instructed graphic element is a straight line, and extracts the feature vector and the reference point. In the present example, the midpoint of the straight line 71 is a reference point, and a vector having the left end of the straight line 71 as a base point and the right end as a tip is extracted as a feature vector. Then, the CPU 50a calculates a rotation angle for matching the extracted feature vector and the base vector, and sorts them in ascending order.
[0065]
In the present example, since the rotation angle for directing the straight line in the horizontal direction, that is, in the X vector direction is the smallest, first, the screen shown in FIG. 24 is displayed on the display device 51. In such a state, when an operation for confirming the display (for example, an operation of the left button of the mouse) is performed, the screen shown in FIG. 24 is continuously displayed on the display device 51. Further, when an operation for displaying the next screen (for example, an operation of the right button of the mouse) is performed, a rotation is performed so that the straight line 71 is directed up and down (a rotation in which the right end of the straight line 71 is upward). Become.
[0066]
Subsequently, if the operation for displaying the next screen is performed, the right end of the straight line 71 is rotated downward, and if the operation is repeated, the right end of the straight line 71 is rotated to the left. It will be.
[0067]
Next, with reference to FIG. 25, a process when the arc 72 is designated will be described.
As shown in FIG. 25, if the arc 72 is designated by the pointer 70, the CPU 50a specifies that the designated graphic element is an arc, and extracts a feature vector and a reference point. In the case of an arc, since the reference point is the center of the circle and the feature vectors are the local X axis V1, the start point vector V2, and the end point vector V3, the CPU 50a extracts these from the graphic elements. Then, the rotation angle at which the extracted feature vector matches the base vector is calculated and sorted in ascending order, and all the graphic elements are rotated according to each rotation angle.
[0068]
In this example, the rotation angle (0 °) for directing the local X axis V1 in the horizontal direction is the smallest, but this is excluded because it has not been rotated, and the rotation angle for directing the start point vector V2 in the horizontal direction is the minimum. Therefore, first, the screen shown in FIG. 26 is displayed on the display device 51. Thereafter, the graphic is rotated and displayed in order of increasing rotation angle for matching the start point vector, end point vector, local X-axis vector, and base vector.
[0069]
Next, with reference to FIG. 27, a process when the elliptical arc 73 is designated will be described.
As shown in FIG. 27, if the elliptical arc 73 is designated by the pointer 70, the CPU 50a specifies that the designated graphic element is an elliptical arc, and extracts a feature vector and a reference point. In the case of an elliptical arc, the reference point is the center of the ellipse, and the feature vectors are the local X axis V1, the start point vector V2, and the end point vector V3, so the CPU 50a extracts them from the graphic elements. Then, the rotation angle at which the extracted feature vector matches the base vector is calculated and sorted in ascending order, and all the graphic elements are rotated according to each rotation angle.
[0070]
In the present example, the start point vector and the end point vector are 0 ° and 360 °, respectively, which coincide with the local X-axis vector. For example, a rotation angle that matches these vectors with the base vector is calculated, and The figure is rotated according to the values sorted in ascending order. As a result, the screen shown in FIG. 28 is displayed on the display device 51.
[0071]
Next, with reference to FIG. 29, a process when the hyperbola 74 is designated will be described.
As shown in FIG. 29, if the hyperbola 74 is designated by the pointer 70, the CPU 50a specifies that the designated graphic element is a hyperbola, and extracts a feature vector and a reference point. In the case of a hyperbola, the reference point is the origin, and the feature vectors are the real axis vector V1 and the asymptotic line vector V2, so the CPU 50a extracts these from the graphic elements. Then, the rotation angle at which the extracted feature vector matches the base vector is calculated and sorted in ascending order, and all the graphic elements are rotated according to each rotation angle.
[0072]
In the present example, the rotation angle that directs the asymptotic line vector V <b> 2 upward is selected first, and a screen as shown in FIG. 30 is first displayed on the display device 51.
Next, with reference to FIG. 31, a process when the parabola 75 is designated will be described.
[0073]
As shown in FIG. 31, if the parabola 75 is designated by the pointer 70, the CPU 50a specifies that the designated graphic element is a parabola, and extracts a feature vector and a reference point. In the case of a parabola, since the reference point is the focal point and the feature vector is the axis vector V1, the CPU 50a extracts these from the graphic elements. Then, the rotation angle at which the extracted feature vector matches the base vector is calculated and sorted in ascending order, and all the graphic elements are rotated according to each rotation angle.
[0074]
In the present example, the rotation angle for turning the axis vector V1 upward is selected first, and a screen as shown in FIG.
Next, with reference to FIG. 33, processing when the free curve 80 is designated will be described.
[0075]
As shown in FIG. 33, if the free curve 80 is designated by the pointer 70, the CPU 50a specifies that the designated graphic element is a free curve, and extracts a feature vector and a reference point. In the case of a free curve, since the reference point is the designated point and the feature vector is the tangent vector V1, the CPU 50a extracts these from the graphic elements. Then, the rotation angle at which the extracted feature vector matches the base vector is calculated and sorted in ascending order, and all the graphic elements are rotated according to each rotation angle.
[0076]
In the present example, the rotation angle for directing the tangent vector V1 in the horizontal direction is selected first, and a screen as shown in FIG.
As described above, according to the embodiment of the present invention, when a graphic element of a two-dimensional figure displayed on the screen is designated, the reference point and the feature vector are extracted, and the feature vector is extracted. Since the rotation angle corresponding to the basis vector is calculated and the figure is rotated by selecting the values in ascending order, the figure can be rotated in a desired direction by a simple operation.
[0077]
Next, the case of a three-dimensional figure will be described.
FIG. 35 is a diagram showing the relationship of the coordinate system when a graphic element is rotated in a three-dimensional graphic. As shown in FIG. 35A, a graphics processing apparatus that processes a three-dimensional figure has two coordinate systems (X, Y, Z) and a coordinate system (Xv, Yv, Zv) indicating a visual field. Kind exists. When displaying on the display device 51, as shown in FIG. 35B, the Zv axis of the coordinate system indicating the visual field is in the depth direction of the screen, the Yv axis is in the vertical direction of the screen, and the Xv axis. The shape of the figure is displayed when the screen is rotated so that is directed in the horizontal direction of the screen. Therefore, in the case of a three-dimensional figure, since the figure is rotated with reference to the coordinate system indicating the visual field, there is no reference point as in the two-dimensional figure. In a three-dimensional figure, a coordinate system indicating a visual field is set as a basis vector.
[0078]
FIG. 36 is a diagram for describing processing when a vector is rotated. As shown in this figure, when moving (rotating) the vector V1 to the vector V2, first, the vector Ax is obtained from the outer product of the vector V1 and the vector V2. Then, the vector Vx is moved to the vector V2 by rotating the vector V1 by the angle θ using the vector Ax as the rotation center axis.
[0079]
FIG. 37 is a diagram for explaining a feature vector of a three-dimensional graphic element. As shown in this figure, the direction vector V1 (x2-x1, y2) is applied to the three-dimensional graphic element “straight line” whose start point and end point are (x1, y1, z1) and (x2, y2, z2). -Y1, z2-z1) are defined as feature vectors. A specific example of a straight line is shown in FIG.
[0080]
For a circle or arc, an axis vector (Ax, Ay, Az) is defined as a feature vector. FIG. 38B is a diagram showing the relationship between a circle or arc and an axis vector.
[0081]
For an ellipse or elliptic arc, an axis vector (Ax, Ay, Az) is defined as a feature vector. FIG. 38C is a diagram illustrating a relationship between an ellipse or an elliptic arc and an axis vector.
[0082]
For a free curve, the tangent vector V1 (Tx, Ty, Tz) is defined as a feature vector. FIG. 39A shows the relationship between the free curve and the tangent vector V1.
[0083]
For a plane, a normal vector V1 (Nx, Ny, Nz) is defined as a feature vector. FIG. 39B is a diagram illustrating a relationship between a plane and a normal vector.
For the cylindrical surface, an axis vector V1 (Ax, Ay, Az) is defined as a feature vector. FIG. 39C shows the relationship between the cylindrical surface and the axis vector.
[0084]
For a conical surface, an axis vector V1 (Ax, Ay, Az) is defined as a feature vector. FIG. 40A shows the relationship between the conical surface and the axis vector.
For a spherical surface, an axis vector V1 (Ax, Ay, Az) is defined as a feature vector. FIG. 40B is a diagram showing the relationship between the spherical surface and the axis vector.
[0085]
For the torus surface, an axis vector V1 (Ax, Ay, Az) is defined as a feature vector. FIG. 40C shows the relationship between the torus surface and the axis vector.
[0086]
For the sweep plane, a sweep direction vector V1 (Sx, Sy, Sz) is defined as a feature vector. FIG. 41A shows the relationship between the sweep plane and the sweep direction vector.
[0087]
For the rotation surface, a rotation axis vector V1 (Ax, Ay, Az) is defined as a feature vector. FIG. 41B is a diagram showing the relationship between the rotation surface and the rotation axis vector.
[0088]
For a free-form surface, a normal vector V1 (Nx, Ny, Nz) is defined as a feature vector. FIG. 41C is a diagram showing a relationship between a free-form surface and a normal vector.
[0089]
Next, with reference to FIG. 42, a process for rotating a three-dimensional figure will be described. When this flowchart is started, the following processing is executed.
[S70] The CPU 50a identifies the graphic element designated by the input device 52.
[S71] The CPU 50a executes a “feature vector extraction process” which is a process of extracting a feature vector of the specified graphic element. Details of this processing will be described later with reference to FIG.
[S72] The CPU 50a executes a “rotation angle candidate inference process” that is a process of inferring a rotation angle candidate of the designated graphic element. Details of this processing will be described later with reference to FIG.
[S73] The CPU 50a executes a “figure rotation process” which is a process of rotating the figure by an amount corresponding to each of the rotation angle candidates calculated in step S72. Details of this processing will be described later with reference to FIG.
[S74] The CPU 50a initializes the variable i to the value “1”.
[S75] The CPU 50a causes the display device 51 to display a figure rotated in correspondence with the i-th rotation angle candidate calculated in step S73.
[S76] The CPU 50a ends the process when predetermined information is input from the input device 52 and it is instructed that the currently displayed graphic is OK. Otherwise, the CPU 50a proceeds to step S77. .
[S77] The CPU 50a increments the variable i by “1”.
[S78] If the value of the variable i is equal to or less than the number of candidates, the CPU 50a returns to step S75 and repeats the same processing, and otherwise proceeds to step S79.
[S79] After setting the variable i to “1” again, the CPU 50a returns to step S75 and repeats the same processing.
[0090]
Next, the details of the “feature vector extraction process” shown in FIG. 42 will be described with reference to FIG. When this flowchart is started, the following processing is executed.
[S80] The CPU 50a acquires the graphic element specified in step S70.
[S81] The CPU 50a acquires the feature vector of the specified figure with reference to the table shown in FIG.
[S82] The CPU 50a stores the acquired feature vector in the vector information table of the HDD 50d, and returns to the original process.
[0091]
FIG. 46 is a diagram illustrating an example of a vector information table. In this figure, three types of feature vectors of vector numbers 1 to 3 are stored.
Next, with reference to FIG. 44, detailed processing of the “rotation angle candidate inference processing” shown in FIG. 42 will be described. When this flowchart is started, the following processing is executed.
[S90] The CPU 50a initializes the variable i to “1”.
[S91] The CPU 50a stores information on the current visual field coordinates in the visual field coordinate table.
[0092]
FIG. 47 is a diagram illustrating an example of the visual field coordinate table. In this example, a base vector of a coordinate system (Xv, Yv, Zv) indicating a visual field is stored.
[S92] The CPU 50a substitutes the i-th feature vector as the i-th element of the one-dimensional array V.
[S93] The CPU 50a substitutes an angle formed by the X vector (1, 0, 0), which is a base vector, and the feature vector V [i] as the (i, 0) th element of the two-dimensional array Th.
[S94] The CPU 50a substitutes the angle formed by the Y vector (0, 1, 0), which is a base vector, and the feature vector V [i] as the (i, 1) th element of the two-dimensional array Th.
[S95] The CPU 50a substitutes the angle formed by the Z vector (0, 0, 1), which is a base vector, and the feature vector V [i] as the (i, 2) th element of the two-dimensional array Th.
[S96] The CPU 50a uses, as the (i, 3) th element of the two-dimensional array Th, a vector (−1, 0, 0) obtained by rotating the X vector, which is a base vector, by 180 °, and a feature vector V [i]. Substitute the angle between and.
[S97] The CPU 50a uses, as the (i, 4) th element of the two-dimensional array Th, a vector (0, -1, 0) obtained by rotating the Y vector, which is a base vector, by 180 °, and a feature vector V [i]. Substitute the angle between and.
[S98] The CPU 50a uses, as the (i, 5) th element of the two-dimensional array Th, a vector (0, 0, −1) obtained by rotating the Z vector, which is a base vector, by 180 °, and a feature vector V [i]. Substitute the angle between and.
[S99] The CPU 50a increments the value of the variable i by “1”.
[S100] If the value of the variable i is equal to or less than the number of feature vectors, the CPU 50a returns to step S92 and repeats the same processing, and otherwise proceeds to step S101.
[S101] The CPU 50a sorts all the elements stored in the two-dimensional array Th in ascending order.
[S102] The CPU 50a eliminates any duplication.
[S103] The CPU 50a stores the sorted result in the rotation angle candidate table of the HDD 50d.
[0093]
FIG. 48 is a diagram illustrating an example of the rotation angle candidate table. In this example, the vector number of the feature vector, the base vector to be matched, and the rotation angle thereof are associated with each other.
[0094]
Next, with reference to FIG. 45, the “graphic rotation process” shown in FIG. 42 will be described in detail. When this flowchart is started, the following processing is executed.
[S110] The CPU 50a initializes the variable i to the value “1”.
[S111] The CPU 50a acquires the i-th rotation angle from the rotation angle candidate table.
[S112] The CPU 50a rotates the figure by the acquired angle, and stores the obtained figure in, for example, the HDD 50d.
[S113] The CPU 50a increments the value of the variable i by “1”.
[S114] If the value of the variable i is less than or equal to the number of rotation angle candidates, the CPU 50a returns to step S111 and repeats the same processing, and otherwise returns to the original processing.
[0095]
Next, a specific operation of the above processing will be described.
Now, it is assumed that a three-dimensional figure 100 as shown in FIG. 49 is displayed on the display device 51. In this case, if the pointer 90 is moved onto the side 100a constituting the three-dimensional graphic 100 and an instruction to rotate the graphic is given, the CPU 50a identifies the specified graphic element and extracts its feature vector. In the present example, since the graphic element is a straight line, a direction vector V1 connecting the start point and the end point of the straight line is extracted as a feature vector.
[0096]
Next, the CPU 50a calculates a rotation angle for matching the extracted feature vector with each base vector, and sorts them in ascending order. In the present example, since the rotation angle at which the feature vector matches the Xv vector is the smallest, this rotation angle is arranged first.
[0097]
Subsequently, the CPU 50a rotates the figure in accordance with the sorted rotation angle candidates and displays the figure on the display device 51. When an operation for selecting a figure rotated at a predetermined rotation angle is performed, the state of the figure at the rotation angle is continuously displayed. FIG. 50 is a display example when the three-dimensional figure 100 is rotated by the rotation angle (rotation angle at which the feature vector matches the Xv vector) arranged first by sorting.
[0098]
If the pointer 90 is moved onto the circle 100b of the three-dimensional figure 100 and an operation for rotating the figure is performed on the display screen as shown in FIG. 51, the CPU 50a determines that the designated figure element is a circle. And an axis vector is extracted as the feature vector.
[0099]
Then, the CPU 50a calculates a rotation angle for matching the feature vector and the base vector, and sorts them in ascending order. Next, the CPU 50a rotates the three-dimensional figure 100 according to the sorted rotation angles, and sequentially displays them on the display device 51 according to the operation of the operator. 52 to 54 are diagrams illustrating examples of images displayed on the display device 51 at this time. FIG. 52 is a display example when the axis vector of the circle is rotated in the direction to match the Yv vector. FIG. 53 shows a display example when rotated so as to coincide with the Zv vector, and FIG. 54, respectively, with the Xv vector. Although not shown in the figure, a figure rotated so as to coincide with the -Xv, -Yv, -Zv vectors is also displayed as a candidate.
[0100]
When an operation for selecting a predetermined candidate from such display candidates is performed, the screen is continuously displayed.
Further, on the display screen as shown in FIG. 55, if the pointer 90 is moved onto the ellipse 100c of the three-dimensional figure 100 and the figure is rotated, the CPU 50a indicates that the designated figure element is an ellipse. And an axis vector is extracted as the feature vector.
[0101]
The CPU 50a calculates a rotation angle that matches the feature vector and the base vector, and sorts them in ascending order. Subsequently, the CPU 50a rotates the three-dimensional figure 100 according to the sorted rotation angles, and sequentially displays them on the display device 51 according to the operation of the operator. 56 to 58 are diagrams illustrating examples of images displayed on the display device 51 at this time. FIG. 56 shows a display example when the axis vector of the ellipse is rotated in the direction to coincide with the Zv vector. Also, FIG. 57 shows a display example when the Xv vector and FIG. 58 are rotated so as to coincide with the Yv vector, respectively. Although not shown in the figure, a figure rotated so as to coincide with the -Xv, -Yv, -Zv vectors is also displayed as a candidate.
[0102]
Further, on the display screen as shown in FIG. 59, if the pointer 90 is moved onto the free curve 100d of the three-dimensional figure 100 and the figure is rotated, the CPU 50a displays the designated graphic element as a free curve. While specifying that there is, a tangent vector is extracted as the feature vector.
[0103]
The CPU 50a calculates a rotation angle that matches the feature vector and the base vector, and sorts them in ascending order. Subsequently, the CPU 50a rotates the three-dimensional figure 100 according to the sorted rotation angles, and sequentially displays them on the display device 51 according to the operation of the operator. 60 to 62 are diagrams illustrating examples of screens displayed on the display device 51 at this time. FIG. 60 is a display example when the tangent vector of the free curve is rotated in the direction to match the Yv vector. Also, FIG. 61 shows a display example when the Xv vector and FIG. 62 are rotated so as to coincide with the Zv vector. Although not shown in the figure, a figure rotated so as to coincide with the -Xv, -Yv, -Zv vectors is also displayed as a candidate.
[0104]
As described above, according to the embodiment of the present invention, when changing the display form of a three-dimensional figure, a predetermined figure element is designated and the feature vector of the figure element matches the base vector. Since the rotation angle to be calculated is calculated, and the figure is selected from those having a small rotation angle, the figure can be rotated in a desired direction with a small number of operations.
[0105]
In the above embodiment, the rotation angle candidates are sorted in ascending order of the rotation angle. However, this is only an example, and it goes without saying that other sorting methods can be adopted. Nor.
[0106]
In addition to sorting according to the magnitude of the rotation angle, it is also possible to perform sorting that reflects the operator's intention by learning the direction that tends to be selected for each graphic element.
[0107]
Furthermore, in the above embodiment, all the graphic elements displayed on the screen are rotated. However, for example, only a preselected graphic element may be rotated.
[0108]
The above processing functions can be realized by a computer. In this case, the processing contents of the functions that the graphic processing apparatus should have are described in a program recorded on a computer-readable recording medium, and the above processing is realized by the computer by executing this program on the computer. Is done. Examples of the computer-readable recording medium include a magnetic recording device and a semiconductor memory. When distributing to the market, store the program in a portable recording medium such as a CD-ROM (Compact Disk Read Only Memory) or floppy disk, or store it in a computer storage device connected via a network. In addition, it can be transferred to another computer through the network. When executed by a computer, the program is stored in a hard disk device or the like in the computer, loaded into the main memory and executed.
[0109]
【The invention's effect】
  As described above, according to the present invention, a graphic element designating means for designating a predetermined graphic element displayed on a display device in a graphic processing device for inputting a graphic element to create a desired graphic and outputting it to the display device A feature vector extracting means for extracting a feature vector of a graphic element specified by the graphic element specifying means, and a rotation angle calculation for calculating a rotation angle for matching one of the basis vectors of the display system with the feature vector Means, and rotating means for rotating a part or all of the graphic including the graphic element by the rotation angle calculated by the rotation angle calculating means in the display system;Before rotating part or all of the figure by the rotating means, the graphic element rotating means for rotating only the graphic element by the angle calculated by the rotation angle calculating means;Therefore, it is possible to rotate the figure to a desired angle with a simple operation.
[Brief description of the drawings]
FIG. 1 is a principle diagram illustrating an operation principle of the present invention.
FIG. 2 is a diagram for explaining the operation of the principle diagram shown in FIG. 1;
FIG. 3 is a diagram illustrating an example of a feature vector when an upper side of a quadrangle is designated in FIG.
FIG. 4 is a diagram when the square shown in FIG. 3 is rotated so that the feature vector matches the base vector.
FIG. 5 is a diagram showing an example of a feature vector when a rectangular diagonal line is designated in FIG. 2;
6 is a diagram when the square shown in FIG. 5 is rotated so that the feature vector matches the base vector. FIG.
FIG. 7 is an example of the case where only the upper side of the quadrangle is rotated and displayed in FIG. 3;
FIG. 8 is a block diagram showing a configuration example of an embodiment of the present invention.
FIG. 9 is a diagram illustrating an example of a reference point and a feature vector for each graphic type.
10A is a diagram showing a straight line feature vector and a reference point, FIG. 10B is a drawing showing a circular arc feature vector and a reference point, and FIG. 10C is a diagram showing an elliptic arc feature vector and a reference point; .
11A shows a parabolic feature vector and a reference point, FIG. 11B shows a hyperbolic feature vector and a reference point, and FIG. 11C shows a free curve feature vector and a reference point. is there.
12 is a flowchart for explaining an example of processing executed in the embodiment shown in FIG. 8; FIG.
13 is a flowchart for explaining the details of “reference point and feature vector extraction processing” shown in FIG. 12;
14 is a flowchart for explaining the details of the “rotation angle candidate inference process” shown in FIG. 12. FIG.
15 is a flowchart for explaining the details of the “graphic rotation process” shown in FIG. 12;
FIG. 16 is a diagram illustrating an example of a vector information table.
FIG. 17 is a diagram illustrating an example of a rotation angle candidate table.
18 is a diagram for explaining a specific operation of the embodiment shown in FIG. 8. FIG.
FIG. 19 is a diagram in which the starting point vector V2 of the arc shown in FIG. 18 is rotated so as to coincide with the Y vector.
20 is a diagram in which the arc starting point vector V2 shown in FIG. 18 is rotated so as to coincide with the X vector.
FIG. 21 is a diagram obtained by rotating the arc start point vector V2 shown in FIG. 18 so as to coincide with the −X vector.
FIG. 22 is a diagram in which the starting point vector V2 of the arc shown in FIG. 18 is rotated so as to coincide with the −Y vector.
FIG. 23 is a diagram for explaining a specific operation of the present invention when a plurality of graphic elements are displayed.
24 is an example of a screen that is displayed first when a straight line is designated in FIG. 23 and rotation is instructed.
FIG. 25 is an example of a display screen when an arc is designated.
FIG. 26 is an example of a screen that is displayed first when an arc is specified in FIG. 25 and rotation is instructed.
FIG. 27 is an example of a display screen when an elliptical arc is designated.
FIG. 28 is an example of a screen that is displayed first when an elliptical arc is specified in FIG. 27 and rotation is instructed.
FIG. 29 is an example of a display screen when a hyperbola is designated.
FIG. 30 is an example of a screen that is first displayed when a hyperbola is designated and rotation is instructed in FIG. 29;
FIG. 31 is an example of a display screen when a parabola is designated.
FIG. 32 is an example of a screen that is first displayed when a parabola is specified and rotation is instructed in FIG. 31;
FIG. 33 is an example of a display screen when a free curve is designated.
FIG. 34 is an example of a screen that is displayed first when a free curve is designated and rotation is instructed in FIG. 33;
FIG. 35 is a diagram illustrating a relationship between a coordinate system included in a three-dimensional figure and a visual field coordinate system.
FIG. 36 is a diagram for describing processing when a vector is rotated.
FIG. 37 is a diagram for explaining a feature vector of each graphic element of a three-dimensional graphic.
38A is a diagram illustrating a straight line feature vector, FIG. 38B is a circle or arc feature vector, and FIG. 38C is an ellipse or elliptic arc feature vector.
39A is a diagram for explaining a free curve feature vector, FIG. 39B is a plan feature vector, and FIG. 39C is a diagram explaining a cylindrical feature vector.
40A is a view for explaining a feature vector of a conical surface, FIG. 40B is a view for explaining a feature vector of a spherical surface, and FIG. 40C is a view for explaining a feature vector of a torus surface.
41A is a diagram for explaining a feature vector of a sweep surface, FIG. 41B is a diagram for explaining a feature vector of a rotating surface, and FIG. 41C is a diagram for explaining a feature vector of a free-form surface.
42 is a flowchart for explaining an example of processing executed when a three-dimensional figure is rotated in the embodiment shown in FIG.
43 is a flowchart for describing the details of “feature vector extraction processing” shown in FIG. 42;
44 is a flowchart for describing the details of “feature vector extraction processing” shown in FIG. 42;
45 is a flowchart for explaining the details of “figure rotation processing” shown in FIG. 42; FIG.
FIG. 46 is a diagram illustrating an example of a vector information table.
FIG. 47 is a diagram illustrating an example of a visual field coordinate table.
FIG. 48 is a diagram illustrating an example of a rotation angle candidate table.
FIG. 49 is a diagram for explaining a specific operation when a three-dimensional figure is rotated.
FIG. 50 is an example of a screen that is displayed first when the upper side of the cube is designated and the rotation of the figure is instructed in FIG. 49;
FIG. 51 is a display example when a circle at the top of a cylinder is designated.
FIG. 52 is an example of a screen that is initially displayed when a circle at the top of the cylinder is designated and rotation of a figure is instructed in FIG.
FIG. 53 is an example of a screen displayed next to FIG. 52;
54 is an example of a screen displayed next to FIG. 53. FIG.
FIG. 55 is a display example when an ellipse on the side surface of a cube is designated.
FIG. 56 is an example of a screen that is first displayed when an ellipse on the side of a cube is designated and rotation of a figure is instructed in FIG.
FIG. 57 is an example of a screen displayed next to FIG.
FIG. 58 is an example of a screen displayed next to FIG.
FIG. 59 is a display example when a free curve on the side surface of a cube is designated.
FIG. 60 is an example of a screen that is first displayed when a free-form curve on a side surface of a cube is designated and rotation of a figure is instructed in FIG.
61 is an example of a screen displayed next to FIG. 60. FIG.
FIG. 62 is an example of a screen displayed next to FIG. 61;
FIG. 63 is a diagram illustrating an example of a conventional method for changing the display form of a two-dimensional figure.
FIG. 64 is a diagram showing an example of a conventional method for changing the display form of a three-dimensional figure.
65 is a display example when a predetermined viewpoint is designated on the screen shown in FIG. 64. FIG.
FIG. 66 is a diagram illustrating an example of another method for changing the display form of a three-dimensional figure.
Fig. 67 is a diagram illustrating an example of still another method of changing the display form of a three-dimensional figure.
[Explanation of symbols]
30 Graphic processing device
30a Graphic element designation means
30b Feature vector extraction means
30c Rotation angle calculation means
30d rotating means
30e Graphic element designation means
30f Rotation angle designation means
31 Input device
32 display devices
50 Graphic processing device
50a CPU
50b ROM
50c RAM
50d HDD
50e GC
50f I / F
51 Display device
52 Input device

Claims (6)

図形要素を入力して所望の図形を作成し、表示装置へ出力する図形処理装置において、
前記表示装置に表示されている所定の図形要素を指定する図形要素指定手段と、
前記図形要素指定手段によって指定された図形要素が有する特徴ベクトルを抽出する特徴ベクトル抽出手段と、
表示系が有する基底ベクトルの何れかと前記特徴ベクトルとを一致させるための回転角度を算定する回転角度算定手段と、
前記図形要素を含む図形の一部または全部を、前記表示系において前記回転角度算定手段によって算定された回転角度だけ回転させる回転手段と、
前記回転手段によって図形の一部または全部を回転する前に、前記図形要素のみを前記回転角度算定手段によって算定された角度だけ回転させる図形要素回転手段と、
を有することを特徴とする図形処理装置。
In a graphic processing device that inputs a graphic element to create a desired graphic and outputs it to a display device,
Graphic element designating means for designating a predetermined graphic element displayed on the display device;
Feature vector extraction means for extracting a feature vector of the graphic element designated by the graphic element designation means;
A rotation angle calculating means for calculating a rotation angle for matching any of the basis vectors of the display system with the feature vector;
Rotating means for rotating a part or all of the graphic including the graphic element by the rotation angle calculated by the rotation angle calculating means in the display system;
Before rotating part or all of the figure by the rotation means, only the graphic element is rotated by the angle calculated by the rotation angle calculation means;
A graphic processing apparatus comprising:
前記回転角度算定手段は、それぞれの基底ベクトルに対する回転角度を算定し、
前記回転手段は、前記図形要素を含む図形の一部または全部を、操作者によって指定された何れかの基底ベクトルに対応する回転角度だけ回転させる、
ことを特徴とする請求項1記載の図形処理装置。
The rotation angle calculation means calculates a rotation angle for each basis vector,
The rotating means rotates a part or all of a graphic including the graphic element by a rotation angle corresponding to any base vector designated by an operator.
The graphic processing apparatus according to claim 1, wherein:
前記図形要素は複数の特徴ベクトルを有し、
前記回転角度算定手段は、前記特徴ベクトルと前記基底ベクトルのそれぞれを一致させるための回転角度を算定する、
ことを特徴とする請求項1記載の図形処理装置。
The graphic element has a plurality of feature vectors;
The rotation angle calculation means calculates a rotation angle for matching each of the feature vector and the base vector.
The graphic processing apparatus according to claim 1, wherein:
前記図形要素回転手段によって回転された図形要素を参照して、特定の回転角度を指定する回転角度指定手段を更に有し、Rotation angle designation means for designating a specific rotation angle with reference to the graphic element rotated by the graphic element rotation means,
前記回転手段は、前記回転角度指定手段によって指定された回転角度だけ前記図形の一部または全部を回転させることを特徴とする請求項1記載の図形処理装置。  2. The graphic processing apparatus according to claim 1, wherein the rotation means rotates a part or all of the graphic by a rotation angle designated by the rotation angle designation means.
図形要素を入力して所望の図形を作成し、表示装置へ出力する処理をコンピュータに機能させるプログラムを記録したコンピュータ読み取り可能な記録媒体において、In a computer-readable recording medium in which a program for causing a computer to function to input a graphic element to create a desired graphic and output it to a display device is recorded.
コンピュータを、  Computer
前記表示装置に表示されている所定の図形要素を指定する図形要素指定手段、  Graphic element designating means for designating a predetermined graphic element displayed on the display device;
前記図形要素指定手段によって指定された図形要素が有する特徴ベクトルを抽出する特徴ベクトル抽出手段、  Feature vector extraction means for extracting a feature vector of the graphic element designated by the graphic element designation means;
表示系が有する基底ベクトルの何れかと前記特徴ベクトルとを一致させるための回転角度を算定する回転角度算定手段、  A rotation angle calculating means for calculating a rotation angle for matching any one of the basis vectors of the display system with the feature vector;
前記図形要素を含む図形の一部または全部を、前記表示系において前記回転角度算定手段によって算定された回転角度だけ回転させる回転手段、  Rotating means for rotating a part or all of the graphic including the graphic element by the rotation angle calculated by the rotation angle calculating means in the display system;
前記回転手段によって図形の一部または全部を回転する前に、前記図形要素のみを前記回転角度算定手段によって算定された角度だけ回転させる図形要素回転手段、  Before rotating part or all of the figure by the rotating means, the graphic element rotating means for rotating only the graphic element by the angle calculated by the rotation angle calculating means,
として機能させるプログラムを記録したコンピュータ読み取り可能な記録媒体。  A computer-readable recording medium storing a program that functions as a computer.
図形要素を入力して所望の図形を作成し、表示装置へ出力する処理をコンピュータに機能させるプログラムにおいて、In a program for causing a computer to function to input a graphic element to create a desired graphic and output it to a display device,
コンピュータを、  Computer
前記表示装置に表示されている所定の図形要素を指定する図形要素指定手段、  Graphic element designating means for designating a predetermined graphic element displayed on the display device;
前記図形要素指定手段によって指定された図形要素が有する特徴ベクトルを抽出する特徴ベクトル抽出手段、  Feature vector extraction means for extracting a feature vector of the graphic element designated by the graphic element designation means;
表示系が有する基底ベクトルの何れかと前記特徴ベクトルとを一致させるための回転角度を算定する回転角度算定手段、  A rotation angle calculating means for calculating a rotation angle for matching any one of the basis vectors of the display system with the feature vector;
前記図形要素を含む図形の一部または全部を、前記表示系において前記回転角度算定手段によって算定された回転角度だけ回転させる回転手段、  Rotating means for rotating a part or all of the graphic including the graphic element by the rotation angle calculated by the rotation angle calculating means in the display system;
前記回転手段によって図形の一部または全部を回転する前に、前記図形要素のみを前記回転角度算定手段によって算定された角度だけ回転させる図形要素回転手段、  Before rotating part or all of the figure by the rotating means, the graphic element rotating means for rotating only the graphic element by the angle calculated by the rotation angle calculating means,
として機能させることを特徴とするプログラム。  A program characterized by functioning as
JP2001014730A 2000-01-24 2001-01-23 Graphic processing apparatus, recording medium, and program Expired - Fee Related JP3923262B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001014730A JP3923262B2 (en) 2000-01-24 2001-01-23 Graphic processing apparatus, recording medium, and program

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2000014807 2000-01-24
JP2000-14807 2000-01-24
JP2001014730A JP3923262B2 (en) 2000-01-24 2001-01-23 Graphic processing apparatus, recording medium, and program

Publications (2)

Publication Number Publication Date
JP2001283239A JP2001283239A (en) 2001-10-12
JP3923262B2 true JP3923262B2 (en) 2007-05-30

Family

ID=26584040

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001014730A Expired - Fee Related JP3923262B2 (en) 2000-01-24 2001-01-23 Graphic processing apparatus, recording medium, and program

Country Status (1)

Country Link
JP (1) JP3923262B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5792499B2 (en) * 2011-04-07 2015-10-14 シャープ株式会社 Electronic device, display method, and display program
JP5905421B2 (en) * 2013-09-03 2016-04-20 株式会社ア−キテック Three-dimensional drawing system and program thereof
KR102052392B1 (en) * 2017-12-15 2020-01-08 (주)이즈커뮤니케이션즈 Method of reconizing graphic

Also Published As

Publication number Publication date
JP2001283239A (en) 2001-10-12

Similar Documents

Publication Publication Date Title
EP1008112B1 (en) Techniques for creating and modifying 3d models and correlating such models with 2d pictures
US10931878B2 (en) System, apparatus, method, and program for displaying wide view image
US8711183B2 (en) Graphical user interfaces and occlusion prevention for fisheye lenses with line segment foci
US20140320524A1 (en) Image Display Apparatus, Image Display Method, And Information Storage Medium
JP2000090290A (en) Device and method for processing image and medium
US7420556B2 (en) Information processing method and information processing apparatus
JP2000090289A (en) Device and method for processing image and medium
US5734383A (en) Apparatus and method for generating a three-dimensional model on a graphic display from a two-dimensional image
NO337287B1 (en) Method and system for manipulating a digital representation of a three-dimensional object
US5712965A (en) Three-dimensional solid arranging/editing method in a computer graphic system and system
JP3186241B2 (en) Figure editing device
US6867771B2 (en) Controlled face dragging in solid models
KR102237519B1 (en) Method of providing virtual exhibition space using 2.5 dimensionalization
JP3923262B2 (en) Graphic processing apparatus, recording medium, and program
EP2234068A1 (en) Image processing device, image processing method, information recording medium, and program
US20210097773A1 (en) Method, apparatus, electronic device, and storage medium for displaying 3d shape in expanded manner
US5886700A (en) Three-dimensional volume selection tool
JPH08255221A (en) Character graphic input editing device
JP4269951B2 (en) 3D computer graphics modeling system
JP2000057377A (en) Image processor, image processing method and medium
JPH0816825A (en) Method and device for editing three-dimensional solid arrangement
US6600486B2 (en) Method for three-dimensional solid graphic generation and record medium of three-dimensional solid graphic generation
JPH0816826A (en) Solid graphic arrangement input method and graphic system
JP2000057378A (en) Image processor, image processing method, medium, and device and method for extracting contour
KR20110080483A (en) Apparatus and method for finding wrong image in three dimensional space and a recording medium thereof

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061031

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061107

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070109

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070220

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070221

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20100302

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110302

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110302

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120302

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130302

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130302

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20140302

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees