JPS63143675A - Picking system for straight line - Google Patents

Picking system for straight line

Info

Publication number
JPS63143675A
JPS63143675A JP28980086A JP28980086A JPS63143675A JP S63143675 A JPS63143675 A JP S63143675A JP 28980086 A JP28980086 A JP 28980086A JP 28980086 A JP28980086 A JP 28980086A JP S63143675 A JPS63143675 A JP S63143675A
Authority
JP
Japan
Prior art keywords
straight line
pick
discriminant
final
picked
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
Application number
JP28980086A
Other languages
Japanese (ja)
Inventor
Nobuhiko Mukai
向井 信彦
Atsushi Tanaka
敦 田中
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP28980086A priority Critical patent/JPS63143675A/en
Publication of JPS63143675A publication Critical patent/JPS63143675A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To remove dividing operation from picking processing by deciding final pick by means of four corner points obtained by a four-corner point forming means and a discriminant for deciding whether four corner points are divided into two parts by a straight line passing both the end points of a straight line to be picked up. CONSTITUTION:A detailed pick inspecting part 120 is provided with a four- corner point forming means 121 for finding out four corners of a picking frame, a decision forming means 122 for forming the discriminant whether the four corner points are divided into two parts by a straight line passing both the end points of the straight line to be picked up and a final decision means 123 for deciding 136 the final pick by means of the obtained four corner points and the decision formula 135. Namely, the inspection part 120 uses the straight line to be picked up as a reference and decides the final pick by the means 123 by means of the four corner points of the picking frame obtained by the means 121 and the decision formula 135 obtained by the means 122. Consequently, the calculation of an intersecting point, i.e., dividing operation, can be omitted and the number of times of operation can be reduced.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、コンピュータグラフィックス分野における
直線のピック処理、すなわち一定の枠内にある直線の抽
出処理を計算によって行う直線のピック方式に関するも
のである。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a straight line picking process in the field of computer graphics, that is, a straight line picking method in which straight lines within a certain frame are extracted by calculation. be.

〔従来の技術〕[Conventional technology]

従来のピック処理では描画処理手法を適用してピック対
象となる図形を優先順位の高い順に描画し、最初にピッ
ク枠内に描画される図形が発見された時点でこの図形を
ピックされた図形として抽出し、ピック処理を終了して
いた。ところが、対話的な応答が要求されるピック処理
に対して、数々の図形描画に相当する処理時間を要する
手法は適切でなく、より高速なピック処理手法が望まれ
ていた。
In conventional pick processing, drawing processing techniques are applied to draw the shapes to be picked in order of priority, and when the first shape to be drawn within the pick frame is found, this shape is selected as the picked shape. Extracted and finished the pick process. However, for pick processing that requires interactive responses, a method that requires processing time equivalent to drawing numerous figures is not appropriate, and a faster pick processing method has been desired.

一方、ピック処理を必要とするのはグラフィックス分野
の描画であり、この分野では大半の図形を直線近似によ
り描画するのが通常である。
On the other hand, picking processing is required for drawing in the graphics field, where most figures are usually drawn by linear approximation.

そこで、直線のピック方式に関しては、例えば、山口冨
士夫著の[コンピュータディスプレイによる図形処理工
学(日刊工新開社)Jに記載の直線のクリッピング方式
(PP、138−145)を利用した計算によるピック
方式が容易に類推されるので、従来技術としてこの直線
のクリッピング方式を取り挙げる。
Therefore, regarding the straight line picking method, for example, a calculation based picking method using the straight line clipping method (PP, 138-145) described in [Graphic processing engineering using computer displays (Nikkan Koshinkaisha) J] written by Fujio Yamaguchi. Since this can be easily inferred, this straight line clipping method will be cited as a conventional technique.

第4図は、この直線のクリッピング方式の流れを示すク
リッピング流れ図である。図において、100は計算に
よるクリッピング処理で必要な入力データ部、110は
この入力データ部100から人力されたデータを基にし
て大雑把なピックの検査を行うピック予備検査部、12
0はこのピック予備検査部110だけでは判定不可能な
直線に対してより詳細な検査を行うピック詳細検査部で
ある。以下、具体的に説明する。
FIG. 4 is a clipping flowchart showing the flow of this linear clipping method. In the figure, 100 is an input data section necessary for clipping processing by calculation, 110 is a pick preliminary inspection section that performs a rough pick inspection based on data input manually from this input data section 100, and 12
0 is a pick detailed inspection section that performs a more detailed inspection on straight lines that cannot be determined by the pick preliminary inspection section 110 alone. This will be explained in detail below.

入力データ部100から入力されるクリップ対象となる
直線(L)の両端点101を(x6.yo)及び(X+
、3’+)とし、同しく入力データ部100から入力さ
れるクリップ枠の4直線102をx−XL、X=Xa、
)’=)’a+3’=3’yとする。直線(I7)の端
点(x、y)がクリップ枠の4直線102によって分割
された9つの領域のうち、どの領域に属するのかを容易
に判断するために、次のベクトルを求める。
Both end points 101 of the straight line (L) to be clipped inputted from the input data section 100 are (x6.yo) and (X+
, 3'+), and the four straight lines 102 of the clip frame that are also input from the input data section 100 are x-XL, X=Xa,
)'=)'a+3'=3'y. In order to easily determine to which region the end point (x, y) of the straight line (I7) belongs among the nine regions divided by the four straight lines 102 of the clipping frame, the following vector is obtained.

(yT  ’j23’  Vs、x*  x、x  x
t)−−(1)(1)式の計算結果、各項の符号が正な
ら0、負なら1として4ビツトの符号を生成する。この
動作を施す手段が符号生成手段111である。
(yT 'j23' Vs, x* x, x x
t) --(1) As a result of calculation of equation (1), if the sign of each term is positive, it is set to 0, and if it is negative, it is set to 1, and a 4-bit code is generated. The means for performing this operation is the code generation means 111.

第5図は、クリップ枠の4直線102によって分割され
た9つの領域における符号を示した符号一覧図である。
FIG. 5 is a list of codes showing codes in nine areas divided by four straight lines 102 of the clipping frame.

ここで、図示を省略した直線(L)の両端点101  
(Xo、 yo)及び(X+、y+)の符号をC6及び
C5とすれば、第5図から次の事柄は明らかである。
Here, both end points 101 of the straight line (L) not shown
If the signs of (Xo, yo) and (X+, y+) are C6 and C5, the following is clear from FIG.

(+) Go =C+ =0000ならば、(x、、y
a)及び(xt、y+)は共にクリップの枠内に存在す
る。
(+) If Go =C+ =0000, then (x,,y
a) and (xt, y+) both exist within the frame of the clip.

従って、直線(L)は完全にクリップの枠内に存在する
Therefore, the straight line (L) exists completely within the frame of the clip.

(II)Go AND  C1≠0000ならば、(X
O,)’O)及び(xt、y+)は共にクリップ枠の4
直線102のうち、少なくとも一つの直線に関して、そ
の直線で分割された二つの領域のうち、クリップ枠外の
領域に存在する。従って、直線(L)は完全にクリップ
の枠外に存在する。
(II) If Go AND C1≠0000, then (X
O, )'O) and (xt, y+) are both clip frame 4
Regarding at least one of the straight lines 102, it exists in an area outside the clipping frame of the two areas divided by the straight line. Therefore, the straight line (L) exists completely outside the clip frame.

前記二条性(i)及び(ii )のうち、いずれかに該
当する直線はこれら一連の処理だけで対象となる直線が
クリップされるのか、されないのかを判定することがで
きる。この動作を施す手段が符号検定手段112であり
、この符号検定手段112及び前記符号生成手段111
だけで判定できる直線が判定された直線132である。
For a straight line that falls under either of the two-line properties (i) and (ii), it can be determined whether or not the target straight line will be clipped just by this series of processing. The means for performing this operation is the code verification means 112, and the code verification means 112 and the code generation means 111
The determined straight line 132 is a straight line that can be determined only by the following steps.

ここまでの動作は前記ピック予備検査部110における
各手段の動作であり、次に前記ピック詳細検査部120
における動作を説明する。
The operations up to this point are the operations of each means in the pick preliminary inspection section 110, and then the pick detailed inspection section 120
The operation will be explained below.

前記二条性(i)及び(ii )のいずれにも該当しな
い直線は少なくとも一方の端点がクリップ枠外に存在し
ているはずであるから、クリップ枠外の端点が(x@、
yo)となるようにする。このためには、次の処理を行
えばよい。
Since at least one end point of a straight line that does not fall under either of the two-line properties (i) and (ii) must exist outside the clip frame, the end point outside the clip frame must be (x@,
yo). For this purpose, the following process may be performed.

falcO−0000ならば、(Xo、yo)と(xl
If falcO-0000, (Xo, yo) and (xl
.

y+)を交換する。y+).

(blco ” OOOOでなければ、何もしない。(blco ” If it is not OOOO, do nothing.

当然の事ながら、(x6.yo)と(X+、y+)を交
換した場合は、その符号C6とCIも交換しておく。
Naturally, when (x6.yo) and (X+, y+) are exchanged, the code C6 and CI are also exchanged.

次に00を基にして、端点(xo、yo)が前記クリッ
プ枠の4直線102の各々に関して、どちらの領域に存
在しているのかを調べる。第5図から次の事柄は明らか
である。
Next, based on 00, it is determined in which region the end point (xo, yo) exists with respect to each of the four straight lines 102 of the clipping frame. The following things are clear from Figure 5.

(i)’Co AND  OOO1≠0000ならば、
Xo<xLである。
(i) If 'Co AND OOO1≠0000,
Xo<xL.

(ii)’Co AND  OO10≠0000ならば
、XH<Xoである。
(ii) If 'Co AND OO10≠0000, then XH<Xo.

(iii)’CoAND  0100≠0000ならば
、yo<yBである。
(iii)'CoAND If 0100≠0000, then yo<yB.

(iv)’前記三条件(i)゛、(ii)’及び(ii
i ) ’以外ならば、yTくyoである。
(iv) 'Above three conditions (i)', (ii)' and (ii)
i) If it is other than ', yTkuyo.

前記四条性(i)゛、(ii)’、(iii ) ’及
び(iv)’の各条件において、対象となる直線(例え
ば条件(i)゛の場合はx=x、、)と直線(L)との
交点及び、その交点の符号を求めて新たに(Xo、yo
)及びC8とする。新たな点(xo、yo)は次のよう
にして計算される。
In each of the four conditions (i), (ii)', (iii)' and (iv)', the target straight line (for example, x=x in the case of condition (i)) and the straight line ( Find the intersection point with L) and the sign of that intersection point and newly calculate (Xo, yo
) and C8. The new point (xo, yo) is calculated as follows.

