JP2686758B2 - Graphic editing device - Google Patents

Graphic editing device

Info

Publication number
JP2686758B2
JP2686758B2 JP63014383A JP1438388A JP2686758B2 JP 2686758 B2 JP2686758 B2 JP 2686758B2 JP 63014383 A JP63014383 A JP 63014383A JP 1438388 A JP1438388 A JP 1438388A JP 2686758 B2 JP2686758 B2 JP 2686758B2
Authority
JP
Japan
Prior art keywords
node
graphic information
tree
graphic
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP63014383A
Other languages
Japanese (ja)
Other versions
JPH01191270A (en
Inventor
靖 森田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP63014383A priority Critical patent/JP2686758B2/en
Publication of JPH01191270A publication Critical patent/JPH01191270A/en
Application granted granted Critical
Publication of JP2686758B2 publication Critical patent/JP2686758B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、グラフィックス・システムにおける一般的
な図形編集装置に係り、特に大量の図形情報の拡大・縮
小表示出力や、各図形の拡大・縮小・移動・複写・削除
等を高速に行うのに好適な図形編集装置に関する。
The present invention relates to a general graphic editing device in a graphics system, and particularly to enlarging / reducing output of a large amount of graphic information and enlarging / expanding each graphic. The present invention relates to a graphic editing device suitable for high speed reduction / movement / copying / deletion.

(従来の技術) 各省庁・官庁等をはじめとして一般企業においても、
住宅地図等の大量の図形情報を、原図等に1つ1つ手書
きによって記入修正したり、保存したりする従来の方法
に代って、グラフィック・ディスプレイを用いて作画、
編集を行い、プロッタやLBP(レーザー・ビーム・プリ
ンタ)等を用いて出図する、図形編集用電子計算機シス
テムが導入されつつある。
(Prior art) In general companies, including ministries and agencies,
Instead of the conventional method of handwriting and saving a large amount of graphic information such as a residential map one by one on the original drawing, etc., drawing using a graphic display,
An electronic computer system for figure editing is being introduced, in which editing is performed and plotting is performed using a plotter or LBP (laser beam printer).

このようなグラフィックス・システム(図形編集方
式)を実現するために、グラフィック・ディスプレイを
はじめとする各ハードウェアは、図形情報が出力可能範
囲(例えば、グラフィック・ディスプレイであれば、1
画面分に相当するフレーム・バッファの容量)を超えた
場合には、出力図形情報をクリッピングしてその範囲内
に収まるように出力する機能を有している。
In order to realize such a graphics system (graphic editing method), each hardware including a graphic display has a range in which graphic information can be output (for example, in the case of a graphic display, 1).
When it exceeds the capacity of the frame buffer corresponding to the screen), it has a function of clipping the output graphic information and outputting it so as to fit within the range.

例えば、1管(画)面に描画した図形情報を拡大して
表示し、画面上で図形情報を編集するような場合、全図
形情報に対して拡大座標変換を行って出力したとして
も、1管面分にクリッピングして1画面上に正しく(誤
動作なしに)表示できるようになっている。
For example, when the graphic information drawn on one screen (screen) is enlarged and displayed and the graphic information is edited on the screen, even if the expanded coordinate conversion is performed on all the graphic information and output, It can be displayed correctly (without malfunction) on one screen by clipping to the screen area.

また、グラフィック・ディスプレイを用いて、会話形
式で図形情報の移動等の編集操作を実現するために、例
えば特開昭62−57078号公報に示すような方式を用い、
マウス等で指示された座標をもとに、全図形情報を検索
して編集対象の図形情報をピックする方式がある。
Further, in order to realize editing operations such as moving graphic information in a conversational manner using a graphic display, for example, a method as disclosed in Japanese Patent Laid-Open No. 62-57078 is used.
There is a method in which all graphic information is searched for based on the coordinates designated by a mouse or the like and the graphic information to be edited is picked.

ピックされた図形情報は、ブリンク等を施してディス
プレイに再表示され、各編集の可否を操作者に問い合わ
せる。例えば、移動の実行が操作者により指示された場
合は、、ブリンクされた図形を管面色(地色)等で上書
き描画することによって当該図形を消去する。
The picked-up graphic information is re-displayed on the display by blinking or the like, and the operator is inquired whether or not each edit is possible. For example, when the operator gives an instruction to execute the movement, the blinked figure is erased by overwriting the blinked figure with the tube surface color (ground color) or the like.

消去図形が管面色以外の図形色部分に重なっている場
合には、前記消去によって、その部分に歯抜け部を生ず
る。この歯抜け部を修復するためには、消去後に、例え
ば特開昭60−173677号公報に示されるように、消去され
た図形により管面色にて上書きされた図形情報を、全図
形情報より検索し、前記消去図形の一部を前記歯抜け部
のみに、当該部分の色で再表示する。このようにして、
歯抜けとなった表示画面を修復した後、ピックされた図
形を移動先に表示すれば、移動操作を完了する。
When the erased figure overlaps the figure color portion other than the tube surface color, the erasure causes a toothless portion in that portion. In order to repair this missing tooth portion, after erasing, as shown in, for example, Japanese Patent Application Laid-Open No. 60-173677, the figure information overwritten with the tube surface color by the erased figure is searched from all the figure information. Then, a part of the erased figure is re-displayed only in the tooth-missing part in the color of the part. In this way,
After repairing the display screen with missing teeth, if the picked figure is displayed at the movement destination, the movement operation is completed.

(発明が解決しようとする課題) しかしながら、かかる従来の図形編集方式において
は、次のような問題が発生する。
(Problems to be Solved by the Invention) However, in the conventional graphic editing method, the following problems occur.

1点目は、図形情報を表示、出図する際に発生するも
ので、大量の図形情報の一部しか表示、出図の対象とは
ならない場合でも、全図形情報を処理した後に出力しな
ければならないために、表示、出力時間が非常に遅くな
ることである。
The first point occurs when displaying and displaying graphic information. Even if only a part of a large amount of graphic information is displayed and it is not the target of drawing, all graphic information must be processed and then output. This means that the display and output time will be very slow because it must be done.

2点目は、図形情報を会話形式で編集する際に発生す
るもので、図形のピック、消去、移動後の修復のため
に、全図形情報を検索する必要があるために、検索時間
が長くなって応答性が悪く、誤操作の原因ともなること
である。
The second point occurs when interactively editing graphic information, and it takes a long time to search because all graphic information must be searched for repairing after picking, deleting, or moving the graphic. Therefore, the responsiveness is poor and it may cause an erroneous operation.

3点目は、上記の各問題点の故に、応答性を確保する
ためには、大量の図形情報を一元的に管理した、編集し
たりすることができないので、少量(適当量)の図形情
報ファイルに分割して、個々に編集せざるを得ず、この
ため、特に分割境界にまたがるような図形情報などは、
複数の図形情報ファイル等に格納されるため、該図形情
報を変更する場合は、複数の図形情報として編集を複数
回行うことが必要となることである。
The third point is that, because of the above problems, a large amount of graphic information cannot be centrally managed or edited in order to secure responsiveness, so a small amount (appropriate amount) of graphic information It has to be divided into files and edited individually. Therefore, especially for graphic information that spans division boundaries,
Since it is stored in a plurality of graphic information files or the like, it is necessary to edit the graphic information a plurality of times when changing the graphic information.

4点目も、3点目と同様の理由により、分割した図形
情報単位の表示、出力しかできないために、これらを統
合して連続した表示、出力を行うことは、非常に難し
い。
The fourth point can only display and output the divided graphic information units for the same reason as the third point, so it is very difficult to integrate and display and output them continuously.

このように、従来の図形編集方式では、大量の図形情
報を一括して取扱おうとすれば、膨大な時間がかかり、
応答性に劣るため、操作者に対しては極めて不便にな
る。
As described above, in the conventional graphic editing method, if a large amount of graphic information is handled at once, it takes a huge amount of time,
The poor responsiveness makes it extremely inconvenient for the operator.

一方、応答性を確保するために、図形情報を分割して
取扱えば、図形情報の編集時には極めて繁雑な作業を強
いられ、視認性の良い図形情報の出力ができないという
問題があった。
On the other hand, if the graphic information is divided and handled in order to secure responsiveness, there is a problem that an extremely complicated work is required at the time of editing the graphic information and the graphic information with good visibility cannot be output.

本発明の目的は、このような従来方式の問題点を解決
し、操作者に対する応答性と、情報の一元管理・編集及
び視認性の良い図形情報の出力などが全て満足される図
形編集方式を提供することにある。
An object of the present invention is to solve the above problems of the conventional method, and to provide a graphic editing method in which responsiveness to an operator, centralized management / editing of information, and output of graphic information with good visibility are all satisfied. To provide.

(課題を解決するための手段) 本発明では、膨大な図形情報を検索するために、図形
情報を囲み、それに外接する矩形座標(矩形の対角頂
点、例えば矩形の左下、右上頂点の座標)を保持し、そ
の座標を基準として各々優先順位を付けた複数のノード
(それぞれが1つの図形情報に対応)によって構成され
たバイナリ・ツリーを導入し、このバイナリ・ツリーを
もとに図形情報を検索する。
(Means for Solving the Problem) In the present invention, in order to retrieve a huge amount of graphic information, rectangular coordinates surrounding the graphic information and circumscribing the graphic information (diagonal vertices of the rectangle, for example, coordinates of lower left and upper right vertices of the rectangle) are used. Introduce a binary tree composed of a plurality of nodes (each corresponding to one piece of graphic information) that holds the Search for.

検索に際しては、全てのツリー・ノードを探索するの
ではなく、ノードの優先順に従った探索を行う。優先順
位を示すキーとしては、図形情報を囲む矩形座標のう
ち、x座標のペアー、またはy座標のペアーを用いる。
When searching, not all tree nodes are searched, but the search is performed according to the priority order of the nodes. As a key indicating the priority order, a pair of x coordinates or a pair of y coordinates among rectangular coordinates surrounding the graphic information is used.

さらに各ノードには、図形情報の存在する区間座標が
対応している。以下に、その構造を定義する。
Furthermore, each node corresponds to a section coordinate in which graphic information exists. The structure is defined below.

k1(n),k2(n): ノードnのx座標、またはy座標のペアー。k 1 (n), k 2 (n): x-coordinate or y-coordinate pair of node n.

