JP3302455B2 - Information processing device - Google Patents

Information processing device

Info

Publication number
JP3302455B2
JP3302455B2 JP18091093A JP18091093A JP3302455B2 JP 3302455 B2 JP3302455 B2 JP 3302455B2 JP 18091093 A JP18091093 A JP 18091093A JP 18091093 A JP18091093 A JP 18091093A JP 3302455 B2 JP3302455 B2 JP 3302455B2
Authority
JP
Japan
Prior art keywords
point
bezier curve
rectangular area
triangular
segment
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
JP18091093A
Other languages
Japanese (ja)
Other versions
JPH0785301A (en
Inventor
芳裕 大西
裕 竹内
Original Assignee
株式会社ジャストシステム
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 株式会社ジャストシステム filed Critical 株式会社ジャストシステム
Priority to JP18091093A priority Critical patent/JP3302455B2/en
Publication of JPH0785301A publication Critical patent/JPH0785301A/en
Application granted granted Critical
Publication of JP3302455B2 publication Critical patent/JP3302455B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、情報処理装置に係
り、詳細には、ベジェ曲線の描画機能を備えた情報処理
装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus, and more particularly, to an information processing apparatus having a function of drawing a Bezier curve.

【0002】[0002]

【従来の技術】パーソナルコンピュータやオフィスコン
ピュータ、ワークテーション、電子出版システム、ワー
ドプロセッサその他各種の情報処理装置が、オフィス、
工場、設計事務所、家庭等に普及し、広く使用されてい
る。このような情報処理装置において、道路地図や建築
図面等の各種図面を作成する場合、任意形状の曲線を描
画することが必要となり、そのための方法として、ベジ
ェ関数によるベジェ曲線を使用する場合がある。ベジェ
曲線は、4つの制御点により描画するもので、始点、終
点上を通過し、両者間に指定される2つのコントロール
ポイントの内側を通過する曲線である。
2. Description of the Related Art Personal computers and office computers, workstations, electronic publishing systems, word processors and various other information processing devices are used in offices,
It is widely used in factories, design offices and homes, and is widely used. In such an information processing apparatus, when creating various drawings such as a road map and an architectural drawing, it is necessary to draw a curve of an arbitrary shape. As a method therefor, a Bezier curve based on a Bezier function may be used. . A Bezier curve is a curve drawn by four control points, passes over the start point and the end point, and passes inside two control points designated between them.

【0003】一方、このような各種の図形処理機能を備
えた情報処理装置では、既に作成した所定の図形を特定
する処理が必要になる。例えば、既に作成した図形の削
除、移動、複写、変形等の各種処理を行う場合に、以下
に説明する図形の特定処理が行われる。まず、操作者が
ディスプレイに表示された複数のベジェ曲線のうち特定
したいベジェ曲線上にカーソルを移動して指定点を入力
する。そして、情報処理装置がこの指定点上のベジェ曲
線を認識する。認識は、ベジェ曲線を含む所定領域内に
指定点が有るか否かを判断する領域内判定を行い、領域
内に含む場合には、更にベジェ曲線上に指定点があるか
否かを判断する線上判定を行う。ここで、線上判定は、
セグメント(入力されたアンカーポイント間の最小単位
のベジェ曲線)の分割を繰り返し、各アンカーポイント
を結ぶ直線で近似し、各直線に対してその直線を含む矩
形領域内に指定点が含まれるか否かを判断する。指定点
が含まれる場合、指定点と直線との距離を計算し、許容
範囲内であれば、そのベジェ曲線上に指定点があるもの
と判定している。
On the other hand, in an information processing apparatus having such various graphic processing functions, it is necessary to perform processing for specifying a predetermined graphic that has already been created. For example, when performing various processes such as deletion, movement, copying, and deformation of an already created graphic, a graphic specifying process described below is performed. First, an operator moves a cursor on a Bezier curve to be specified among a plurality of Bezier curves displayed on the display and inputs a designated point. Then, the information processing device recognizes the Bezier curve on the designated point. Recognition is performed by determining whether or not there is a designated point in a predetermined area including a Bezier curve, and if it is included in the area, further determining whether or not there is a designated point on the Bezier curve. Perform on-line determination. Here, the determination on the line is
Repeat the segment (the smallest unit Bezier curve between the input anchor points), approximate with the straight line connecting each anchor point, and check if the specified point is included in the rectangular area including the straight line for each straight line Judge. If the designated point is included, the distance between the designated point and the straight line is calculated, and if it is within the allowable range, it is determined that the designated point is on the Bezier curve.

【0004】[0004]

【発明が解決しようとする課題】ところで、ベジェ曲線
の特定処理における線上判定は、時間を要する。これ
は、ベジェ曲線の分割によるセグメントの直線近似に時
間を要すると共に、近似した各直線を含む矩形領域内外
の判定と距離の計算にも時間を必要とし、これらの各処
理をセグメントに対して分割した直線の数だけ処理を行
う必要があるためである。この線上判定処理は、領域内
判定において指定点が領域内にあると判定される全ての
ベジェ曲線に対して行われる。ところが、従来の領域内
判定処理は、指定点が存在するか否かの判定をベジェ曲
線を含む矩形領域に対して行っているため、線上判定処
理の対象が増加することが多かった。
The on-line determination in the Bezier curve specifying process requires time. This requires time to approximate a straight line of a segment by dividing a Bezier curve, and also requires time to determine the inside and outside of a rectangular area including each approximated straight line and to calculate a distance. Each of these processes is divided into segments. This is because it is necessary to perform processing for the number of straight lines. This on-line determination processing is performed on all Bezier curves for which the designated point is determined to be within the region in the within-region determination. However, in the conventional in-area determination processing, the determination of whether or not a designated point exists is performed on a rectangular area including a Bezier curve.

【0005】図14は、従来の線上判定の対象となるベ
ジェ曲線を決定する領域判定処理を説明するためのもの
である。この図14は、多くの図形を重ねて各図形の内
部を少しづつ色を変えながら塗りつぶすことにより立体
感を表現するような場合の例である。このような図にお
いて、例えば、指定点89(図面上、×で示す。)が図
示の位置に指定されたとする。この場合、図14(b)
に示すように、各ベジェ曲線90a〜94aを含む矩形
領域90b〜94bに対して領域内判定を行うと、全て
の矩形領域に対して指定点89が含まれることとなる。
このため、全てのベジェ曲線90a〜94aに対して、
長時間を要する線上判定処理を行う必要があり、全体と
して更に処理時間が掛かっていた。このように、従来の
図形特定処理における、領域内判定は、矩形領域によっ
て行われていたために、領域内と判定される場合が増
え、その結果時間の掛かる線上判定処理の対象も増加
し、結果として高速処理を行うことができなかった。
FIG. 14 is a diagram for explaining a conventional area determination process for determining a Bezier curve to be subjected to on-line determination. FIG. 14 shows an example of a case in which a large number of figures are overlapped and the inside of each figure is painted while changing the color little by little, thereby expressing a three-dimensional effect. In such a diagram, for example, it is assumed that a designated point 89 (indicated by a cross in the drawing) is designated at the illustrated position. In this case, FIG.
As shown in (5), when the in-region determination is performed on the rectangular regions 90b to 94b including the Bezier curves 90a to 94a, the specified point 89 is included in all the rectangular regions.
Therefore, for all Bezier curves 90a to 94a,
It is necessary to perform a long-time on-line determination process, and it takes more processing time as a whole. As described above, in the conventional graphic identification processing, the in-area determination is performed based on the rectangular area, so that the number of cases where the determination is made within the area increases, and as a result, the target of the time-consuming on-line determination processing increases. As a result, high-speed processing could not be performed.

【0006】そこで、本発明は、線上判定処理の対象を
少なくすることで、図形の特定を高速で行うことが可能
な情報処理装置を提供することを目的とする。
SUMMARY OF THE INVENTION It is therefore an object of the present invention to provide an information processing apparatus capable of specifying a figure at high speed by reducing the number of targets of the on-line determination processing.

【0007】[0007]

【課題を解決するための手段】請求項1記載の発明で
は、図1に原理的に示すように、曲線が通過する2つの
アンカーポイントと、通過しない2つのコントロールポ
イントの4つの制御点からベジェ曲線を描画する情報処
理装置において、描画されたベジェ曲線を特定するため
の指定点を入力する入力手段1と、ベジェ曲線のセグメ
ント上の所定点を算出し、この所定点、始点、一方の
ントロールポイントからなる三角形領域、および、前記
所定点、終点、他方のコントロールポイントからなる三
角形領域を算出する三角形領域算出手段2と、この三角
形領域算出手段2で算出された2つの三角形領域に前記
入力手段1から入力された指定点が含まれるか否かを判
断する第1判断手段3と、この第1判断手段3で2つの
三角形領域に指定点が含まれると判断されたセグメント
に対して、所定距離内に前記指定点が存在するか否かを
判断する第2判断手段4と、この第2判断手段4で指定
点が所定距離内に存在すると判断されたセグメントを含
むベジェ曲線を特定するベジェ曲線特定手段5とを、情
報処理装置に具備させて前記目的を達成する。
According to the first aspect of the present invention, as shown in FIG. 1, two anchor points through which a curve passes and two control points through which no curve passes.
In an information processing apparatus that draws a Bezier curve from the four control points of Int , input means 1 for inputting a designated point for specifying the drawn Bezier curve, and a predetermined point on a segment of the Bezier curve are calculated. predetermined point, the start point, one of the co
Control means for calculating a triangular area consisting of control points , the predetermined point, the end point, and a triangular area consisting of the other control point; and inputting the triangular areas calculated by the triangular area calculating means 2 into the two triangular areas. A first determining means 3 for determining whether or not the designated point input from the means 1 is included; and a segment for which the first determining means 3 determines that the two triangular regions include the designated point, Second determining means 4 for determining whether or not the specified point exists within a predetermined distance, and specifying a Bezier curve including the segment for which the specified point is determined to be within the predetermined distance by the second determining means 4 The object is achieved by providing the information processing apparatus with the Bezier curve specifying means 5.

【0008】請求項2記載の発明では、図2に原理的に
示すように、請求項1記載の情報処理装置において、セ
グメントの4つの制御点を含む矩形領域を算出する矩形
領域算出手段6と、この矩形領域算出手段6で算出され
た矩形領域に前記入力手段1から入力された指定点が含
まれるか否かを判断する第3判断手段7とを備え、前記
三角形領域算出手段2は、前記矩形領域に指定点が含ま
れると前記第3判断手段7で判断されたセグメントに対
して三角形領域を算出する。
According to a second aspect of the present invention, as shown in FIG. 2, in the information processing apparatus according to the first aspect, a rectangular area calculating means 6 for calculating a rectangular area including four control points of a segment is provided. A third determining means 7 for determining whether or not the rectangular area calculated by the rectangular area calculating means 6 includes the designated point input from the input means 1; and the triangular area calculating means 2 comprises: A triangular area is calculated for the segment determined by the third determining means 7 when the specified point is included in the rectangular area.

【0009】[0009]

【作用】請求項1記載の情報処理装置では、入力手段1
から指定点が入力されると、三角形領域算出手段2がそ
の指定点と4つの制御点からなる2つの三角形領域を算
出し、この三角形領域に指定点が含まれるか否かを第1
判断手段3で判断する。指定点が三角形領域に含まれる
場合、第2判断手段4が指定点とセグメントと所定距離
内に存在するか否かを判断し、存在すれば、ベジェ曲線
特定手段5がそのセグメントを含むベジェ曲線を特定す
る。
In the information processing apparatus according to the first aspect, the input means 1
When a designated point is input from the triangular region calculating means 2, the triangular region calculating means 2 calculates two triangular regions each including the designated point and four control points, and determines whether or not the specified point is included in the triangular region.
The judgment is made by the judging means 3. If the specified point is included in the triangular area, the second determining means 4 determines whether or not the specified point and the segment are within a predetermined distance, and if so, the Bezier curve specifying means 5 causes the Bezier curve including the segment to be present. To identify.

【0010】請求項2記載の情報処理装置では、セグメ
ントの4つの制御点を含む矩形領域を矩形領域算出手段
6で算出し、その矩形領域に入力手段1から入力された
指定点が含まれると第3判断手段7で判断された場合
に、前記三角形領域算出手段2が三角形領域を算出す
る。
In the information processing apparatus according to the present invention, a rectangular area including four control points of a segment is calculated by the rectangular area calculating means 6, and the rectangular area includes the designated point input from the input means 1. When determined by the third determining means 7, the triangular area calculating means 2 calculates a triangular area.

【0011】[0011]

【実施例】以下、本発明の情報処理装置における一実施
例を図3ないし図13を参照して詳細に説明する。図3
は第1〜第3の実施例における情報処理装置のハード構
成を表したものである。この図1に示すように、情報処
理装置は、本実施例によるベジェ曲線描画処理等の各種
処理動作を行うCPU(中央処理装置)11を備えてい
る。このCPU11には、データバス等のバスライン1
3を介して、ROM15、RAM17、画像メモリ1
9、入力装置21、スキャナ23、プリンタ25、ディ
スプレイ27、通信制御部29の各部が接続されてい
る。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the information processing apparatus according to the present invention will be described below in detail with reference to FIGS. FIG.
Represents a hardware configuration of the information processing apparatus in the first to third embodiments. As shown in FIG. 1, the information processing apparatus includes a CPU (central processing unit) 11 that performs various processing operations such as Bezier curve drawing processing according to the present embodiment. The CPU 11 includes a bus line 1 such as a data bus.
3, a ROM 15, a RAM 17, an image memory 1
9, the input device 21, the scanner 23, the printer 25, the display 27, and the communication control unit 29 are connected.

【0012】ROM15は、装置全体をCPU11で制
御するための各種プログラムや、各種データが格納され
たリード・オンリ・メモリである。このROM13に
は、本実施例によるベジェ曲線の特定処理プログラム等
の図形処理プログラムや、ベジェ関数、その他各種デー
タ等が格納されている。RAM17は、CPU11で行
われる各種処理動作において使用されるワーキングメモ
リとして使用され、また各種データの保存に使用される
ランダム・アクセス・メモリである。このRAM17に
は、図形処理により描画される、直線や各種図形に対す
る座標値や図形の種類を特定する図形描画データが格納
される。また、本実施例によるベジェ曲線描画処理で自
動設定されたコントロールポイントと、入力されたアン
カーポイントもベジェ曲線描画データとしてRAM17
に格納されるようになっている。なお、本実施例による
各種動作を行うためのプログラムやデータは、フロッピ
ーディスク等の他の記憶媒体からRAM17にインスト
ールし、RAM17からプログラム等を読みだして動作
するようにしてもよい。
The ROM 15 is a read-only memory in which various programs for controlling the entire apparatus by the CPU 11 and various data are stored. The ROM 13 stores a graphic processing program such as a Bezier curve identification processing program according to the present embodiment, a Bezier function, and other various data. The RAM 17 is used as a working memory used in various processing operations performed by the CPU 11, and is a random access memory used for storing various data. The RAM 17 stores graphic drawing data for specifying a coordinate value and a graphic type for a straight line and various figures drawn by the figure processing. The control points automatically set in the Bezier curve drawing processing according to the present embodiment and the input anchor points are also stored in the RAM 17 as Bezier curve drawing data.
It is stored in. The programs and data for performing various operations according to the present embodiment may be installed in the RAM 17 from another storage medium such as a floppy disk, and the programs and the like may be read from the RAM 17 and operated.

【0013】画像メモリ19は、画像データを記憶する
ものであり、RAM17に格納されている図形描画デー
タで描画される図形が格納され、この画像メモリ19に
格納されるデータが、プリンタ25やディスプレイ27
に出力されるようになっている。入力装置21は、ポイ
ンティングデバイスとしてのマウス211やキーボード
213等の各種入力装置を備えている。また、入力装置
21には、図示しないタブレットやデジタイザ等の各種
入力装置も接続が可能になっている。スキャナ23は、
画像データを読み込む入力装置で、読み込まれた画像デ
ータは、画像メモリ19に格納されるようになってい
る。プリンタ25およびディスプレイ27は、図形描画
データに従って画像メモリ19に展開された図形データ
を出力する装置である。プリンタ25としては、ドット
プリンタ、レーザプリンタ、XYプロッタ等の各種装置
が使用される。また、ディスプレイ27としては、CR
Tディスプレイや、液晶ディスプレイ等の各種ディスプ
レイが使用される。
The image memory 19 stores image data. The image memory 19 stores a figure drawn by the figure drawing data stored in the RAM 17. The data stored in the image memory 19 is stored in a printer 25 or a display. 27
Is output to The input device 21 includes various input devices such as a mouse 211 and a keyboard 213 as a pointing device. Various input devices such as a tablet and a digitizer (not shown) can be connected to the input device 21. The scanner 23 is
The image data read by the input device that reads the image data is stored in the image memory 19. The printer 25 and the display 27 are devices that output graphic data developed in the image memory 19 according to graphic drawing data. Various devices such as a dot printer, a laser printer, and an XY plotter are used as the printer 25. Also, as the display 27, CR
Various displays such as a T display and a liquid crystal display are used.

【0014】通信制御部29は、LAN(ローカル・エ
リア・ネットワーク)、ファクシミリ通信網、ISDN
(サービス総合ディジタル網)等の各種通信網を介し
て、パーソナルコンピュータやオフィスコンピュータ、
ワークテーション、電子出版システム、ワードプロセッ
サその他各種の情報処理装置や、異機種装置と接続され
ている。この通信制御部29を介して他の情報処理装置
間において、図形描画データ等の各種データの通信が行
われるようになっている。
The communication control unit 29 includes a LAN (local area network), a facsimile communication network, an ISDN
(Personal computer, office computer, etc.)
It is connected to a workstation, an electronic publishing system, a word processor, and various other information processing devices, as well as heterogeneous devices. Communication of various data such as graphic drawing data is performed between the other information processing apparatuses via the communication control unit 29.

【0015】次に、このように構成された実施例の動作
について説明する。 〔ベジェ曲線描画処理の原理〕 図4はベジェ曲線による曲線の描画状態を表したもので
ある。この図4に示すように、4つの制御点を構成する
アンカーポイントP0、P3、コントロールポイント
1、P2のうち、始点P0、終点P3を通り、2つの
ントロールポイントP1、P2の方向と距離によって決
定されるベジェ曲線L0が描画されることとなる。この
ベジェ曲線L0は、次の3次ベジェ関数B(t)によっ
て演算される。 B(t)=(1−t)3 ・P0 +3(1−t)2 ・t・P1 +3(1−t)・t2 ・P2+t3 ・P3 ここで、0≦t≦1である。
Next, the operation of the embodiment configured as described above will be described. [Principle of Bezier Curve Drawing Processing] FIG. 4 shows a drawing state of a curve by a Bezier curve. As shown in FIG. 4, the anchor points P0, P3 and the control points P constituting the four control points
Of 1, P2, passes through the starting point P0, the end point P3, 2 two co
A Bezier curve L0 determined by the directions and distances of the control points P1 and P2 is drawn. This Bezier curve L0 is calculated by the following cubic Bezier function B (t). B (t) = (1- t) 3 · P0 +3 (1-t) 2 · t · P1 +3 (1-t) · t 2 · P2 + t 3 · P3 where a 0 ≦ t ≦ 1.

【0016】次にベジェ曲線の特定処理動作について説
明する。 〔動作の概要〕 本実施例によるベジェ曲線の特定処理は、操作者によっ
てマウス211から指定点89が入力されると、その指
定点89上のベジェ曲線を特定する。本実施例では、こ
の入力された指定点89の領域内判定を、ベジェ曲線を
描画するアンカーポイントP0、P3、コントロールポ
イントP1、P2および、そのベジェ曲線のt=0.5
の点P4からなる、2つの三角形領域に対して領域内判
定を行う。
Next, the operation of specifying the Bezier curve will be described. [Outline of Operation] In the processing for specifying a Bezier curve according to the present embodiment, when a designated point 89 is input from the mouse 211 by the operator, the Bezier curve on the designated point 89 is specified. In this embodiment, the determination of the input designated point 89 in the area is performed by determining the anchor points P0 and P3 for drawing the Bezier curve and the control point.
Int P1, P2 and t = 0.5 of the Bezier curve
Is determined for two triangular regions consisting of the point P4.

【0017】図5から図12は、ベジェ曲線の特定処理
動作を説明するためのものである。図5に示すように、
3本の曲線L1、L2、L3が既に描画され、ディスプ
レイ27に表示されているものとする。そして、これら
の各曲線のうち、操作者が曲線L2を特定すべくマウス
211等の操作によって指定点89を入力した場合の、
情報処理装置による曲線L2の特定処理動作について説
明する。CPU11は、指定点89が入力されたか否か
を監視しており、図12に示すように、指定点89が入
力されると(ステップ1;Y)、パラメータn、mをそ
れぞれ1に設定する(ステップ2)。そして、図6に示
すように、ディスプレイ27に表示されている各曲線L
1、L2、L3を含む最小の矩形領域Q1、Q2、Q3
を計算し、RAM17に格納しておく(ステップ3)。
なお、これら各矩形領域は、曲線の描画時に予め計算し
ておき、その図形を示すデータと共に矩形領域を示すデ
ータをRAM17に格納しておくようにしてもよい。こ
の場合、CPU11は、RAM17から、各曲線を含む
最小の矩形領域を計算しておく。
FIGS. 5 to 12 are for explaining the operation for specifying a Bezier curve. As shown in FIG.
It is assumed that three curves L1, L2, L3 have already been drawn and are displayed on the display 27. Then, of these curves, when the operator inputs the designated point 89 by operating the mouse 211 or the like to specify the curve L2,
A specific processing operation of the curve L2 by the information processing device will be described. The CPU 11 monitors whether or not the designated point 89 has been inputted. As shown in FIG. 12, when the designated point 89 is inputted (Step 1; Y), the parameters n and m are set to 1 respectively. (Step 2). Then, as shown in FIG. 6, each of the curves L displayed on the display 27 is displayed.
The smallest rectangular areas Q1, Q2, Q3 including 1, L2, L3
Is calculated and stored in the RAM 17 (step 3).
Each of these rectangular areas may be calculated in advance at the time of drawing a curve, and data indicating the rectangular area may be stored in the RAM 17 together with data indicating the figure. In this case, the CPU 11 calculates a minimum rectangular area including each curve from the RAM 17.

【0018】そして、CPU11は、RAM17に格納
した矩形領域Qnを読み出し、その矩形領域Qn内に指
定点89があるか否かを順次判断する(ステップ4)。
矩形領域Qnに指定点89が含まれる場合(ステップ
4;Y)、図7に示すように、そのベジェ曲線Lnのセ
グメントLnmを構成する4つの制御点、すなわち、2
つのアンカーポイント(始点、終点)と2つのコントロ
ールポイントを含む最小の矩形領域Rnmを算出する
(ステップ5)。CPU11は、算出した矩形領域Rn
mに指定点89が含まれるか否かを判断する(ステップ
6)。指定点89が含まれる場合(ステップ6;Y)、
そのベジェ曲線Lnmをt=0.5で分割する点tnm
を計算する(ステップ7)。
Then, the CPU 11 reads the rectangular area Qn stored in the RAM 17, and sequentially determines whether or not the designated point 89 exists in the rectangular area Qn (step 4).
When the specified point 89 is included in the rectangular area Qn (step 4; Y), as shown in FIG. 7, the four control points constituting the segment Lnm of the Bezier curve Ln, namely, 2
One anchor point (start point, end point) and two control points
The minimum rectangular area Rnm including the rule point is calculated (step 5). The CPU 11 calculates the calculated rectangular area Rn.
It is determined whether or not the specified point 89 is included in m (step 6). When the designated point 89 is included (Step 6; Y),
A point tnm at which the Bezier curve Lnm is divided at t = 0.5
Is calculated (step 7).

【0019】図8はベジェ曲線L0をt=0.5で分割
する点tnmを表したものである。例えば、図8に示す
4つの制御点P0、P1、P2、P3で定義される3次
ベジェ曲線L0は形状を変えることなく2つの3次ベジ
ェ曲線に分割することができる。すなわち、ベジェ曲線
L0は、4点P0、P4、P7、P9で定義される3次
ベジェ曲線L1および4点P9、P8、P6、P3で定
義される3次ベジェ曲線L2に分割できる。ここで点t
nmは、制御点P9が該当する。ここで、 P4=(P0+P1)/2 P5=(P1+P2)/2 P6=(P2+P3)/2 P7=(P4+P5)/2=(P0+2P1+P2)/
4 P8=(P5+P6)/2=(P1+2P2+P3)/
4 P9=(P7+P8)/2=〔P0+3(P1+P2)
+P3〕/4 である。このように3次ベジェ曲線は、分割を繰り返し
再帰的に適用することで、際限なく細分することができ
るという性質をもっている。
FIG. 8 shows a point tnm at which the Bezier curve L0 is divided at t = 0.5. For example, a cubic Bezier curve L0 defined by four control points P0, P1, P2, and P3 shown in FIG. 8 can be divided into two cubic Bezier curves without changing the shape. That is, the Bezier curve L0 can be divided into a cubic Bezier curve L1 defined by four points P0, P4, P7, and P9 and a cubic Bezier curve L2 defined by four points P9, P8, P6, and P3. Where point t
nm corresponds to the control point P9. Here, P4 = (P0 + P1) / 2 P5 = (P1 + P2) / 2 P6 = (P2 + P3) / 2 P7 = (P4 + P5) / 2 = (P0 + 2P1 + P2) /
4 P8 = (P5 + P6) / 2 = (P1 + 2P2 + P3) /
4 P9 = (P7 + P8) / 2 = [P0 + 3 (P1 + P2)
+ P3] / 4. As described above, the cubic Bezier curve has a property that it can be subdivided without limit by repeatedly applying the division recursively.

【0020】CPU11は、点tnmを算出すると、図
9に示すように、2つの三角形領域P0、P1、tnm
と、tnm、P2、P3の2つの三角形領域Snmを算
出し、その三角形領域Snm内に指定点89があるか否
かを判断する(ステップ8)。指定点89が三角形領域
Snm内にある場合(ステップ8;Y)、そのセグメン
トLnm(図9では、セグメントL22)について、従
来と同様に、線上判定処理を行う(ステップ9)。な
お、本実施例における線上判定処理では、セグメントL
nmを256分割したアンカーポイントを直線で結ぶこ
とにより近似する。CPU11は、線上判定処理によ
り、近似した直線と指定点との距離が所定の許容値内に
有るか否かを判断し、許容値内であれば(ステップ1
0;Y)、そのセグメントLnmを含む曲線Lnを、特
定すると共に、ディスプレイ27に所定の表示をして
(ステップ11)、特定処理を終了する。
When the CPU 11 calculates the point tnm, as shown in FIG. 9, the two triangular areas P0, P1, tnm
, Tnm, P2, and P3 are calculated, and it is determined whether or not the designated point 89 exists in the triangular area Snm (step 8). If the designated point 89 is within the triangular area Snm (Step 8; Y), a line determination process is performed on the segment Lnm (segment L22 in FIG. 9) in the same manner as in the related art (Step 9). In the on-line determination process in the present embodiment, the segment L
Approximation is made by connecting the anchor points obtained by dividing nm by 256 using straight lines. CPU11 is the line determination process, the distance between the straight line and the designated point that approximates it is determined whether or not within a predetermined allowable value, if it is within tolerance (Step 1
0; Y) , the curve Ln including the segment Lnm is specified, a predetermined display is displayed on the display 27 (step 11), and the specification processing ends.

【0021】ステップ6、ステップ8、および、ステッ
プ10における判断がNの場合、CPU11は、mが最
終値か否かを判断する(ステップ12)。mが最終値で
ない場合(ステップ12;N)、mに1を加えて(ステ
ップ13)、ステップ5以降の処理を次のセグメントL
nmについて行う。ここで、ステップ6の判断がNの場
合は、矩形領域Rnmに指定点89が含まれない場合で
あり、例えば、図10に示す矩形領域R11や矩形領域
R13が該当する。また、ステップ8の判断がNの場合
は、矩形領域Rnmに指定点89が含まれるが、三角形
領域Snm内に指定点89が含まれない場合であり、例
えば、図10に示す矩形領域R12に対する三角形領域
S12(図11参照)が該当する。
If the determination in steps 6, 8 and 10 is N, the CPU 11 determines whether m is the final value (step 12). If m is not the final value (step 12; N), 1 is added to m (step 13), and the processing after step 5 is performed on the next segment L
nm. Here, when the determination in step 6 is N, the specified point 89 is not included in the rectangular area Rnm, and corresponds to, for example, the rectangular area R11 or the rectangular area R13 shown in FIG. If the determination in step 8 is N, the specified point 89 is included in the rectangular area Rnm, but the specified point 89 is not included in the triangular area Snm. For example, the rectangular area Rnm shown in FIG. This corresponds to the triangular area S12 (see FIG. 11).

【0022】そして、CPU11は、ステップ12およ
びステップ4の判断において、mが最終値である場合
(ステップ12;N)、および、矩形領域Qn内に指定
点89がない場合(ステップ4;N)、nが最終値か否
かを判断する(ステップ14)。nが最終値でない場合
(ステップ14;N)、nに1を加えて(ステップ1
5)、ステップ4以降の処理を、次の曲線Lnの矩形領
域Qnについて行う。nが最終値である場合、指定点8
9で指定された位置に該当する曲線が存在しない旨をデ
ィスプレイ27に表示して(ステップ16)、特定処理
を終了する。
Then, the CPU 11 determines in step 12 and step 4 that m is the final value (step 12; N) and that there is no designated point 89 in the rectangular area Qn (step 4; N). , N is a final value (step 14). If n is not the final value (Step 14; N), 1 is added to n (Step 1).
5) The processing after step 4 is performed on the rectangular area Qn of the next curve Ln. If n is the final value, designated point 8
The fact that there is no curve corresponding to the position specified in 9 is displayed on the display 27 (step 16), and the specific processing is terminated.

