JPH0281179A - Picking circuit - Google Patents

Picking circuit

Info

Publication number
JPH0281179A
JPH0281179A JP63232989A JP23298988A JPH0281179A JP H0281179 A JPH0281179 A JP H0281179A JP 63232989 A JP63232989 A JP 63232989A JP 23298988 A JP23298988 A JP 23298988A JP H0281179 A JPH0281179 A JP H0281179A
Authority
JP
Japan
Prior art keywords
point
circuit
midpoint
line segment
code
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
JP63232989A
Other languages
Japanese (ja)
Inventor
Katsuhide Kurihara
勝秀 栗原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP63232989A priority Critical patent/JPH0281179A/en
Publication of JPH0281179A publication Critical patent/JPH0281179A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To shorten the processing time by providing a position deciding circuit for executing a pick decision by a position relation of areas in which a start point, a middle point and an end point of divided segments are positioned, respectively. CONSTITUTION:When coordinates of a start point and an end point of a segment to be picked are informed to a picking circuit 18, codes of the start point and the end point are calculated by a code calculating circuit 26. By using the code obtained by the circuit 26, where a designated segment is picked or not is decided by a code deciding circuit 24. When whether it is picked or not cannot be determined by a decision of the circuit 24, a position deciding circuit 25 executes a middle point division with regard to the segment which cannot be decided, and executes a pick decision by a position relation of areas in which the start point, the middle point and the end point of divided segments are positioned, respectively. In such a way, that which is picked clearly and that which is not picked can be decided on the way of a study, and the processing time is shortened.

Description

【発明の詳細な説明】 〔概要〕 例えばCADなどのような図形処理システムにより図形
を作成する操作過程で対話的に画面上の図形を選択し、
移動、拡大、縮小等の図形編集を行う場合のピッキング
回路に関し、 中点分割法を改善し、中点分割を交点が得られるまで繰
返さなくても途中の中点と、その中点に対応する始点と
終点の位置関係で、ピック領域と交差するか否かを判定
することによりピッキング処理を高速化し、CAD等の
図形処理における図形選択を効率化することを目的とし
、 始点、中点及び終点のそれぞれの位置する領域の位置関
係により、線分が前記範囲内を通るか否かを判定し、こ
れにより判定できない線分に関しては中点分割を行い、
分割された線分の始点、中点及び終点のそれぞれの位置
する領域の位置関係により、線分が前記範囲内を通るか
否かを判定する位置判定回路を備えるように構成する。
[Detailed Description of the Invention] [Summary] For example, in the operation process of creating a figure using a figure processing system such as CAD, a figure on the screen is interactively selected,
Regarding the picking circuit when editing shapes such as moving, enlarging, and reducing, the midpoint division method has been improved, and it is now possible to correspond to intermediate midpoints and their midpoints without having to repeat midpoint division until an intersection is obtained. The purpose is to speed up the picking process by determining whether or not the starting point and end point intersect with the pick area based on the positional relationship between the starting point and the end point, and to make the selection of shapes in CAD and other graphic processing more efficient. It is determined whether the line segment passes within the range according to the positional relationship of the regions in which each of the lines are located, and for line segments that cannot be determined based on this, midpoint division is performed,
The apparatus is configured to include a position determination circuit that determines whether or not the line segment passes within the range based on the positional relationship of the regions in which the starting point, middle point, and end point of the divided line segment are located.

〔産業上の利用分野〕[Industrial application field]

本発明は、例えばCADなどのような図形処理システム
により図形を作成する操作過程で対話的に画面上の図形
を選択し、移動、拡大、縮小等の図形編集を行う場合の
ピッキング(図形選択)回路に関する。
The present invention deals with picking (figure selection) when a figure on the screen is interactively selected during the operation process of creating a figure using a figure processing system such as CAD, and the figure is edited such as moving, enlarging, or reducing the figure. Regarding circuits.