ただし、k1(n)≦k2(n) α,β:ノードに対応した区間 a:ノード b:ノードaの左ノード c:ノードaの右ノード 上記のような定義の下では、本発明のバイナリ・ツリ
ーの各ノードは以下の条件を満足する。
However, k 1 (n) ≦ k 2 (n) α, β: section corresponding to the node a: node b: left node of node a c: right node of node a Each node of the binary tree of satisfies the following conditions.

1)ノードaに対して、 k1(a)≦k1(b),k1(a)≦k1(c) α≦k2(a)≦β 2)ノードbに対して、 α≦k2(b)≦(α+β)/2 3)ノードcに対し、 (α+β)/2<k2(c)≦β 上記の条件を、本ツリーの全てのノードに対して再帰
的に適用することにより、バイナリ・ツリーが構成でき
るものである。
1) For node a, k 1 (a) ≦ k 1 (b), k 1 (a) ≦ k 1 (c) α ≦ k 2 (a) ≦ β 2) For node b, α ≦ k 2 (b) ≦ (α + β) / 2 3) For node c, (α + β) / 2 <k 2 (c) ≦ β The above condition is recursively applied to all nodes of this tree. By doing so, a binary tree can be constructed.

本構造に従って、ノードの探索を行い、検索する必要
のないサブツリーをチェックすることにより、不要な検
索を行なわず、目的の図形情報を高速に確定し得るもの
である。
According to this structure, a node is searched and a subtree that does not need to be searched is checked, so that target graphic information can be determined at high speed without performing unnecessary search.

(作用) 図形情報の検索に際しては、前述のバイナリ・ツリー
構造を用い、不必要な情報を検索しないことにより、目
的の図形情報を高速にアクセスできる。
(Operation) When retrieving graphic information, the above-mentioned binary tree structure is used and unnecessary graphic information is not retrieved, so that desired graphic information can be accessed at high speed.

(実施例) 以下、本発明の1実施例を詳細に説明する。(Example) Hereinafter, one example of the present invention will be described in detail.

第1図は、本発明による図形情報の構成を示すもの
で、同図(A)はバイナリ・ツリーの1例を示す図、同
図(B)は前記バイナリ・ツリーで表わされる具体的な
図形情報群の1例を示す図である。第2図は、本発明を
実施するシステム構成例である。
FIG. 1 shows the structure of graphic information according to the present invention. FIG. 1A shows an example of a binary tree, and FIG. 1B shows a concrete graphic represented by the binary tree. It is a figure which shows an example of an information group. FIG. 2 is a system configuration example for implementing the present invention.

はじめに、本発明による会話形図形編集装置の概略構
成について、第2図を参照して述べる。
First, the schematic configuration of the interactive figure editing apparatus according to the present invention will be described with reference to FIG.

本発明の図形編集装置への図形情報の入力は、グラフ
ィック・ディスプレイ11やキーボード12等を使用して、
電子計算機13に格納された会話形式図形編集プログラム
を起動し、種々の情報の入力は、プログラムと会話しな
がら、マウス14,ライトペン15,デジタイザ16,キーボー
ド12等の各種入力機器(座標入力手段)を用いて行う。
20はバッチ型入力装置である。
Input of graphic information to the graphic editing apparatus of the present invention uses the graphic display 11, the keyboard 12, etc.
The interactive figure editing program stored in the electronic computer 13 is started, and various information is input while talking with the program, such as the mouse 14, the light pen 15, the digitizer 16 and the keyboard 12 (coordinate input means). ) Is used.
20 is a batch type input device.

起動されたプログラムは、操作者の指示にしたがった
図形情報(例えば、日立市大みか町1丁目の住宅地図)
を、グラフィック・ディスプレイ11に表示する。
The started program is the graphic information according to the operator's instruction (for example, a residential map of 1-chome Omika-cho, Hitachi City).
Is displayed on the graphic display 11.

表示の際は、2次記憶装置17に格納された全図形情報
(日立市全住宅地図)を読み出し、指示のあった図形情
報(大みか1丁目)を検索し、適当な座標変換(拡大・
縮小及びハードウェアの座標系への変換)を施し、グラ
フィック・ディスプレイ11に出力する。
At the time of display, all graphic information (Hitachi City all-house map) stored in the secondary storage device 17 is read out, and the graphic information (Omika 1-chome) that has been instructed is searched for and appropriate coordinate conversion (enlargement
Reduction and conversion to hardware coordinate system) and output to the graphic display 11.

操作者は目的の画面が表示されると、本プログラムと
会話形式で、各種の入力機器を用いて指示を与えること
により、図形情報の編集(新しい住宅の追加及び、取り
壊された住宅の削除等)を行う。
When the target screen is displayed, the operator can edit the graphic information (add a new house and delete a demolished house, etc.) by giving instructions using various input devices in an interactive manner with this program. )I do.

例えば、新たな線分を描画する場合には、マウス14を
用いて、グラフィック・ディスプレイ11上で、所望の始
点および終点をクリックすると、所望の直線が追加表示
される。また、既に表示されている線分の近傍をクリッ
クすることによって、その線分をピックし、前記線分を
削除したり、あるいは、さらに他の位置をクリックする
ことによって、その線分を移動したりする。
For example, when a new line segment is drawn, a desired straight line is additionally displayed by clicking the desired start point and end point on the graphic display 11 using the mouse 14. You can also click on a line segment that is already displayed to pick that line segment, delete the line segment, or click another position to move the line segment. Or

プログラムは、各編集操作に従って、図形をグラフィ
ック・ディスプレイ11に表示したり、図形情報の更新を
行なったりする。操作者より編集終了の指示があった場
合、プログラムは更新された図形情報を2次記憶装置17
に格納して停止する。
The program displays a graphic on the graphic display 11 and updates the graphic information according to each editing operation. When the operator gives an instruction to end editing, the program stores the updated graphic information in the secondary storage device 17.
Store in and stop.

また、2次記憶装置17に格納した情報の中から、操作
者の指示に従って、(例えば日立市大みか1丁目の住宅
地図)を、LBP18やプロッタ19に選択的に出力する機能
も有している。
It also has a function of selectively outputting (for example, a house map of Hitachi City Omika 1-chome) from the information stored in the secondary storage device 17 to the LBP 18 or the plotter 19 according to the instruction of the operator. .

続いて、本システムの図形情報の構成について述べ
る。
Next, the configuration of the graphic information of this system will be described.

第1図(A)は本発明によるバイナリ・ツリー(以
下、ツリーと略する)1の構造例を示し、図(B)はこ
のツリーで表わされる図形情報2の1例を図示したもの
である。
FIG. 1A shows an example of the structure of a binary tree (hereinafter abbreviated as a tree) 1 according to the present invention, and FIG. 1B shows an example of graphic information 2 represented by this tree. .

ここで、ツリーの各ノード3はそれぞれ、個々の図形
情報4に対応付けられている(ノード3に含まれる情報
については、後述する)。その対応関係は、各ノードの
左(または右)上に記された丸枠付数字5と、個々の図
形情報の左上に記された丸枠付数字6によって示されて
いる。
Here, each node 3 of the tree is associated with each piece of graphic information 4 (the information included in the node 3 will be described later). The correspondence is shown by a circled frame number 5 written on the left (or right) of each node and a circled frame number 6 written on the upper left of each graphic information.

ツリーの構造は、個々の図形情報に外接する矩形7の
1対角線の左下、右上のx座標(以下、x1(i),x
2(i):i=1,2,3…等と略する)と、各ノードに対応付
けられたx座標の区間8に従っている。なおここでは、
説明を簡単にするため、全図形情報の持つ座標空間は、
第1図(B)に示したように、[0,N]/[0,M]の整数
座標に正規化されているものとする。
The structure of the tree is such that the x-coordinates of the lower left and upper right of the one diagonal of the rectangle 7 circumscribing each figure information (hereinafter, x 1 (i), x
2 (i): abbreviated as i = 1,2,3, etc.), and the x coordinate section 8 associated with each node is followed. Here,
To simplify the explanation, the coordinate space of all figure information is
As shown in FIG. 1 (B), it is assumed that the coordinates are normalized to integer coordinates of [0, N] / [0, M].