【0023】図13は、本実施例の線上判定処理(ステ
ップ9)の対象となるセグメントLnmを説明するため
のものである。この図13は、図14(b)に対応して
示されている。この図13に示すように、本実施例で
は、三角形領域Snm内に指定点89が含まれるか否か
を判断している(ステップ8)ため、線上判定処理の対
象となるセグメントLnmとしては、90aのみであ
る。このように、従来の特定処理では、図14(b)に
示すように、全てのベジェ曲線90a〜94aに対し
て、長時間を要する線上判定処理を行う必要があるのに
対して、本実施例では、線上判定処理の対象となるセグ
メントが少ないため、図形を高速で特定することができ
る。
FIG. 13 is a diagram for explaining the segment Lnm to be subjected to the on-line determination processing (step 9) of this embodiment. FIG. 13 is shown corresponding to FIG. As shown in FIG. 13, in the present embodiment, it is determined whether or not the specified point 89 is included in the triangular area Snm (Step 8). Therefore, as the segment Lnm to be subjected to the on-line determination processing, 90a only. As described above, in the conventional specific processing, as shown in FIG. 14B, it is necessary to perform a long-time on-line determination processing on all the Bezier curves 90a to 94a. In the example, since there are few segments to be subjected to the on-line determination processing, the figure can be specified at high speed.