(i)”′前記条件(i)°の場合、 (xo、yo)=(xt、yo+(y+−yo)*(X
L −xo)/(x+−Xo))(ii)’”前記条件
(ii)’の場合、(xo、Vo);(xi、yo+(
y+−yo)* (xll −xo)/(X+−xo)
)(iii ) ”前記条件(iii ) ’の場合、
(xo、yo)−(χo+(x+−xo) * (ye
 −yo)/(y+−yo)+yg )(iv ) l
 +前記条件(iv)″の場合、(xo、 yo)−(
xo+ (に+−Xo) * (VT −yo)/(y
+−yo)+yt )以上の結果より得られた直線(L
)の新たな両端点(xo、yo)及び(X+、y+)と
その符号C0及びC1を基にして、前記二条性(i)及
び(ii)の検査からの処理を再び繰り返せば、4回の
乗算及び除算と数回の加減算及び比較演算だけで対象と
している直線のクリップ処理を行うことができる。
(i)'''In the case of the above condition (i)°, (xo, yo)=(xt, yo+(y+-yo)*(X
L -xo)/(x+-Xo))(ii)''In the case of the above condition (ii)', (xo, Vo); (xi, yo+(
y+-yo)* (xll-xo)/(X+-xo)
) (iii) In the case of ``the above condition (iii)',
(xo, yo)−(χo+(x+−xo)*(ye
-yo)/(y+-yo)+yg)(iv)l
+ In the case of the above condition (iv)'', (xo, yo) - (
xo+ (ni+-Xo) * (VT -yo)/(y
+-yo)+yt) The straight line (L
) and the new endpoints (xo, yo) and (X+, y+) of The target straight line can be clipped only by multiplication and division, and several additions, subtractions, and comparisons.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

この直線のクリッピング方式を利用した直線のピック方
式を考えた場合、前記二条性(i)及び(ii )のい
ずれかに該当する直線に対しては、対象としている直線
がピックされるのか、されないのかを容易に判定するこ
とができる。しかし、前記二条性(i)及び(ii)の
いずれにも該当しない直線に対しては、1回の交点計算
に少なくとも1回の乗算及び除算と数回の加減算が必要
である。
When considering a straight line picking method using this straight line clipping method, for a straight line that falls under either of the two-line properties (i) or (ii) above, the target straight line may or may not be picked. It can be easily determined whether However, for a straight line that does not fall under either of the above-mentioned two-line properties (i) or (ii), at least one multiplication and division and several additions and subtractions are required for one intersection calculation.

最悪の場合には、4回もの乗算及び除算が必要となる。In the worst case, as many as four multiplications and divisions are required.

特に、除算演算は膨大な計算時間を必要とし、また一般
に、除算結果は無限小数となり有限桁では収まらず精度
の保証ができない。
In particular, division operations require an enormous amount of calculation time, and generally, the result of division is an infinite decimal number, which cannot be accommodated within a finite number of digits, and accuracy cannot be guaranteed.

この発明は係る問題点を解決するためになされたもので
、ピック予備検査部だけでは容易に判定できない直線に
対して除算演算を不要とすることによりピック処理から
除算操作を除去するとともに、演算回数を減少させるこ
とにより、高速でかつ精度の高い直線のピック方式を得
ることを目的とする。
This invention has been made to solve this problem, and eliminates the division operation from the pick process by eliminating the need for division operations for straight lines that cannot be easily determined by the pick pre-inspection section alone. The purpose is to obtain a high-speed and highly accurate straight line picking method by reducing the .

〔問題点を解決するための手段〕[Means for solving problems]

この発明に係る直線のピック方式におけるピック詳細検
査部は、ピック枠の4隅点を求める4隅点生成手段と、
上記4隅点がピック対象となる直線の両端点を通る直線
によって二分されるか否かを判別する判別式を生成する
判別式生成手段と、上記により得られた4隅点と判別式
を用いて最終的なピックの判定を行う最終判定手段とを
備えて成るものである。
The pick detail inspection unit in the straight line pick method according to the present invention includes four corner point generation means for calculating four corner points of the pick frame;
A discriminant generating means for generating a discriminant for determining whether or not the four corner points are bisected by a straight line passing through both end points of the straight line to be picked; and final determination means for making a final pick determination.

〔作用〕[Effect]

この発明におけるピック詳細検査部は、従来方式がピッ
ク予備検査部同様、ピック枠の4直線を基準に判定を行
うので交点計算が欠かせず除算演算を必要としたのに対
して、ピック対象となる直線を基準にし、4隅点生成手
段により得られたピック枠の4隅点と判別式生成手段に
より得られた判別式を用いて最終判別手段で判別するの
で、交点計算、すなわち除算演算が不要となるとともに
、演算回数が減少する。
The pick detail inspection section of this invention, like the pick preliminary inspection section, makes judgments based on the four straight lines of the pick frame in the conventional method, so intersection calculations are essential and division operations are required. The final discriminator uses the four corner points of the pick frame obtained by the four corner point generating means and the discriminant obtained by the discriminant generating means to make a discrimination using the straight line as a reference, so the intersection point calculation, that is, the division operation is performed. This is not necessary and the number of calculations is reduced.

〔実施例〕〔Example〕

以下、この発明の実施例を図について説明する。 Embodiments of the present invention will be described below with reference to the drawings.

第1図はこの発明の一実施例を示したもので、図におい
て、100は計算によるピック処理で必要な入力データ
部、110はこの入力データ部100から入力されたデ
ータを基にして大雑把なピックの検査を行うピック予備
検査部、120はこのピック予備検査部110だけでは
判定不可能な直線に対してさらに詳細な検査を行うピッ
ク詳細検査部、130はこのピック詳細検査部120及
び前記ピック予備検査部110によって得られる出力デ
ータ部である。101はピック対象となる直線の両端点
であり、102はピック枠の4直線である。111は前
記ピック対象となる直線の両端点101及び前記ビック
枠の4直線102を基にしてビック予備検査を行うため
に必要な符号を生成する符号生成手段、131はこの符
号生成手段111によって生成された符号であり、11
2はビック予備検査を行うために前記符号131を検定
する符号検定手段、132はこの符号検定手段112に
よって判定された直線、133は前記符号検定手段11
2だけでは判定不可能な直線である。121はこの判定
不可能な直線133に対してピック詳細検査を行うため
に必要なピック枠の4隅点を生成する4隅点生成手段、
134はこの4隅点生成手段121によって生成された
ピック枠の4隅点てあり、122はビック詳細検査を行
うために必要な判別式を生成する判別式生成手段、13
5はこの判別式生成手段122によって生成された判別
式であり、123はこの判別式135と前記ピック枠の
4隅点134を基にして最終的なビックの判定を行う最
終判定手段、136はこの最終判定手段123によって
傅られる最終的なビックの判定である。
FIG. 1 shows an embodiment of the present invention. In the figure, 100 is an input data section necessary for pick processing by calculation, and 110 is a rough calculation based on the data input from this input data section 100. A pick preliminary inspection section 120 inspects the pick, a pick detailed inspection section 120 performs a more detailed inspection on straight lines that cannot be determined by the pick preliminary inspection section 110 alone, and 130 indicates the pick detailed inspection section 120 and the pick. This is an output data section obtained by the preliminary inspection section 110. 101 are both end points of a straight line to be picked, and 102 are four straight lines of the pick frame. 111 is a code generating means for generating a code necessary for performing a big preliminary inspection based on both end points 101 of the straight line to be picked and the four straight lines 102 of the big frame, and 131 is a code generated by this code generating means 111. The code is 11
Reference numeral 2 denotes a sign testing means for testing the code 131 in order to perform a BIC preliminary test, 132 a straight line determined by the sign testing means 112, and 133 the sign testing means 11.
It is a straight line that cannot be determined with only 2. 121 is a four corner point generating means for generating four corner points of a pick frame necessary for performing a pick detailed inspection on this undeterminable straight line 133;
134 are the four corner points of the pick frame generated by the four corner point generating means 121; 122 is a discriminant generating means for generating a discriminant necessary for performing a big detailed inspection;
5 is a discriminant generated by this discriminant generating means 122, 123 is a final determining means for making a final big judgment based on this discriminant 135 and the four corner points 134 of the pick frame, and 136 is a final determining means This is the final big decision made by this final decision means 123.

次に動作について説明する。前記入力データ部100に
おけるデータ101,102及び前記ピック予備検査部
110における手段111゜112、さらに前記符号1
319判定された直線132、判定不可能な直線133
は従来技術と全く同一である。前記ピック予備検査部1
10だけでは判定不可能な直線133に対する前記ビッ
ク詳細検査部120における動作について説明する。
Next, the operation will be explained. Data 101 and 102 in the input data section 100, means 111 and 112 in the pick preliminary inspection section 110, and further the reference numeral 1
319 determined straight line 132, undetermined straight line 133
is exactly the same as the prior art. The pick preliminary inspection section 1
The operation of the big detail inspection unit 120 regarding the straight line 133, which cannot be determined using only the line 10, will be explained.

ピック詳細検査を行うために前記ピック枠の4直線10
2から次の4点を求める。
4 straight lines 10 of the pick frame for detailed pick inspection
Find the following four points from 2.

(XL、 yt )l(XR,VT )l(XL、 y
ll )l(XR,yt )−+21(2)式によって
与えられる4点がピック枠の4隅点134であり、この
動作を施す手段が4隅点生成手段121である。また、
前記判定不可能な直線133の両端点(Xo、yo)及
び(xl、yt)を通過する直線を考え、次の判別式を
導入する。
(XL, yt)l(XR,VT)l(XL, y
The four points given by the formula (2) are the four corner points 134 of the pick frame, and the means for performing this operation is the four corner point generating means 121. Also,
Considering a straight line passing through both end points (Xo, yo) and (xl, yt) of the undeterminable straight line 133, the following discriminant is introduced.

F(x、y)=(y−yo)*(xt−xo)−(yt
−yo)*(x−xo)  −−−(31(3)式によ
って与えられる判別式F (x、 y)が判別式135
であり、この動作を施す手段が判別式生成手段122で
ある。前記ピック枠の4隅点134((2)式の4点)
が前記判別式135((31式)によって二分されるか
どうかを最終判定手段123により判別することにより
、ビック処理を実行する。
F(x,y)=(y-yo)*(xt-xo)-(yt
-yo)*(x-xo) ---(31 The discriminant F (x, y) given by equation (3) is the discriminant 135
The means for performing this operation is the discriminant generating means 122. Four corner points 134 of the pick frame (four points in equation (2))
The final determination means 123 determines whether or not is divided into two by the discriminant 135 ((31)), thereby executing the big processing.

このためには、(3)式に(2)弐の各点を代入し、各
式における符号を調べればよい。(3)式に(2)式の
各点を代入すれば、次式が得られる。
To do this, it is sufficient to substitute each point in (2) 2 into equation (3) and check the sign in each equation. By substituting each point of equation (2) into equation (3), the following equation is obtained.

F(XL−yt )−(VT−yo)*(xl−xo)
−(yt−yo)傘(xt −xo)・−(4) FCx*、 y7)=(yt −yo)*(xt−xo
)−(yt−yo)* (XR−xo)−・−(5) F(XLI VB)−(Vs −Vo)”(xt−xo
)−(yt−Vo)” (XL −Xo)−・−(6) P(XRI yll)=(yn −yo)*(xt−x
o)−(yt−yo)* (XR−3[0)第2図は、
前記判別式135と前記ピック枠の4隅点134との関
係を示す判別式及び4隅点関係図である。第2図から、
次の事柄は明らかである。
F(XL-yt)-(VT-yo)*(xl-xo)
-(yt-yo) umbrella (xt-xo)・-(4) FCx*, y7)=(yt-yo)*(xt-xo
)-(yt-yo)* (XR-xo)--(5) F(XLI VB)-(Vs-Vo)"(xt-xo
)−(yt−Vo)” (XL −Xo)−・−(6) P(XRI yll)=(yn −yo)*(xt−x
o)-(yt-yo)* (XR-3[0) Figure 2 is
It is a discriminant and four corner point relationship diagram showing the relationship between the discriminant 135 and the four corner points 134 of the pick frame. From Figure 2,
The following is clear:

(1)(41〜(71式のうち、一つでも零となれば直
線はビックされる。
(1) (41-(71) If even one of the formulas becomes zero, the straight line will be surprised.

(n)(41〜(7)式のうち、一つでも異符号の式が
あれば直線はピックされる。
(n) If at least one of the equations (41 to (7)) has an opposite sign, a straight line is picked.

(III)(41〜(7)式の全てが同符号であれば直
線はピックされない。
(III) If all of equations (41 to (7)) have the same sign, no straight line will be picked.

前記三条性(I)、(ff)及び(Ill)の条件判定
を行い、前記判定不可能な直線133に対して最終的な
ピックの判定を行えば、4回の乗算と数回の減算及び比
較演算によりピック処理を実行することができる。何故
なら、(4)〜(7)式には同一の項が二個ずつ含まれ
ているからである。
If the conditions of the three-stripe properties (I), (ff), and (Ill) are determined, and the final pick is determined for the undeterminable straight line 133, four multiplications, several subtractions, and Pick processing can be performed by comparison operations. This is because equations (4) to (7) each contain two identical terms.

以上述べた手法により、前記ピック詳細検査部120に
は除算演算が不要となり、高速でかつ精度の高い直線の
ピック方式を実現することができ、また、除算演算が不
要となることにより、直線のピック処理をハードウェア
化する場合、ハードウェアの構成が簡単になり、低価格
なものが得られる。
With the method described above, the pick detail inspection section 120 does not need a division operation, and can realize a high-speed and highly accurate straight line picking method. When the pick processing is implemented in hardware, the hardware configuration becomes simple and a product can be obtained at a low price.

しかし、一般に乗算は加減算及び比較演算に比べて計算
時間のかかる演算であるから、さらに乗算回数を減少さ
せる方法について考える。第3図は、前記最終判定手段
123における詳細な動作を表す最終判定流れ図であり
、301はピ・7り対象となる直線がX軸あるいはy軸
に平行な場合の判定を行う平行線判定部、302はピッ
ク対象となる直線がX軸、y軸いずれにも平行ではない
場合の判定を行う非平行線判定部である。前記判定不可
能な直線133の両端点(x 6. y o)及び(x
l、yt)に対して、次の事柄は明らかである。
However, since multiplication generally requires more calculation time than addition/subtraction and comparison operations, we will consider ways to further reduce the number of multiplications. FIG. 3 is a final judgment flowchart showing the detailed operation of the final judgment means 123, and 301 is a parallel line judgment unit that makes a judgment when the straight line to be cut is parallel to the X-axis or the y-axis. , 302 is a non-parallel line determining unit that determines when a straight line to be picked is not parallel to either the X axis or the y axis. Both end points (x 6. y o) and (x
l, yt), the following is clear.

(r)’xl =Xoならば、ピック対象となる直線は
y軸に平行な直線となり、xL≦xo≦xRが満足され
れば直線はピックされ、満足されなければ直線はピック
されない。
If (r)'xl = Xo, the straight line to be picked is a straight line parallel to the y-axis, and if xL≦xo≦xR is satisfied, the straight line is picked; otherwise, the straight line is not picked.

(II)’y+ −y。ならば、ピック対象となる直線
はX軸に平行な直線となり、yB≦y0≦yTが満足さ
れれば直線はピックされ、満足されなければ直線はピッ
クされない。
(II)'y+ -y. Then, the straight line to be picked is a straight line parallel to the X axis, and if yB≦y0≦yT is satisfied, the straight line is picked; otherwise, the straight line is not picked.

前記二条性(T)“及び(■)′の条件判定を行い、最
終的なピックの判定を行うブロックが平行線判定部30
1である。前記二条性(I)゛及び(旧。
The parallel line determining unit 30 is a block that performs conditional determination of the two-line property (T) and (■)′ and determines the final pick.
It is 1. Said two-row (I)'' and (old).

のいずれにも該当しない直線は、直線の傾きにより最終
的なピックの判定処理が異なるので、簡単に判定が行え
るように、次の処理を施しておく。
For straight lines that do not fall under any of the following, the final pick determination process differs depending on the slope of the straight line, so the following process is applied to make the determination easy.

(A)XO<XIならば、何もしない。(A) If XO<XI, do nothing.

(B)Xo <xlでなければ、(Xo、yo)と(X
I、Y+)を交換する。
(B) If Xo < xl, then (Xo, yo) and (X
I, Y+).

この処理の結果、常に次式が成立する。As a result of this processing, the following equation always holds.

X +   X o > 0            
−(81前記二条件(I)゛及び(旧゛のいずれにも該
当しない直線はある一定の零でない有限の傾きを持って
おり、この傾きの正負により、ピックの判定処理が異な
ってくる。傾きの正負は(XI   Xo)及び(yt
   yo)の符号を判定することにより求められるが
、(8)式より常に(XI   xo>o)が成立する
ので、(yt   yo)の正負によって傾きの正負が
決定される。
X + X o > 0
-(81) A straight line that does not meet either of the two conditions (I) and (old) has a certain non-zero finite slope, and the pick determination process differs depending on whether this slope is positive or negative. The sign of the slope is (XI Xo) and (yt
Although it is determined by determining the sign of (yt yo), since (XI xo>o) always holds true from equation (8), the sign of the slope is determined by the sign of (yt yo).

次に、正の傾きを持つ直線に対するピックの判定処理に
ついて説明するが、負の傾きを持つ直線に対するピック
の判定処理も同様にして行うことができる。第2図より
次の事柄は明らかである。
Next, a pick determination process for a straight line with a positive slope will be described, but a pick determination process for a straight line with a negative slope can be performed in the same manner. The following points are clear from Figure 2.

〔正の傾きを持つ直線に対して〕[For straight lines with positive slope]

(1)”  F (XL、yB ) =Oならば、直線
はピックされる。
(1) If F (XL, yB) = O, the straight line is picked.

(II)”  F (XL、 yn ) > OかつF
(xR,ytr)≦0ならば、直線はピックされる。
(II)” F (XL, yn) > O and F
If (xR, ytr)≦0, the straight line is picked.

(Iff)”  F (XL、 yll ) < 0か
つF(XL、yT)≧0ならば、直線はピックされる。
(Iff)” If F (XL, yll) < 0 and F (XL, yT) ≧0, the straight line is picked.

(IV)”前記三条性(I)”、(II)”及び(II
I)”以外の直線はピックされない。
(IV) “Said three-stage (I)”, (II)” and (II)
Straight lines other than "I)" are not picked.

前記四条件(1)” 、(■)゛、(■)°”及び(■
)゛の条件判定を行い、最終的なピックの判定を行うブ
ロックが非平行線判定部302である。
The above four conditions (1)”, (■)゛, (■)°” and (■
The non-parallel line determining unit 302 is a block that performs conditional determination of ) and final pick determination.

また、この非平行線判定部302及び前記平行線判定部
301における処理を実行し、前記判定不可能な直線1
33に対する最終的な判定を行う手段が最終判定手段1
23であり、この結果、最終的なピックの判定136が
得られる。
Further, the process in the non-parallel line determining unit 302 and the parallel line determining unit 301 is executed, and the undeterminable straight line 1
The means for making the final judgment regarding 33 is the final judgment means 1.
23, resulting in a final pick decision 136.

次に、乗算の回数について考える。前記平行線判定部3
01では乗算を必要としないから、前記非平行線判定部
302における正の傾きを持つ直線に対して、乗算を含
む演算を下記に示す。
Next, consider the number of multiplications. The parallel line determination section 3
01 does not require multiplication, so the calculation including multiplication for a straight line with a positive slope in the non-parallel line determining section 302 will be shown below.

(I)”’前記条件(■)゛の場合、 P(XL、 ytr )=(yi −yo)*(x+−
xo)−(yt−yo)* (xt −xo)(II)
”’前記条件(II)” の場合、F(にり、 31f
 )=(yll −Vo)*(にI−Xo)−(yt−
yo)* (xt −xo)−α〔 F(XR,ym )=(ym −yo)*(x+−xo
)−(yt−yo)* (xll −xo)−(rす (■)゛゛前記条件(III)” の場合、F(xt、
 yn )=(yll −yo)”(x+−xo)−(
yt−yo)* (xt −xo)−、(Jす F(XL、 yt )=(yt −yo)*(x+−x
o)−(yt−yo)* (xt −xo)−−tt3
ン (IV)”’前記条件(IV)” の場合、前記条件(
II)”’あるいは(III)”’と同じ。
(I)''In the case of the above condition (■)'', P(XL, ytr)=(yi -yo)*(x+-
xo)-(yt-yo)*(xt-xo)(II)
In the case of ``'condition (II)'', F(Niri, 31f
)=(yll −Vo)*(I−Xo)−(yt−
yo) * (xt - xo) - α [ F (XR, ym ) = (ym - yo) * (x+ - xo
)−(yt−yo)*(xll−xo)−(rsu(■)゛゛For the above condition (III),
yn )=(yll −yo)”(x+−xo)−(
yt-yo)*(xt-xo)-, (JF(XL, yt)=(yt-yo)*(x+-x
o)-(yt-yo)* (xt-xo)--tt3
In the case of “the above condition (IV)”, the above condition (IV)
II)'' or (III) Same as ''.

前記四条件(1)”’〜(IV)”’において、乗算の
回数は条件(1)”’の2回を除いて他は全て3回であ
る。何故なら、00)と(B)式あるいは(7Qと(I
3)式において同一の項が一つ含まれているからである
In the four conditions (1)'' to (IV)'', the number of multiplications is three in all cases except for the two in condition (1)''.This is because 00) and equation (B) Or (7Q and (I
This is because the equation 3) contains one identical term.

最後に、直線のピック処理全体に渡って必要な演算の量
についてまとめておく。前記ピック予備検査部110で
必要な演算の量は従来技術の方式と全く同一であり、数
回の減算及び比較演算だけである。一方、前記ピック詳
細検査部120で必要な演算の量は、高々3回の乗算と
数回の減算及び比較演算のみである。従来技術の方式で
は、前記ピック詳細検査部120において、少なくとも
1回の乗算及び除算を必要とし、最悪の場合には4回も
の乗算及び除算を必要としていたが、本方式では除算演
算が不要となる。また、直線のピック処理に必要な計算
時間についても、除算の計算時間を乗算の計算時間の約
2倍とし、ピック処理に必要な全計算時間が乗算及び除
算の計算時間にほぼ等しいとすれば、従来技術の方式で
は最低でも3回、平均7.5回、最悪の場合には12回
もの乗算に相当する計算時間を必要としていたのに対し
、本方式では高々3回の乗算に相当する計算時間だけで
直線のピック処理を行うことができる。
Finally, we will summarize the amount of calculations required throughout the straight line pick process. The amount of calculations required by the pick pre-inspection unit 110 is exactly the same as in the prior art, only a few subtraction and comparison operations. Meanwhile, the amount of calculations required by the pick detail inspection unit 120 is at most three multiplications, several subtractions, and comparison operations. In the conventional method, the pick detail inspection unit 120 requires at least one multiplication and division, and in the worst case, as many as four multiplications and divisions, but the present method eliminates the need for division operations. Become. Also, regarding the calculation time required for straight line pick processing, assuming that the calculation time for division is approximately twice the calculation time for multiplication, and the total calculation time required for pick processing is approximately equal to the calculation time for multiplication and division. , while the conventional method required calculation time equivalent to at least 3 multiplications, 7.5 times on average, and as many as 12 times in the worst case, the present method requires calculation time equivalent to at most 3 multiplications. Straight line pick processing can be performed using only calculation time.

(発明の効果〕 以上のように、この発明によれば、ピック詳細検査部は
、ピック枠の4隅点を求める4隅点生成手段と、上記4
隅点がピック対象となる直線の両端点を通る直線によっ
て部分されるか否かを判別する判別式を生成する判別式
生成手段と、上記により得られた4隅点と判別式を用い
て最終的なピックの判定を行う最終判定手段とを備えた
ことにより、従来技術ではピック詳細検査に必要であっ
た除算演算が不要となるとともに、演算回数を減少させ
ることができるので、高速でかつ精度の高い直線のピッ
ク処理を行うことができる。また、除算演算が不要とな
ることにより、直線のピック処理をハードウェア化する
場合、ハードウェアの構成が簡単になり、低価格なもの
が得られる効果がある。
(Effects of the Invention) As described above, according to the present invention, the pick detail inspection section includes the four corner point generation means for calculating the four corner points of the pick frame, and the four corner point generation means for calculating the four corner points of the pick frame.
A discriminant generation means that generates a discriminant for determining whether a corner point is parted by a straight line passing through both end points of the straight line to be picked, and a final By having a final judgment means for making a pick judgment, it is possible to eliminate the need for division operations, which were necessary in the conventional technology for detailed pick inspection, and to reduce the number of operations, resulting in high speed and accuracy. It is possible to pick high straight lines. Further, since the division operation is not required, when the straight line pick processing is implemented in hardware, the hardware configuration becomes simpler and the cost can be lowered.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はこの発明の一実施例を示す直線のピック手順図
、第2図は判別式とピック枠の4隅点との関係を示した
判別式及び4隅点関係図、第3図は他の実施例の最終判
定手段における詳細な動作を表す最終判定流れ図、第4
図は従来技術の方式を示したクリッピング流れ図、第5
図はクリンプ枠の4直線によって分割された9つの領域
における符号を示した符号一覧図である。 図において、100は入力データ部、101はピック対
象となる直線の両端点、102はピック枠の4直線、1
10はピック予備検査部、111は符号生成手段、11
2は符号検定手段、120ばピック詳細検査部、121
は4隅点生成手段、122は判別式生成手段、123は
最終判定手段、130は出力データ部、131は符号、
132は判定された直線、133は判定不可能な直線、
134はピック枠の4隅点、135は判別式、136は
最終的なピックの判定である。 なお、図中、同一符号は同一、又は相当部分を示す。 代理人  大  岩  増  m(ほか2名)=21− 手続補正書(自発) 1.事件の表示   特願昭61−289800号2、
発明の名称 直線のピック方式 3、補正をする者 代表者志岐守哉 5、補正の対象 特許請求の範囲、発明の詳細な説明、図面の欄。 6、補正の内容 (1)特許請求の範囲を別紙の通り補正する。 (2)明細書第12頁第11行目r (XR,YT)−
−−−−(21Jとあるのを[(X R、Y a ) 
−−−−−(2) Jと補正する。 (3)図面、第3図、第4図を別紙の通り補正する。 以上 2、特許請求の範囲 (1)ピック対象となる直線の両端点及びピック枠の4
直線を基にして、対象となる直線のピック予備検査を行
うピック予備検査部と、この予備検査部だけでは判定不
可能な直線に対して最終的なピック詳細検査を行うピッ
ク詳細検査部とを備え、直線のピック処理をSf算によ
り行うようにした直線のピック方式にあって、上記ピッ
ク詳細検査部は、ピック枠の4隅点を求める4隅点生成
手段と、。 上記4隅点がピック対象となる直線の両端点を通る直線
によって部分されるか否かを判別する判別式を生成する
判別式生成手段と、上記により得られた4隅点と判別式
を用いて最終的なピックの判定を行う最終判定手段とを
備えて成ることを特徴とする直線のピック方式。 +21最終判定手段は、4隅点の各点を判別式に代入し
、得られた各判別式の符号を調べることによりピックの
判定を行うことを特徴とする特許請求の範囲第1項記載
の直線のピック方式。 (3)最終判定手段は、ピック対象となる直線の傾きを
調べ、当該直線がビック枠の4直線に対応するX軸ある
いはy軸に平行な場合の判定を行う平行線判定部と、X
軸、y軸のいずれにも平行でない場合の判定を行う非王
竹錦l淀皿とから成ることを特徴とする特許請求の範囲
第1項記載の直線のピック方式。
Fig. 1 is a straight line picking procedure diagram showing an embodiment of the present invention, Fig. 2 is a discriminant and four corner point relationship diagram showing the relationship between the discriminant and the four corner points of the pick frame, and Fig. 3 is a diagram showing the relationship between the discriminant and the four corner points of the pick frame. Final judgment flowchart showing detailed operation in final judgment means of other embodiments, No. 4
Figure 5 is a clipping flowchart showing the method of the prior art.
The figure is a list of codes showing codes in nine areas divided by four straight lines of the crimp frame. In the figure, 100 is the input data section, 101 is both end points of the straight line to be picked, 102 is the 4 straight lines of the pick frame, 1
10 is a pick preliminary inspection section; 111 is a code generation means; 11
2 is a sign verification means, 120 is a pick detailed inspection unit, 121
are four corner point generation means, 122 is a discriminant generation means, 123 is a final judgment means, 130 is an output data section, 131 is a code,
132 is a determined straight line, 133 is a straight line that cannot be determined,
134 is the four corner points of the pick frame, 135 is a discriminant, and 136 is the final pick determination. In addition, in the figures, the same reference numerals indicate the same or equivalent parts. Agent Masu Oiwa M (and 2 others) = 21- Procedural amendment (voluntary) 1. Indication of the incident: Patent Application No. 61-289800 2,
Name of the invention Straight line pick method 3, Representative Moriya Shiki 5, Claims to be amended, Detailed description of the invention, Drawings column. 6. Contents of amendment (1) The scope of claims will be amended as shown in the attached sheet. (2) Specification page 12, line 11 r (XR, YT)-
-----(21J) [(X R, Y a )
−−−−−(2) Correct as J. (3) Correct the drawings, Figures 3 and 4 as shown in the attached sheet. Above 2, Claims (1) Both end points of the straight line to be picked and 4 of the pick frame
There is a pick preliminary inspection section that performs a pick preliminary inspection of the target straight line based on the straight line, and a pick detailed inspection section that performs a final pick detailed inspection on straight lines that cannot be determined by this preliminary inspection section alone. In the straight line pick method in which straight line pick processing is performed by Sf calculation, the pick detail inspection section includes four corner point generation means for determining four corner points of the pick frame. A discriminant generating means for generating a discriminant for determining whether or not the four corner points are parted by a straight line passing through both end points of the straight line to be picked; and final determination means for making a final pick determination. +21 The final determination means determines the pick by substituting each of the four corner points into a discriminant and checking the sign of each obtained discriminant. Straight pick method. (3) The final determination means includes a parallel line determination unit that examines the inclination of the straight line to be picked and determines if the straight line is parallel to the X axis or y axis corresponding to the four straight lines of the big frame;
2. The method for picking a straight line according to claim 1, further comprising a straight line pick plate that determines when the straight line is not parallel to either the axis or the y-axis.

Claims (3)

【特許請求の範囲】[Claims] (1)ピック対象となる直線の両端点及びピック枠の4
直線を基にして、対象となる直線のピック予備検査を行
うピック予備検査部と、この予備検査部だけでは判定不
可能な直線に対して最終的なピック詳細検査を行うピッ
ク詳細検査部とを備え、直線のピック処理を計算により
行うようにした直線のピック方式にあって、上記ピック
詳細検査部は、ピック枠の4隅点を求める4隅点生成手
段と、上記4隅点がピック対象となる直線の両端点を通
る直線によって二分されるか否かを判別する判別式を生
成する判別式生成手段と、上記により得られた4隅点と
判別式を用いて最終的なピックの判定を行う最終判定手
段とを備えて成ることを特徴とする直線のピック方式。
(1) Both end points of the straight line to be picked and 4 of the pick frame
There is a pick preliminary inspection section that performs a pick preliminary inspection of the target straight line based on the straight line, and a pick detailed inspection section that performs a final pick detailed inspection on straight lines that cannot be determined by this preliminary inspection section alone. In the straight line picking method in which the straight line picking process is performed by calculation, the pick detail inspection section includes a four corner point generation means for calculating four corner points of the pick frame, and a four corner point generation means for determining the four corner points to be picked. A discriminant generating means that generates a discriminant to determine whether the straight line is bisected by a straight line passing through both end points, and a final pick determination using the four corner points and the discriminant obtained above. A straight line picking method characterized by comprising: a final determination means for performing a straight line pick method.
(2)最終判定手段は、4隅点の各点を判別式に代入し
、得られた各判別式の符号を調べることによりピックの
判定を行うことを特徴とする特許請求の範囲第1項記載
の直線のピック方式。
(2) The final determination means determines the pick by substituting each of the four corner points into a discriminant and checking the sign of each obtained discriminant. Straight line pick method as described.
(3)最終判定手段は、ピック対象となる直線の傾きを
調べ、当該直線がピック枠の4直線に対応するx軸ある
いはy軸に平行な場合の判定を行う平行線判定部と、x
軸、y軸のいずれにも平行でない場合の判定を行う平行
線判定部とから成ることを特徴とする特許請求の範囲第
1項記載の直線のピック方式。
(3) The final determination means includes a parallel line determination unit that examines the inclination of the straight line to be picked and determines if the straight line is parallel to the x-axis or y-axis corresponding to the four straight lines of the pick frame;
2. The straight line picking method according to claim 1, further comprising a parallel line determining unit that determines if the straight line is not parallel to either the axis or the y axis.
JP28980086A 1986-12-05 1986-12-05 Picking system for straight line Pending JPS63143675A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28980086A JPS63143675A (en) 1986-12-05 1986-12-05 Picking system for straight line

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28980086A JPS63143675A (en) 1986-12-05 1986-12-05 Picking system for straight line

Publications (1)

Publication Number Publication Date
JPS63143675A true JPS63143675A (en) 1988-06-15

Family

ID=17747927

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28980086A Pending JPS63143675A (en) 1986-12-05 1986-12-05 Picking system for straight line

Country Status (1)

Country Link
JP (1) JPS63143675A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03242768A (en) * 1989-10-23 1991-10-29 Internatl Business Mach Corp <Ibm> Method and device for detecting selection of object

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03242768A (en) * 1989-10-23 1991-10-29 Internatl Business Mach Corp <Ibm> Method and device for detecting selection of object
JPH0827846B2 (en) * 1989-10-23 1996-03-21 インターナショナル・ビジネス・マシーンズ・コーポレーション Method and apparatus for detecting object selection

Similar Documents

Publication Publication Date Title
US5483258A (en) Pick correlation
Hershberger et al. An O (n log n) implementation of the Douglas-Peucker algorithm for line simplification
Toussaint et al. On a convex hull algorithm for polygons and its application to triangulation problems
Paschos Fast color texture recognition using chromaticity moments
Wolovich et al. The determination of implicit polynomial canonical curves
CN109144988A (en) A kind of detection method and device of abnormal data
US6681237B1 (en) Exponentiation circuit for graphics adapter
JPS63143675A (en) Picking system for straight line
Ramezanpour et al. Generalized module extension Banach algebras: Derivations and weak amenability
JPH04291685A (en) Clip tester circuit and clip testing method
Les Shape understanding: possible classes of shapes
Mestetskiy Skeleton representation based on compound bezier curves
US5491494A (en) Pick correlation
Yen et al. Parallel boxing in B-spline intersection
JP2684609B2 (en) Graphic display method in graphic data processing device
Blanning Sensitivity analysis in logic-based models
Firouzkouhi et al. New Fundamental Relation on Fuzzy Hypersemigroups
Asano et al. Systolic algorithms for computing the visibility polygon and triangulation of a polygonal region
Skala Algorithms for clipping quadratic arcs
Schafmeister Fast algorithm for generating cpk images on graphics workstations
Keong et al. A Novel approach for automatic machining feature recognition with edge blend feature
US6236411B1 (en) Method for classifying arrangements of graphical line segments
Jung et al. The phase space analysis of 3D vector fields
Ulmet Reflection curves—new computation and rendering techniques
JPH03176776A (en) Circle picking processing system