ツリーのルート・ノード9は、区間[0,N]に右上座
標x2(i)が含まれている複数の図形情報(すなわち、
第1図(B)に示された各図形)の中で最小の左下座標
x1(i)を持つ図形情報(第1図の例では、折線図形)
が対応する。
The root node 9 of the tree has a plurality of pieces of graphic information in which the upper right coordinate x 2 (i) is included in the section [0, N] (that is,
Smallest lower left coordinate in each figure shown in Fig. 1 (B)
Graphic information with x 1 (i) (in the example of FIG. 1, a polygonal line graphic)
Corresponds.

ルート・ノード9の左ノード(バイナリ・ツリーで左
側へ分岐した子ノード)は、区間[0,N/2]にx2(j)
(ただしj≠iが含まれているものの中で、最小のx
1(j)(ただし、j≠i)を持つ図形情報(第1図の
例では、菱形図形)が対応し、また右ノード(バイナリ
・ツリーで右側へ分岐した子ノード)は、区間[N/2+
1,N]にx2(k)(ただしk≠i)が含まれている中で
最小のx1(k)(ただし、k≠i)を持つ図形情報(第
1図の例では、矩形図形)が対応する。
The left node of the root node 9 (child node branched to the left in the binary tree) is x 2 (j) in the interval [0, N / 2].
(However, the smallest x among those that include j ≠ i
1 (j) (where j ≠ i) has corresponding graphic information (diamond shape in the example of FIG. 1), and the right node (child node branched to the right in the binary tree) is the interval [N / 2 +
1, N] includes x 2 (k) (where k ≠ i), the figure information (the rectangle in the example of FIG. 1 has the smallest x 1 (k) (where k ≠ i). (Figure) corresponds.

以上の説明から分るように、本ツリー構造の一般的定
義はつぎのようになる。
As can be seen from the above description, the general definition of this tree structure is as follows.

(1)あるサブツリーのルート・ノードは、区間[α,
β]にx2(i)が含まれており、最小のx1(i)を持つ
図形情報が対応する。
(1) The root node of a subtree is the interval [α,
β] includes x 2 (i) and corresponds to the graphic information having the smallest x 1 (i).

(2)前記ルート・ノードの左ノードは、区間[α,
(α+β)/2]にx2(j)(j≠i)が含まれているも
のの中で、最小のx1(j)(j≠i)を持つ図形情報が
対応する。
(2) The left node of the root node is a section [α,
Among (α + β) / 2] including x 2 (j) (j ≠ i), the graphic information having the smallest x 1 (j) (j ≠ i) corresponds.

(3)その右ノードは、区間[(α+β)/2+1,β]に
x2(k)(k≠i)が含まれているものの中で、最小の
x1(k)(k≠i)を持つ図形情報が対応する。
(3) The right node is in the interval [(α + β) / 2 + 1, β]
x 2 (k) (k ≠ i) is included, the smallest
The graphic information having x 1 (k) (k ≠ i) corresponds.

上記の定義を全てのサブツリーが満足するように、第
1図(B)の全図形に順次繰り返し適用して構成したも
のが、第1図(A)のバイナリ・ツリーである。なお、
ルート・ノードを子ノードとして持つノード10は、ツリ
ー操作(例えば、第1図において、ルートノード9を削
除するような操作容易にするためのダミーノードであ
る。
The binary tree of FIG. 1 (A) is formed by sequentially and repeatedly applying the above definition to all the figures of FIG. 1 (B) so that all subtrees are satisfied. In addition,
A node 10 having a root node as a child node is a dummy node for facilitating a tree operation (for example, in FIG. 1, deleting the root node 9).

ツリーの各ノードは、第1図(A)にも示したよう
に、当該図形情報を保持するためのポインタと、当該図
形を囲んで外接する矩形の左上、右下の座標、及び図形
情報へのポインタ(例えば、メモリの先頭アドレス、デ
ータ長)、左または右の子ノードへのポインタ等を保持
している。また、出力結果として、図形が描画順序に依
存するような場合は、ノードを描画順に連結した双方向
のポインタ等をも保持することができる。
As shown in FIG. 1A, each node of the tree has a pointer for holding the figure information, upper left and lower right coordinates of a rectangle circumscribing the figure, and coordinates to the figure information. (For example, the start address of the memory, the data length), the pointer to the left or right child node, and the like are held. Further, as a result of output, when the figure depends on the drawing order, a bidirectional pointer or the like connecting the nodes in the drawing order can be held.

次に、本発明の全体的な動作を説明する前に、まず、
動作の中心となるバイナリ・ツリーを用いた図形情報の
検索、図形情報の追加、削除の手順につき、ツリートラ
バースとノード操作を重点にして説明する。なお、これ
らの操作手順を、第1図の具体的なバイナリ・ツリーに
適用する例については、後で説明する。
Next, before explaining the overall operation of the present invention, first,
A procedure for searching graphic information using a binary tree, which is the center of operation, and adding / deleting graphic information will be described with an emphasis on tree traverse and node operation. An example in which these operation procedures are applied to the specific binary tree in FIG. 1 will be described later.

まず、第4図に示すフローチャートを参照して、バイ
ナリ・ツリーの構造に従った図形情報の検索について述
べる。
First, referring to the flow chart shown in FIG. 4, the search for graphic information according to the structure of the binary tree will be described.

グラフィック・ディスプレイに表示すべき範囲を、第
13図に示したように、領域30[0,N]x[0,M]上(例え
ば、日立市全体の地図)の[X1,Y1]×[X2,Y2]の範囲
32(例えば、大みか1丁目のが含まれる範囲)とする。
即ち、表示しようとしている図形情報の全て、または一
部が[X1,Y1]×[X2,Y2]の範囲にあるもの(第13図に
おいて、符号34,36であらわされたもの)を、全図形情
報の中から検索するものとする。
The range to be displayed on the graphic display is
As shown in Fig. 13, the range of [X 1 , Y 1 ] × [X 2 , Y 2 ] on the area 30 [0, N] x [0, M] (for example, the map of the entire Hitachi city)
32 (for example, the range including Omika 1-chome).
That is, all or part of the graphic information to be displayed is in the range of [X 1 , Y 1 ] × [X 2 , Y 2 ] (indicated by reference numerals 34 and 36 in FIG. 13). ) Is searched from all the graphic information.

検索時のツリートラバース(探索)は、与えられた前
記座標X1,Y1,X2,Y2を基準とし、各図形情報を囲む矩形
領域の座標をこれと比較して行う。また、ツリートラバ
ースは、当該ツリーのルート・ノードより行なう。たど
ったノード(現在検索中のノード)をn(401)とし、
ノードに対応した区間[α,β]を[0,N]とする(40
2)。
The tree traverse (search) at the time of search is performed by using the given coordinates X 1 , Y 1 , X 2 , Y 2 as a reference and comparing the coordinates of a rectangular area surrounding each piece of graphic information with this. Also, tree traversal is performed from the root node of the tree. The traced node (the node currently being searched) is n (401),
The interval [α, β] corresponding to the node is set to [0, N] (40
2).

つぎに、検索中のノードnが空ノードであるか、換言
すれば、次にたどるべき子ノードを持っているか否かを
チェックする(403)。空ノードならば、410の判定を行
ない、空ノードでなければ404の判定を行なう。
Next, it is checked whether or not the node n under search is an empty node, in other words, whether or not it has a child node to be traced next (403). If it is an empty node, 410 is determined, and if it is not an empty node, 404 is determined.

ここで、探索対象ノードに対応した図形情報を囲む矩
形領域の左下および右上隅の座標を、第1図(B)のよ
うに、{x1(n),y1(n)},{x2(n),y2(n)}
とし、さらにx1(n)≦x2(n),y1(n)≦y2(n)
とする。
Here, the coordinates of the lower left and upper right corners of the rectangular area surrounding the graphic information corresponding to the search target node are {x 1 (n), y 1 (n)}, {x as shown in FIG. 1 (B). 2 (n), y 2 (n)}
And x 1 (n) ≦ x 2 (n), y 1 (n) ≦ y 2 (n)
And

また、ツリートラバースは、以下の説明から明らかな
ように、深さ優先で行なう。換言すれば、403の判定が
否定で、検索対象ノードに子ノードがある限りツリーを
下方へたどり、たどった順にノードおよび区間をスタッ
ク(後入れ先出し)方式で記憶する。
Further, as is apparent from the following description, tree traversal is performed with depth priority. In other words, the determination of 403 is negative, and as long as there are child nodes in the search target node, the tree is traced downward, and the nodes and sections are stored in a stack (last in, first out) method.

バイナリ・ツリーの構成から明らかなように、現在の
検索対象ノードの持つ矩形の左下x座標x1(n)が出力
範囲の右側(例えば、第13図の矩形38)であれば{X2
x1(n)}、当該ノード以下のサブツリーは、全て出力
範囲外なので、検索しない(404の前半の条件)。
As is clear from the configuration of the binary tree, if the lower left x coordinate x 1 (n) of the rectangle of the current search target node is on the right side of the output range (for example, rectangle 38 in FIG. 13), {X 2 <
Since x 1 (n)} and the subtrees under the node are all outside the output range, they are not searched (the first half condition of 404).

また、現在のノードに対応する区間[α,β]の終点
(β)が出力範囲の左側(β<X1)であれば、それ以下
のサブツリーは全て左側、すなわち範囲外となるので検
索しない(404の後半の条件)。
If the end point (β) of the section [α, β] corresponding to the current node is on the left side of the output range (β <X 1 ), all subtrees below it will be on the left side, that is, outside the range, and will not be searched. (Conditions in the latter half of 404).

前記の判定404で範囲外とされたノード以外のものに
ついては、そのノードの持つ矩形が出力範囲[X1,Y1
×[X2,Y2]に含まれるかどうかを判定する(405)。す
なわち、405の判定が不成立ならば範囲外であり、一
方、同判定が成立するノードは範囲内であるので、出力
の対象として保持する(406)。
For the nodes other than the nodes that are out of the range in the determination 404, the rectangle of the node is the output range [X 1 , Y 1 ]
It is determined whether it is included in × [X 2 , Y 2 ] (405). That is, if the determination of 405 is not satisfied, it is out of the range, while the node for which the determination is satisfied is within the range, and thus is held as an output target (406).

続いて、現在の検索対象ノードとその区間[α,β]
をスタック方式でプッシュ(入力)し(407)、[α,
β]の区間計算を行なって、その左のノードにトラバー
スし(408,409)、判定403へ戻る。
Next, the current search target node and its section [α, β]
Is pushed (input) by stack method (407), and [α,
[β] is calculated and the node to the left of the [β] is traversed (408, 409) and the process returns to the determination 403.

このとき、もし403の判定が成立し、ノードが無く空
ノードであると判定されれば、410でスタックが空か否
かを判定する。スタックが空でないと判定されたときは
(410)、スタックをポップし(411)、右のノードにト
ラバースし(412,413)、判定403へ戻り、404以降の判
定、操作を繰り返す。判定403の結果が肯定でノードが
無く(空ノードで)、しかも判定410の結果も肯定でス
タックも空であるならば、全ての所望ノードについての
検索が終了したことになるので、処理を停止する。
At this time, if the determination of 403 is established and it is determined that there is no node and the node is an empty node, it is determined at 410 whether the stack is empty. When it is determined that the stack is not empty (410), the stack is popped (411), the node is traversed to the right node (412, 413), the process returns to the determination 403, and the determination and operations after 404 are repeated. If the result of judgment 403 is affirmative and there are no nodes (empty node), and the result of judgment 410 is affirmative and the stack is empty, it means that the search for all the desired nodes is completed, so the processing is stopped. To do.

続いて、第5図に示すフローチャートを参照して、ツ
リー・ノードの生成、追加処理について述べる。n,α,
β,x,y等は前記検索処理の場合の仮定と同様である。ま
たノード生成動作をより容易に実現するために、ここで
はルート・ノードを左に持つダミーのノードより処理を
開始するものとする。
Next, with reference to the flowchart shown in FIG. 5, tree node generation and addition processing will be described. n, α,
β, x, y, etc. are the same as the assumption in the case of the search processing. In order to realize the node generation operation more easily, it is assumed here that processing is started from a dummy node having a root node on the left.

新しく挿入すべきノードをnewとし(501)、ツリーの
構造にしたがって各ノードをたどる。すなわち、Pnをダ
ミーノード(第1図の10)とし(502)、Pnの左ノード
をnにセットする(503)。inに「左」を示すフラグ値
をセットし(504)、区間(α,β)に(0,N)をセット
する(505)。
The node to be newly inserted is set to new (501), and each node is traced according to the tree structure. That is, Pn is a dummy node (10 in FIG. 1) (502), and the left node of Pn is set to n (503). A flag value indicating "left" is set in in (504), and (0, N) is set in the interval (α, β) (505).

つぎの判定506では、nが空ノードか否かをチェック
し、空ノードでなければ判定507を行なう。この判定507
において、現在の検索対象ノードの矩形の左下x座標x1
(n)が、挿入すべきノードの矩形の左下x座標x1(ne
w)よりも大きければ、挿入すべき位置は、現ノードの
位置であるので、現在のノードと挿入すべきノードの各
ポインタを付け替えることにより、両ノードを、交換し
(508,509)、現在のノードを挿入すべきノードとする
(510)。
In the next judgment 506, it is checked whether or not n is an empty node, and if not n, a judgment 507 is made. This decision 507
In, the lower left x coordinate x 1 of the rectangle of the current search target node
(N) is the lower left x coordinate x 1 (ne of the rectangle of the node to be inserted
If it is larger than w), the position to insert is the position of the current node. Therefore, by exchanging the pointers of the current node and the node to be inserted, both nodes are exchanged (508,509), and the current node is replaced. Is a node to be inserted (510).

更に、挿入すべきノードの矩形の右上x座標x2(ne
w)が[α,(α+β)/2]に含まれれば、左のサブツ
リーに挿入され(512,513〜515)、そうでなければ右の
サブツリーに挿入される(512,516〜518)。
Furthermore, the upper right x-coordinate of the rectangle of the node to be inserted x 2 (ne
If w) is included in [α, (α + β) / 2], it is inserted into the left subtree (512,513 to 515), otherwise it is inserted into the right subtree (512,516 to 518).

最後に、挿入すべきノードは、必ずツリーの葉として
生成される(519)ので、その左右の子ノードを空ノー
ドとして(520)処理を終了する。
Finally, since the node to be inserted is always generated as a leaf of the tree (519), the left and right child nodes are made empty nodes (520), and the process ends.

ツリー・ノード操作処理の他の例として、ノードの削
除処理について、第6図のフローチャートを参照して説
明する。n,α,β,x1,y1等は、前記仮定と同様である。
またダミーのノードより処理を開始することも、前述と
同様である(602〜605)。
As another example of the tree node operation process, a node deletion process will be described with reference to the flowchart of FIG. n, α, β, x 1 , y 1, etc. are the same as the above assumption.
In addition, starting processing from a dummy node is also the same as described above (602 to 605).

削除すべきノードを前述の検索処理によって検索、確
定し、これをdelとする(601)。delとされたノードは
本ツリーは、前に詳述した定義と手法に従って構成され
ているため、ノード生成時と同様の手法で、その構造に
従ってツリーをたどることにより(606〜614)、delの
位置(delの親ノードPn、左右区別dn)を探索すること
ができる。
The node to be deleted is searched and confirmed by the above-described search processing, and this is designated as del (601). Since this tree is constructed according to the definitions and methods detailed above, the nodes designated as del are traced according to the structure of the tree in the same way as when the nodes were created (606 to 614). The position (parent node Pn of del, left / right distinction dn) can be searched.

delが発見された(606)ならば、delをツリーより削
除する。すなわち、ツリーの構造を保つために、下記の
ようにして、delの子(左,右)ノードによりそのノー
ドを置き換える。
If del is found (606), delete it from the tree. That is, in order to maintain the structure of the tree, the node is replaced by the child (left, right) nodes of del as follows.

delの右ノードが無い(空ノード)か(616)、また
は、delの左ノードの矩形左下x座標が、右ノードの矩
形左下x座標よりも小さい場合(618)は、delの左ノー
ドで置き換える。この場合の置き換えは、delの親ノー
ドにdelの左ノードを接続(626)し、delの右ノードを
左ノードの右ノードとし(625,630)、delにdelの左ノ
ードのポインタを保持させること(629)によって行な
う。
If there is no right node of del (empty node) (616), or if the lower left rectangle x coordinate of the left node of del is smaller than the lower left rectangle x coordinate of the right node (618), replace it with the left node of del . The replacement in this case is to connect the left node of del to the parent node of del (626), make the right node of del the right node of the left node (625,630), and let del hold the pointer of the left node of del ( 629).

また、delの右ノードで置き換える場合(617,618)も
同様に行なう(619〜624)。
Also, when replacing with the right node of del (617, 618), it is similarly performed (619 to 624).

このようにして、削除すべきノードを葉に向って一段
一段置き換えてゆき(615)、葉ノードを削除したとこ
ろで(631)、この処理は終了する。
In this way, the node to be deleted is replaced step by step toward the leaf (615), and when the leaf node is deleted (631), this processing ends.

つぎに、第1図に示す図形情報をもとに、前述の各編
集操作、すなわち、図形情報の新規生成、追加及び削除
の各操作を通しての、ツリーの状態の経緯を具体的に述
べる。
Next, based on the graphic information shown in FIG. 1, the history of the state of the tree through each of the above-mentioned editing operations, that is, each operation of newly creating, adding and deleting graphic information will be specifically described.

まず、図形情報を新たに生成する場合についての例
を、第7図および第5図を参照して述べる。
First, an example of a case of newly generating graphic information will be described with reference to FIGS. 7 and 5.

新規に図形情報を生成する場合は、まず、ダミーのツ
リー・ノード10を生成しておく(701)。
When newly generating graphic information, a dummy tree node 10 is first generated (701).

その後、第1図の図形情報が操作者により入力(例
えば、マウス14等で多角形の各頂点をグラフィック・デ
ィスレイ上でクリックすることにより)されたと仮定す
ると、その図形情報より外接矩形座標{x1(2),y
1(2)},{x2(2),y2(2)}を求めて、新たなノ
ード3に格納する。
After that, assuming that the graphic information in FIG. 1 is input by the operator (for example, by clicking each vertex of the polygon on the graphic display with the mouse 14 or the like), the circumscribed rectangle coordinates {x 1 (2), y
1 (2)}, {x 2 (2), y 2 (2)} are obtained and stored in the new node 3.

この後、第5図に示すフローチャートに従い、格納し
たノードをnew(=のノード)とし(501)、Pnを第1
図のダミーノード10として(502)、ツリーの生成を行
なう(702)。
After that, according to the flowchart shown in FIG. 5, the stored node is set as new (= node) (501), and Pn is set as the first node.
As the dummy node 10 in the figure (502), a tree is generated (702).

この場合は、Pnを(ダミーノード)の左、右のノード
は存在せず、空ノードとなっているため、nには空ノー
ドがセットされ(503)、504〜506の処理後、直ちにノ
ード挿入処理、Pn(=ダミーノード)のin(=左)ノー
ドにnew(=のノード)をセットし(519)(703)、n
ewの左、右ノードを“空ノード”にセットする(520)
(704)を行なう。以上で、図形情報の新規生成を行
なう手順は終了する。
In this case, since Pn (dummy node) has no left and right nodes and is an empty node, an empty node is set in n (503), and immediately after processing 504 to 506, Insert processing, new (= node) is set to in (= left) node of Pn (= dummy node) (519) (703), n
Set left and right nodes of ew to "empty node" (520)
Perform (704). This is the end of the procedure for newly generating graphic information.

次に、前記状態より第1図に示した,,の図形
情報がこの順に入力され、図形情報を追加する場合につ
いて、各々第8,9,10図を参照して説明する。
Next, a case will be described with reference to FIGS. 8, 9 and 10 in which the graphic information of, shown in FIG. 1 is inputted in this order from the above state and the graphic information is added.

の図形情報が入力されて、外接矩形座標を生成した
後、新たなノードに格納する。この後、第5図に示すフ
ローチャートと第8図に示す経緯図に従い、を格納し
たノードをnewとし(501)、Pnを第1図のダミーノード
10として(502)、ツリーの生成を行なう(802)。
After the figure information is input and the circumscribed rectangle coordinates are generated, it is stored in a new node. Then, according to the flowchart shown in FIG. 5 and the history chart shown in FIG. 8, the node storing is set as new (501), and Pn is the dummy node shown in FIG.
As 10 (502), a tree is generated (802).

この場合は、Pnの左ノードにはルート・ノード(の
ノード)がセットされているため、nにはのノードが
セットされる(503)。504〜505の処理後、nすなわち
ノードは空ノードではない(506)ので、x1(new)
{=x1(3)}とx1(n){=x1(2)}とを比較する
(507)。
In this case, since the root node (node thereof) is set in the left node of Pn, the node of is set in n (503). After the processing of 504 to 505, n, that is, the node is not an empty node (506), so x 1 (new)
{= X 1 (3)} is compared with x 1 (n) {= x 1 (2)} (507).

x1(new)<x1(n)ではないので、Pnにn(=の
ノード)をセットし(511)、その後x2(new)と(α+
β)/2(=N/2)を比較する(512)。x2(new)≦(α
+β)/2であるので、nの左のノード(空ノード)をn
とし(513)、[α,β]に[α,(α+β)/2](=
[0,N/2])とセットして(514)、inに左を示すフラグ
値をセット(515)する(803)。
Since x 1 (new) <x 1 (n) is not established, n (= node) is set to Pn (511), and then x 2 (new) and (α +)
β) / 2 (= N / 2) is compared (512). x 2 (new) ≤ (α
+ Β) / 2, so the node to the left of n (empty node) is n
(513), and [α, (α + β) / 2] (=
[0, N / 2]) (514), and a flag value indicating left is set (515) in (803).

続いて、nには空ノードがセットされていることが判
る(506)ので、ノード挿入処理(519,520)を行なう
(804,805)。
Then, since it is found that an empty node is set in n (506), node insertion processing (519,520) is performed (804,805).

ノード挿入後は、描画順を保持するため、を格納し
たノードに、のノード・ポインタ(の次にが描画
されていることを示す。)をセットし、一方、を格納
したノードには、のノード・ポインタ(の前にが
描画されていることを示す。)をセットする(806)。
After the node is inserted, in order to maintain the drawing order, set the node pointer of (to indicate that the next is drawn) to the node that stores, and the node that stores to A node pointer (indicating that is drawn before) is set (806).

これにより、図形情報を描画順に表示することが可能
となり、図形情報が重なるような位置に入力され、描画
されても、入力した通りに表示することが可能となる。
例えば、赤色に塗りつぶした長方形の上に、白色で文字
A,B,C等と描画し、これらの文字を強調する等のことが
可能になる。
As a result, the graphic information can be displayed in the drawing order, and even if the graphic information is input and drawn in such a position as to overlap, it can be displayed as input.
For example, on a rectangle filled in red, white letters
It is possible to draw A, B, C, etc. to emphasize these characters.

続いて、の図形情報を入力した場合のノードの挿入
は、を入力した場合と同様に、第5図に示すフローチ
ャートと第9図に示す経緯図に従って行なわれる。
Then, the insertion of the node when the graphic information of is input is performed according to the flowchart shown in FIG. 5 and the history chart shown in FIG. 9 as in the case of inputting.

すなわち、のノードをnewとして(501)、ダミーの
ノードによりツリー生成を開始する(502〜505)(901,
902)。nはのノードであり、判定506は不成立である
ので、x1(new){=x1(5)}とx1(n){=x
1(2)}とを比較する(507)。x1(new)<x1(n)
ではないので、Pnにnをセットし(511),x2(new)
{=x2(5)}と(α+β)/2(=N/2)を比較する(5
12)。
That is, the node of is set as new (501), and tree generation is started by dummy nodes (502 to 505) (901,
902). Since n is a node of and the decision 506 is not established, x 1 (new) {= x 1 (5)} and x 1 (n) {= x
1 (2)} is compared (507). x 1 (new) <x 1 (n)
Is not so set n to Pn (511), x 2 (new)
Compare {= x 2 (5)} with (α + β) / 2 (= N / 2) (5
12).

x2(new)>(α+β)/2、すなわち前記判定512は否
定であるので、nの右のノード(空ノード)にnをセッ
トし(516)、[α,β]に[(α+β)/2+1,β]
(=[N/2+1,N]とセットして(517)、inに右を示す
フラグ値をセット(518)する(903)。
x 2 (new)> (α + β) / 2, that is, the determination 512 is negative, so n is set to the node to the right of n (empty node) (516), and [α, β] is set to [(α + β) / 2 + 1, β]
(= [N / 2 + 1, N] is set (517), and the flag value indicating the right is set to in (518) (903).

続いて、nには空ノードがセットされていることが判
る(506)ので、ノード挿入処理(519,520)を行なう
(904,905)。ノード挿入後は、描画順保持のためのポ
インタを生成する。
Subsequently, since it is found that an empty node is set in n (506), node insertion processing (519,520) is performed (904,905). After inserting the node, a pointer for holding the drawing order is generated.

即ちのノードに、のノード・ポインタを格納す
る。その結果、第9図に906で示したように、には、
の前の図形情報を示すのノード・ポインタと、の
次の図形情報を示すのノード・ポインタの2つが保持
される。また、のノードには、のノード・ポインタ
をセットする(906)。
That is, the node pointer of is stored in the node of. As a result, as shown at 906 in FIG.
Two node pointers indicating the previous graphic information of and the node pointer indicating the next graphic information are held. Further, the node pointer of is set to the node of (906).

の図形情報に対するノードの挿入は、前述した図形
情報,の場合と同様に、第5図に示すフローチャー
トと第10図に示す経緯図に従って行なわれる。
The insertion of the node into the graphic information is performed according to the flow chart shown in FIG. 5 and the history chart shown in FIG. 10, as in the case of the graphic information described above.

のノードをnewとして(501)、ダミーのノードより
ツリー生成を開始する(502〜505)(1001,1002)。こ
こで、nはのノードであるから空ノードではなく(50
6)、x1(new){=x1(1)}<x1(n){=x
1(2)}ので(507)、newの左、右ノードに各々nの
左ノード(のノード)、右ノード(のノード)をセ
ットする(508)(1003)。
The node of is set as new (501), and tree generation is started from dummy nodes (502 to 505) (1001, 1002). Here, since n is a node of (50
6), x 1 (new) {= x 1 (1)} <x 1 (n) {= x
Since 1 (2)} (507), new left and right nodes are set to n left node (node) and right node (node) (508) (1003).

この段階では、newの左ノードはのノード、右ノー
ドには、のノードがセットされている。
At this stage, the left node of new is set to, and the right node is set to.

次に、Pn(=ダミーノード)のin(=左)ノードにne
w(=のノード)をセットする(509)(1004)。そし
て、nとnewとを交換する(510)(1005)。この場合、
nはのノードとなり、newはのノードとなる。
Next, ne in the in (= left) node of Pn (= dummy node)
w (= node) is set (509) (1004). Then, n and new are exchanged (510) (1005). in this case,
n becomes a node of and new becomes a node of.

つまり、ツリーの途中の位置にノードが挿入された場
合は、挿入すべき濃度を交換して、やのノード挿入
時と同時にツリーをたどる。
That is, when a node is inserted at a position in the middle of the tree, the density to be inserted is exchanged, and the tree is traced at the same time as the node insertion.

即ち、Pnにn(=のノード)をセットし、x2(ne
w){=x2(2)}≦(α+β)/2(=N/2)であるので
(512)、nにnの左ノード(のノード)、[α,
β]に[α,(α+β)/2](=[0,N/2]、inに左を
示すフラグ値をセットする(513〜515)(1006)。
That is, n (= node) is set in Pn, and x 2 (ne
Since w) {= x 2 (2)} ≦ (α + β) / 2 (= N / 2) (512), n is the left node (node of n), [α,
[[alpha], ([alpha] + [beta]) / 2] (= [0, N / 2]) is set to [beta]], and the flag value indicating the left is set to in (513 to 515) (1006).

更に、同様にして、n(=のノード)の判定を行な
う。(506)。x1(new){=x1(2)}<x1(n){=
x1(3)}であるから(507)、new(=のノード)の
左、右ノードにnの左、右ノード(ともに空ノード)を
各々セットし(508)(1007)、Pn(=のノード)のi
n(=左)ノードをnewとセットして(509)、nとnewの
交換をする(510)(1008)。ここでnew=のノード、
n=のノードとなっている。
Further, similarly, n (= node) is determined. (506). x 1 (new) {= x 1 (2)} <x 1 (n) {=
Since x 1 (3)} (507), the left and right nodes of new (= node) are set to n left and right nodes (both are empty nodes) (508) (1007), and Pn (= Node) i
The n (= left) node is set to new (509), and n and new are exchanged (510) (1008). Where new = node,
It is a node of n =.

続いて、Pnにn(=のノード)をセットする(51
1)(1009)。x2(new){=x2(3)}≦(α+β)/2
(=N/4)であるため(512)、nにnの左ノード(空ノ
ード)を、[α,β]に[α,(α+β)/2](=[0,
N/4])をinに左を示すフラグ値をセットする(513〜51
5)(1010)。
Then, n (= node) is set in Pn (51
1) (1009). x 2 (new) {= x 2 (3)} ≦ (α + β) / 2
Since (= N / 4) (512), n is the left node (empty node) of n, and [α, β] is [α, (α + β) / 2] (= [0,
N / 4]) to in and set the flag value indicating left (513 to 51)
5) (1010).

nは空ノードであるので(506)、Pn(=のノー
ド)のin(=左)ノードに、new(=のノード)をセ
ットし(519)(1011)、newの左右ノードを空ノードに
セットする(520)(1012)。
Since n is an empty node (506), new (= node) is set to the in (= left) node of Pn (= node) (519) (1011), and the left and right nodes of new are made empty nodes. Set (520) (1012).

上述のツリー生成処理後は、描画順ポインタを、,
の入力時と同様の手順で、のノードと、のノード
にセットする(1013)。
After the above tree generation processing,
Set the node of and the node of by the same procedure as when inputting (1013).

以上に詳細に述べたように、本発明では、ツリーの生
成時には、ノードごとに2分された枝を、1つのパスし
た通らない。即ち、1つのノード挿入のためには、ツリ
ーのルートより葉までの一本道しかたどらないため、た
どるノードの数は、全ノード数(すなわち、全図形情報
数)をKとした場合、ほぼlog2Kでよいことになる。
As described above in detail, in the present invention, when a tree is generated, a branch that is divided into two for each node does not pass through one path. That is, since one path from the root of the tree to the leaves is traced for inserting one node, the number of nodes to trace is almost log when the total number of nodes (that is, the total number of graphic information) is K. 2 K is good.

従って、全図形情報が100000程度の多数である場合で
も、17回程度(≒log2100000)のノード探索で操作を完
了することが可能となっている。
Therefore, even if the total figure information is a large number of about 100000, the operation can be completed by about 17 times (≈log 2 100000) of node searches.

具体例の最後として、図形情報を削除する場合につい
て、以下に説明する。
At the end of the specific example, the case of deleting the graphic information will be described below.

図形情報を削除する場合は、操作者が入力した座標
(例えば、マウス等で削除対象となる図形の近傍を、ク
リックした位置)をもとに、第4図で示されるツリー探
索処理を用いて、対象図形情報に対応したツリー・ノー
ドを確定し、第6図で示されるツリー・ノード削除処理
にて、ノードを削除し、更に図形情報も削除する。
When deleting graphic information, the tree search process shown in FIG. 4 is used based on the coordinates input by the operator (for example, the position where the vicinity of the graphic to be deleted is clicked with the mouse). , The tree node corresponding to the target graphic information is determined, the node is deleted in the tree node deletion processing shown in FIG. 6, and the graphic information is also deleted.

第1図に示されたツリー及び図形情報が記憶されてお
り、の図形情報のひし形の右下辺上の座標が、削除対
象として与えられた場合に、の図形情報を削除するま
での経緯についての例を、以下に述べる。
When the tree and the graphic information shown in FIG. 1 are stored, and the coordinates on the lower right side of the diamond of the graphic information are given as the deletion target, An example is given below.

まず入力された座標を(x,y)とし、N/4<x≦N/2で
あり、かつx1(4)<x<x2(4)であると仮定する。
更に、εをNに比較して十分小さい数として(例えば、
N=1024とすればε=8程度)、 X1=x−ε, Y1=y−ε, X2=x+ε, Y2=y+ε, とする。
First, it is assumed that the input coordinates are (x, y), N / 4 <x ≦ N / 2, and x 1 (4) <x <x 2 (4).
Furthermore, let ε be a sufficiently small number compared to N (for example,
If N = 1024, then ε = 8), and X 1 = x−ε, Y 1 = y−ε, X 2 = x + ε, Y 2 = y + ε.

これらの条件をもとに、まず第4図に示すフローチャ
ートに従い、第1図で示されるツリーをたどる例につい
て示す。更に、どのようなツリーがたどられるかの軌跡
を、第11図に示す。
Based on these conditions, an example of tracing the tree shown in FIG. 1 will be described first according to the flowchart shown in FIG. Furthermore, Fig. 11 shows the trajectory of what kind of tree can be traced.

第11図において、2重丸のノード,,は、図形
情報が削除対象か否かを検索したノード、1重丸のノー
ド,は、ツリートラバースの過程で探索したノード
である。また、三角枠のノード,は探索しないノー
ドである。また、1108は、ノードをたどる順を表す矢線
である。
In FIG. 11, a double circle node, is a node searched for whether or not the graphic information is to be deleted, and a single circle node is a node searched in the process of tree traverse. Also, the nodes in the triangle frame are the nodes that are not searched. Reference numeral 1108 is an arrow line indicating the order in which the nodes are traced.

まず、第4図のフローチャートにおいて、nをルート
・ノード(のノード)とし(401)、[α,β]を
[0,N]とする(402)。nはルート・ノードであって空
ノードではなく(403)、しかもX2>x1(n){=x
1(1)}かつX1<β(=N)であるので(404)、
[X1,Y1]×[X2,Y2]と[x1(n),y1(n)]×[x2
(n),y2(n)](n=1)との領域が重なるか否か
の判定を行なう(405)。
First, in the flowchart of FIG. 4, n is the root node (node thereof) (401), and [α, β] is [0, N] (402). n is a root node, not an empty node (403), and X 2 > x 1 (n) {= x
1 (1)} and X 1 <β (= N), so (404),
[X 1 , Y 1 ] × [X 2 , Y 2 ] and [x 1 (n), y 1 (n)] × [x 2
It is determined whether or not the areas (n), y 2 (n)] (n = 1) overlap each other (405).

これらの領域が重ならないので、スタックにn(=
1)、[α,β](=[0,N])をプッシュして保持し
(407)、nにn(=のノード)の左ノード(のノ
ード)をセットする(408)。そして、次のノードに対
応する区間をセットするために、[α,β]に[α,
(α+β)/2](=[0,N/2])をセットして(409)、
判定403へ戻る。
Since these areas do not overlap, n (=
1), [α, β] (= [0, N]) is pushed and held (407), and the left node (node thereof) of n (= node) is set to n (408). Then, in order to set the section corresponding to the next node, [α, β] is set to [α,
Set (α + β) / 2] (= [0, N / 2]) (409),
Return to decision 403.

n(=のノード)は空ノードではなく(403)、X2
>x1(n){=x1(2)}かつX1<β(=N/2)であり
(404)、[X1,Y1]×[X2,Y2]と[x1(n),y
1(n)]×[x2(n),y2(n)](n=2)との領域
が重なる(405)ので、nで示されるノードは、検索さ
れたノードである(406)。
n (= node) is not an empty node (403), X 2
> X 1 (n) {= x 1 (2)} and X 1 <β (= N / 2) (404), and [X 1 , Y 1 ] × [X 2 , Y 2 ] and [x 1 (N), y
Since the area of 1 (n)] × [x 2 (n), y 2 (n)] (n = 2) overlaps (405), the node indicated by n is the searched node (406). .

更に同様にしてn,[α,β]をスタックにプッシュし
て保持し(407)、nにnの左ノード(のノード)と
にセットし(408)、[α,β]に[α,(α+β)/
2](=[0,N/4])とした後、再び判定403へ戻る。
Similarly, n, [α, β] are pushed and held on the stack (407), n is set to (the node of) the left node of n (408), and [α, β] is set to [α, β]. (Α + β) /
2] (= [0, N / 4]), and the process returns to the determination 403 again.

n(=のノード)は空ノードではなく(403)、X1
>β(=N/4)であり(404)、またはスタックは空でな
い(410)ので、スタックをポップしてノード、区間を
取り出しn,[α,β]にセットする(411)。この時の
nはのノード、[α,β]は[0,N/2]である。
n (= node) is not an empty node (403), X 1
> Β (= N / 4) (404) or the stack is not empty (410), so the stack is popped, the node and the interval are extracted and set to n, [α, β] (411). At this time, n is a node and [α, β] is [0, N / 2].

nにnの右ノード(のノード)をセットし(41
2)、[α,β]に[(α+β)/2+1,β](=[N/4+
1,N/2])をセットする(413)。
Set the right node (node of n) to n (41
2), [(α + β) / 2 + 1, β] (= [N / 4 +
1, N / 2]) is set (413).

更に、判定403へ戻ってツリーをたどる。このときも
n(=のノード)は空ノードではなく(403)、X2>x
1(n){=x1(4)}かつX1<β(=N/2)であり(40
4)、[X1,Y1]×[X2,Y2]と[x1(n),y1(n)]×
[x2(n),y2(n)](n=4)とは領域が重ならな
い(405)。
Further, the process returns to the decision 403 and follows the tree. Also at this time, n (= node) is not an empty node (403), and X 2 > x
1 (n) {= x 1 (4)} and X 1 <β (= N / 2), and (40
4), [X 1 , Y 1 ] × [X 2 , Y 2 ] and [x 1 (n), y 1 (n)] ×
The regions do not overlap with [x 2 (n), y 2 (n)] (n = 4) (405).

それ故に、スタックにn,[α,β]をプッシュして保
持し(407)、nにnの左ノード(空ノード)をセット
し(408)、[α,β]に[α,(α+β)/2](=[N
/4+1,(N/4+1+N/2)/2])をセットして(409)、
判定403へ戻る。
Therefore, n, [α, β] is pushed and held on the stack (407), the left node (empty node) of n is set to n (408), and [α, (α + β] is set to [α, β]. ) / 2] (= [N
/ 4 + 1, (N / 4 + 1 + N / 2) / 2]) is set (409),
Return to decision 403.

次の判定では、nの空ノードであり(403)、スタッ
ク空ではないので(410)、スタックをポップしてノー
ド、区間を取り出し、n,[α,β]にセットする(41
1)。この時のnはのノードであり、[α,β]は、
[N/4+1,(N/4+1+N/2)/2]である。
In the next judgment, since it is an empty node of n (403) and it is not an empty stack (410), the stack is popped to extract the node and the section and set to n, [α, β] (41
1). At this time, n is a node of and [α, β] is
[N / 4 + 1, (N / 4 + 1 + N / 2) / 2].

nにnの右ノード(空ノード)をセットし(412)、
[α,β]に[(α+β)/2,β](=[{N/4+1+
(N/4+1+N/2)/2}2+1,(N/4+1+N/2)/2])を
セットして(413)、判定403へ戻る。
Set n's right node (empty node) to n (412),
[(Α + β) / 2, β] (= [{N / 4 + 1 +
(N / 4 + 1 + N / 2) / 2} 2 + 1, (N / 4 + 1 + N / 2) / 2]) is set (413) and the process returns to the determination 403.

この場合も、nは空ノードであり(403)、スタック
は空でないので(410)、更にスタックをポップしてノ
ード、区間を取り出し、n,[α,β]にセットする(41
1)。この時のnはのノード、[α,β]は[0,N]で
ある。
In this case as well, n is an empty node (403) and the stack is not empty (410). Therefore, the stack is further popped to extract the node and the section and set to n, [α, β] (41
1). At this time, n is a node and [α, β] is [0, N].

nをnの右ノード(のノード)とし(412)、
[α,β]を[(α+β)/2+1,β](=[N/2,N])
とする(413)。その後、判定403へ戻る。
Let n be (the node of) the right node of n (412),
[Α, β] is [(α + β) / 2 + 1, β] (= [N / 2, N])
(413). After that, the process returns to the determination 403.

n(=ノード)は空ノードでなく(403)、X2<x1
(n){=x1(5)}であり(404)、スタックは空(4
10)であるので、ツリー探索を終了する。
n (= node) is not an empty node (403), X 2 <x 1
(N) {= x 1 (5)} (404) and the stack is empty (4
10), so the tree search ends.

以上の処理によって、削除対象の図形情報は、のノ
ードに対応したものであることが分る。
From the above processing, it is found that the graphic information to be deleted corresponds to the node.

ここで、実際に検索されたノードは、下記の通りとな
る。
Here, the actually searched nodes are as follows.

,,:対象の図形情報か否かのチェックを行なっ
たノード。
,,: The node that checked whether it is the target graphic information.

,:ツリートラバースの過程として検索したノー
ド。
,: Nodes searched as a process of tree traverse.

これより、対象の図形情報か否かの検索の為には、ノ
ードごとに2分された枝の、1つのパスしか通らないこ
とが分る。即ち、ツリー生成時と同様に、その検索対象
のノード数は、全ノード数(全図形情報数)をKとした
場合ほぼlog2K程度であることが分る。
From this, it can be seen that only one path of the branch bisected for each node is passed in order to search for the target graphic information. That is, as in the case of the tree generation, it can be seen that the number of search target nodes is approximately log 2 K when the total number of nodes (total graphic information number) is K.

従って、従来技術では、全図形情報が、たとえば1000
00個あった場合は、同数の100000回図形情報を検索する
必要があったが、本方式では、わずか17回程度(≒log2
100000)で済む。これに、ツリートラバースのオーバー
ヘッド、即ち、ツリートラバースの過程として検索した
ノードの個数を加えても、その検索回数には、大きな開
きがあることが判る。
Therefore, in the prior art, all graphic information is, for example, 1000
If there were 00 pieces, it was necessary to retrieve the same number of pieces of graphic information 100,000 times, but with this method, only about 17 times (≈log 2
100000). Even if the overhead of the tree traverse, that is, the number of nodes searched in the process of the tree traverse is added to this, it can be seen that the number of times of the search has a large difference.

次に、削除対象となった図形情報ののノードを、ツ
リーから削除する具体例について、第6図に示されたフ
ローチャートと第12図の経緯図を参照して説明する。
Next, a specific example of deleting the node of the graphic information to be deleted from the tree will be described with reference to the flowchart shown in FIG. 6 and the history chart of FIG.

まず、delをのノードにセットする(601)(120
1)。Pnを第1図のダミーノード10とし(602)、nにPn
の左ノード(ルート・ノードであるのノード)をセッ
トし(603)、dnに「左」を示すフラグ値をセットし(6
04)、区間[α,β]に[0,N]をセットする(605)
(1202)。
First, set del to the node of (601) (120
1). Pn is the dummy node 10 in FIG. 1 (602), and n is Pn.
The left node (node that is the root node) is set (603), and the flag value indicating "left" is set to dn (6
04), set [0, N] to the interval [α, β] (605)
(1202).

つぎに、n(=のノード)はdel(=のノード)
ではないので(606)、Pnにn(=のノード)をセッ
トする(607)。x2(del){=x2(2)≦(α+β)/2
(=N/2)であるので判定608は肯定であり、nにn(=
のノード)の左ノード(=のノード)をセットする
(609)。
Next, n (= node) is del (= node)
Since it is not (606), n (= node) is set in Pn (607). x 2 (del) {= x 2 (2) ≦ (α + β) / 2
Since (= N / 2), the determination 608 is affirmative, and n is n (=
The left node (= node) of (node of) is set (609).

[α,β]に[α,(α+β)/2](=[0,N/2])
をセットし(610)、dnに「左」を示すフラグ値をセッ
トする(611)(1203)。
[Α, (α + β) / 2] (= [0, N / 2]) in [α, β]
Is set (610), and a flag value indicating "left" is set in dn (611) (1203).

このとき、n(=のノード)はdelであり(606)、
delの左、右ノードはともに空ノードでない(616〜61
7)ので、x1(delの左ノード){=x1(3)}とx1(de
lの右ノード){=x1(4)}とを比較する判定618を実
施する。
At this time, n (= node) is del (606),
The left and right nodes of del are not empty nodes (616 to 61)
7), so x 1 (the left node of del) {= x 1 (3)} and x 1 (de
The right node of l) {= x 1 (4)} is compared to make a decision 618.

ここではx1(delの左ノード)<x1(delの右ノード)
であり、判定618が成立するので、delの右ノード(の
ノード)をnにセットし(625)(1204)、Pn(=の
ノード)のdn(左)ノードにdelの左ノード(のノー
ド)をセットする(626)(1205)。
Here x 1 (the left node of del) <x 1 (the right node of del)
Since the judgment 618 is established, the right node (node of) of del is set to n (625) (1204), and the left node of del (node of) is set to the dn (left) node of Pn (= node). ) Is set (626) (1205).

delの左ノード(のノード)をPnにセットし(627)
(1206)、dnに「左」を示すフラグ値をセットする(62
8)。delの左、右ノードにPn(=のノード)の左、右
ノード(とも空ノード)をセット(629)(1207,120
8)、Pn(=のノード)の右ノードにn(=のノー
ド)をセットする(630)。
Set left node (node) of del to Pn (627)
(1206), a flag value indicating "left" is set to dn (62
8). Set left and right nodes (both empty nodes) of Pn (= node) to left and right nodes of del (629) (1207,120)
8), n (= node) is set to the right node of Pn (= node) (630).

上述の処理操作を行なうことによりツリー・ノードの
再構成を行なうことができる(1209)。この後、判定61
5へ戻るが、このときはdel(=のノード)の左、右ノ
ードはともに空ノードとされているので(615)、Pn
(=のノード)のdn(左)に空ノードをセットし(63
1)、ノードの削除処理を完了する(1210)。
The tree node can be reconstructed by performing the above processing operation (1209). After this, the decision 61
Returning to 5, but at this time, the left and right nodes of del (= node) are both empty nodes (615), so Pn
Set an empty node to dn (left) of (= node) (63
1) Complete the node deletion process (1210).

そしてさらに、描画順序保持のためのポインタを削除
する。即ち、の図形情報の直前に入力された図形情報
(この場合は存在しない。)の次には、の図形情報の
直後に入力された図形情報(の図形情報)が並ぶよう
にポインタをセットし、の図形情報の直後に入力され
た図形情報(の図形情報)の前には、の直前に入力
された図形情報(この場合は存在しない。)が並ぶよう
にポインタをセットする(1211)。
Further, the pointer for holding the drawing order is deleted. That is, the pointer is set so that the graphic information input immediately before the graphic information of (which does not exist in this case) is arranged next to the graphic information input immediately after the graphic information of. Before the graphic information (the graphic information) input immediately after the graphic information of, the pointer is set so that the graphic information (immediately does not exist in this case) input immediately before (1211).

以上で、図形情報の削除を行なう手順は終了する。 This is the end of the procedure for deleting graphic information.

以上述べたように、ツリーよりのノード削除はノード
ごとに2分された枝を、1つのパスしか通らない。即
ち、ツリー生成と同様の理由より、そのたどるノード数
は全ノード数(全図形情報数)をKとした場合、ほぼlo
g2Kであることがわかる。
As described above, when deleting a node from the tree, only one path passes through the branch divided into two for each node. That is, for the same reason as the tree generation, the number of nodes traced is almost lo when the total number of nodes (total number of graphic information) is K.
It turns out that it is g 2 K.

本システムの会話形図形編集プログラムは、操作者に
よって起動され、図形情報の編集指示を受けた場合、全
図形情報の中から編集範囲の図形情報を前記ツリー探索
処理で高速に検索し、グラフィック・ディスプレイに表
示する。
The interactive figure editing program of this system is started by an operator, and when an instruction to edit figure information is received, figure information in the editing range is searched from all figure information at high speed by the tree search processing, Display on the display.

なお、表示の際、図形情報が重なっており、描画順に
表示図形が依存しているような場合は、検索されたノー
ド・ポインタを適当な配列に保持し、描画順にソートし
た後、表示する。更に、削除による表示画面の修復にも
使用できる。
In addition, when the graphic information is overlapped at the time of display and the displayed graphics depend on the drawing order, the retrieved node pointers are held in an appropriate array, sorted in the drawing order, and then displayed. Furthermore, it can be used to restore the display screen by deleting.

また、図形を描画するなどして、新たな図形情報の生
成を行う場合は、新たな図形情報に基づいて外接する矩
形座標を演算し、ノード生成処理を用いて図形情報の生
成を行う。
Further, when new graphic information is generated by drawing a graphic, the circumscribed rectangular coordinates are calculated based on the new graphic information, and the graphic information is generated using the node generation processing.

既に生成されている図形情報を削除する場合は、適宜
の手段で、指定された座標近傍の図形情報を、前記ツリ
ー探索処理を行って、高速に検索する。
When deleting the already generated graphic information, the graphic information near the designated coordinates is searched at high speed by an appropriate means.

この場合は、指定された座標位置を含む小さな矩形
(たとえば、全空間を[0,1024]×[0,1024]とし、指
定座標位置をx,yとした場合、[x−8,y−8]×[x+
8,y+8]で定義できる)を用いて、候補図形を検索す
ることができる。
In this case, a small rectangle containing the specified coordinate position (for example, if the whole space is [0,1024] x [0,1024] and the specified coordinate position is x, y, [x-8, y- 8] × [x +
8, y + 8]) can be used to search for candidate figures.

また、更に検索精度を上げるためには、複数の候補図
形に対して指定座標点との間の距離計算を施し、優先順
位を付けることもできる。
Further, in order to further improve the search accuracy, it is possible to calculate the distances from the designated coordinate points to a plurality of candidate figures and prioritize them.

この実施例によれば、膨大な図形情報の度重なる検索
をきわめて高速に行うことができ、操作者に対して快適
な編集作業環境を提供できる。
According to this embodiment, repeated retrieval of a large amount of graphic information can be performed extremely quickly, and a comfortable editing work environment can be provided to the operator.

また、LBPやプロッタな対し図形情報を出力する際に
応用できることは明らかであり、膨大な図形情報の中の
任意の範囲を高速に選択、出力することが可能である。
Further, it is obvious that the present invention can be applied to the case of outputting graphic information for LBP or plotter, and it is possible to select and output any range in a huge amount of graphic information at high speed.

更に、図形情報を会話形式で入力せず、カードやフロ
ッピーディスク等の媒体を通して、大量の図形情報を一
括して入力させることも、ツリー生成時間(入力情報数
をKとすると、ほぼKlog2Kに比例した時間)が十分に短
いので、可能である。
Furthermore, instead of inputting graphic information interactively, a large amount of graphic information can be input all at once through a medium such as a card or a floppy disk, and tree generation time (assuming that the number of input information is K is approximately Klog 2 K). Is sufficiently short, that is possible.

また、第3図に示すように、2次記憶装置21の容量が
不足しており、ツリーを格納できない場合でも、会話編
集開始時に主記憶上で、ツリー生成プログラム22によっ
てツリーを構成し、編集操作時の応答性を確保すること
もできる。
Further, as shown in FIG. 3, even when the tree cannot be stored because the capacity of the secondary storage device 21 is insufficient, the tree is constructed and edited by the tree generation program 22 in the main memory at the start of conversation editing. It is also possible to secure responsiveness during operation.

本実施例で説明したツリーの構造は、矩形のx座標に
着目したものであるが、、全図形情報の座標系が[0,
N]×[0,M]であり、M>>Nの場合は、明らかに、y
座標に着目してツリーを構成すべきである。このように
すれば、ツリーのレベルを低く押えることができる。ま
た、座標系[0,N]×[0,M]を任意の実数空間に拡張す
ることも可能である。
The structure of the tree described in this embodiment focuses on the x-coordinate of a rectangle, but the coordinate system of all graphic information is [0,
N] × [0, M], and if M >> N, then obviously y
The tree should be constructed focusing on the coordinates. This way you can keep the tree level low. It is also possible to extend the coordinate system [0, N] × [0, M] to an arbitrary real number space.

(発明の効果) 以上述べたところから明からなように、座標をキーと
して図形情報を検索し、編集出力させる方式に、バイナ
リ・ツリーを導入したことにより、従来では不可能であ
った高速応答が可能となった。
(Effects of the Invention) As is apparent from the above description, the introduction of the binary tree in the method of searching and editing and outputting the graphic information using the coordinate as a key makes it possible to obtain a high-speed response that was impossible in the past. Became possible.

すなわち、従来の応答時間をkKとした場合、(k+
k′)log2Kに短縮することができる。ただし、上記に
おいては、Kは図形情報数、kは探索処理のオーバーヘ
ッド、k′はツリー探索のオーバーヘッドである。
That is, assuming that the conventional response time is kK, (k +
k ') can be shortened to log 2 K. However, in the above, K is the number of graphic information, k is the overhead of search processing, and k'is the overhead of tree search.

さらに、探索が高速化され、検索に要する時間が短縮
されたことにより、大量の図形情報を一元的に管理する
ことが可能となり、その任意範囲の編集、出力が従来技
術にて確保されていた応答時間とほぼ変りなく確保でき
ることにより、より高度の操作性を持つことができる。
Furthermore, since the search is speeded up and the time required for the search is shortened, it is possible to manage a large amount of graphic information in a unified manner, and the editing and output of the arbitrary range are secured by the conventional technology. Since it can be secured almost unchanged from the response time, higher operability can be achieved.

結果的に、グラフィックス・システムとしての性能
が、飛躍的に向上することになる。
As a result, the performance of the graphics system will be dramatically improved.

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

第1図は本発明の要部であるバイナリ・ツリーの構造と
図形情報の概要を示す図、第2,3図は本発明を適用した
グラフィックス・システムの概略構成例を示すブロック
図、第4図は本発明におけるツリーの探索処理を示すフ
ローチャート、第5図はツリーの生成処理を示すフロー
チャート、第6図はツリーよりノードを削除する処理を
示すフローチャート、第7図はバイナリ・ツリーの新規
作成時におけるツリー構造の変化状態を示す図、第8〜
10図は図面情報の追加に伴うバイナリ・ツリーのノード
追加時におけるツリー構造の変化状態を示す図、第11図
はバイナリ・ツリーの探索経路を示す図、第12図は図面
情報の削除に伴うバイナリ・ツリーのノード削除時にお
けるツリー構造の変化状態を示す図、第13図はバイナリ
・ツリーを用いた図形情報の探索手順を説明するための
座標系を示す図である。 1……ツリーの全体構成、2……図形情報の全体構成、
3……ツリー・ノード、4……図形情報、7……図形情
報を囲む外接矩形、8……ルート・ノードに対応した区
間[0,N]、11……グラフィック・ディスプレイ、12…
…キーボード、13……電子計算機、14……マウス、15…
…ライトペン、16……デジタイザ、17,21……2次記憶
装置、18……LBP、19……プロッタ、20……バッチ形入
力装置、22……ツリー生成プログラム
FIG. 1 is a diagram showing an outline of the structure and graphic information of a binary tree which is an essential part of the present invention, and FIGS. 2 and 3 are block diagrams showing a schematic configuration example of a graphics system to which the present invention is applied. FIG. 4 is a flowchart showing a tree searching process according to the present invention, FIG. 5 is a flowchart showing a tree generating process, FIG. 6 is a flowchart showing a process of deleting a node from a tree, and FIG. 7 is a new binary tree. The figure which shows the change state of the tree structure at the time of creation, 8th-
Fig. 10 is a diagram showing the state of change in the tree structure when a binary tree node is added in accordance with the addition of drawing information, Fig. 11 is a diagram showing the binary tree search path, and Fig. 12 is accompanying the deletion of drawing information. FIG. 13 is a diagram showing a changed state of the tree structure when a node of the binary tree is deleted, and FIG. 13 is a diagram showing a coordinate system for explaining a procedure for searching for graphic information using the binary tree. 1 ... Overall structure of tree, 2 ... Overall structure of graphic information,
3 ... Tree node, 4 ... Graphic information, 7 ... Enclosing rectangle surrounding graphic information, 8 ... Section [0, N] corresponding to root node, 11 ... Graphic display, 12 ...
… Keyboard, 13… Computer, 14… Mouse, 15…
… Light pen, 16 …… Digitizer, 17,21 …… Secondary storage device, 18 …… LBP, 19 …… Plotter, 20 …… Batch type input device, 22 …… Tree generation program

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】図形情報を入力し、記憶する手段と、前記
図形情報を指定された位置に表示する手段と、前記図形
情報を囲み、これに外接する矩形の1対の対角頂点の座
標を各図形毎に演算し、記憶する手段と、前記各図形毎
の矩形の1対の対角頂点座標の、一方の座標軸上での正
規化された値に基づいてバイナリ・ツリーを生成する手
段とを具備し、 前記バイナリ・ツリーの各ノードは、あるノードnに対
応する矩形の1対の対角頂点座標をk1(n),k2(n)
{ただし、k1(n)≦k2(n)},当該ノードnに対応
した区間を(α,β)とし、さらに当該ノードをa、そ
の左ノードをb,またその右ノードをcとしたとき、ノー
ドa,b,cが次の条件を満足することを特徴とする図形編
集装置。 イ)ノードa、 k1(a)≦k1(b),k1(a)≦k1(c),α≦k
2(a)≦β、 ロ)ノードb、 α≦k2(b)≦(α+β)/2、 ハ)ノードc、 (α+β)/2<k2(c)≦β、
1. A means for inputting and storing graphic information, a means for displaying the graphic information at a designated position, and coordinates of a pair of diagonal vertices of a rectangle surrounding and surrounding the graphic information. Means for calculating and storing for each figure, and means for generating a binary tree based on the normalized values of the pair of diagonal vertex coordinates of the rectangle for each figure on one coordinate axis. And each node of the binary tree has a pair of diagonal vertex coordinates of a rectangle k 1 (n), k 2 (n) corresponding to a certain node n.
{However, k 1 (n) ≦ k 2 (n)}, the section corresponding to the node n is (α, β), the node is a, its left node is b, and its right node is c. In this case, the graphic editing apparatus is characterized in that the nodes a, b, and c satisfy the following conditions. B) Nodes a, k 1 (a) ≦ k 1 (b), k 1 (a) ≦ k 1 (c), α ≦ k
2 (a) ≦ β, b) node b, α ≦ k 2 (b) ≦ (α + β) / 2, c) node c, (α + β) / 2 <k 2 (c) ≦ β,
【請求項2】前記バイナリ・ツリーは、図形情報ととも
には記憶されず、編集操作開始時に生成されることを特
徴とする前記特許請求の範囲第1項記載の図形編集装
置。
2. The graphic editing apparatus according to claim 1, wherein the binary tree is not stored together with the graphic information and is generated at the start of an editing operation.
JP63014383A 1988-01-27 1988-01-27 Graphic editing device Expired - Fee Related JP2686758B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63014383A JP2686758B2 (en) 1988-01-27 1988-01-27 Graphic editing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63014383A JP2686758B2 (en) 1988-01-27 1988-01-27 Graphic editing device