図形処理システムは、−船釣に、第7図に示すように、
メモリ30.デイスプレィ31.キーボード32.入力
ペン33.タブレット34.プロセッサ35等から成り
、オペレータはCRT画面上の図形をボインティング・
デイバイス(例えばマウス、タブレット等)で画面上を
指定することにより、その座標を中心とするピンク領域
(中心から矩形領域のX軸及びY軸方向の大きさは予め
設定される)と交わる図形が選択される。即ち、上記の
ピンク領域と画面上の図形が交わるか否かを高速に判定
する回路が必要で、図形選択の速度は、特にオペレータ
の生産性に関係があり、利用分野からも一層の高速化が
要求される。
The graphic processing system is used for boat fishing, as shown in FIG.
Memory 30. Display 31. Keyboard 32. Input pen 33. Tablet 34. It consists of a processor 35, etc., and the operator points the figures on the CRT screen.
By specifying an area on the screen with a device (e.g., mouse, tablet, etc.), a figure that intersects with the pink area centered at the coordinates (the size of the rectangular area from the center in the X-axis and Y-axis directions is set in advance) will be created. selected. In other words, a circuit is required to quickly determine whether or not the above-mentioned pink area intersects with the figure on the screen.The speed of figure selection is particularly related to operator productivity, and further speeding up is required from the field of application. is required.

〔従来の技術〕[Conventional technology]

従来のピッキング回路は、大別すると、3通りになる。 Conventional picking circuits can be broadly classified into three types.

その第1は、線分を表示する場合に使用されるDDA回
路を拡張したものである。DDA回路は指定された2点
を結ぶ線上の点を発生させる回路で、CRT上に線分を
表示する際に使用される。
The first is an extension of the DDA circuit used to display line segments. The DDA circuit is a circuit that generates a point on a line connecting two specified points, and is used when displaying a line segment on a CRT.

ピッキングの場合は、この回路の出力をフレームバッフ
ァに書込む代りに、出力された点がピンク範囲内に含ま
れるか否かを判定する回路に導く。
In the case of picking, instead of writing the output of this circuit to the frame buffer, it is directed to a circuit that determines whether the output point is within the pink range.

この回路によると、線分上のすべての点についてピンク
範囲に含まれるか否かを判定しなければならない。また
表示する場合と同程度の処理時間を必要とする。
According to this circuit, it is necessary to determine whether all points on the line segment are included in the pink range. Furthermore, the processing time required is about the same as that for display.

その第2は、DDA回路の線分発生とは独立にクリップ
回路を採用するもので、最終的には線分とピック範囲が
交差するか否かを判定するためのピック範囲の境界線と
線分との交点を計算する。
The second method is to use a clipping circuit independently of line segment generation in the DDA circuit, which ultimately uses the boundary line of the pick range to determine whether the line segment intersects with the pick range. Calculate the intersection with the minute.

この回路は、線分の始点及び終点のピック範囲に対する
位置を判定することにより、線分上の点を発生しなくて
もピンク判定できるようにしたものである。ピック判定
は、下記の順序で行われる。
This circuit enables pink determination without generating points on the line segment by determining the positions of the starting point and end point of the line segment with respect to the pick range. Pick determination is performed in the following order.

(1)ピック範囲の範囲内外を第8図に示す9個の領域
に分割し、それぞれに4ビツトのコードを与える。
(1) Divide the outside and outside of the pick range into nine regions shown in FIG. 8, and give each a 4-bit code.

(2)入力された線分の始点及び終点が分割した9領域
のどこにあるか調べ、以下の処理を行う。
(2) Check where the starting point and ending point of the input line segment are in the nine divided areas, and perform the following processing.

(イ)始点及び終点のコードの論理積をとり、結果が0
000でなければ、線分はピック範囲外であるためピッ
クされない。
(b) Take the AND of the codes at the start point and end point, and the result is 0.
If it is not 000, the line segment is outside the pick range and will not be picked.