【0024】[0024]

【発明の効果】以上説明したように、本発明の情報処理
装置によれば、線上判定処理の対象が少なくなるので、
図形の特定を高速で行うことができる。
As described above, according to the information processing apparatus of the present invention, the number of objects of the on-line determination processing is reduced.
A figure can be specified at high speed.

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

【図1】請求項1の発明における情報処理装置の原理を
示す原理図である。
FIG. 1 is a principle diagram showing the principle of an information processing apparatus according to the first aspect of the present invention.

【図2】請求項2の発明における情報処理装置の原理を
示す原理図である。
FIG. 2 is a principle diagram showing the principle of the information processing apparatus according to the invention of claim 2;

【図3】本発明の情報処理装置における一実施例のハー
ド構成を表したものである。
FIG. 3 illustrates a hardware configuration of an embodiment of the information processing apparatus of the present invention.

【図4】ベジェ曲線による曲線の描画状態の説明図であ
る。
FIG. 4 is an explanatory diagram of a drawing state of a curve by a Bezier curve.

【図5】ベジェ曲線の特定処理動作の対象となるベジェ
曲線を例示した説明図である。
FIG. 5 is an explanatory diagram exemplifying a Bezier curve to be subjected to a Bezier curve identification processing operation;

【図6】ベジェ曲線の特定処理動作における、各曲線を
含む最小の矩形領域Qnの説明図である。
FIG. 6 is an explanatory diagram of a minimum rectangular area Qn including each curve in a Bezier curve specification processing operation.