Publications (2)

Publication Number Publication Date
JPH01191270A JPH01191270A (en) 1989-08-01
JP2686758B2 true JP2686758B2 (en) 1997-12-08

Family

ID=11859526

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63014383A Expired - Fee Related JP2686758B2 (en) 1988-01-27 1988-01-27 Graphic editing device

Country Status (1)

Country Link
JP (1) JP2686758B2 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7555730B2 (en) 2005-05-12 2009-06-30 Hewlett-Packard Development Company, L.P. Method for arranging graphic assemblies
US8065627B2 (en) * 2003-09-30 2011-11-22 Hewlett-Packard Development Company, L.P. Single pass automatic photo album page layout
US8056013B2 (en) 2005-05-13 2011-11-08 Hewlett-Packard Development Company, L.P. Method for arranging graphic assemblies
US7743322B2 (en) 2003-09-30 2010-06-22 Hewlett-Packard Development Company, L.P. Automatic photo album page layout
US7656543B2 (en) 2004-11-12 2010-02-02 Hewlett-Packard Development Company, L.P. Albuming images
US8161377B2 (en) 2005-03-01 2012-04-17 Hewlett-Packard Development Company, L.P. Arranging images on pages of an album
US7644356B2 (en) 2005-06-10 2010-01-05 Hewlett-Packard Development Company, L.P. Constraint-based albuming of graphic elements
US9152292B2 (en) 2009-02-05 2015-10-06 Hewlett-Packard Development Company, L.P. Image collage authoring
US8291314B2 (en) * 2009-04-23 2012-10-16 Hewlett-Packard Development Company, L.P. Arranging graphic objects on a page
US8161384B2 (en) 2009-04-23 2012-04-17 Hewlett-Packard Development Company, L.P. Arranging graphic objects on a page with text

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6054073A (en) * 1983-09-02 1985-03-28 Nec Corp Object selecting device