([I)始点又は終点のコードが0000であればコー
ドがooooO点はピック範囲内にあるので、ピックさ
れる。
([I) If the code of the start point or end point is 0000, the code ooooO point is within the pick range and is picked.

(ハ)上記2例以外の場合はピンク範囲と交差している
可能性があるため、線分とピンク範囲の境界線との交点
を求め、交点が存在すれば、ピックされる。
(c) In cases other than the above two cases, there is a possibility that the line segment intersects with the pink range, so the intersection between the line segment and the boundary line of the pink range is found, and if an intersection exists, it is picked.

この方法は、ピック範囲と線分との交点を計算するため
に除算器を必要とする。
This method requires a divider to calculate the intersection of the pick range and the line segment.

その第3は、その交点計算に中点分割法を使用するもの
で、上記第2の回路で(ハ)の部分を実現するには除算
器を必要とするが、これを除算器なしでも実現できるよ
うに中点分割法を利用した回路である。
The third method uses the midpoint division method to calculate the intersection point, and although a divider is required to achieve part (c) in the second circuit above, this can also be achieved without a divider. This is a circuit that uses the midpoint division method to make it possible.

中点分割法は、第9図に示すように、まず始点及び終点
の間を2等分してCIを求め、次にその点C1と始点と
の中点C3を求める・・・という中点分割を繰返すこと
により、ピック範囲の境界との交点を求めるもので、例
えば第9図では、C5が境界と交差していることが得ら
°れる。第2の回路で(イ)もしくは(ロ)以外の場合
、ピック範囲と交差している可能性があるため、線分を
中点で2本に分割し、それぞれの線分について(イ)〜
(ハ)の方法を行う。
As shown in Figure 9, the midpoint division method first divides the area between the starting point and the ending point into two to find the CI, and then finds the midpoint C3 between that point C1 and the starting point. By repeating the division, the point of intersection with the boundary of the pick range is found; for example, in FIG. 9, it is found that C5 intersects with the boundary. In cases other than (a) or (b) in the second circuit, there is a possibility that it intersects with the pick range, so divide the line segment into two at the midpoint, and for each line segment (a) ~
Perform method (c).

この中点分割法では、交点がもとまるまで中点分割を繰
返さなければならない。
In this midpoint division method, midpoint division must be repeated until an intersection is found.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上記各回路には、それぞれ難点がある。 Each of the above circuits has its own drawbacks.

第1の回路では、線分上のすべての点についてビック範
囲に含まれるか否かを判定しなければならない。また表
示する場合と同程度の処理時間を必要とする。
The first circuit must determine whether all points on the line segment are included in the big range. Furthermore, the processing time required is about the same as that for display.

第2の回路は、ビック範囲と線分の交点を計算するため
に除算器を必要とする。
The second circuit requires a divider to calculate the intersection of the big range and the line segment.

第3の中点分割法は、交点が得られるまで中点分割を繰
返さなければならない。
The third midpoint splitting method requires repeating midpoint splitting until an intersection point is obtained.

本発明は、このような課題に鑑みて創案されたもので、
中点分割法を改善し、中点分割を交点が得られるまで繰
返さなくても途中の中点と、その中点に対応する始点と
終点の位置関係で、ビック領域と交差するか否かを判定
することによりピッキング処理を高速化し、CADなど
の図形処理における図形選択を効率化したピッキング回
路を提供することを目的としている。
The present invention was created in view of these problems, and
By improving the midpoint division method, it is possible to determine whether or not the midpoint division intersects with a big area based on the positional relationship between the midpoint and the corresponding start and end points, without having to repeat the midpoint division until an intersection is obtained. It is an object of the present invention to provide a picking circuit that speeds up picking processing through determination and makes graphic selection in graphic processing such as CAD more efficient.

〔課題を解決するための手段〕[Means to solve the problem]

本発明における上記課題を解決するための手段は、所定
の範囲の周辺を複数の領域に区分し、線分の始点、終点
及び中点の位置する領域を算出するコード計算回路と、
始点と終点が位置する領域の位置関係により、線分が前
記範囲内を通るか否かを判定するコード判定回路とを備
え、図形を前記範囲内で選択するピッキング回路におい
て、始点、中点及び終点のそれぞれの位置する領域の位
置関係により、線分が前記範囲内を通るか否かを判定し
、これにより判定できない線分に関しては中点分割を行
い、分割された線分の始点、中点及び終点のそれぞれの
位置する領域の位置関係により、線分が前記範囲内を通
るか否かを判定する位置判定回路を備えたピッキング回
路とするものである。
Means for solving the above problems in the present invention includes a code calculation circuit that divides the periphery of a predetermined range into a plurality of regions and calculates the regions where the start point, end point, and midpoint of the line segment are located;
A picking circuit that selects a figure within the range and includes a code determination circuit that determines whether a line segment passes within the range based on the positional relationship between the areas where the start point and the end point are located. Based on the positional relationship of the regions where each end point is located, it is determined whether the line segment passes within the range, and for line segments that cannot be determined by this, midpoint division is performed, and the starting point, midpoint of the divided line segment is The picking circuit is provided with a position determination circuit that determines whether or not a line segment passes within the range based on the positional relationship between the regions in which the point and the end point are located.

〔作用〕[Effect]

本発明は、中点分割を利用したピッキング処理に際し、
始点と中点と終点のそれぞれの位置関係の判定を追加す
ることにより、不必要な中点分割を省略するものである
In the picking process using midpoint division, the present invention provides the following advantages:
By adding the determination of the positional relationship between the starting point, midpoint, and end point, unnecessary midpoint division is omitted.

第1図は、本発明の原理を示す説明図である。FIG. 1 is an explanatory diagram showing the principle of the present invention.

同図に示すように、指定された始点と終点を結ぶ線分が
ビック範囲と交差するか否かは、例えば、ピック範囲の
左端、右端、下端、上端の各辺の延長線により9個に分
割した領域に対する始点、中点、終点の位置関係で判定
可、能である。例えば■〜■のような位置関係にあれば
交差しないことがわかる。これに対して、■の位置関係
にある線分は交差することが明らかである。また■、■
のような位置関係にある線分は始点、中点、終点の位置
の情報だけでは交差するかしないかの判定はできないの
で、中点分割をする必要がある。
As shown in the figure, whether or not the line segment connecting the specified start point and end point intersects with the big range can be determined by, for example, nine extension lines of the left end, right end, bottom end, and top end of the pick range. It is possible to determine based on the positional relationship of the starting point, middle point, and ending point with respect to the divided area. For example, if the positions are as shown in ■ to ■, it can be seen that they do not intersect. On the other hand, it is clear that the line segments in the positional relationship of ■ intersect. Also■、■
It is not possible to determine whether line segments with a positional relationship like this intersect or not based only on the information on the positions of the starting point, midpoint, and ending point, so it is necessary to perform midpoint division.

位置判定回路は、例えば分割した領域の位置コードを第
1図の()内のようにしたとすると、上記判定を下記の
如く行う。
For example, assuming that the position code of the divided area is as shown in parentheses in FIG. 1, the position determination circuit performs the above determination as follows.

■)中点のコードを求める(始点、終点のコードは予め
求めである)。
(2) Find the code of the midpoint (the codes of the start point and end point are found in advance).

■)中点のコードが0000ならば、その中点はピック
範囲に含まれるのでビックされる(■の場合)。
■) If the code of the midpoint is 0000, the midpoint is included in the pick range, so it is jacked (in the case of ■).

■)始点と中点のコードの論理積が0000でない場合
、終点及び中点のコードの論理積により下記のいずれか
になる。
(2) If the logical product of the codes at the start point and the middle point is not 0000, one of the following results will be obtained by the logical product of the codes at the end point and the middle point.

終点と中点のコードの論理積も0000でなければ、線
分はビック範囲と交差する可能性がないのでビックされ
ない(■〜■の場合)。
If the logical product of the end point and midpoint codes is also not 0000, there is no possibility that the line segment will intersect with the big range, so it will not be surprised (in the case of ■ to ■).

終点と中点のコードの論理積がooooの場合、始点と
中点が同じ座標ならばピンクされず、同じ座標でなけれ
ば中点を新始点として新始点と終点の中点を求め、■)
から繰返す(■の場合)。
If the logical product of the end point and midpoint code is oooo, if the start point and midpoint have the same coordinates, it will not be pink, and if they do not, the midpoint will be used as the new starting point, and the midpoint between the new starting point and the end point will be calculated.■)
Repeat from (■).

■)始点と中点のコードの論理積が0000である場合
、終点と中点が同じ座標であればピンクされず、同じ座
標でなければ中点を新路点として始点と新路点の中点を
求め、■)から繰返す(■の場合)。
■) If the logical product of the start point and midpoint code is 0000, if the end point and midpoint have the same coordinates, they will not be pink, and if they do not have the same coordinates, the midpoint will be used as the new route point and will be between the start point and the new route point. Find the points and repeat from ■) (in case of ■).

このように、第1図の■〜■の線分のように、明らかに
ビック範囲内を通らない線分でも、従来では、例えば分
割ができなくなるまで中点分割を繰り返さなければ判定
できなかったのに対し、本発明では、始点、中点、終点
の位置関係により、より速くビック範囲内を通らない線
分が判定されるため、図形選択を効率化できる。
In this way, even line segments that obviously do not pass within the big range, such as the line segments ■ to ■ in Figure 1, could not be determined until the midpoint division was repeated until the division became impossible. In contrast, in the present invention, line segments that do not pass within the big range are determined more quickly based on the positional relationship of the start point, middle point, and end point, so that figure selection can be made more efficient.

〔実施例〕〔Example〕

以下、図面を参照して、本発明の実施例を詳細に説明す
る。
Embodiments of the present invention will be described in detail below with reference to the drawings.

第2図は、本発明を実施したデイスプレィ装置の一例を
示す概略ブロック図である。同図に示すように、通信制
御回路11はホストコンピュータ10から送られてきた
データをデイスプレィプロセッサ12に与え、デイスプ
レィプロセッサ12はホストコンピュータ10から与え
られたデータをデータRAM15に格納すると共に、座
標変換回路16に出力する。座標変換回路16は、前記
デイスプレィプロセッサ12から出力された表示データ
(x、y、2)に対して拡大や縮小や回転や平行移動を
行う。この座標変換回路16から出力されたデータはク
リップ回路17に与えられ、クリップ回路17は表示領
域からはみだした線分のクリップを行い、クリップした
結果を直線発生(DDA)回路19に与える。直線発生
回路19はクリップ回路17から出力された始点と終点
とを結ぶ線分上の点を発生してフレームメモリ20に書
き込む。フレームメモリ20に記憶された各ドツトデー
タはモニタインタフェース21に与えられ、モニタイン
タフェース21はフレームメモリ20上のドツトデータ
を読み出して、同期信号と共にCRT22に与える。従
って、CRT22には図形が表示される。
FIG. 2 is a schematic block diagram showing an example of a display device embodying the present invention. As shown in the figure, the communication control circuit 11 provides data sent from the host computer 10 to the display processor 12, and the display processor 12 stores the data provided from the host computer 10 in the data RAM 15. It is output to the coordinate conversion circuit 16. The coordinate conversion circuit 16 enlarges, reduces, rotates, and translates the display data (x, y, 2) output from the display processor 12. The data outputted from the coordinate conversion circuit 16 is given to a clipping circuit 17, which clips the line segment that protrudes from the display area, and gives the clipped result to a straight line generation (DDA) circuit 19. The straight line generating circuit 19 generates points on the line segment connecting the starting point and the ending point outputted from the clipping circuit 17 and writes them into the frame memory 20. Each dot data stored in the frame memory 20 is given to a monitor interface 21, and the monitor interface 21 reads out the dot data on the frame memory 20 and supplies it to the CRT 22 together with a synchronizing signal. Therefore, graphics are displayed on the CRT 22.

次に、本発明の制御の流れについて説明する。Next, the flow of control of the present invention will be explained.

マウス31又はタブレット32を操作すると座標値がデ
イスプレィプロセッサ12に通知される。
When the mouse 31 or tablet 32 is operated, the display processor 12 is notified of the coordinate values.

デイスプレィプロセッサ12は通知された座標値に対応
するCRT上の位置に第2図に示すようなカーソル23
を表示する。オペレータは1.マウス31又はタブレッ
ト32を操作して、選択したい図形の上にカーソル23
を移動し、マウス31もしくはタブレット32のボタン
が押下されたことがデイスプレィプロセッサ12に通知
されると、デイスプレィプロセッサ12はピ・ツク処理
を開始する。まず、状態をピックモードに遷移し、次に
データRAM15に格納されている図形データを順に座
標変換回路16に出力する。座標変換回路16は図形デ
ータを座標変換する。ビックモードの場合には、座標変
換したデータをクリップ回路17でなく、本発明のピッ
ク回路18に出力し、ビック回路18はその図形データ
がピック範囲と交差するか否かを判定して、結果をデイ
スプレィプロセッサ12に通知する。デイスプレィプロ
セッサ12は、判定結果が“ピックされた”場合はその
図形データ情報をホストコンピュータ10に通知する。
The display processor 12 places a cursor 23 as shown in FIG. 2 at a position on the CRT corresponding to the notified coordinate values.
Display. The operator is 1. Operate the mouse 31 or tablet 32 to place the cursor 23 on the shape you want to select.
When the display processor 12 is notified that the button on the mouse 31 or the tablet 32 has been pressed, the display processor 12 starts the pick process. First, the state is changed to pick mode, and then the graphic data stored in the data RAM 15 is sequentially output to the coordinate conversion circuit 16. A coordinate conversion circuit 16 converts the coordinates of graphic data. In the case of the big mode, the coordinate-transformed data is output not to the clip circuit 17 but to the pick circuit 18 of the present invention, and the big circuit 18 determines whether the graphic data intersects the pick range and outputs the result. to the display processor 12. If the determination result is "picked", the display processor 12 notifies the host computer 10 of the graphic data information.

判定結果が“ビックされた“でない場合は次の図形デー
タについてピンクされるか否かの判定を行う。
If the determination result is not "vicked", it is determined whether or not the next graphic data is to be pinked.

第3図は、第2図に示した前記ビック回路18の具体的
な構成図である。同図において、ビ・ツク回路18は、
コード判定回路242位置判定回路25、コード計算回
路26.及び始点座標、始点コード、終点座標、終点コ
ード、中点座標、中点コード、ピック範囲の値を登録す
る各レジスタで構成されている。
FIG. 3 is a specific configuration diagram of the big circuit 18 shown in FIG. 2. In the figure, the bit circuit 18 is
Code determination circuit 242, position determination circuit 25, code calculation circuit 26. and registers for registering values of start point coordinates, start point code, end point coordinates, end point code, midpoint coordinates, midpoint code, and pick range.

ピック回路18に対して、ピンク対象の線分の始点及び
終点の座標を通知すると、まず、コード計算回路26に
より始点及び終点のコードが演算される。第4図は、コ
ード計算回路26の処理を示すフローチャートである。
When the pick circuit 18 is notified of the coordinates of the starting point and ending point of the line segment to be pink, first, the code calculating circuit 26 calculates the codes of the starting point and ending point. FIG. 4 is a flowchart showing the processing of the code calculation circuit 26.

コードとは、図形が定義される空間を第8図に示す如く
、指定されたピック範囲の左端、右端。
The code refers to the space in which a figure is defined, as shown in Figure 8, at the left and right ends of the specified pick range.

上端、下端で9つの領域に分割した場合に、指定された
点が9つの領域のどこに位置するかを示したものである
。各領域は4ビツトの符号を持ち、その4ビツトは、各
ビットが1の時、次のような意味を持つ。
This shows where a designated point is located in the nine areas when the area is divided into nine areas at the top and bottom ends. Each area has a 4-bit code, and when each bit is 1, the 4 bits have the following meanings.

第1ビツト二頂点はピック領域の左端より左方にある。The two vertices of the first bit are to the left of the left edge of the pick area.

第2ビツト二頂点はピック領域の右端より右方にある。The second bit two vertices are to the right of the right edge of the pick area.

第3ビット:頂点はビック領域の下端より下方にある。Third bit: The vertex is below the bottom edge of the big area.

第4ビツト二頂点はビック領域の上端より上方にある。The two vertices of the fourth bit are above the top of the big area.

次に、コード計算回路26で得たコードを使用して、指
定された線分がピックされるかをコード判定回路24で
判定する。第5図は、この処理を示すフローチャートで
ある。
Next, using the code obtained by the code calculating circuit 26, the code determining circuit 24 determines whether the specified line segment is picked. FIG. 5 is a flowchart showing this process.

■始点と終点のコードの論理積をとり、その結果がoo
ooでなければ、線分はピンク範囲外であるため、ピッ
クされない。
■Take the logical AND of the codes at the start point and end point, and the result is oo
If it is not oo, the line segment is outside the pink range and will not be picked.

■始点又は終点のコードがooooであるとき、コード
がooooである点はピック範囲内にあるので、その線
分はピックされる。
(2) When the code of the start point or end point is oooo, the line segment is picked because the point whose code is oooo is within the pick range.