【図7】ベジェ曲線特定処理動作における、セグメント
の4つの制御点を含む最小の矩形領域Rnmの説明図で
ある。
FIG. 7 is an explanatory diagram of a minimum rectangular area Rnm including four control points of a segment in the Bezier curve specifying processing operation.

【図8】ベジェ曲線特定処理動作における、ベジェ曲線
L0をt=0.5で分割する点tnmの説明図である。
FIG. 8 is an explanatory diagram of a point tnm at which the Bezier curve L0 is divided at t = 0.5 in the Bezier curve specification processing operation.

【図9】ベジェ曲線特定処理動作における、2つの三角
形領域の説明図である。
FIG. 9 is an explanatory diagram of two triangular areas in the Bezier curve specifying processing operation.

【図10】ベジェ曲線特定処理動作における、矩形領域
Rnmに指定点を含む場合と含まない場合の説明図であ
る。
FIG. 10 is an explanatory diagram of a case where a specified point is included in a rectangular area Rnm and a case where the specified point is not included in a Bezier curve specifying processing operation.

【図11】ベジェ曲線特定処理動作における、三角形領
域Snm内に指定点が含まれない場合の説明図である。
FIG. 11 is an explanatory diagram in a case where a designated point is not included in a triangular area Snm in the Bezier curve specifying processing operation.