Also Published As

Publication number Publication date
JPH01191270A (en) 1989-08-01

Similar Documents

Publication Publication Date Title
US5553226A (en) System for displaying concept networks
US6195664B1 (en) Method and system for controlling the conversion of a file from an input format to an output format
US5249265A (en) Structure storage management in a graphics display device
JP2686758B2 (en) Graphic editing device
US5469539A (en) Method for abstracting/detailing structuring elements of system specification information
JPS6037945B2 (en) How to display hierarchical tree-structured text in an ordered structure
JP2839555B2 (en) Information search method
JPH0812668B2 (en) Handwriting proofreading method
JPH02120980A (en) Network display system
JPH1091382A (en) Text editing device and method
JP3533674B2 (en) Information display device and method thereof
JP3020213B2 (en) Document processing device
JP2616522B2 (en) Document image information editing device
JPH0765186A (en) Graphic editing device
JPH0844717A (en) Document editing device
JP2723241B2 (en) Document management system
JPH0421229B2 (en)
JPH08166950A (en) Document editing device
JPH0792905A (en) Partially modified facility drawing generating system
JPH0594292A (en) Frame type knowldge editing system
JPH10320407A (en) Method and device for supporting visual simulation
JPH05290105A (en) Figure component control system
JPH0525139B2 (en)
JPH0744446A (en) Relating method for grouped information
JPH0844766A (en) Document retrieval device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees