JPS6254377A - Selecting method for vector - Google Patents
Selecting method for vectorInfo
- Publication number
- JPS6254377A JPS6254377A JP19420585A JP19420585A JPS6254377A JP S6254377 A JPS6254377 A JP S6254377A JP 19420585 A JP19420585 A JP 19420585A JP 19420585 A JP19420585 A JP 19420585A JP S6254377 A JPS6254377 A JP S6254377A
- Authority
- JP
- Japan
- Prior art keywords
- vector
- point
- coordinates
- vectors
- given point
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Image Processing (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
この発明はベクトル選出方法、特に複数のベクトルから
、指定された1点を含む一つのベクトルを選び出す方法
に関するものである。 。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a vector selection method, and particularly to a method for selecting one vector containing one specified point from a plurality of vectors. .
従来グラフィックディスプレイ等において複数のベクト
ルから指定された1点を含む一つのベクトルを選び出す
には複数のベクトル全てについてディジタル線分に分解
し、即ち、そのベクトルを構成するすべての点の座標値
1tを算出し、算出したすべての座標位置の中に指定さ
れた1点と一致するものがあるかないかを判定すること
によシ行なっていた。与えられたベクトル群中の各ベク
トルをV−(1=1xn)で表わしく但しnはベクトル
の総数である)、各ベクトルの始点と終点の座標をそれ
ぞれ始点(x−y−)、終点(xei、 yei)st
、 5t
(i=1〜n)とする。Conventionally, in order to select one vector containing one designated point from multiple vectors in a graphic display, etc., all of the multiple vectors are decomposed into digital line segments, that is, the coordinate values 1t of all the points constituting the vector are calculated. This was done by calculating and determining whether or not any of all the calculated coordinate positions matched a specified point. Each vector in a given vector group is expressed as V-(1=1xn), where n is the total number of vectors), and the coordinates of the starting point and ending point of each vector are expressed as the starting point (x-y-) and the ending point ( xei, yei)st
, 5t (i=1 to n).
第2図は従来の方法を示すフローチャート図であり、図
において(1)はカウント変数iを初期化する初期設定
ステップ、に)は変数iをインクリメントするインクリ
メントステップ、(3)はiがnK違したか否かを判定
するn判定ステップ、(6)はV。FIG. 2 is a flowchart showing the conventional method. In the figure, (1) is an initial setting step for initializing the count variable i, (2) is an increment step for incrementing the variable i, and (3) is an increment step for incrementing the variable i. n determination step (6) for determining whether or not it has been performed.
についてディジタル線分に分解し、その都度(P。is decomposed into digital line segments, each time (P.
Py)と一致しているか否かを判定するディジタル線分
発生比較ステップである。ところでディジタル信号のグ
ラフィックディスプレイでは、Xもyもその増分には最
小の単位(以下、仮りに数値1で表わす)があり、その
最小単位以下の端数の値をとることができないから、グ
ラフィックディスプレイ上でCx−y・)と(xsi、
ysi)を結81、 111 61
、 el\ 、G!f)l[!&ij!Mat:
& < 11−:&&IOt!ml して直線に近似
させた折線となる。たとえばX81〉xsi 、 ye
i >3’siでちゃ、かつ(xei−xsi )>
(yei−3’si )の場合は(Xsi e YBi
)から出発してXは毎回1ずつ増加してゆき、この1だ
け増加したXの匝に対しyは前回のyの値のままにして
おくか又は前回のyの値より1だけ増加するか、どちら
が厳密な直線上のyの値により近いがを決定して順次(
x、y)の座標位置を決定してゆかねばならない。先に
述べたディジタル線分の発生と2よ、このような操作の
ことをいう。This is a digital line segment generation comparison step to determine whether or not they match Py). By the way, in a graphic display of digital signals, the increment of both X and y has a minimum unit (hereinafter, it will be represented by the number 1), and it is not possible to take a fractional value less than that minimum unit. Cx-y・) and (xsi,
ysi) 81, 111 61
, el\, G! f)l[! &ij! Mat:
&< 11-: &&IOt! ml to form a broken line approximated to a straight line. For example, X81〉xsi, ye
i >3'si dechakatsu(xei-xsi)>
In the case of (yei-3'si), (Xsi e YBi
), X increases by 1 each time, and when X increases by 1, y should remain at the previous value of y, or should it be increased by 1 from the previous value of y? , which is closer to the value of y on the exact straight line and sequentially (
The coordinate position (x, y) must be determined. Generation of digital line segments and 2 mentioned above refer to such operations.
次に第2図に示す方法の動作について説明する。Next, the operation of the method shown in FIG. 2 will be explained.
ステップf1+により変数iをIK上セツト、次にステ
ップ(6)によりベクトルV、をディジタル線分に分解
し、分解した1点、1点についてCP 、P )y
と比較する。もしこれが一致していれば(Px、Py)
の属するベクトルはV、と判定できピッキングは成功(
found)となる。In step f1+, the variable i is set on the IK, and in step (6), the vector V is decomposed into digital line segments, and each decomposed point is compared with CP, P)y. If this matches (Px, Py)
It can be determined that the vector to which belongs is V, and the picking is successful (
found).
もし、分解した全ての点が(PX、Py)と一致しなけ
れば%(Px、Py)はV、上にないと判定し、ステッ
プ(3)K処理が移る。ステップ(3)ではiがnに達
したか否かを判定しnに達していれば(Px。If all the decomposed points do not match (PX, Py), it is determined that %(Px, Py) is not above V, and the process moves to step (3) K. In step (3), it is determined whether or not i has reached n, and if it has reached n (Px).
Py)の!14−rるベクトルは存在しなかったと判定
し、ピッキング不成功(not found )となる
。jがnに達していなければステップ(2)によ、!1
lliを1インクリメントし、次のベクトルについてス
テップ(6)以下の処理をくり返す。Py)'s! It is determined that the vector 14-r does not exist, and picking is unsuccessful (not found). If j has not reached n, go to step (2)! 1
Increment lli by 1 and repeat the process from step (6) on the next vector.
上記のような従来の方法では、与えられた複数のベクト
ル群を一度ディジタル線分に分解していたから、その計
算量は非常に大きく、そのため非常に多くの時間を費や
していた。In the conventional method described above, a given group of vectors is once decomposed into digital line segments, which requires a very large amount of calculation and therefore consumes a large amount of time.
この発明はかかる問題を解決するためになされたもので
、目的のベクトルを選出するための計算量を減らす判定
方法を得ることを目的としている。This invention was made to solve this problem, and aims to provide a determination method that reduces the amount of calculation required to select a target vector.
c間跪点分解決するための手段〕
との発明ではベクトルをディジタル線分に分解して与え
られた1点が含まれているか否か判定するのではなく、
ベクトルの領域比較と直線の式を使い与えられた1点が
ベクトル上に存在するか否かを判定する。In the invention of [Means for solving c-interval kneeling points], instead of decomposing a vector into digital line segments and determining whether or not a given point is included,
It is determined whether a given point exists on a vector using vector area comparison and a straight line equation.
この発明においては、目的のベクトルを選出するのに簡
単なアレレボリズムを使用するから、それに装する計算
量が従来に比べ著しく減る。In this invention, since a simple allelevolism is used to select the target vector, the amount of calculation involved is significantly reduced compared to the conventional method.
〔発明の実施例〕 以下、この発明の実施例を図について説明する。[Embodiments of the invention] Embodiments of the present invention will be described below with reference to the drawings.
従来と同様に与えられたベクトル群について、その個数
をnとし、ベクトル群の始点と終点の座標をそれぞれ始
点(xat、3’si)、終点(xei 、yei)(
1=lxn)とし、与えられた点の座標を(PK、Py
)とする。As before, for a given vector group, let the number be n, and let the coordinates of the starting point and ending point of the vector group be the starting point (xat, 3'si) and the ending point (xei, yei) (
1=lxn), and the coordinates of the given point are (PK, Py
).
第1図はこの発明の一実施例を示すフローチャート図で
第1図中(1) 、 (21、(3)は第2図に示す従
来の方法と同一ステップを示し、(4)は(PC,Py
)が(”si、YBi、)と(xei、Xeiを対角綴
止の2頂点とする長方形内に入っているか否かを判定す
る領域判定ステップであり、この判定はx31≦PK≦
Xei又はxat≦Py≦ysiで、かり、ysi≦P
y≦yei又はyei≦Pア≦7siを判定することに
より容易に判定できる。FIG. 1 is a flowchart showing an embodiment of the present invention. In FIG. 1, (1), (21, and (3) indicate the same steps as in the conventional method shown in FIG. ,Py
) is within a rectangle with ("si, YBi,) and (xei, Xei as two vertices of diagonal binding).
Xei or xat≦Py≦ysi, and ysi≦P
This can be easily determined by determining y≦yei or yei≦Pa≦7si.
次にステップ(4)により(Px、Py)がベクトルV
lの領域内に入っていると判定されたベクトルについて
、そのベクトルV、上に(PK、 Py) が乗って
いるか否かを判定する。領域内に入っている場合には次
のステップである直線判定ステップ(5)に処理が移る
。ステップ(5)では(Px、 Py)がベクトルvI
上にあるか否かを判定する。(X3i * 73i)と
(X6i+ 76i)とを含む直線の式、すなわち(P
x、 Py)が満せばV、上に乗っていることになるか
ら(yei −)’si )・Px” ysi−Xei
−X5i−yei =Py・(Xei−Xsi)・・・
(2)が成立するか否かによシ判定できる。式(2)の
X・、y・ 、X・、y・、PP81 81
el el X’ yは最小
単位以下の端数を含んでおらず、かつ式(2)の中には
割!ll′N、が含まれてないので、式(2)の演算で
は端数の問題が起らない。Next, in step (4), (Px, Py) becomes the vector V
For a vector determined to be within the region of l, it is determined whether (PK, Py) is placed on the vector V. If it is within the area, the process moves to the next step, straight line determination step (5). In step (5), (Px, Py) is the vector vI
Determine whether it is above. The equation of the straight line including (X3i * 73i) and (X6i + 76i), that is, (P
If x, Py) are satisfied, then V is on top of (yei −)'si )・Px” ysi−Xei
-X5i-yei =Py・(Xei-Xsi)...
The determination can be made based on whether (2) holds. X・, y・ , X・, y・, PP81 81 of formula (2)
el el Since ll'N is not included, the problem of fractions does not occur in the operation of equation (2).
以上のようにこの発明によればCF、、py)がv1上
にあるか否かの判定に要する計算量を著しく減らすこと
により極めて高速に複数のベクトルから指定された1点
を含むベクトルを選び出すことができるという効果があ
る。As described above, according to the present invention, by significantly reducing the amount of calculation required to determine whether CF, py) is on v1, a vector containing one specified point is selected from multiple vectors at an extremely high speed. It has the effect of being able to
第1図はこの発明の一実施例を示すフローチャート図、
第2図は従来の方法を示すフローチャート図である。
(1)初期設定ステップ、(2)インクリメントステッ
プ、(31n判定ステップ、(4)領域判定ステップ、
(5)直線判定ステップ。
なお各図中同一符号は同−又は相当部分を示すものとす
る。FIG. 1 is a flow chart diagram showing an embodiment of the present invention;
FIG. 2 is a flow chart diagram illustrating a conventional method. (1) initial setting step, (2) increment step, (31n determination step, (4) area determination step,
(5) Straight line determination step. Note that the same reference numerals in each figure indicate the same or corresponding parts.
Claims (1)
定した1点を含むベクトルを選出するベクトル選出方法
において、上記n個のベクトルの始点と終点の座標をそ
れぞれ(x_s_i、y_s_i)及び(x_e_iy
_e_i)(i=1〜n)とし、各ベクトルについて上
記指定した1点の座標(P_x、P_y)がx_s_i
≦P_x≦x_e_i又はx_e_i≦P_x≦x_s
_iで、かつy_s_i≦P_y≦y_e_i又はy_
e_i≦P_y≦y_s_iであるか否かを判定するこ
とによりP_x、P_yが(x_s_i、y_s_i)
及び(x_e_i、y_e_i)を対角線上の頂点とす
る長方形内にあるか否かの判断を行なう領域判定段階と
、この領域判定段階において(P_x、P_y)が領域
内に入っていると判定したベクトルについて(P_xP
_y)が(x_s_i、y_s_i)と(x_e_i、
y_e_i)とを含む直線の式 y=ysi+[(y_e_i−y_s_i)/(x_e
_i−x_s_i)]xを満足し、P_y(x_e_i
−x_s_i)=y_s_i,x_e_i−y_s_i
・x_s_i+P_x(y_e_i−y_s_i)が成
立するか否かを判定する直線判定段階を備えたことを特
徴とするベクトル選出方法。[Claims] In a vector selection method of selecting a vector containing one specified point from n vectors, where n is an arbitrary plural number, the coordinates of the starting point and ending point of the n vectors are respectively ( x_s_i, y_s_i) and (x_e_iy
_e_i) (i=1 to n), and the coordinates (P_x, P_y) of the point specified above for each vector are x_s_i
≦P_x≦x_e_i or x_e_i≦P_x≦x_s
_i, and y_s_i≦P_y≦y_e_i or y_
By determining whether e_i≦P_y≦y_s_i, P_x, P_y are (x_s_i, y_s_i)
and an area determination step in which it is determined whether or not the vector is within a rectangle with (x_e_i, y_e_i) as its diagonal vertices; About (P_xP
_y) is (x_s_i, y_s_i) and (x_e_i,
The straight line equation y=ysi+[(y_e_i−y_s_i)/(x_e
_i−x_s_i)]x, P_y(x_e_i
−x_s_i)=y_s_i, x_e_i−y_s_i
- A vector selection method characterized by comprising a straight line determination step of determining whether or not x_s_i+P_x(y_e_i−y_s_i) holds.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP19420585A JPS6254377A (en) | 1985-09-03 | 1985-09-03 | Selecting method for vector |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP19420585A JPS6254377A (en) | 1985-09-03 | 1985-09-03 | Selecting method for vector |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS6254377A true JPS6254377A (en) | 1987-03-10 |
Family
ID=16320699
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP19420585A Pending JPS6254377A (en) | 1985-09-03 | 1985-09-03 | Selecting method for vector |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS6254377A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04304323A (en) * | 1991-04-01 | 1992-10-27 | Nippon Steel Corp | Method for controlling cooling unit for strip continuously heat treating device |
JPH05263148A (en) * | 1992-03-16 | 1993-10-12 | Nippon Steel Corp | Method for controlling cooling furnace for strip continuous heat treating device |
-
1985
- 1985-09-03 JP JP19420585A patent/JPS6254377A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04304323A (en) * | 1991-04-01 | 1992-10-27 | Nippon Steel Corp | Method for controlling cooling unit for strip continuously heat treating device |
JPH05263148A (en) * | 1992-03-16 | 1993-10-12 | Nippon Steel Corp | Method for controlling cooling furnace for strip continuous heat treating device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH01161481A (en) | Display | |
JPS6254377A (en) | Selecting method for vector | |
JPS61261779A (en) | Generation of curve of second order signal | |
JP2739345B2 (en) | Color correction method | |
JPS59145970A (en) | Displaying method of spectrum | |
JP3154823B2 (en) | How to represent a character composed of connected objects | |
JP2752762B2 (en) | Node matching processing method | |
JP2001290855A (en) | Delay calculating method for hierarchical design | |
JPH06274308A (en) | Uniform modeling generation processing method for bezier curve | |
JP3275277B2 (en) | Graphic drawing creation apparatus and method | |
JPS62182841A (en) | Square root arithmetic system | |
JPS6155728A (en) | Coordinate input device | |
JPH0991447A (en) | Device for approximating bezier curve | |
JPH04246785A (en) | Graphic preparing device | |
JPH03118667A (en) | Preparation of shape data | |
JPH05181847A (en) | Output data item delimiting processing method | |
JP2989830B2 (en) | Vector processing method | |
JPH02120918A (en) | Method for linearizing nonlinear input | |
JPH033084A (en) | Line plotting method | |
JPS59195761A (en) | Diagram processing method | |
JPH04172566A (en) | Shape changing method for wiring pattern | |
JPS60211491A (en) | Display control circuit | |
JPH05334414A (en) | Dot input system for branch structure graphic | |
JPH06119116A (en) | Data control system | |
JPH04102975A (en) | Semi-automatic stroke connection order determining processing system |