■上記■及び■の判定でピンクされるか否か決定できな
かった場合は、本発明の位置判定回路25によってピン
ク判定を行う。第6図は、その処理を示すフローチャー
トである。
(2) If it is not possible to determine whether or not the image should be pinked by the determinations (2) and (2) above, the position determination circuit 25 of the present invention performs a pink determination. FIG. 6 is a flowchart showing the processing.

l)中点の座標を計算し、コード計算回路によりコード
を求める。
l) Calculate the coordinates of the midpoint and obtain the code using a code calculation circuit.

中点の座標(x、y)は x−(始点のX十終点のX)÷2 y=(始点のy十終点のy)÷2 である。The coordinates (x, y) of the midpoint are x - (Start point X + End point X) ÷ 2 y = (y of the starting point + y of the ending point) ÷ 2 It is.

■)中点のコードがooooならば中点はピック範囲に
含まれるのでピックされる。
(2) If the code of the midpoint is oooo, the midpoint is included in the pick range and is picked.

■)始点及び中点のコードの論理積が0000でない場
合は3通りに分けられる。終点及び中点のコードの論理
積もooooでない場合は、線分はピック範囲と交差す
る可能性がないので、ピンクされない。コードの論理積
が0000の場合は、始点と中点が同じ座標ならピ・ツ
クされない。同じ座標でない場合は、中点を新しい始点
とし、始点と終点の中点を求め、1)から処理を繰返す
(2) If the logical product of the starting point and middle point codes is not 0000, it is divided into three ways. If the logical product of the end point and midpoint codes is also not oooo, there is no possibility that the line segment will intersect the pick range, so it will not be pinked. If the logical product of the codes is 0000, if the starting point and midpoint have the same coordinates, they will not be picked. If the coordinates are not the same, the midpoint is set as the new starting point, the midpoint between the starting point and the ending point is found, and the process is repeated from 1).

■)始点及び中点のコードの論理積が0000である場
合は2通りに分けられる。終点と中点とが同じ座標なら
ばピックされない。同じ座標でない場合は中点を新しい
終点とし、始点と終点の中点を求め、I)から処理を繰
返す。
(2) If the logical product of the starting point and middle point codes is 0000, it can be divided into two ways. If the end point and midpoint have the same coordinates, they will not be picked. If the coordinates are not the same, the midpoint is set as the new end point, the midpoint between the start point and the end point is found, and the process is repeated from I).

このようにして、コード判定回路24でピックされるか
否かを判定し、結果を通知する。上記の如く、本実施例
では、明らかにピンクされるもの及び明らかにピンクさ
れないものを検討の途中で判定して行くので、従来より
も処理時間が大幅に短縮されている。
In this way, the code determination circuit 24 determines whether or not it is picked, and notifies the result. As described above, in this embodiment, since it is determined during the examination what is obviously pink and what is clearly not pink, the processing time is significantly reduced compared to the conventional method.

〔発明の効果〕〔Effect of the invention〕

以上、説明したとおり、本発明によれば、中点分割法を
改善し、中点分割を交点が得られるまで繰返さなくても
途中の中点と、その中点に対応する始点と終点の位置関
係でピック領域と交差するか否かを判定することにより
ピッキング処理を高速化し、CAD等の図形処理におけ
る図形選択を効率化したピッキング回路を提供すること
ができる。
As explained above, according to the present invention, the midpoint division method is improved, and the midpoint division can be performed without repeating the midpoint division until an intersection point is obtained, and the positions of the starting point and the ending point corresponding to the midpoint. It is possible to provide a picking circuit that speeds up the picking process by determining whether or not it intersects the pick area based on the relationship, and makes graphic selection in graphic processing such as CAD more efficient.

26;コード計算回路。26; Code calculation circuit.

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

第1図は本発明の詳細な説明図、 第2〜第3図は本発明の一実施例の構成図、第4〜第6
図は実施例のフローチャート、第7図は一般的な図形処
理システムの構成図、第8図は一般的な判定処理の説明
図、 第9図は従来の中点分割法の説明図である。 18;ピック回路、 24;コード判定回路、 25;位置判定回路、 本発明の一実施例の構成図 第2図 本発明の一冥施伊jの構成図 第3図 第4図 コード判定舛理のフロー 第5図
Figure 1 is a detailed explanatory diagram of the present invention, Figures 2 and 3 are configuration diagrams of an embodiment of the present invention, and Figures 4 and 6 are
7 is a block diagram of a general graphic processing system, FIG. 8 is an explanatory diagram of a general determination process, and FIG. 9 is an explanatory diagram of the conventional midpoint division method. 18; pick circuit; 24; code determination circuit; 25; position determination circuit; Fig. 2 is a block diagram of an embodiment of the present invention; Fig. 3 is a block diagram of one embodiment of the present invention; Flow diagram 5

Claims (1)

【特許請求の範囲】 所定の範囲の周辺を複数の領域に区分し、線分の始点、
終点及び中点の位置する領域を算出するコード計算回路
(26)と、 始点と終点が位置する領域の位置関係により、線分が前
記範囲内を通るか否かを判定するコード判定回路(24
)とを備え、 図形を前記範囲内で選択するピッキング回路(18)に
おいて、 始点、中点及び終点のそれぞれの位置する領域の位置関
係により、線分が前記範囲内を通るか否かを判定し、こ
れにより判定できない線分に関しては中点分割を行い、
分割された線分の始点、中点及び終点のそれぞれの位置
する領域の位置関係により、線分が前記範囲内を通るか
否かを判定する位置判定回路(25)を備えたことを特
徴とするピッキング回路。
[Claims] The periphery of a predetermined range is divided into a plurality of regions, and the starting point of a line segment,
A code calculation circuit (26) that calculates the area where the end point and the middle point are located, and a code judgment circuit (24) that determines whether the line segment passes within the range based on the positional relationship of the area where the start point and the end point are located.
), the picking circuit (18) selects a figure within the range, and determines whether a line segment passes within the range based on the positional relationship of the regions in which the start point, middle point, and end point are located. Then, for line segments that cannot be determined by this, midpoint division is performed,
It is characterized by comprising a position determination circuit (25) that determines whether or not the line segment passes within the range based on the positional relationship of the regions in which the starting point, middle point, and end point of the divided line segment are located. picking circuit.
JP63232989A 1988-09-17 1988-09-17 Picking circuit Pending JPH0281179A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63232989A JPH0281179A (en) 1988-09-17 1988-09-17 Picking circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63232989A JPH0281179A (en) 1988-09-17 1988-09-17 Picking circuit

Publications (1)

Publication Number Publication Date
JPH0281179A true JPH0281179A (en) 1990-03-22

Family

ID=16948058

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63232989A Pending JPH0281179A (en) 1988-09-17 1988-09-17 Picking circuit

Country Status (1)

Country Link
JP (1) JPH0281179A (en)

Similar Documents

Publication Publication Date Title
JP3030206B2 (en) Method and apparatus for clipping a graphic polygon to a clipping area
EP0356103B1 (en) Scan-conversion process and processor
JPH11102446A (en) Graphics input device
JPH0281179A (en) Picking circuit
US5185596A (en) Electronic image modification
JP2947984B2 (en) Figure Drawing Method in Multiprocessor System
JP3305395B2 (en) Figure division device
JP2780496B2 (en) Clipping method for drawing equipment
JP4106719B2 (en) Image processing device
JP2536948B2 (en) Three-point specified circular arc detection method and device
JPH03209499A (en) Forming method for outline font and drawing device for the same
JP2904994B2 (en) Coordinate connection display method
JPH06215133A (en) Equipment and method for data processing
JPH0350686A (en) Graphic processing system
JPH10333819A (en) Method for inputting three-dimensional position
JPH1031760A (en) Graphic processor
JPH06250777A (en) Three-dimensional position indicating device
JPH02127786A (en) Two-dimensional expressing method for three-dimensional object
JPH01320583A (en) Plotting editor
JPS6169094A (en) Graphic processing method and apparatus
JPH06342474A (en) Area plotting system
JPH05324793A (en) Cursor display system for graphic processing system
JP2002042160A (en) Device and method for processing three-dimensional shape and storage medium storing program for performing this method
JPS6316387A (en) Clipping circuit
JPH05250455A (en) Graphic containment deciding system in graphic display device