JP2002056402A - Shape calculation device, shape calculation method and computer-readable storage medium - Google Patents

Shape calculation device, shape calculation method and computer-readable storage medium

Info

Publication number
JP2002056402A
JP2002056402A JP2000243328A JP2000243328A JP2002056402A JP 2002056402 A JP2002056402 A JP 2002056402A JP 2000243328 A JP2000243328 A JP 2000243328A JP 2000243328 A JP2000243328 A JP 2000243328A JP 2002056402 A JP2002056402 A JP 2002056402A
Authority
JP
Japan
Prior art keywords
solution
calculating
shape
circle
calculated
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.)
Withdrawn
Application number
JP2000243328A
Other languages
Japanese (ja)
Inventor
Masaru Kageura
勝 影浦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2000243328A priority Critical patent/JP2002056402A/en
Publication of JP2002056402A publication Critical patent/JP2002056402A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

PROBLEM TO BE SOLVED: To efficiently execute accurate shape calculation by using an algebraic calculation method and a geometric calculation method together. SOLUTION: When calculating shape data showing a desired shape in interactive environment, it is geometrically checked whether combination of plural drawing elements indicated as restriction conditions for defining the desired shape satisfies the restriction conditions for calculating the shape or not, patterns of a solution to be found are assorted according to relation between the restriction conditions and the assumed solution, and algebraic restriction conditions based on relation between the plural drawing elements and the solution are set in each the solution pattern (S1-S6). The solution is algebraically calculated on the basis of the geometric relation by simultaneously setting up the algebraic conditions in each the solution pattern, and accuracy of the calculated solution is geometrically checked (S7-S9).

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、形状算出装置及び
形状算出方法に関し、例えば、CAD(ComputerAided
Design)やDTP(Desk Top Publishing)等のアプリ
ケーションにおける対話形式の処理を利用した所望の形
状データの作成、その形状データを用いた所定の工学的
処理、或いは、図形・文字列データの作成・印刷等を行
う情報処理装置に採用して好適な形状算出装置及び形状
算出方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a shape calculating device and a shape calculating method, for example, a CAD (Computer Aided).
Creation of desired shape data using interactive processing in applications such as Design) and DTP (Desk Top Publishing), predetermined engineering processing using the shape data, or creation and printing of figure / character string data The present invention relates to a shape calculation device and a shape calculation method that are suitable for use in an information processing device that performs such operations.

【0002】[0002]

【従来の技術】従来より、CADやDTP等のアプリケ
ーションと、高精度な印刷装置とを使用した版下作成の
ような作業は、オペレータが所望する最終的な印刷イメ
ージを保ちながら、表示装置に表示される画面を見なが
らの編集作業、所謂WYSIWYG(What You See is W
hat You Get)の環境において行われる。
2. Description of the Related Art Conventionally, tasks such as creating a composition using an application such as CAD or DTP and a high-precision printing device have been performed on a display device while maintaining a final print image desired by an operator. Editing work while watching the displayed screen, so-called WYSIWYG (What You See is W
hat You Get).

【0003】このような環境下において、オペレータが
形状算出装置を利用して指定した所望の要素群と、指定
された要素群と所定の関係にある図形形状を定義しよう
とする場合、情報処理装置においては、例えば、点、直
線または線分、円また円弧の何れかの種別をもつ3つの
描画要素に接する円(指定要素が直線、線分、円、円弧
の場合)、或いは通過する円(指定要素が点の場合)を
算出すべく、オペレータによって指定された描画要素群
との所定の位置関係を表わす拘束条件を代数的な数式と
して表現し、これらを連立させて、その拘束条件を満た
す解を求めるという方法がある。
In such an environment, when an operator intends to define a desired element group specified by using a shape calculation device and a graphic shape having a predetermined relationship with the specified element group, an information processing device is required. In, for example, a circle tangent to three drawing elements having any type of a point, a straight line or a line segment, a circle or an arc (when the designated element is a straight line, a line segment, a circle, or an arc), or a passing circle ( In order to calculate (when the designated element is a point), a constraint condition representing a predetermined positional relationship with a drawing element group designated by the operator is expressed as an algebraic mathematical expression, and these are made simultaneous to satisfy the constraint condition. There is a method of finding a solution.

【0004】また、幾何的に、指定された要素と、解と
の全ての場合をパターン分類して、そのパターン毎に幾
何的な方法で解を算出する方法がある。
Further, there is a method of classifying all cases of a specified element and a solution geometrically, and calculating a solution by a geometric method for each pattern.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、代数的
な方法によって解を算出する従来の方法においては、算
出した解に計算誤差等のノイズが含まれることにより、
正確な解が算出できない場合がある。
However, in the conventional method of calculating a solution by an algebraic method, noise such as a calculation error is included in the calculated solution.
In some cases, an accurate solution cannot be calculated.

【0006】また、完全に代数的方法によって解を算出
する場合には、高次の多項式を解く必要があるが、5次
以上の多項式を求める一般的な手段はないため、全ての
解を効率よく算出することができない。また、4次以下
の多項式であっても、解を求める手段が数値的に不安定
なので、算出した解は計算誤差等のノイズの影響を受け
易いという問題がある。
Further, when a solution is calculated completely by an algebraic method, it is necessary to solve a higher-order polynomial. It cannot be calculated well. Further, even for a polynomial of degree 4 or less, the means for finding a solution is numerically unstable, and thus the calculated solution is susceptible to noise such as calculation errors.

【0007】一方、幾何的な方法によって解を算出する
場合には、パターン分類の場合分けの数が膨大になり、
非効率な処理となる。
On the other hand, when a solution is calculated by a geometric method, the number of cases of pattern classification becomes enormous,
This is an inefficient process.

【0008】そこで、本発明は、代数的な算出法と幾何
的な算出法を併用することにより、効率良く正確な形状
計算を行う形状算出装置及び形状算出方法及びコンピュ
ータ読み取り可能な記憶媒体の提供を目的とする。
Accordingly, the present invention provides a shape calculating device, a shape calculating method, and a computer-readable storage medium for efficiently and accurately calculating a shape by using an algebraic calculation method and a geometric calculation method together. With the goal.

【0009】[0009]

【発明を解決するための手段】上記の目的を達成するた
め、本発明に係る形状算出装置は、以下の構成を特徴と
する。
In order to achieve the above object, a shape calculating apparatus according to the present invention has the following configuration.

【0010】即ち、対話形式の環境において、所望の形
状を表わす形状データを算出する形状算出装置であっ
て、所望の形状(例えば、円)を定義するための制約条
件として、複数の描画要素を指示する指示手段と、前記
指示手段によって指示された複数の描画要素の組み合わ
せが、前記形状を算出する制約条件を満足するか否か
を、幾何的にチェックする制約条件チェック手段と、前
記制約条件と想定する解の関係に従って、求めるべき解
のパターンを分類する解パターン分類手段と、前記解パ
ターン分類手段によって分類された解パターン毎に、前
記複数の描画要素と解の関係とに基づく代数的な制約条
件を設定する制約条件設定手段と、前記制約条件設定手
段によって設定された前記解パターン毎の代数的制約条
件を連立させることにより、幾何的な関係に基づいて、
代数的に解を算出する解算出手段と、前記解算出手段に
よって算出された解の精度を、幾何的にチェックする解
チェック手段と、前記解チェック手段による結果に従っ
て、前記複数の描画要素に対応する形状データを算出す
る算出手段とを備えることを特徴とする。
That is, in an interactive environment, a shape calculation device for calculating shape data representing a desired shape, wherein a plurality of drawing elements are defined as constraints for defining a desired shape (for example, a circle). Instructing means for instructing, constraint condition checking means for geometrically checking whether a combination of a plurality of drawing elements designated by the instructing means satisfies the constraint condition for calculating the shape, and the constraint condition A solution pattern classifying means for classifying a pattern of a solution to be obtained in accordance with the assumed solution relation, and for each solution pattern classified by the solution pattern classification means, an algebraic form based on the relation between the plurality of drawing elements and the solution. Constraint condition setting means for setting a simple constraint condition and algebraic constraint conditions for each solution pattern set by the constraint condition setting means. Ri, based on the geometric relationship,
A solution calculating means for calculating a solution algebraically; a solution checking means for geometrically checking the accuracy of the solution calculated by the solution calculating means; and a solution corresponding to the plurality of drawing elements according to a result of the solution checking means. And calculating means for calculating shape data to be generated.

【0011】例えば前記制約条件チェック手段は、前記
複数の描画要素間の幾何的な関係に基づいて縮退の有無
を判定すると共に、縮退しているときには、前記際算出
手段による解の算出が不可能と判定すると良い。
[0011] For example, the constraint condition checking means determines whether or not there is contraction based on the geometric relationship between the plurality of drawing elements. Should be determined.

【0012】また、例えば前記解チェック手段は、前記
解パターン毎に、少なくとも解の縮退及び同一解の有無
をチェックすると良い。
Further, for example, the solution checking means may check at least the solution degeneracy and the presence or absence of the same solution for each of the solution patterns.

【0013】好適な実施形態において、前記指示手段
は、前記複数の描画要素が線分のときに、その線分を、
その線分を含む直線に変換する第1変換手段と、前記複
数の描画要素が円弧のときに、その円弧を、その円弧を
含む円に変換する第2変換手段とを含み、前記解チェッ
ク手段は、前記第1または第2変換手段によって変換さ
れた描画要素に基づいて前記解算出手段によって算出さ
れた解の中から、前記線分または円弧と接している解を
選別する選別手段を含むと良い。
[0013] In a preferred embodiment, when the plurality of drawing elements are line segments, the instructing means displays the line segments as:
A first conversion unit that converts the drawing into a straight line including the line segment; and a second conversion unit that converts the arc into a circle including the arc when the plurality of drawing elements are arcs, wherein the solution checking unit includes: Includes selecting means for selecting a solution in contact with the line segment or the arc from among the solutions calculated by the solution calculating means based on the drawing elements converted by the first or second converting means. good.

【0014】また、上記の同目的を達成するため、本発
明に係る形状算出方法は、以下の構成を特徴とする。
Further, in order to achieve the above object, a shape calculation method according to the present invention is characterized by the following configuration.

【0015】即ち、対話形式の環境において、所望の形
状を表わす形状データを算出する形状算出方法であっ
て、所望の形状を定義するための制約条件として、複数
の描画要素を指示する指示工程と、前記指示工程にて指
示された複数の描画要素の組み合わせが、前記形状を算
出する制約条件を満足するか否かを、幾何的にチェック
する制約条件チェック工程と、前記制約条件と想定する
解の関係に従って、求めるべき解のパターンを分類する
解パターン分類工程と、前記解パターン分類工程にて分
類された解パターン毎に、前記複数の描画要素と解の関
係とに基づく代数的な制約条件を設定する制約条件設定
工程と、前記制約条件設定工程にて設定された前記解パ
ターン毎の代数的制約条件を連立させることにより、幾
何的な関係に基づいて、代数的に解を算出する解算出工
程と、前記解算出工程にて算出された解の精度を、幾何
的にチェックする解チェック工程と、前記解チェック工
程による結果に従って、前記複数の描画要素に対応する
形状データを算出する算出工程とを有することを特徴と
する。
That is, in an interactive environment, a shape calculating method for calculating shape data representing a desired shape, comprising: an instructing step of designating a plurality of drawing elements as constraint conditions for defining the desired shape. A constraint checking step of geometrically checking whether a combination of a plurality of drawing elements specified in the specifying step satisfies the constraint for calculating the shape, and a solution assumed as the constraint. A solution pattern classifying step of classifying a solution pattern to be obtained in accordance with the relationship, and for each solution pattern classified in the solution pattern classifying step, an algebraic constraint condition based on the relationship between the plurality of drawing elements and the solution. By simultaneously setting the algebraic constraint conditions for each solution pattern set in the constraint condition setting process, A solution calculation step of calculating a solution algebraically, a solution check step of geometrically checking the accuracy of the solution calculated in the solution calculation step, and a plurality of drawing elements according to a result of the solution check step. And a calculation step of calculating shape data corresponding to.

【0016】更に、上記の形状算出装置及び形状算出方
法を、コンピュータによって実現するプログラムコード
が格納されている、コンピュータ読み取り可能な記憶媒
体を特徴とする。
Further, the present invention is characterized by a computer-readable storage medium storing a program code for realizing the above-described shape calculating device and shape calculating method by a computer.

【0017】[0017]

【発明の実施の形態】以下、本発明に係る形状算出装置
の実施形態を、図面を参照して詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of a shape calculation device according to the present invention will be described below in detail with reference to the drawings.

【0018】[第1の実施形態] <ハードウェア構成の説明>図2は、本発明を適用可能
な形状算出装置のハードウェア構成を示すブロック図で
ある。
First Embodiment <Description of Hardware Configuration> FIG. 2 is a block diagram showing a hardware configuration of a shape calculation device to which the present invention can be applied.

【0019】図2において、21は、中央処理装置(C
PU)であり、本装置の全体の制御や演算処理を行な
う。11は、オペレータが文字や数値を入力可能なキー
ボードであり、12は、座標や図形を指示するため補助
入力装置としてのマウスである。41はCRT等の表示
装置であり、CPU21が実行するソフトウエアプログ
ラムに従って、図形データおよび文字データ、各種操作
パネルやボタンを表示する。即ち、キーボード11、マ
ウス12、並びに表示装置41は、本実施形態において
マンマシンインタフェースとして機能する。
In FIG. 2, reference numeral 21 denotes a central processing unit (C
PU), which performs overall control and arithmetic processing of the apparatus. Reference numeral 11 denotes a keyboard which allows an operator to input characters and numerical values, and 12 denotes a mouse as an auxiliary input device for designating coordinates and graphics. Reference numeral 41 denotes a display device such as a CRT, which displays graphic data, character data, various operation panels and buttons according to a software program executed by the CPU 21. That is, the keyboard 11, the mouse 12, and the display device 41 function as a man-machine interface in the present embodiment.

【0020】22はシステムバスであり、本装置を構成
するハードウエアの各要素は、全てこのシステムバス2
2を介してプログラムおよびデータの受け渡しを行なっ
ている。
Reference numeral 22 denotes a system bus, and all components of the hardware constituting the apparatus are connected to the system bus 2.
2 and exchange programs and data.

【0021】また、31は、読出専用記憶装置(RO
M)であり、本実施形態に係るプログラムは、このRO
M31に予め格納されており、CPU21は、ROM3
1から読み出したプログラムを実行する。32は、読出
書込記憶装置(RAM)であり、本実施形態に係るプロ
グラムの実行中に、CPU21は、必要に応じて、RA
M32にデータを読み書きしながら処理を行なう。33
は、フロッピー(登録商標)ディスク装置(FD)やハ
ードディスク装置(HD)等の外部記憶装置であり、文
字の書体情報やコード情報等のデータが格納されてい
る。
Reference numeral 31 denotes a read-only memory (RO)
M), and the program according to the present embodiment uses the RO
It is stored in advance in M31, and the CPU 21
The program read from 1 is executed. Reference numeral 32 denotes a read / write storage device (RAM), and the CPU 21 executes the RA as needed during the execution of the program according to the present embodiment.
Processing is performed while data is read from and written to M32. 33
Is an external storage device such as a floppy (registered trademark) disk device (FD) or a hard disk device (HD), and stores data such as character type information and code information.

【0022】尚、本実施形態に係るプログラムを、外部
記憶装置33に格納させておき、RAM32に読み込ん
でから、CPU21によって実行するようにしてもよい
し、また、文字の書体情報やコード情報等のデータをR
OM31に格納させておき、CPU21が必要に応じ
て、それらのデータを読み出して使用するようにしても
よい。
The program according to the present embodiment may be stored in the external storage device 33, read into the RAM 32, and then executed by the CPU 21, or may include character type information, code information, and the like. Data of R
The data may be stored in the OM 31, and the CPU 21 may read and use the data as needed.

【0023】51は、印刷装置の一例としてのレーザプ
リンタであり、本装置によって作成された印刷データ
を、校正刷り(印刷データの確認のための出力)し、ま
た印刷ログファイルの内容を出力する。52は、イメー
ジセッターであり、本装置によって作成された印刷デー
タを、清刷り(正式な版下となる高精度な出力)する。
53は、レーザマーカーであり、本装置によって作成さ
れた印刷データを、レーザで直接、製品に焼き付ける。
Reference numeral 51 denotes a laser printer as an example of a printing apparatus, which performs proof printing (output for confirming print data) of print data created by the apparatus, and outputs the contents of a print log file. . Reference numeral 52 denotes an image setter, which prints the print data created by the apparatus (prints a high-accuracy copy of a formal copy).
Reference numeral 53 denotes a laser marker, which prints print data created by the apparatus directly onto a product by using a laser.

【0024】ここで、レーザプリンタ51と、イメージ
セッター52と、レーザマーカー53の違いについて説
明する。
Here, differences between the laser printer 51, the imagesetter 52, and the laser marker 53 will be described.

【0025】レーザプリンタ51は、照射されたレーザ
光によって感光ドラム上に形成された静電潜像にトナー
を吸着させ、そのトナー像を記録紙に転写・定着するプ
リンタであり、解像度は1500DPI(ドット/イン
チ)程度まで可能である。また、イメージセッター52
は、レーザ光を直接、感光紙に照射するプリンタであ
り、解像度は、4000DPI程度まで可能である。イ
メージセッター52に使用する用紙サイズは、A1程度
まで可能である。そして、レーザマーカー53は、レー
ザ光を直接、成形品に照射し、樹脂材料を溶融して黒化
させるか、充填材を配合した特殊材料を使用して発色さ
せる印刷装置である。
The laser printer 51 is a printer that absorbs toner on an electrostatic latent image formed on a photosensitive drum by an irradiated laser beam, and transfers and fixes the toner image on recording paper, and has a resolution of 1500 DPI ( (Dots / inch). Also, the imagesetter 52
Is a printer that irradiates a laser beam directly to photosensitive paper, and can have a resolution up to about 4000 DPI. The paper size used for the imagesetter 52 can be up to about A1. The laser marker 53 is a printing device that directly irradiates a molded product with a laser beam to melt and blacken the resin material or to develop a color using a special material containing a filler.

【0026】<ソフトウエアの説明>本実施形態では、
WYSIWYG環境においてマウス12等を用いてオペ
レータによって与えられた点、直線、円の何れかの種別
の3つの要素(描画要素)を通過する円(点の場合)、
或いは、当該3つの要素に接する円を算出する場合につ
いて説明する。
<Description of Software> In this embodiment,
A circle (in the case of a point) passing through any of three types of elements (drawing elements) of a point, a straight line, and a circle given by the operator using the mouse 12 or the like in the WYSIWYG environment;
Alternatively, a case where a circle tangent to the three elements is calculated will be described.

【0027】図1は、第1の実施形態において形状算出
装置が行う処理手順を示すフローチャートであり、CP
U21において実行される。
FIG. 1 is a flowchart showing a processing procedure performed by the shape calculation device in the first embodiment.
This is executed in U21.

【0028】図1において、ステップS1:オペレータ
は、表示装置41を見ながら、マウス12等のポインテ
ィングデバイスやキーボード11等を使って、所望する
(設定しようと想定している)円に接する3つの要素、
または通過する3つの要素を指定する(図3参照)。
In FIG. 1, step S1: the operator looks at the display device 41 and uses a pointing device such as the mouse 12 or the keyboard 11 or the like to contact three desired (estimated) circles. element,
Alternatively, three elements that pass through are designated (see FIG. 3).

【0029】ステップS2:要素間の幾何的な関係によ
り縮退していないかチェックする。即ち、ステップS1
で指定された要素間の関係が幾何的にある関係にあると
きは、縮退してしまい、求める円の解がない場合があ
る。例えばステップS1で指定された3つの要素が1つ
の直線と2つの点の場合において、それら2つの点が同
一の点の場には算出される円の解が不定になり、正しい
解が算出できなかったり、装置が暴走してしまう可能性
がある。その場合は、ステップS3及びステップS4に
おいて、幾何的にチェックしてあらかじめ縮退している
(図4参照)と判断して、解が求まらないと判定する。
Step S2: It is checked whether or not there is a contraction due to a geometric relationship between elements. That is, step S1
When the relationship between the elements specified by is geometrically related, the relationship may be degenerated, and the solution to the circle to be obtained may not be obtained. For example, in the case where the three elements specified in step S1 are one straight line and two points, the solution of the calculated circle becomes indefinite when the two points are the same, and the correct solution can be calculated. Or the device may run away. In that case, in steps S3 and S4, it is geometrically checked, it is determined that the data is degenerated in advance (see FIG. 4), and it is determined that no solution is obtained.

【0030】そのほかに縮退しているケースとしては、
図5のようなケースが考えられる。
[0030] Other cases of degeneration include:
The case as shown in FIG. 5 can be considered.

【0031】また、理論上は解が求まる場合であって
も、装置の誤差等のノイズにより、解が正しく求まらな
いことがある。そのため、あらかじめ決めた許容誤差を
使って、要素間の関係を判定する。
In theory, even when a solution is obtained, the solution may not be obtained correctly due to noise such as an error of the apparatus. Therefore, the relationship between elements is determined using a predetermined tolerance.

【0032】例えば2点が同一の点であるかの判定は、
当該2点間の距離が所定の許容誤差範囲に入っているか
どうかで判定される(図6参照)。
For example, to determine whether two points are the same point,
It is determined whether the distance between the two points falls within a predetermined allowable error range (see FIG. 6).

【0033】ステップS5:指定要素と解との関係によ
り、解のパターンを分類する。即ち、指定要素と求める
解となる円の幾何的な関係の組み合わせを考えて、解と
各入力要素との関係を想定して分類する。
Step S5: Classify the solution pattern according to the relationship between the designated element and the solution. That is, considering the combination of the geometrical relationship between the designated element and the circle to be the solution to be obtained, the classification is performed assuming the relationship between the solution and each input element.

【0034】まず、オペレータによって入力(指定)さ
れた3つの要素の種別に応じて、次の10種類に分類さ
れる。 (p1)入力要素が点、点、点の場合、(p2)入力要
素が直線、直線、直線の場合、(p3)入力要素が円、
円、円の場合、(p4)入力要素が点、直線、円の場
合、(p5)入力要素が点、点、直線の場合、(p6)
入力要素が点、直線、直線の場合、(p7)入力要素が
点、点、円の場合、(p8)入力要素が点、円、円の場
合、(p9)入力要素が直線、直線、円の場合、(p1
0)入力要素が直線、円、円の場合。
First, according to the types of the three elements input (designated) by the operator, they are classified into the following ten types. (P1) When the input element is a point, a point, a point, (p2) When the input element is a straight line, a straight line, and (p3), the input element is a circle,
In the case of a circle, a circle, (p4) When the input element is a point, a straight line, and a circle, (p5) When the input element is a point, a point, a straight line, (p6)
(P7) When the input element is a point, a line, and a circle, (p8) When the input element is a point, a circle, and a circle, (p9) When the input element is a line, a line, and a circle In the case of (p1
0) When the input element is a straight line, a circle, or a circle.

【0035】また、求める円と入力された円が接すると
いう関係は次の3通りがある。 (A)求める円と入力した円が外接する(図7(A)参
照)、(B)求める円と入力した円が内接する。入力し
た円が求める円の内側にある(図7(B)参照)、
(C)求める円と入力した円が内接する。入力した円が
求める円の外側にある(図7(c)参照)、入力された
要素の中に円がある場合は,求める円のパターンとして
はそれぞれ上述した(A)乃至(C)の3通りの場合が
あるので、N個の円がある場合には、最大3通り解が
存在する可能性がある。よって、解のパターンは、ま
ず、入力した要素の種別の組み合わせに応じて、上記の
(p1)乃至(p10)の何れかのパターンが決定さ
れ、各組み合わせに応じて、入力要素に円がN個含まれ
る場合、それぞれ、最大3個の解のパターンが存在す
ることになる。
There are the following three relations between the circle to be obtained and the inputted circle. (A) The circle to be determined and the input circle are circumscribed (see FIG. 7A), and (B) The circle to be determined and the input circle are inscribed. The input circle is inside the circle to be determined (see FIG. 7B),
(C) The circle to be obtained and the input circle are inscribed. When the input circle is outside the circle to be obtained (see FIG. 7C), and there is a circle in the input element, the patterns of the circle to be obtained are the above-mentioned three patterns (A) to (C), respectively. since there are cases of the street, if there are N circles, it is possible that up to 3 N as solution exists. Therefore, as a solution pattern, first, any one of the above-described patterns (p1) to (p10) is determined according to the combination of the types of the input elements, and a circle is added to the input element according to each combination. when included pieces, so that each pattern exists up to 3 N number of solutions.

【0036】具体的には、上記の(p1)乃至(p1
0)において考えられるところの、求める円の最大数
は、 (p1)の場合:1、 (p2)の場合:1、 (p3)の場合:27、 (p4)の場合:3、 (p5)の場合:1、 (p6)の場合:1、 (p7)の場合:3、 (p8)の場合:9、 (p9)の場合:3、 (p10)の場合:9、 となる。
Specifically, the above (p1) to (p1)
The maximum number of circles that can be considered in (0) is: (p1): 1, (p2): 1, (p3): 27, (p4): 3, (p5) In the case of: 1, in the case of (p6): 1, in the case of (p7): 3, in the case of (p8): 9, in the case of (p9): 3, and in the case of (p10): 9.

【0037】本装置では、入力要素の種別を判別して、
(p1)乃至(p10)の何れのパターンになるか判別
し、各パターンに含まれる円と求める円との関係とし
て,それぞれ(A)乃至(C)の3通りを考えて、求め
る円として採り得る全ての処理を行う。
In this device, the type of the input element is determined,
It is determined which of the patterns (p1) to (p10) is to be obtained, and as a relationship between the circle included in each pattern and the circle to be obtained, three types (A) to (C) are considered, and the circle is obtained as the obtained circle. Do all the processing you get.

【0038】ステップS6:各パターンごとに入力要素
と解の関係による制約条件式を選択する。即ち、ステッ
プS5で求める円の解のパターンが得られたなら、それ
ぞれのパターンに応じて求める円が満たすべき制約条件
式のセットを選択する。
Step S6: A constraint condition expression based on the relationship between the input element and the solution is selected for each pattern. That is, when the solution pattern of the circle to be obtained in step S5 is obtained, a set of constraint condition expressions to be satisfied by the circle to be obtained is selected according to each pattern.

【0039】入力要素の種別と求める円の解との関係に
より、5つの制約条件が考えられる。但し、説明に使用
する記号を、 C:求める円の中心, (Cx,Cy):求める円の中心座標, r:求める円の半径, と定める。
Five constraints can be considered depending on the relationship between the type of the input element and the solution of the circle to be obtained. Here, the symbols used in the description are defined as: C: center of the circle to be determined, (Cx, Cy): center coordinates of the circle to be determined, r: radius of the circle to be determined.

【0040】(1)点を通過する(図8参照) 記号を以下のように定める。(1) Passing through a point (see FIG. 8) Symbols are defined as follows.

【0041】 Pi:与点 (Pix,Piy):与点座標値 |C−Pi|=r (e1), (Cx−Pix)2+(Cy−Pix)2=r2 ・・・(e2), 上記の式(e2)は、 A=2Pix,B=−2Pi,C=Pix2+Piy2(P1), x=Cx,y=Cyとおくと、 x2+y2+Ax+By+C=r2 ・・・(C1), という(Cx,Cy,r)に関する制約条件式となる。Pi: given point (Pix, Piy): given point coordinate value | C−Pi | = r (e1), (Cx−Pix) 2 + (Cy−Pix) 2 = r 2 (e2) , the above formula (e2) is, a = 2Pix, B = -2Pi , C = Pix2 + Piy2 (P1), x = Cx, putting the y = Cy, x 2 + y 2 + Ax + By + C = r 2 ··· (C1) , And (Cx, Cy, r).

【0042】(2)直線に接する(図9参照) 記号を以下のように定める。(2) Touching a straight line (see FIG. 9) Symbols are defined as follows.

【0043】P1:直線を通る任意の1点, (P1x,P1y):P1の座標表現, V1:直線の単位方向ベクトル, (V1x,V1y):V1の座標表現, Pt:接点, ここで、パラメトリック表現を使い、 Pt=P1+TtV1 ・・・・(e3), と表現する。但し、 Tt:接点を通るときのパラメータ値 である。P1: an arbitrary point passing through the straight line, (P1x, P1y): a coordinate expression of P1, V1: a unit direction vector of the straight line, (V1x, V1y): a coordinate expression of V1, Pt: contact point, Pt = P1 + TtV1... (E3) using a parametric expression. Here, Tt is a parameter value when passing through the contact point.

【0044】そうすると、 (C−Pt)・V1=0 ・・・・(e4), が成り立つから、式(e4)を式(e3)に代入して、 Tt=(C−P1)・V1 ・・・・(e5), が導かれる。Then, since (C−Pt) · V1 = 0 (E4) holds, the equation (e4) is substituted into the equation (e3), and Tt = (C−P1) · V1 · (E5), is derived.

【0045】また、 |C−Pt|=r ・・・(e6), が成り立つ。Also, | C−Pt | = r (e6) holds.

【0046】従って、式(e3),(e5),(e6)
より、 |C−P1|−((C−P1)・V1)=r ・・・(e7), が成り立つ。座標表現では、 (Cx−P1x)+(Cy−P1y)−((Cx−P1x)V1x+ (Cy−P1y)V1y)=r ・・・・(e8), 式(e8)は、 D=1−V1x、 E=1−V1y、 F=−2V1xV1y、 G=−2P1x+2V1xP1x+2V1xV1yP1y、 H=−2P1y+2V1yP1y+2VIxV1yP1x、 J=P1x+P1y−V1x*P1x−V1y*P1y−2V 1xV1yP1xPIy ・・・(C2), X=Cx、Y=Cyとおくと、 Dx+Ey+Fxy+Gx+Ry+J=r ・・・(C2), という(Cx,Cy,r)に関する制約条件式となる。
Therefore, the equations (e3), (e5), (e6)
| C−P1 | 2 − ((C−P1) · V1) 2 = r 2 (e7). In the coordinate expression, (Cx-P1x) 2 + (Cy-P1y) 2 -((Cx-P1x) V1x + (Cy-P1y) V1y) 2 = r 2 ... (E8) D = 1-V1x 2, E = 1-V1y 2, F = -2V1xV1y, G = -2P1x + 2V1x 2 P1x + 2V1xV1yP1y, H = -2P1y + 2V1y 2 P1y + 2VIxV1yP1x, J = P1x 2 + P1y 2 -V1x 2 * P1x 2 -V1y 2 * P1y 2 -2V 1xV1yP1xPIy ··· (C2), X = Cx, putting a Y = Cy, Dx 2 + Ey 2 + Fxy + Gx + Ry + J = r 2 ··· (C2), that the (Cx, Cy, r) about the constraint condition Become.

【0047】(2)’X軸に平行直線に接する(図10
参照) 上述した(2)の特殊な場合であり、 (Vlx,Vly)=(1,0) ・・・(e9), が成り立つから、式(e9)を式(e8)に代入して、 (Cy−P1y)=0 ・・・(e10), 式(e10)は、 H=−2P1y,J=P1y ・・・・(C2’), x=Cx,Y=Cyとおくと、 y+Hy+J=r ・・・・(C2’), という(Cx,Cy,r)に関する制約条件式となる。
(2) 'A tangent to a straight line parallel to the X axis (FIG. 10
This is a special case of the above (2), and (Vlx, Vly) = (1, 0) (e9) holds, so that equation (e9) is substituted into equation (e8), and (Cy-P1y) 2 = 0 ··· (e10), formula (e10) is, H = -2P1y, J = P1y 2 ···· (C2 '), x = Cx, putting a Y = Cy, y 2 + Hy + J = r 2 (C2 ′), which is a constraint condition expression regarding (Cx, Cy, r).

【0048】(C2’)はまた、 |y−P1y|=r(C2”), という形でも表現できる。(C2 ') can also be expressed as | y-P1y | = r (C2 ").

【0049】(3)与えられた円に外接する(図11参
照)記号を以下のように定める。
(3) A symbol circumscribing a given circle (see FIG. 11) is determined as follows.

【0050】Ci:接する円の中心, (Cix,Ciy):接する円の中心の座標表現, ri:接する円の半径, |C−Ci|=r+ri ・・・(e11), 辺々2乗して座標表現にすると、 (Cx−Cix)+(Ciy−Ciy)=r+2*r*ri+ri ・・・・(e12), となる。Ci: center of tangent circle, (Cix, Ciy): coordinate representation of the center of tangent circle, ri: radius of tangent circle, | C−Ci | = r + ri (e11), squared on each side (Cx-Cix) 2 + (Cy-Cy) 2 = r 2 + 2 * r * ri + ri 2 (e12).

【0051】式(e12)は、 K=−2Cix,L=−2Ciy,M=Cix+Ciy−ri,N =2ri ・・・・・(P3), x=Cx、y=Cyとおくと、 x+y+Kx+Ly+M=r+Nr ・・・・(C3), という(Cx,Cy,r)に関する制約条件式となる。Equation (e12) is given as follows: K = −2Cix, L = −2Cy, M = Cix 2 + Cy 2 −ri 2 , N = 2ri (P3), x = Cx, y = Cy and, the x 2 + y 2 + Kx + Ly + M = r 2 + Nr ···· (C3), that (Cx, Cy, r) related to the constraint condition.

【0052】(4)与えられた円に内接する(図12参
照) 記号は外接する場合と同様に定める。
(4) Inscribe the given circle (see FIG. 12) The symbols are determined in the same manner as in the circumscribed circle.

【0053】求める円が与えられた円に含まれる場合
も、以下の式で表現できる。
When the circle to be obtained is included in the given circle, it can be expressed by the following equation.

【0054】ここで、便宜的に、解となる円が入力円に
含まれる場合を”内接”、含む場合を”内包”と呼ぶ。
Here, for convenience, the case where the solution circle is included in the input circle is called "inscribed", and the case where it is included is called "inclusion".

【0055】 |C−Ci|=r−ri ・・・(e13), 辺々2乗して座標表現にすると (Cx−Cix)+(Ciy−Ciy)=r−2*r*ri+ri ・・・(e14), となる。| C−Ci | = r−ri (e13), when each side is squared to obtain a coordinate expression, (Cx−Cix) 2 + (Cy−Ciy) 2 = r 2 −2 * r * ri + ri 2 (e14).

【0056】式(e14)は、 K=−2Cix,L=−2Ciy,M=Cix+Ciy−ri−N =−2ri ・・・・(P4), x=Cx、y=Cyとおくと、 x+y+Kx+Ly+M=r+Nr ・・・・(C4), という(Cx,Cy,r)に関する制約条件式となる。Equation (e14) is given as follows: K = −2Cix, L = −2Cyy, M = Cix 2 + Cy 2 −ri 2 −N = −2ri (P4), x = Cx, y = Cy and, the x 2 + y 2 + Kx + Ly + M = r 2 + Nr ···· (C4), that (Cx, Cy, r) related to the constraint condition.

【0057】ステップS7:ステップS5による解と,
与えられた要素との関係によるパターン分類により、入
力要素の種別の組み合わせから可能な解の全てのパター
ンに対して、ステップS6で決めた制約条件を連立させ
た代数方程式を解くことにより、考えられる解を全て代
数的に求める。但し、代数的に求める場合においても、
幾何的な知識を若干使うことによって解法を単純化で
き、処理装置の効率を向上することが可能である。
Step S7: The solution in step S5,
By pattern classification based on the relationship with a given element, it is conceivable to solve an algebraic equation in which the constraint conditions determined in step S6 are simultaneously solved for all possible solutions of the combination of the types of input elements. Find all solutions algebraically. However, even when it is calculated algebraically,
The solution can be simplified by using a little geometric knowledge, and the efficiency of the processing device can be improved.

【0058】具体的には、入力要素の組みあわせの各パ
ターンにより次のような手順で求める。ここではいくつ
かの場合においての例を挙げる。
More specifically, it is obtained by the following procedure based on each combination pattern of input elements. Here are examples in some cases.

【0059】(p1)入力要素が3つとも点のとき:制
約条件は全て(ステップS6)の(C1)であるから、
解の円は、 x+y+A1x+B1y+C1=r ・・・(1), x+y+A2x+B2y+C2=r ・・・(2), x+y+A2x+B2y+C2=r ・・・(3), の3つの制約条件式を満たす。
(P1) When all three input elements are points: Since all the constraints are (C1) in (Step S6),
Circle solution, x 2 + y 2 + A1x + B1y + C1 = r 2 ··· (1), x 2 + y 2 + A2x + B2y + C2 = r 2 ··· (2), x 2 + y 2 + A2x + B2y + C2 = r 2 ··· (3), The following three constraint expressions are satisfied.

【0060】式(1)−式(2)により、 (A1−A2)x+(B1−B2)y+C1−C2=0 ・・・(4), 式(2)−式(3)により、 (A2−A3)x+(B2−B3)y+C2−C3=0 ・・・(5), A1−A2=A4,B1−B2=B4,C1−C2=C4, A2−A3=A5,B2−B3=B5,C2−C3=C5 ・・・(6) , と置くと、式(4),式(5)は、 A4x+B4y+C4=0 ・・・(4)’, A5x+B5y+C5=0 ・・・(5)’, 式(4)*B5−式(5)*B4により、 (A4B5−A5B4)x+C4B5−C5B4=0 ・・・(7), A4B5−A5B4=A6,C4B5−C5B4=C6 ・・・(8), と置くと、 A6x+C6=0 ・・・(7)’, A6≠0ならx=−C6/A6 ・・・(9), (4)’よりB4≠0なら、 y=−1/B4(A4x+C4) ・・・(10), 式(1),(9),(10)よりx,yが決まったら、 r=(x+y+A1x+B1y+C1)(1/2) よりrが求まる。A6≠0または、B4≠0なら解なし
とする。
From (1)-(2), (A1-A2) x + (B1-B2) y + C1-C2 = 0 (4), (2)-(3) -A3) x + (B2-B3) y + C2-C3 = 0 (5), A1-A2 = A4, B1-B2 = B4, C1-C2 = C4, A2-A3 = A5, B2-B3 = B5 , C2−C3 = C5 (6), Equations (4) and (5) are expressed as A4x + B4y + C4 = 0 (4) ′, A5x + B5y + C5 = 0 (5) ′, According to the formula (4) * B5-formula (5) * B4, (A4B5-A5B4) x + C4B5-C5B4 = 0 (7), A4B5-A5B4 = A6, C4B5-C5B4 = C6 (8), A6x + C6 = 0 (7) ', If A6 ≠ 0, x = −C6 / A6 If B4,0 from (9), (4) ′, y = −1 / B4 (A4x + C4) (10), x and y are obtained from equations (1), (9), and (10). Once determined, r is obtained from r = (x 2 + y 2 + A1x + B1y + C1) (1/2) . If A6 ≠ 0 or B4 ≠ 0, there is no solution.

【0061】(p2)入力要素が3つとも直線のとき:
3つとも直線のときは幾何的な情報を使って求めること
ができる。もし、3つの直線とも互いに平行でないな
ら、 (A)直線1と直線2の2等分線を求める。 (B)直線2と直線3の2等分線を求める。 を求めて、上記(A)と(B)の交点が中心(Cx,C
y)となる(図13参照)。当該中心から3つの直線の
何れかに垂線をおろすと、その垂線の距離が半径(r)
となる。
(P2) When all three input elements are straight lines:
When all three are straight lines, they can be obtained using geometric information. If none of the three straight lines are parallel to each other, (A) A bisector of the straight line 1 and the straight line 2 is obtained. (B) A bisector of the straight line 2 and the straight line 3 is obtained. And the intersection of (A) and (B) is centered (Cx, Cx
y) (see FIG. 13). When a perpendicular is dropped to any of the three straight lines from the center, the distance of the perpendicular is a radius (r).
Becomes

【0062】もし3つの直線のうち2つの直線が平行な
ら、 (C)平行な2直線に平行で2直線の中間にある直線を
求める. (D)平行な2直線の何れかと残りの直線との2等分線
を求める。 (E)上記で求めた2等分線と(1)で求めた直線の交
点を求める。
If two of the three straight lines are parallel, (C) find a straight line that is parallel to the two parallel straight lines and that is intermediate between the two straight lines. (D) Obtain a bisector of one of the two parallel straight lines and the remaining straight line. (E) Find the intersection of the bisector found above and the straight line found in (1).

【0063】(E)で求めた交点が解の中心(Cx,C
y)となる。半径は平行2直線間の距離の半分となる。
The intersection obtained in (E) is the center of the solution (Cx, Cx
y). The radius is half the distance between the two parallel straight lines.

【0064】(p3)入力要素が点、直線、円のそれぞ
れのとき:まず、直線がX軸と平行になるように入力要
素それぞれに座標変換をかける。解がもとまったら、そ
の円を逆の座標変換を施すことによって求めることがで
きる(図14参照)。この場合の座標変換の手順は、以
下の通りである。
(P3) When input elements are points, straight lines, and circles: First, coordinate conversion is applied to each input element so that the straight line is parallel to the X axis. When the solution is obtained, the circle can be obtained by performing the reverse coordinate transformation (see FIG. 14). The procedure of coordinate conversion in this case is as follows.

【0065】直線の単位方向ベクトルとX軸のなす角度
をθとすると、回転の行列R(θ)は、
Assuming that the angle between the unit direction vector of the straight line and the X axis is θ, the rotation matrix R (θ) is

【0066】[0066]

【数1】 ・・・・(p3−1),である。変換後前の点をp、変
換後の点をp’とすると、 P’=R(θ)p ・・・・(p3−2), で表現できる。
(Equation 1) ... (p3-1). Assuming that a point before the conversion is p and a point after the conversion is p ′, it can be expressed by P ′ = R (θ) p (p3-2).

【0067】円の場合は、中心点、直線の場合は、直線
を通る点および、方向ベクトルを式(p3−2)で変換
することによって座標変換ができる。
The coordinates can be converted by converting the center point in the case of a circle, the point passing through the straight line in the case of a straight line, and the direction vector by equation (p3-2).

【0068】求まった結果の円に対してはR(−θ)
で、式(p3−2)を適用することによって本来の座標
系での値を求めることができる。
For the circle obtained as a result, R (−θ)
By applying the equation (p3-2), the value in the original coordinate system can be obtained.

【0069】ここで、直線の単位方向ベクトルとX軸の
なす角度をθとすると、 cosθ=V1x、sinθ=V1y ・・・・(p3−3), となる。
Here, assuming that the angle between the unit direction vector of the straight line and the X axis is θ, cos θ = V1x, sin θ = V1y (p3-3).

【0070】座標変換を行った後の入力要素において、
制約条件は、点に関しては、(C1)、直線に関して
は、(C2”)、円に関しては、式(C3)および式
(C4)を使う。
In the input element after the coordinate transformation,
The constraints use (C1) for points, (C2 ″) for straight lines, and equations (C3) and (C4) for circles.

【0071】制約条件の連立式は、 x+y+A1x+B1y+C1=r ・・・(Q1), |y−P1y|=r ・・・(Q2), x+y+K3x+L3y+M3=r+N3r ・・・(Q3), である。式(Q3)は、係数の値を変えることによっ
て、外接する場合、内接、内包する場合を全て表現でき
る。よって以下の手順で式(Q3)の係数の値を変えた
ものを全て求めればよい。この場合の手順は以下のよう
になる。
The simultaneous equations of the constraint conditions are: x 2 + y 2 + A1x + B1y + C1 = r 2 (Q1), | y−P1y | = r (Q2), x 2 + y 2 + K3x + L3y + M3 = r 2 + N3r・ (Q3), Equation (Q3) can express all cases of circumscribed, inscribed, and inclusive by changing the value of the coefficient. Therefore, all values obtained by changing the value of the coefficient of the equation (Q3) may be obtained by the following procedure. The procedure in this case is as follows.

【0072】(a)y−P1y>=0の場合、 式(Q2)よりr=y−P1y ・・・(Q4), 式(Q3)−式(Q1)より、 K4x+L4y+M4=N3r ・・・(Q5), 但し、K4=K3−A1,L4=L3−B1,M4=M
3−C1 (Q5)−(Q4)*N3より K4x+L5y+M5=0 ・・・(Q6), 但し、L4−N3=L5,M4+N3P1y=M5 L5≠0なら、 y=K6x+M6 (Q7), 式(Q7)、(q4)より、 r=K6x+M7 (Q8), 但し、M7=M6−P1yである。
(A) When y-P1y> = 0, from equation (Q2), r = y-P1y (Q4), and from equation (Q3) -equation (Q1), K4x + L4y + M4 = N3r ( Q5), where K4 = K3-A1, L4 = L3-B1, M4 = M
3-C1 (Q5)-(Q4) * N3: K4x + L5y + M5 = 0 (Q6), where L4-N3 = L5, M4 + N3P1y = M5 If L5 ≠ 0, y = K6x + M6 (Q7), Equation (Q7) , (Q4), r = K6x + M7 (Q8), where M7 = M6-P1y.

【0073】式(Q8),(Q7)を式(Q1)に代入
すると、xに関する2次方程式となる。
By substituting equations (Q8) and (Q7) into equation (Q1), a quadratic equation for x is obtained.

【0074】 K8=2K6M6+A1+BIK6−2K6M7 M8=M6+B1M6+C1−M7 とおくと、 x+K8x+M8=0 を解いて、xを算出する。そして、その算出結果を式
(Q7),(Q8)に代入してx,y,rが全て求まる
ことになる。
[0074] When putting the K8 = 2K6M6 + A1 + BIK6-2K6M7 M8 = M6 2 + B1M6 + C1-M7 2, by solving x 2 + K8x + M8 = 0 , to calculate the x. Then, the calculation results are substituted into equations (Q7) and (Q8), and x, y, and r are all obtained.

【0075】L5=0の場合は、式(Q6)より、 K4x+M5=0 ・・・・(Q6)’, K4≠0なら、x=M9 ・・・(Q9), 但し、M9=−M5/K4である。また、K4=0なら
解がない。
When L5 = 0, according to equation (Q6), K4x + M5 = 0... (Q6) ′, and if K4 ≠ 0, x = M9 (Q9), where M9 = −M5 / K4. If K4 = 0, there is no solution.

【0076】式(Q4)、(Q12)を(Q1)に代入
すると、 B10y+M10=0 ・・・(Q10), 但し、B10=B1+2P1y、M10=M9+A1
M9+C1−P1yB10≠0なら、 y=M11 ・・・(Q11), 但し、M11=−M10/B10, r=y−P1y=M11−P1y ・・・(Q12), (b)y−P1y<0の場合、 式(Q2)より、 r=−y+P1y ・・・(Q13), 以下は、(a)の場合と同様にできる。
[0076] formula (Q4), is substituted into the (Q1) (Q12), B10y + M10 = 0 ··· (Q10), however, B10 = B1 + 2P1y, M10 = M9 2 + A1
If M9 + C1-P1y 2 B10 ≠ 0, y = M11 ··· (Q11), provided that, M11 = -M10 / B10, r = y-P1y = M11-P1y ··· (Q12), (b) y-P1y When <0, from equation (Q2), r = −y + P1y (Q13), the following can be performed in the same manner as in the case of (a).

【0077】上述したように、円に関する制約条件の場
合、係数の値を変えて上記の手順で解くことにより、解
の可能性となる円を全て求めることができる。
As described above, in the case of the constraint condition relating to the circle, all the circles that can be solved can be obtained by changing the coefficient value and solving according to the above procedure.

【0078】(p4)入力要素が点と2直線の場合:直
線のうちの一つが、X軸と平行になるように点と残りの
直線を座標変換する。ここでは、幾何的な関係を使う。
(P4) When the input element is a point and two straight lines: The point and the remaining straight lines are coordinate-transformed so that one of the straight lines is parallel to the X axis. Here, a geometric relationship is used.

【0079】2直線が平行でないとき、求める円の中心
は、2直線の2等分線上に存在するはずである(図15
参照)。
When the two straight lines are not parallel, the center of the circle to be obtained should be on the bisector of the two straight lines (FIG. 15).
reference).

【0080】交点をpi、単位方向ベクトルをuとする
と、 ・点が領域1、または3にある場合(図15参照):u=(v1+v2)/| v1+v2| ・・・・(R1), または、 ・点が領域2、または4にある場合(図15参照):u=(v1−v2)/| v1−2| ・・・・(R2), となる。但し、v1,v2は2直線の方向ベクトルであ
る。
Assuming that the intersection is pi and the unit direction vector is u: When the point is in the region 1 or 3 (see FIG. 15): u = (v1 + v2) / | v1 + v2 | (R1), or When the point is in the region 2 or 4 (see FIG. 15): u = (v1-v2) / | v1-2 | (R2) Here, v1 and v2 are directional vectors of two straight lines.

【0081】2等分線上の点は、 X=Pi+tu ・・・・(R3), と表現できる。A point on the bisector can be expressed as X = Pi + tu (R3).

【0082】式(R3)は直線上の式なので、 O1x+P1y+Q1=0 ・・・・(R4), ただし、O1=Uy,P1=−Ux,Q1=−UyPi
x+UxPiy という制約が成り立つ。
Since equation (R3) is an equation on a straight line, O1x + P1y + Q1 = 0 (R4), where O1 = Uy, P1 = -Ux, Q1 = -UyPi
The constraint x + UxPy holds.

【0083】点を通るという制約より、 x+y+A2x+B2y+C2=r ・・・・(R5), x軸と平行な直線と接するという制約より、 y+H2y+J3=r ・・・・(R6), 式(R4),(R5),(R6)を連立させることによ
り解がもとまる。
[0083] than constraint that passes through the point, x 2 + y 2 + A2x + B2y + C2 = r 2 ···· (R5), from the constraint that contact with a straight line parallel to the x-axis, y 2 + H2y + J3 = r 2 ···· (R6 ), Equations (R4), (R5), and (R6) are solved to obtain a solution.

【0084】2直線が平行なとき(図16参照)は、上
記と同様に、2直線がX軸に平行になるように座標変換
する。
When the two straight lines are parallel (see FIG. 16), coordinate conversion is performed so that the two straight lines are parallel to the X axis, as described above.

【0085】2直線の距離をdとすると、 r=d/2 ・・・・(R7), 中心は2直線を通る点の中点を通って、X軸に平行直線
上にあるから、中心のY座標は、 y=(p1y+p2y)/2 ・・・・(R8), 但し、P1y,P2yは各直線を通る1点のy座標であ
る。
Assuming that the distance between the two straight lines is d, r = d / 2 (R7). The center passes through the midpoint of the point passing through the two straight lines and is on a straight line parallel to the X axis. Y = (p1y + p2y) / 2 (R8), where P1y and P2y are y coordinates of one point passing through each straight line.

【0086】式(R7)、(R8)を(R5)に代入す
ると、xに関する2次方程式となるので、それを解くこ
とによって、x座標が求まる。
When the equations (R7) and (R8) are substituted into (R5), a quadratic equation relating to x is obtained. By solving the quadratic equation, the x coordinate is obtained.

【0087】入力要素の組み合わせの違う他のパターン
でも同様の手順によって、代数的にもとめることが同様
に求めることができる。
The same procedure can be used to calculate algebraically for other patterns having different combinations of input elements.

【0088】また、幾何的な知識を併用することによっ
て、代数方程式の次数が高くならず、しかも、代数的に
クリティカルな場合を幾何的な条件を使って場合分けし
て解くので、ノイズに強く安定して、効率的に求めるこ
とができる。
Also, by using the geometrical knowledge together, the degree of the algebraic equation does not increase, and the algebraically critical case is solved separately by using the geometrical condition. It can be obtained stably and efficiently.

【0089】ステップS8:各解が制約条件を満たして
いるか幾何的にチェックする。即ち、上記の如く求めた
解は、解が溝たすべき制約条件を満たしているだけで、
必要条件は満たしているが、十分条件は満たしていな
い。また、代数的に解く過程で、装置のエラー等のノイ
ズによる誤差等により、正しく求まる解となっていない
場合がある。この場合において、装置のエラーを考慮
し、十分条件を満たす解が事前に求まる条件をあらかじ
め幾何的にチェックするという方法もあるが、幾何的な
関係の場合分けの数が膨大になり、装置が複雑になると
いうことと、装置の予期せぬエラーにより正しく求まら
ない可能性があるので、ステップS2で行ったような簡
単な幾何的チェックを除けば、本ステップのように事後
に十分条件を幾何的にチェックするほうが効率的であ
る。
Step S8: It is geometrically checked whether each solution satisfies the constraint condition. In other words, the solution obtained as described above only satisfies the constraint condition that the solution should be grooved,
The requirements are met, but not enough. Also, in the process of solving algebraically, there may be a case where the solution cannot be obtained correctly due to an error due to noise such as an error of the apparatus. In this case, there is a method of geometrically checking in advance a condition for obtaining a solution that satisfies a sufficient condition in consideration of an error of the device.However, the number of cases of the geometric relationship becomes enormous, and the device becomes large. Since it may be complicated and the error may not be obtained correctly due to an unexpected error of the apparatus, except for a simple geometrical check performed in step S2, sufficient conditions can be obtained after the fact as in this step. It is more efficient to check geometrically.

【0090】幾何的な条件チェックの方法は、上述した
ステップS7で設定した解となる円と入力要素の関係を
算出したの円が本当に満たすかどうかを誤差を考慮しな
幾何的なチェックをするというものである。与えられた
3つの形状要素のそれぞれに、制約条件で設定した関係
を満たしていれば十分条件を満たすことになる。
The method for checking the geometric condition is to calculate the relationship between the circle which is the solution set in step S7 and the input element and to check whether the circle really satisfies the error by considering the error. That is. If each of the three given shape elements satisfies the relation set by the constraint condition, the condition is sufficiently satisfied.

【0091】チェックの方法は、各要素およびその解と
の関係により次のようになる。
The checking method is as follows depending on the relationship between each element and its solution.

【0092】記号を以下のように定める。The symbols are defined as follows.

【0093】R:求まった円の半径, eps:誤差の許容量, (a)入力要素が点の場合(図17参照) 点と求まった円の中心との距離をDとすると、 R−eps≦D≦R+eps, である。 (b)入力要素が直線の場合(図18参照) 求まった円の中心と直線の最短距離をDとすると、 R−eps≦D≦R+eps, である。 (c)入力要素が円で求める円と外接する場合(図19
参照) 入力要素の円の中心と算出したの円の中心間の距離を
D、入力要素の円の半径をRiとすると、 R+Ri−eps≦D≦R+Ri+eps, である。 (d)入力要素が円で求める円が内接する場合(図20
参照) 入力要素の円の中心と算出したの円の中心間の距離を
D、入力要素の円の半径をRiとすると、 Ri−R−eps≦D≦Ri−R+eps, である。 (e)入力要素が円で求める円が内包する場合(図21
参照) 入力要素の円の中心と算出したの円の中心間の距離を
D、入力要素の円の半径をRiとすると、 R−Ri−eps≦D≦R−Ri+eps, である。
R: radius of the obtained circle, eps: allowable amount of error, (a) When the input element is a point (see FIG. 17) When the distance between the point and the center of the obtained circle is D, R-eps ≦ D ≦ R + eps, (B) In the case where the input element is a straight line (see FIG. 18) Assuming that the obtained shortest distance between the center of the circle and the straight line is D, R-eps ≦ D ≦ R + eps. (C) When the input element circumscribes the circle determined by the circle (FIG. 19)
Reference) Assuming that the distance between the center of the input element circle and the calculated center of the circle is D, and the radius of the input element circle is Ri, R + Ri−eps ≦ D ≦ R + Ri + eps. (D) The case where the input element is inscribed by a circle (FIG. 20)
If the distance between the center of the input element circle and the calculated center of the circle is D, and the radius of the input element circle is Ri, then Ri-R-eps≤D≤Ri-R + eps. (E) When the input element is a circle determined by a circle (FIG. 21)
Reference) When the distance between the center of the input element circle and the calculated center of the circle is D, and the radius of the input element circle is Ri, R-Ri-eps≤D≤R-Ri + eps.

【0094】例えば、上記のステップS7における(p
3)の場合、すなわち、入力要素が点、直線、円のそれ
ぞれのとき、制約条件として、点を通る、直線に接する
という制約条件は一意に定まるが、円の場合は、外接す
る場合と、内接または内包する場合がある。
For example, (p) in step S7
In the case of 3), that is, when the input element is a point, a straight line, and a circle, the constraint condition of passing through the point and tangent to the straight line is uniquely determined as the constraint condition. May be inscribed or included.

【0095】外接する、という条件の制約式を選択し
て、制約条件を連立させて解いた解は、上記の(a),
(b),(c)の条件を満たしている解を選択すること
によって誤差を考慮して、十分条件を満たした解を選ぶ
ことができる。
A solution obtained by selecting a constraint formula of the condition of circumscribing and simultaneously solving the constraints is given by the above (a),
By selecting a solution that satisfies the conditions (b) and (c), a solution that satisfies the sufficient condition can be selected in consideration of an error.

【0096】内接する、または内包する、という条件の
制約式を選択して、制約条件を連立させて解いた解は、
上記の(a),(b)および(d)または(e)を満た
していれば解として選択できる。
A solution obtained by selecting a constraint equation of the condition of inscribed or inclusive and solving the constraints simultaneously is as follows:
If the above (a), (b) and (d) or (e) are satisfied, a solution can be selected.

【0097】そして、上記の2つの場合をあわせたもの
が解の候補となる。
The combination of the above two cases is a solution candidate.

【0098】ステップS9:各解が縮退していないか、
同一のものがないか誤差を考慮して幾何的にチェックす
る。即ち、ステップS8で選択された解の候補が、誤差
等を考えて、この装置でノイズ等による誤差が生じても
現実的に正しく扱え、しかもオペレータが正当に扱える
ようになっているように解を選別する。
Step S9: Check whether each solution is degenerate
Geometrically check for identical ones considering errors. That is, considering the error and the like, the solution candidate selected in step S8 can be correctly handled even if an error due to noise or the like occurs in this apparatus, and furthermore, the solution can be correctly handled by the operator. Sort out.

【0099】例えば、図5(A)のように半径が異常に
小さかったり、装置があつかえる範囲を超えた大きい半
径をもつものは、縮退している解として扱わないようチ
ェックする。
For example, as shown in FIG. 5 (A), it is checked that a solution having an abnormally small radius or a large radius exceeding the range that the device can handle is not treated as a degenerated solution.

【0100】条件は、次のように表せる。解の候補とな
る円の半径をR、許容誤差をeps、許容最大半径をR
maxとおけば、 R≦eps, R>Rmax, の場合は、縮退したとみなす。
The condition can be expressed as follows. Let R be the radius of a circle that is a solution candidate, eps the allowable error, and R the maximum allowable radius.
If max is satisfied, if R ≦ eps, R> Rmax, then it is considered that the data has been degenerated.

【0101】また、図5(B)のようにステップS8で
選択された解の候補のうち、誤差を考えれば幾何的に同
一のものと扱えるものをチェックする。
Also, as shown in FIG. 5B, among the solution candidates selected in step S8, those which can be treated as geometrically the same considering errors are checked.

【0102】許容誤差をeps、解の候補となる2つの
円の中心間の距離をD、半径をR1、R2とすると、 D+|R1−R2|<=eps, のとき2つの円は同一とみなす。
Assuming that the allowable error is eps, the distance between the centers of two circles as solution candidates is D, and the radii are R1 and R2, the two circles are the same when D + | R1-R2 | <= eps. I reckon.

【0103】ステップS10:ステップS9で求めた結
果により、縮退した解の候補を選択肢から外したり、同
一と判定された2つの円を統合して一つの円とする。例
えばステップS9における2つの円と判定された円の場
合には、それら2つの円の中心間の中点を中心にし、半
径を2つの円の半径の平均値とした円を設定する。
Step S10: Based on the result obtained in step S9, the degenerated solution candidates are excluded from the options, or two circles determined to be the same are integrated into one circle. For example, in the case of a circle determined to be two circles in step S9, a circle having a center at the midpoint between the centers of the two circles and having a radius equal to the average value of the two circles is set.

【0104】上述した本実施形態によれば、代数的な算
出法と幾何的な算出法を併用することにより、効率良く
円形状の計算を行うことができる。
According to the above-described embodiment, the circular shape can be efficiently calculated by using the algebraic calculation method and the geometric calculation method together.

【0105】[第2の実施形態]次に、上述した第1の
実施形態に係る形状算出装置を基本とする第2の実施形
態を説明する。以下の説明においては、第1の実施形態
と同様な構成については重複する説明を省略し、本実施
形態における特徴的な部分を中心に説明する。
[Second Embodiment] Next, a second embodiment based on the shape calculation apparatus according to the first embodiment will be described. In the following description, the same configuration as that of the first embodiment will not be described repeatedly, and the description will focus on the characteristic portions of the present embodiment.

【0106】以下、本実施形態における形状算出処理に
ついて、図22のフローチャートに従って詳細に説明す
る。
Hereinafter, the shape calculation processing in this embodiment will be described in detail with reference to the flowchart of FIG.

【0107】第1の実施形態の入力要素の種別に、本実
施形態では、線分、円弧を更に加える。この場合、第1
の実施形態の前後に以下のような処理を加えることによ
って、オペレータによって指定された3つの各要素に接
する(点の場合は通過する)円を求めることができる。
In this embodiment, line segments and arcs are further added to the types of input elements in the first embodiment. In this case, the first
By adding the following processing before and after the embodiment, a circle touching (passing in the case of a point) each of the three elements specified by the operator can be obtained.

【0108】図22において、ステップS11:入力要
素が線分または円弧のとき、それぞれの要素を含む直
線、円を定義する(図23参照)。
In FIG. 22, step S11: When the input element is a line segment or a circular arc, a straight line and a circle including each element are defined (see FIG. 23).

【0109】ステップS12:第1の実施形態(図1)
と同様な処理を行う。
Step S12: First Embodiment (FIG. 1)
The same processing is performed.

【0110】ステップS13:求めた結果の円と、ステ
ップS11で定義した直線または円との接点を求める。
その接点が最初に入力された線分または円弧に乗ってい
れば接しているものとして解とする(図24参照)。
Step S13: A contact point between the obtained circle and the straight line or circle defined in step S11 is obtained.
If the contact points on the first input line segment or arc, the contact is determined to be in contact (see FIG. 24).

【0111】このような処理を行う本実施形態によって
も、代数的な算出法と幾何的な算出法を併用することに
より、効率良く円形状の計算を行うことができる。
According to the present embodiment for performing such processing, the circular shape can be efficiently calculated by using both the algebraic calculation method and the geometric calculation method.

【0112】[第3の実施形態]次に、上述した第1の
実施形態に係る形状算出装置を基本とする第3の実施形
態を説明する。以下の説明においては、第1の実施形態
と同様な構成については重複する説明を省略し、本実施
形態における特徴的な部分を中心に説明する。
[Third Embodiment] Next, a third embodiment based on the shape calculation device according to the above-described first embodiment will be described. In the following description, the same configuration as that of the first embodiment will not be described repeatedly, and the description will focus on the characteristic portions of the present embodiment.

【0113】以下、本実施形態における形状算出処理に
ついて、図25のフローチャートに従って詳細に説明す
る。
Hereinafter, the shape calculation processing in this embodiment will be described in detail with reference to the flowchart in FIG.

【0114】第1の実施形態または第2の実施形態にお
いては求める解が複数存在する。しかし、本装置を使っ
て対話的に図形を定義する場合、ただ一つしか必要な
く、複数の解の中から必要なものを選択しなければいけ
ない場合が想定される。
In the first embodiment or the second embodiment, there are a plurality of solutions to be found. However, when a figure is defined interactively using the present apparatus, only one is necessary, and a case is required where a necessary one must be selected from a plurality of solutions.

【0115】本実施形態では、本装置のオペレータが効
率的に、思い通りのものを解として選択する手段とし
て、第1の実施形態または第2の実施形態の処理の前後
に、次の処理を組み込む(図26参照)。
In the present embodiment, the following processing is incorporated before and after the processing of the first or second embodiment as a means for the operator of the present apparatus to efficiently select a desired one as a solution. (See FIG. 26).

【0116】図25において、ステップS21:オペレ
ータの指示したピック点により入力要素を指定する(図
26参照)。即ち、第1の実施形態のステップS1(図
1)における入力要素の指示において、オペレータは、
求める円(想定する所望の円)に接する要素を指示する
に際して、マウス12等のポインティングデバイス等に
より、その要素に近接した点をピック等により指示す
る。このとき、オペレータには、求める円と接する接点
の近くを指示することを予め教示しておくものとする。
In FIG. 25, step S21: An input element is designated by a pick point designated by the operator (see FIG. 26). That is, in the instruction of the input element in step S1 (FIG. 1) of the first embodiment, the operator
When indicating an element in contact with a desired circle (an assumed desired circle), a pointing device such as the mouse 12 or the like is used to indicate a point close to the element by a pick or the like. At this time, it is assumed that the operator is instructed in advance to instruct the vicinity of the contact point in contact with the desired circle.

【0117】ステップS22:選択要素上のオペレータ
の指定した近接点に一番近い要素上の点を求める(図2
6参照)。即ち、ステップS21でオペレータが指定し
たピック点に一番近い要素上の点を求める。
Step S22: Find the point on the selected element that is closest to the proximity point specified by the operator (FIG. 2).
6). That is, the point on the element closest to the pick point specified by the operator in step S21 is determined.

【0118】ステップS23:第1または第2の実施形
態(図1、図22)と同様な処理を行う。
Step S23: The same processing as in the first or second embodiment (FIGS. 1 and 22) is performed.

【0119】ステップS24:求めた結果の複数の円の
中から指示点情報より選択する。即ち、算出したの候補
となる複数の円と、ステップS22で求めた要素上の各
点との距離の合計を算出し、一番小さいものを、求める
円として算出する(図26参照)。
Step S24: Select from a plurality of circles of the obtained result from the indicated point information. That is, the sum of the distances between the plurality of calculated candidate circles and each point on the element calculated in step S22 is calculated, and the smallest one is calculated as the calculated circle (see FIG. 26).

【0120】尚、上記のステップS24の代わりに、 ・求めた結果の複数の円の中から指示点情報よりオペレ
ータに選択させる、 ・オペレータの指示した入力情報に関わらず、全ての解
を一時的に表示して、オペレータにそのなかから選択さ
せる、 ・或いは、ステップS24と同様に、ステップS22で
求めた要素上の各点との距離の合計を選択基準として使
うが、オペレータのミスや微妙な判定がある場合を考慮
して、合計の小さい順にオペレータに提示して、オペレ
ータの入力したいものを選択させる、 という処理を行っても良い。
[0120] Instead of the above step S24, the operator is allowed to select from a plurality of circles of the obtained result from the indicated point information. • All the solutions are temporarily irrespective of the input information specified by the operator. And let the operator select from among them. Alternatively, as in step S24, the sum of the distances to each point on the element obtained in step S22 is used as a selection criterion. In consideration of the case where the judgment is made, a process of presenting to the operator in ascending order of the total and allowing the operator to select what he / she wants to input may be performed.

【0121】このような処理を行う本実施形態によって
も、代数的な算出法と幾何的な算出法を併用することに
より、効率良く正確な円形状の計算を行うことができ
る。
According to the present embodiment for performing such processing, efficient and accurate calculation of a circular shape can be performed by using both the algebraic calculation method and the geometric calculation method.

【0122】[0122]

【他の実施形態】尚、本発明の目的は、前述した実施形
態の機能を実現するソフトウェアのプログラムコードを
記録した記憶媒体(または記録媒体)を、システム或い
は装置に供給し、そのシステム或いは装置のコンピュー
タ(またはCPUやMPU)が記憶媒体に格納されたプログラ
ムコードを読み出し実行することによっても、達成され
る。この場合、記憶媒体から読み出されたプログラムコ
ード自体が前述した実施形態の機能を実現することにな
り、そのプログラムコードを記憶した記憶媒体は本発明
を構成することになる。また、コンピュータが読み出し
たプログラムコードを実行することにより、前述した実
施形態の機能が実現されるだけでなく、そのプログラム
コードの指示に基づき、コンピュータ上で稼働している
オペレーティングシステム(OS)等が実際の処理の一部ま
たは全部を行い、その処理によって前述した実施形態の
機能が実現される場合も含まれる。
Further, another object of the present invention is to provide a storage medium (or storage medium) storing a program code of software for realizing the functions of the above-described embodiments to a system or an apparatus, and to provide the system or apparatus. This is also achieved when a computer (or CPU or MPU) reads and executes the program code stored in the storage medium. In this case, the program code itself read from the storage medium implements the functions of the above-described embodiment, and the storage medium storing the program code constitutes the present invention. In addition, the computer executes the readout program code, so that not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instructions of the program code. This also includes a case where some or all of the actual processing is performed and the functions of the above-described embodiments are realized by the processing.

【0123】更に、記憶媒体から読み出されたプログラ
ムコードが、コンピュータに挿入された機能拡張カード
やコンピュータに接続された機能拡張ユニットに備わる
メモリに書込まれた後、そのプログラムコードの指示に
基づき、その機能拡張カードや機能拡張ユニットに備わ
るCPU等が実際の処理の一部または全部を行い、その処
理によって前述した実施形態の機能が実現される場合も
含まれる。
Further, after the program code read from the storage medium is written in the memory provided in the function expansion card inserted into the computer or the function expansion unit connected to the computer, the program code is read based on the instruction of the program code. This also includes the case where the CPU or the like provided in the function expansion card or function expansion unit performs part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.

【0124】[0124]

【発明の効果】以上説明したように、本発明によれば、
代数的な算出法と幾何的な算出法を併用することによ
り、効率良く正確な形状計算を行う形状算出装置及び形
状算出方法及びコンピュータ読み取り可能な記憶媒体の
提供が実現する。
As described above, according to the present invention,
By using an algebraic calculation method and a geometric calculation method together, it is possible to provide a shape calculation device, a shape calculation method, and a computer-readable storage medium for efficiently and accurately calculating a shape.

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

【図1】第1の実施形態において3要素に接する円を定
義する処理の手順を説明するフローチャートである。
FIG. 1 is a flowchart illustrating a procedure of a process for defining a circle tangent to three elements in a first embodiment.

【図2】本発明を適用可能な形状算出装置のハードウェ
ア構成を示すブロック図である。
FIG. 2 is a block diagram showing a hardware configuration of a shape calculation device to which the present invention can be applied.

【図3】オペレータによる入力要素の指示を説明する図
である。
FIG. 3 is a diagram illustrating an instruction of an input element by an operator.

【図4】入力要素が縮退していて正しく解が求まらない
場合および、算出したがそのままでは現実的に処理でき
ないように縮退してしまっている様子を説明する図であ
る。
FIG. 4 is a diagram illustrating a case where an input element is degenerated and a correct solution cannot be obtained, and a state where the input element is degenerated so that it cannot be processed realistically as it is.

【図5】入力要素が縮退している様々なケースを説明す
る図である。
FIG. 5 is a diagram illustrating various cases in which an input element is degenerated.

【図6】縮退の判定方法を説明する図である。FIG. 6 is a diagram illustrating a method for determining degeneration.

【図7】求める円と入力する円の関係を説明する図であ
る。
FIG. 7 is a diagram illustrating a relationship between a circle to be obtained and an input circle.

【図8】点を通るという制約条件を説明する図である。FIG. 8 is a diagram illustrating a constraint condition of passing through a point.

【図9】直線に接するという制約条件を説明する図であ
る。
FIG. 9 is a diagram for explaining a constraint condition of being in contact with a straight line.

【図10】X軸に平行直線に接するという制約条件を説
明する図である。
FIG. 10 is a diagram for explaining a constraint condition that a tangent to a straight line parallel to the X axis.

【図11】円に外接するという制約条件を説明する図で
ある。
FIG. 11 is a diagram illustrating a constraint condition of circumscribing a circle.

【図12】円に内接するという制約条件を説明する図で
ある。
FIG. 12 is a diagram illustrating a constraint condition of inscribed in a circle.

【図13】3直線に接する円を代数的に求める手順を説
明する図である。
FIG. 13 is a diagram illustrating a procedure for algebraically obtaining a circle tangent to three straight lines.

【図14】任意の直線がX軸に平行になるように座標変
換をかけることを説明する図である。
FIG. 14 is a diagram illustrating that coordinate conversion is performed so that an arbitrary straight line is parallel to the X axis.

【図15】1点と平行でない2直線に接する円を代数的
に求める手順を説明する図である。
FIG. 15 is a diagram illustrating a procedure for algebraically obtaining a circle tangent to two straight lines that are not parallel to one point.

【図16】1点と平行な2直線に接する円を代数的に求
める手順を説明する図である。
FIG. 16 is a diagram illustrating a procedure for algebraically obtaining a circle tangent to two straight lines parallel to one point.

【図17】算出したが正しく点を通過しているかチェッ
クする方法を説明する図である。
FIG. 17 is a diagram illustrating a method of checking whether a calculated point has passed a point correctly.

【図18】算出したが正しく直線と接しているかチェッ
クする方法を説明する図である。
FIG. 18 is a diagram illustrating a method for checking whether the calculated but correctly contacted straight line is in contact.

【図19】算出したが正しく円と外接しているかチェッ
クする方法を説明する図である。
FIG. 19 is a diagram for explaining a method of checking whether the calculated but circumscribed circle is correct.

【図20】算出したが正しく円と内接しているかチェッ
クする方法を説明する図である。
FIG. 20 is a diagram illustrating a method of checking whether the calculated but inscribed circle is correct.

【図21】算出したが正しく円を内包しているかチェッ
クする方法を説明する図である。
FIG. 21 is a diagram for explaining a method for checking whether a calculated circle includes a circle correctly.

【図22】第2の実施形態における処理手順を説明する
フローチャートである。
FIG. 22 is a flowchart illustrating a processing procedure according to the second embodiment.

【図23】入力要素が線分または円弧のとき線分を含む
直線または円弧を含む円を定義することを説明する図で
ある。
FIG. 23 is a diagram for explaining defining a straight line including a line segment or a circle including an arc when the input element is a line segment or an arc;

【図24】求めた解が線分または円弧と接しているか判
定することを説明する図である。
FIG. 24 is a diagram illustrating how to determine whether the obtained solution is in contact with a line segment or an arc.

【図25】第3の実施形態における処理手順を説明する
フローチャートである。
FIG. 25 is a flowchart illustrating a processing procedure according to the third embodiment.

【図26】第3の実施形態における処理内容を説明する
図である。
FIG. 26 is a view for explaining processing contents in the third embodiment.

Claims (15)

【特許請求の範囲】[Claims] 【請求項1】 対話形式の環境において、所望の形状を
表わす形状データを算出する形状算出装置であって、 所望の形状を定義するための制約条件として、複数の描
画要素を指示する指示手段と、 前記指示手段によって指示された複数の描画要素の組み
合わせが、前記形状を算出する制約条件を満足するか否
かを、幾何的にチェックする制約条件チェック手段と、 前記制約条件と想定する解の関係に従って、求めるべき
解のパターンを分類する解パターン分類手段と、 前記解パターン分類手段によって分類された解パターン
毎に、前記複数の描画要素と解の関係とに基づく代数的
な制約条件を設定する制約条件設定手段と、 前記制約条件設定手段によって設定された前記解パター
ン毎の代数的制約条件を連立させることにより、幾何的
な関係に基づいて、代数的に解を算出する解算出手段
と、 前記解算出手段によって算出された解の精度を、幾何的
にチェックする解チェック手段と、 前記解チェック手段による結果に従って、前記複数の描
画要素に対応する形状データを算出する算出手段と、を
備えることを特徴とする形状算出装置。
1. A shape calculating apparatus for calculating shape data representing a desired shape in an interactive environment, comprising: indicating means for indicating a plurality of drawing elements as constraint conditions for defining the desired shape. A constraint condition checking unit for geometrically checking whether a combination of a plurality of drawing elements specified by the specifying unit satisfies the constraint condition for calculating the shape; and Solution pattern classifying means for classifying the solution pattern to be obtained according to the relation; and for each solution pattern classified by the solution pattern classifying means, setting algebraic constraint conditions based on the relationship between the plurality of drawing elements and the solution. A constraint condition setting unit that sets the algebraic constraint condition for each solution pattern set by the constraint condition setting unit. A solution calculating means for calculating a solution algebraically, a solution checking means for geometrically checking the accuracy of the solution calculated by the solution calculating means, and a plurality of A calculating means for calculating shape data corresponding to the drawing element.
【請求項2】 前記制約条件チェック手段は、前記複数
の描画要素間の幾何的な関係に基づいて縮退の有無を判
定すると共に、縮退しているときには、前記際算出手段
による解の算出が不可能と判定することを特徴とする請
求項1記載の形状算出装置。
2. The method according to claim 1, wherein the constraint condition checking unit determines whether or not there is contraction based on a geometrical relationship between the plurality of drawing elements. The shape calculation device according to claim 1, wherein it is determined that the shape calculation is possible.
【請求項3】 前記解チェック手段は、前記解パターン
毎に、少なくとも解の縮退及び同一解の有無をチェック
することを特徴とする請求項1記載の形状算出装置。
3. The shape calculation apparatus according to claim 1, wherein the solution checking unit checks at least the solution degeneracy and the presence or absence of the same solution for each of the solution patterns.
【請求項4】 前記指示手段は、 前記複数の描画要素が線分のときに、その線分を、その
線分を含む直線に変換する第1変換手段と、 前記複数の描画要素が円弧のときに、その円弧を、その
円弧を含む円に変換する第2変換手段とを含み、 前記解チェック手段は、前記第1または第2変換手段に
よって変換された描画要素に基づいて前記解算出手段に
よって算出された解の中から、前記線分または円弧と接
している解を選別する選別手段を含むことを特徴とする
請求項1記載の形状算出装置。
4. The pointing means comprises: first conversion means for converting a line segment into a straight line including the line segment when the plurality of drawing elements is a line segment; And a second conversion unit for converting the arc into a circle including the arc, wherein the solution checking unit is configured to calculate the solution based on the drawing element converted by the first or second conversion unit. 2. The shape calculation device according to claim 1, further comprising a selection unit that selects a solution that is in contact with the line segment or the arc from the solutions calculated by the method.
【請求項5】 前記指示手段は、 ポインティングデバイスによって表示装置上の所望の点
を指定可能な指定手段と、 前記複数の描画要素の中で、オペレータによって指定さ
れた近接点に最も近い描画要素上の指示点を算出する指
示点算出手段とを含み、 前記解算出手段は、前記指示点算出手段によって算出さ
れた指示点に基づいて、算出した解の中から何れかの解
を選択する解選択手段を含むことを特徴とする請求項1
または請求項2記載の形状算出装置。
5. A pointing device, comprising: a pointing device that can specify a desired point on a display device by a pointing device; and a drawing element closest to a proximity point specified by an operator among the plurality of drawing elements. And selecting a solution from among the calculated solutions based on the designated point calculated by the designated point calculating means. 2. The method according to claim 1, further comprising means.
Alternatively, the shape calculation device according to claim 2.
【請求項6】 前記解選択手段は、 算出した解と前記指示点との関係を表わす評価関数に基
づいて、解の評価値を算出する評価手段と、 前記評価手段によって算出された評価値に応じた順番
で、前記解を表示すると共に、表示した何れかの解を選
択可能に表示する表示手段と、を含むことを特徴とする
請求項5記載の形状算出装置。
6. An evaluation means for calculating an evaluation value of a solution based on an evaluation function representing a relationship between the calculated solution and the designated point, wherein the evaluation value calculated by the evaluation means is 6. The shape calculation device according to claim 5, further comprising: display means for displaying the solutions in a corresponding order and displaying any of the displayed solutions in a selectable manner.
【請求項7】 前記解選択手段は、算出した解と前記複
数の描画要素との各接点と、前記指示点との距離の合計
が最も小さい解を選択することを特徴とする請求項5記
載の形状算出装置。
7. The solution selecting unit according to claim 5, wherein the solution selecting means selects a solution having the smallest total distance between the calculated solution and each contact point between the plurality of drawing elements and the designated point. Shape calculation device.
【請求項8】 前記解選択手段は、 算出した解と前記複数の描画要素との各接点と、前記指
示点との距離の合計を計算する計算手段と、 前記計算手段によって算出された距離に応じた順番で表
示すると共に、表示した何れかの距離を選択可能に表示
する表示手段と、を含むことを特徴とする請求項5記載
の形状算出装置。
8. The solution selecting means includes: a calculating means for calculating a sum of distances between the calculated solution and each of the plurality of drawing elements and the designated point; and a distance calculated by the calculating means. 6. The shape calculating device according to claim 5, further comprising: display means for displaying in a corresponding order and displaying one of the displayed distances in a selectable manner.
【請求項9】 前記解は円を表わす関係式であって、前
記形状データは、円を表わすデータであることを特徴と
する請求項1記載の形状算出装置。
9. The shape calculation device according to claim 1, wherein the solution is a relational expression representing a circle, and the shape data is data representing a circle.
【請求項10】 対話形式の環境において、所望の形状
を表わす形状データを算出する形状算出方法であって、 所望の形状を定義するための制約条件として、複数の描
画要素を指示する指示工程と、 前記指示工程にて指示された複数の描画要素の組み合わ
せが、前記形状を算出する制約条件を満足するか否か
を、幾何的にチェックする制約条件チェック工程と、 前記制約条件と想定する解の関係に従って、求めるべき
解のパターンを分類する解パターン分類工程と、 前記解パターン分類工程にて分類された解パターン毎
に、前記複数の描画要素と解の関係とに基づく代数的な
制約条件を設定する制約条件設定工程と、 前記制約条件設定工程にて設定された前記解パターン毎
の代数的制約条件を連立させることにより、幾何的な関
係に基づいて、代数的に解を算出する解算出工程と、 前記解算出工程にて算出された解の精度を、幾何的にチ
ェックする解チェック工程と、 前記解チェック工程による結果に従って、前記複数の描
画要素に対応する形状データを算出する算出工程と、を
有することを特徴とする形状算出方法。
10. A shape calculating method for calculating shape data representing a desired shape in an interactive environment, comprising: an instructing step of designating a plurality of drawing elements as constraint conditions for defining the desired shape. A constraint checking step of geometrically checking whether or not a combination of a plurality of drawing elements specified in the specifying step satisfies the constraint for calculating the shape; and a solution assumed as the constraint. A solution pattern classifying step of classifying a solution pattern to be obtained according to the relationship of: algebraic constraints based on a relationship between the plurality of drawing elements and the solution for each solution pattern classified in the solution pattern classification A constraint condition setting step of setting algebraic constraint conditions for each solution pattern set in the constraint condition setting step. A solution calculating step of calculating a solution algebraically; a solution checking step of geometrically checking the accuracy of the solution calculated in the solution calculating step; and a plurality of drawing elements according to a result of the solution checking step. A calculating step of calculating shape data corresponding to the shape data.
【請求項11】 前記制約条件チェック工程において、
前記複数の描画要素間の幾何的な関係に基づいて縮退の
有無を判定すると共に、縮退しているときには、前記際
算出工程における解の算出が不可能と判定することを特
徴とする請求項10記載の形状算出方法。
11. In the constraint condition checking step,
11. The method according to claim 10, further comprising determining whether or not there is contraction based on a geometric relationship between the plurality of drawing elements, and determining that a solution cannot be calculated in the calculation step when the contraction occurs. The described shape calculation method.
【請求項12】 前記解チェック工程において、前記解
パターン毎に、少なくとも解の縮退及び同一解の有無を
チェックすることを特徴とする請求項10記載の形状算
出方法。
12. The shape calculating method according to claim 10, wherein in said solution checking step, at least for each of said solution patterns, at least the degeneracy of the solution and the presence or absence of the same solution are checked.
【請求項13】 前記指示工程において、 前記複数の描画要素が線分のときには、その線分を、そ
の線分を含む直線に変換し、 前記複数の描画要素が円弧のときには、その円弧を、そ
の円弧を含む円に変換し、 前記解チェック工程において、 前記直線または円に基づいて前記解算出工程において算
出された解の中から、前記線分または円弧と接している
解を選別することを特徴とする請求項10記載の形状算
出方法。
13. In the instruction step, when the plurality of drawing elements are line segments, the line segments are converted into straight lines including the line segments. When the plurality of drawing elements are arcs, the arc is Converting into a circle including the arc, and selecting the solution in contact with the line segment or the arc from the solutions calculated in the solution calculation step based on the straight line or the circle in the solution checking step. The shape calculation method according to claim 10, wherein:
【請求項14】 請求項1乃至請求項9の何れかに記載
の形状算出装置としてコンピュータを動作させるプログ
ラムコードが格納されていることを特徴とするコンピュ
ータ読み取り可能な記憶媒体。
14. A computer-readable storage medium storing a program code for operating a computer as the shape calculation device according to claim 1. Description:
【請求項15】 請求項10乃至請求項13の何れかに
記載の形状算出方法をコンピュータによって実現可能な
プログラムコードが格納されていることを特徴とするコ
ンピュータ読み取り可能な記憶媒体。
15. A computer-readable storage medium storing a program code capable of realizing the shape calculation method according to any one of claims 10 to 13 by a computer.
JP2000243328A 2000-08-10 2000-08-10 Shape calculation device, shape calculation method and computer-readable storage medium Withdrawn JP2002056402A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000243328A JP2002056402A (en) 2000-08-10 2000-08-10 Shape calculation device, shape calculation method and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000243328A JP2002056402A (en) 2000-08-10 2000-08-10 Shape calculation device, shape calculation method and computer-readable storage medium

Publications (1)

Publication Number Publication Date
JP2002056402A true JP2002056402A (en) 2002-02-22

Family

ID=18734201

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000243328A Withdrawn JP2002056402A (en) 2000-08-10 2000-08-10 Shape calculation device, shape calculation method and computer-readable storage medium

Country Status (1)

Country Link
JP (1) JP2002056402A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7236015B1 (en) 2022-04-26 2023-03-09 キヤノンマーケティングジャパン株式会社 ELECTRONIC DEVICE, ELECTRONIC DEVICE CONTROL METHOD, AND PROGRAM

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7236015B1 (en) 2022-04-26 2023-03-09 キヤノンマーケティングジャパン株式会社 ELECTRONIC DEVICE, ELECTRONIC DEVICE CONTROL METHOD, AND PROGRAM
JP2023161712A (en) * 2022-04-26 2023-11-08 キヤノンマーケティングジャパン株式会社 Electronic device, control method of electronic device and program

Similar Documents

Publication Publication Date Title
US4891763A (en) NC program editing and programming device
JP5377685B2 (en) Image forming apparatus and image forming program
JP6735367B2 (en) Mold correction method
US5649084A (en) Method for performing boolean operations on geometric objects in a computer-aided design system
JP2828271B2 (en) Shape generation method in CAD system
KR100186788B1 (en) Displaying objects with geometric constraints
JP2002056402A (en) Shape calculation device, shape calculation method and computer-readable storage medium
JP2666750B2 (en) Figure placement device
CN117762088A (en) Method of generating tool paths for engraving on various forming surfaces
Akeo et al. Computer Graphics System for Reproducing Three‐Dimensional Shape from Idea Sketch
CA2012406C (en) Graphics system
JP4124851B2 (en) Information processing apparatus, information processing method, and storage medium
JPH07160873A (en) Method for converting picture data including bezier curve
JP4302102B2 (en) 3D design support program
Nyemba Computer Aided Design: Engineering Design and Modeling Using AutoCAD
JP2008236474A (en) Print image processing method, print image processing system and image output medium
JP2829692B2 (en) Operation Macro CAD System
JP2005142614A (en) Scanner driver program, information processing apparatus, and copy system
JP4458640B2 (en) Drawing instruction apparatus, drawing instruction method thereof, and computer-readable storage medium
JP5687612B2 (en) Image forming apparatus
JP4006113B2 (en) Graphic processing method and apparatus
JP2005332183A (en) Device and method for mesh correction, and program
JP2006172007A (en) Mesh correction device for analysis and mesh correction method for analysis
JP3561416B2 (en) Shape data processing device, processing method, and storage medium storing shape data processing program
JP4208659B2 (en) Graphic editing device

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20071106