【図12】ベジェ曲線特定処理動作を示すフローチャー
トである。
FIG. 12 is a flowchart showing a Bezier curve specification processing operation.

【図13】実施例における線上判定処理の対象となるセ
グメントLnmの説明図である。
FIG. 13 is an explanatory diagram of a segment Lnm to be subjected to the on-line determination process in the embodiment.

【図14】従来の線上判定の対象となるベジェ曲線を決
定する領域判定処理の説明図である。
FIG. 14 is an explanatory diagram of a conventional area determination process for determining a Bezier curve to be subjected to on-line determination.

【符号の説明】[Explanation of symbols]

1 入力手段 2 三角形領域算出手段 3 第1判断手段 4 第2判断手段 5 ベジェ曲線特定手段 6 矩形領域算出手段 7 第3判断手段 11 CPU 13 バスライン 15 ROM 17 RAM 19 画像メモリ 21 入力装置 211 マウス 213 キーボード 23 スキャナ 25 プリンタ 27 ディスプレイ 29 通信制御部 Reference Signs List 1 input means 2 triangular area calculating means 3 first determining means 4 second determining means 5 Bezier curve specifying means 6 rectangular area calculating means 7 third determining means 11 CPU 13 bus line 15 ROM 17 RAM 19 image memory 21 input device 211 mouse 213 Keyboard 23 Scanner 25 Printer 27 Display 29 Communication control unit

フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06T 1/00 G06T 11/00 - 17/50 G06F 17/50 G06F 3/00 G06F 3/14 - 3/153 Continuation of front page (58) Fields investigated (Int.Cl. 7 , DB name) G06T 1/00 G06T 11/00-17/50 G06F 17/50 G06F 3/00 G06F 3/14-3/153

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 曲線が通過する2つのアンカーポイント
と、通過しない2つのコントロールポイントの4つの制
御点からベジェ曲線を描画する情報処理装置において、 描画されたベジェ曲線を特定するための指定点を入力す
る入力手段と、 ベジェ曲線のセグメント上の所定点を算出し、この所定
点、始点、一方のコントロールポイントからなる三角形
領域、および、前記所定点、終点、他方のコントロール
ポイントからなる三角形領域を算出する三角形領域算出
手段と、 この三角形領域算出手段で算出された2つの三角形領域
に前記入力手段から入力された指定点が含まれるか否か
を判断する第1判断手段と、 この第1判断手段で2つの三角形領域に指定点が含まれ
ると判断されたセグメントに対して、所定距離内に前記
指定点が存在するか否かを判断する第2判断手段と、 この第2判断手段で指定点が所定距離内に存在すると判
断されたセグメントを含むベジェ曲線を特定するベジェ
曲線特定手段とを具備することを特徴とする情報処理装
置。
1. An information processing apparatus for drawing a Bezier curve from four control points , two anchor points through which a curve passes and two control points through which no curve passes, a designated point for specifying the drawn Bezier curve. An input means for inputting, calculating a predetermined point on the segment of the Bezier curve, and calculating the predetermined point, the starting point, a triangular area including one control point , and the predetermined point, the ending point, and the other control;
A triangular area calculating means for calculating a triangular area consisting of points; and a first judging means for judging whether or not the two triangular areas calculated by the triangular area calculating means include the designated point input from the input means. And a second determining means for determining whether or not the specified point exists within a predetermined distance with respect to the segment determined by the first determining means to include the specified point in the two triangular areas; An information processing apparatus comprising: a Bezier curve specifying unit that specifies a Bezier curve that includes a segment for which the specified point is determined to be within a predetermined distance by the second determining unit.
【請求項2】 セグメントの4つの制御点を含む矩形領
域を算出する矩形領域算出手段と、 この矩形領域算出手段で算出された矩形領域に前記入力
手段から入力された指定点が含まれるか否かを判断する
第3判断手段とを備え、 前記三角形領域算出手段は、前記第3判断手段で、前記
矩形領域に指定点が含まれると判断されたセグメントに
対して三角形領域を算出することを特徴とする請求項1
記載の情報処理装置。
2. A rectangular area calculating means for calculating a rectangular area including four control points of a segment, and whether or not the rectangular area calculated by the rectangular area calculating means includes a designated point input from the input means. And a third determining means for determining whether the triangular area is calculated for the segment determined by the third determining means to include the designated point in the rectangular area. Claim 1.
An information processing apparatus according to claim 1.
JP18091093A 1993-06-26 1993-06-26 Information processing device Expired - Fee Related JP3302455B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18091093A JP3302455B2 (en) 1993-06-26 1993-06-26 Information processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18091093A JP3302455B2 (en) 1993-06-26 1993-06-26 Information processing device

Publications (2)

Publication Number Publication Date
JPH0785301A JPH0785301A (en) 1995-03-31
JP3302455B2 true JP3302455B2 (en) 2002-07-15

Family

ID=16091436

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18091093A Expired - Fee Related JP3302455B2 (en) 1993-06-26 1993-06-26 Information processing device

Country Status (1)

Country Link
JP (1) JP3302455B2 (en)

Also Published As

Publication number Publication date
JPH0785301A (en) 1995-03-31

Similar Documents

Publication Publication Date Title
JP3030206B2 (en) Method and apparatus for clipping a graphic polygon to a clipping area
JPH10105361A (en) Method and system for specifying object
JP2585515B2 (en) Drawing method
JPH07200218A (en) Method and equipment for interlocking of graphical object
EP0887773A2 (en) Curve smoothing
JP3302455B2 (en) Information processing device
US6392662B1 (en) Draw order preservation in a computer-implemented graphics system
JP2662539B2 (en) 3D graphics processor
JP3339648B2 (en) Information processing apparatus and drawing method
JP3156729B2 (en) Drawing equipment
JPS63211466A (en) Graphic input device
JPH0830665A (en) Method and device for editing character and graphic
JPH0785293A (en) Information processor
JPH0290321A (en) Catalog execution control system
JP3269686B2 (en) Image creation device
JP3362520B2 (en) Image forming device
JPH11203489A (en) Method and device for plotting bezier curve and recording medium storing bezier curve plotting program
JP2001357076A (en) Image display method for cad system
JP2714114B2 (en) Graphic processing method and graphic system
JPH07282285A (en) Graphic editing device
JPH0785125A (en) Graphic drawing device
JPH08138068A (en) Device and method for graphic generation
JPH0944529A (en) Method and device for graphic processing
JPS61240283A (en) Display controller
Van Dam An overview of interactive computer graphics and its application to computer-aided engineering and design

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080426

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110426

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees