JP2677273B2 - A polygonal line approximation device for cubic Bezier curves - Google Patents

A polygonal line approximation device for cubic Bezier curves

Info

Publication number
JP2677273B2
JP2677273B2 JP22243888A JP22243888A JP2677273B2 JP 2677273 B2 JP2677273 B2 JP 2677273B2 JP 22243888 A JP22243888 A JP 22243888A JP 22243888 A JP22243888 A JP 22243888A JP 2677273 B2 JP2677273 B2 JP 2677273B2
Authority
JP
Japan
Prior art keywords
curve
point
cubic bezier
circuit
coordinate
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
JP22243888A
Other languages
Japanese (ja)
Other versions
JPH0271384A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP22243888A priority Critical patent/JP2677273B2/en
Priority to EP89306213A priority patent/EP0349182B1/en
Priority to DE68927786T priority patent/DE68927786D1/en
Priority to KR1019890009097A priority patent/KR920003479B1/en
Publication of JPH0271384A publication Critical patent/JPH0271384A/en
Priority to US07/795,253 priority patent/US5214754A/en
Application granted granted Critical
Publication of JP2677273B2 publication Critical patent/JP2677273B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Description

【発明の詳細な説明】 〔概 要〕 たとえばコンピュータグラフィック表示装置、図形印
刷装置等に用いられる3次ベジェ曲線の折線近似装置に
関し、 処理時間およびデータ量を増大させることなく曲線を
折線で近似させることを目的とし、 3次ベジェ曲線の始点、第1の制御点、第2の制御
点、および終点を入力する3次ベジェ曲線座標入力手段
と、前記始点と前記終点とを結ぶ線分の中点と、前記第
1の制御点と前記第2の制御点とを結ぶ線分の中点と、
の座標差を演算する誤差演算手段と、該座標差が所定値
以上か否かを判別する誤差判別手段と、該座標差が所定
値未満の場合には当該曲線の始点および終点を結ぶ線分
を前記曲線の折線データとして発生する折線データ発生
手段と、前記座標差が所定値以上の場合には前記3次ベ
ジェ曲線を分割し、該分割された各3次ベジェ曲線に対
して前記誤差演算手段および前記誤差判別手段の動作を
繰り返させる曲線分割手段とを具備するように構成す
る。
The present invention relates to a polygonal line approximation device for a cubic Bezier curve used in, for example, a computer graphic display device, a graphic printing device, etc., and approximates a curve with a polygonal line without increasing processing time and data amount. For the purpose of: a cubic Bezier curve coordinate input means for inputting a start point, a first control point, a second control point, and an end point of a cubic Bezier curve, and a line segment connecting the start point and the end point A point, and a midpoint of a line segment connecting the first control point and the second control point,
Error calculating means for calculating the coordinate difference of the curve, an error determining means for determining whether the coordinate difference is a predetermined value or more, and a line segment connecting the start point and the end point of the curve when the coordinate difference is less than the predetermined value. And polygonal line data generating means for generating the curved line data of the curve, and dividing the cubic Bezier curve when the coordinate difference is a predetermined value or more, and calculating the error for each of the divided cubic Bezier curves. Means and curve dividing means for repeating the operation of the error determining means.

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

本発明はたとえばコンピュータグラフィック表示装
置、図形印刷装置等に用いられる3次ベジェ曲線の折線
近似装置に関する。
The present invention relates to a polygonal line approximation device for a cubic Bezier curve used in, for example, a computer graphic display device or a graphic printing device.

〔従来の技術〕[Conventional technology]

一般的に、3対ベジェ曲線は、第2図に示すように、
始点Q11、終点Q14、2つの制御点Q12,Q13の4つの曲線
定義座標により、曲線が表される。この3次ベジェ曲線
の曲線上の点は、この4つの曲線定義座標を用いること
により、簡単に求めることができる(山口富士夫著“コ
ンピュータディスプレイによる形状処理工学(2)"p10
〜15、日刊工業、昭和57)。すなわち、Q11(始点)、Q
12(制御点)、Q13(制御点)、Q14(終点)の4つの曲
線定義座標が与えられたとき、以下の手順により曲線を
比率ts:1−tsで分割する曲線上の点を求めることができ
る。
Generally, the 3-pair Bezier curve is as shown in FIG.
A curve is represented by four curve defining coordinates of a start point Q 11 , an end point Q 14 , and two control points Q 12 , Q 13 . The points on the curve of this cubic Bezier curve can be easily obtained by using these four curve definition coordinates (Fujio Yamaguchi "Shape processing engineering by computer display (2)" p10
~ 15, Nikkan Kogyo, Showa 57). That is, Q 11 (starting point), Q
Given the four curve definition coordinates of 12 (control point), Q 13 (control point), and Q 14 (end point), the points on the curve that divide the curve by the ratio ts: 1-ts are calculated by the following procedure. You can ask.

(1)Q11,Q12間を比率ts:1−tsで内分する点をQ21
し、Q12Q,13間を比率ts:1−tsで内分する点をQ22とし、
Q13,Q14間を比率ts:1−tsで内分する点をQ23とする。
(1) Q 21 is the point that internally divides between Q 11 and Q 12 with the ratio ts: 1−ts, and Q 22 is the point that internally divides between Q 12 Q and 13 with the ratio ts: 1−ts.
The point where Q 13 and Q 14 are internally divided by the ratio ts: 1−ts is Q 23 .

(2)さらに、Q21,Q22間を比率ts:1−tsで内分する点
をQ31とし、Q22,Q23間を比率ts:1−tsで内分する点をQ
32とする。
(2) Furthermore, the point that internally divides Q 21 and Q 22 with the ratio ts: 1-ts is Q 31, and the point that internally divides Q 22 and Q 23 with the ratio ts: 1-ts is Q.
32 .

(3)さらにもう一度、Q31Q,32間を比率ts:1−tsで内
分する点をQ41とする。
(3) Once again, Q 41 is the point that internally divides between Q 31 and Q 32 with the ratio ts: 1−ts.

このとき、Q41は、Q11,Q12,Q13,Q14により与えられた
曲線を比率ts:1−tsで分割する曲線上の点となる。
At this time, Q 41 is a point on the curve dividing the curve given by Q 11 , Q 12 , Q 13 , and Q 14 by the ratio ts: 1−ts.

同時に、Q11,Q12,Q13,Q14の4つの曲線定義座標によ
り表されたもとの3次ベジェ曲線は、Q11,Q12,Q13,Q14
の4つの曲線定義座標により表される3次ベジェ曲線
と、Q41,Q32,Q23,Q14の4つの曲線定義座標により表さ
れる3次ベジェ曲線の2つの曲線に分割される。
At the same time, Q 11, Q 12, Q 13, the original cubic Bezier curve represented by four curves define the coordinates of Q 14 is, Q 11, Q 12, Q 13, Q 14
It is divided into two curves, a cubic Bezier curve represented by the four curve defining coordinates of the above and a cubic Bezier curve represented by the four curve defining coordinates of Q 41 , Q 32 , Q 23 , and Q 14 .

従来、3次ベジェ曲線を直線列で近似する場合には、
上述の方法による分割を予め決められた回数だけ繰り返
し行い、求められた曲線上の点を順番に結んだ直線列と
していた。
Conventionally, when approximating a cubic Bezier curve with a straight line sequence,
The division by the above-described method is repeated a predetermined number of times to form a straight line string in which the points on the obtained curve are connected in order.

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

分割の回数と求められる曲線上の点の数には、指数関
数に比例する関係があり、従って、曲率が大きい曲線を
折線で高精度で表すためには、上記回数を増加させる必
要があり、この結果、処理時間およびデータ量が増大す
る一方、曲率が小さい曲線に対して過剰の精度となり、
逆の場合には、曲率が大きい曲線の近似された曲線の品
質が低下するという課題がある。
The number of divisions and the number of points on the curve to be obtained have a relationship proportional to the exponential function, and therefore, in order to represent a curve with a large curvature with a polygonal line with high accuracy, it is necessary to increase the number of times. As a result, the processing time and the amount of data increase, but the accuracy becomes excessive for a curve with a small curvature.
In the opposite case, there is a problem that the quality of the approximated curve of the curve having a large curvature deteriorates.

従って、本発明の目的は、処理時間およびデータ量を
増大させることなく3次ベジェ曲線を折線で高精度に近
似させることにある。
Therefore, an object of the present invention is to approximate a cubic Bezier curve with a polygonal line with high accuracy without increasing processing time and data amount.

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

上述の課題を解決するための手段は第1図に示され
る。すなわち、3次ベジェ曲線座標入力手段は、3次ベ
ジェ曲線の始点Q11、第1の制御点Q12、第2の制御点Q
13、および終点Q14を入力し、誤差演算手段は始点Q11
終点14とを結ぶ線分▲▼の中点Pと、第1
の制御点Q12と第2の制御点Q13とを結ぶ線分▲
▼の中点Rと、の座標差を演算し、誤差判別手段は
座標差が所定値以上か否かを判定する。この結果、座標
差が所定値未満の場合には、折線データ発生手段が当該
曲線の始点および終点を結ぶ線分▲▼を曲
線の折線データとして発生する。他方、座標差が所定値
以上の場合には、曲線分割手段は、2次ベジェ曲線を分
割し、これら分割された3次ベジェ曲線に対して誤差演
算手段および誤差判別手段の動作を繰り返させるもので
ある。
The means for solving the above-mentioned problem is shown in FIG. That is, the cubic Bezier curve coordinate input means uses the cubic Bezier curve start point Q 11 , the first control point Q 12 , and the second control point Q.
13 and the end point Q 14 are input, and the error calculating means uses the middle point P of the line segment ▲ ▼ connecting the start point Q 11 and the end point 14 and the first point
Line segment connecting the control point Q 12 and the second control point Q 13 of ▲
The difference between the midpoint R and the coordinate difference is calculated, and the error determining means determines whether or not the difference between the coordinates is equal to or greater than a predetermined value. As a result, when the coordinate difference is less than the predetermined value, the polygonal line data generating means generates the line segment ▲ ▼ connecting the start point and the end point of the curve as the polygonal line data of the curve. On the other hand, when the coordinate difference is equal to or larger than the predetermined value, the curve dividing means divides the quadratic Bezier curve, and the operations of the error calculating means and the error determining means are repeated with respect to the divided cubic Bezier curves. Is.

〔作 用〕(Operation)

上述の手段によれば、第3図に示すように、誤差とし
ては、近似された線分▲▼と、その区間の
実際の曲線Xとの最大距離を用いる。このとき、曲線X
と線分▲▼との距離を計算することは困難
であるため、3次ベジェ曲線の性質である凸開包(発生
される曲線Xは、4つの曲線定義座標の内側に存在す
る)を利用し、ベジェ曲線の始点Q11と終点Q14を結ぶ線
分の中点Pと、2つの制御点Q12,Q13間を結ぶ線分の中
点Rとの座標差を用いる。点Pと点R間の距離は、3次
ベジェ曲線の凸閉包より、線分▲▼と曲線
Xとの最大距離よりも長くなる。点Pと点Rとの座標差
が大きい場合には、3次ベジェ曲線は分割される。従っ
て、この分割回数は曲線Xの形状変化に合わせて変化す
る。この結果、曲率が大きい曲線に対しては分割回数は
増加するが、曲率が小さい曲線に対しては分割回数は減
少する。
According to the above-mentioned means, as shown in FIG. 3, the maximum distance between the approximated line segment () and the actual curve X in the section is used as the error. At this time, the curve X
Since it is difficult to calculate the distance between the line segment and the line ▲ ▼, use the convex hull (the generated curve X exists inside the four curve definition coordinates), which is the property of a cubic Bezier curve. Then, the coordinate difference between the midpoint P of the line segment connecting the start point Q 11 and the end point Q 14 of the Bezier curve and the midpoint R of the line segment connecting the two control points Q 12 and Q 13 is used. The distance between the point P and the point R is longer than the maximum distance between the line segment ▼ and the curve X due to the convex hull of the cubic Bezier curve. When the coordinate difference between the point P and the point R is large, the cubic Bezier curve is divided. Therefore, the number of divisions changes as the shape of the curve X changes. As a result, the number of divisions increases for a curve having a large curvature, but the number of divisions decreases for a curve having a small curvature.

〔実施例〕〔Example〕

第4図は本発明に係る曲線の折線近似装置が適用され
る図形表示装置である。第4図において、1は図形デー
タ入力装置、2は座標変換装置、3は曲線発生装置、4
は描画処理装置、5はCRT6を制御する表示制御装置であ
る。本発明に係る曲線の折線近似装置は曲線発生装置3
として用いられる。また、本発明は図形印刷装置にも適
用される。この場合には、第4図の表示制御装置5およ
びCRT6は印刷制御装置および印刷装置となる。
FIG. 4 shows a graphic display device to which the curved line approximation device according to the present invention is applied. In FIG. 4, 1 is a graphic data input device, 2 is a coordinate conversion device, 3 is a curve generation device, 4
Is a drawing processing device, and 5 is a display control device for controlling the CRT 6. The curved line approximation apparatus according to the present invention is a curve generation apparatus 3
Used as The present invention is also applied to a graphic printing device. In this case, the display controller 5 and the CRT 6 shown in FIG. 4 are the print controller and the printer.

第5図は本発明に係る曲線の折線近似装置の一実施例
を示すブロック回路図である。第5図において、データ
入力回路501は3次ベジェ曲線を表す4つの曲線定義座
標Q11〜Q14を入力処理する。曲線分割回路502はデータ
入力回路501からの入力座標の曲線もしくは誤差判定回
路504から戻された曲線データの曲線をts:1−tsで分割
処理をする。誤差演算回路503はデータ入力回路501から
の入力座標もしくは分割された曲線とそれを近似する線
分との座標差を演算する。誤差判別回路504は誤差演算
回路503により計算された座標差と、予め設定された座
標差の閾値との比較を行い、座標差が閾値以内である場
合には、データをデータ出力回路505に渡し、閾値以内
でない場合には、データを再び曲線分割回路502に戻
す。データ出力回路505は、折線近似された曲線のデー
タを出力する処理を行う。
FIG. 5 is a block circuit diagram showing an embodiment of a curved line approximation apparatus according to the present invention. In Figure 5, the data input circuit 501 inputs handle four curves defined coordinate Q 11 to Q 14 representing the cubic Bezier curve. The curve division circuit 502 divides the curve of the input coordinates from the data input circuit 501 or the curve of the curve data returned from the error determination circuit 504 by ts: 1-ts. The error calculation circuit 503 calculates the coordinate difference between the input coordinate from the data input circuit 501 or the divided curve and the line segment approximating it. The error determining circuit 504 compares the coordinate difference calculated by the error calculating circuit 503 with a preset coordinate difference threshold value, and when the coordinate difference is within the threshold value, passes the data to the data output circuit 505. If it is not within the threshold value, the data is returned to the curve dividing circuit 502 again. The data output circuit 505 performs a process of outputting the curve-approximated curve data.

以下、各回路502,503について詳述する。 Hereinafter, each of the circuits 502 and 503 will be described in detail.

曲線分割回路502は、たとえば、3次のベジェ曲線の
性質から曲線を比率ts:1−tsで分割する曲線上の点を求
める方法(参考文献:山口富士夫著“コンピュータディ
スプレイによる形状処理工学(2)”日刊工業p10〜1
5、昭和57)を用いて、曲線を分割するものである。第
6図に示すように、曲線分割回路502は、レジスタ601〜
604、座標分割回路605〜610、レジスタ611〜618により
構成されている。すなわち、第2図に示すように、曲線
を表す座標としてQ11〜Q14が与えられたとすると、これ
らの座標はレジスタ601〜604に格納される。座標Q11,Q
14はそのままレジスタ611,618に格納される。座標分割
回路605は座標Q11,Q12間を比率ts:1−tsで分割した座標
Q21を発生してレジスタ612に格納し、座標分割回路606
は座標Q12,Q13間を比率ts:1−tsで分割した座標Q22を発
生し、座標分割回路607は座標Q13,Q14間を比率ts:1−ts
で分割した座標Q23を発生してレジスタ617に格納する。
また、座標分割回路608は座標Q21,Q22間を比率ts:1−ts
で分割した座標Q31を発生してレジスタ613に格納し、座
標分割回路609は座方Q22,Q23間を比率ts:1−tsで分割し
た座標Q32を発生してレジスタ616に格納する。さらに、
座標分割回路610は座標Q31,Q32を比率ts:1−tsで分割し
た座標Q41を発生してレジスタ614,615に格納する。この
とき、第2図に示すように座標Q41は、Q11,Q12,Q13,Q14
により与えられた曲線比率ts:1−tsで分割する曲線上の
座標となり、また同時に、この座標において曲線は2つ
の曲線(Q11,Q21,Q31,Q41とQ41,Q32,Q23,Q14)に分割さ
れる。
The curve division circuit 502 obtains a point on the curve that divides the curve at the ratio ts: 1-ts from the property of a cubic Bezier curve (reference: Fujio Yamaguchi, "Shape processing engineering by computer display (2 ) ”Nikkan Kogyo p10〜1
(5, Showa 57) is used to divide the curve. As shown in FIG. 6, the curve division circuit 502 includes registers 601-
604, coordinate division circuits 605 to 610, and registers 611 to 618. That is, as shown in FIG. 2, if Q 11 to Q 14 are given as coordinates representing a curve, these coordinates are stored in the registers 601 to 604. Coordinates Q 11 ,, Q
14 is stored in the registers 611 and 618 as it is. The coordinate division circuit 605 divides the coordinates Q 11 and Q 12 with the ratio ts: 1-ts.
Generates Q 21 and stores it in register 612, and coordinate division circuit 606
The ratio ts between coordinates Q 12, Q 13 are: the coordinates Q 22 divided occurred in 1-ts, coordinates dividing circuit 607 ratio between coordinates Q 13, Q 14 ts: 1 -ts
The coordinate Q 23 divided by is generated and stored in the register 617.
Further, the coordinate division circuit 608 calculates the ratio ts: 1−ts between the coordinates Q 21 and Q 22.
The coordinate Q 31 divided by is generated and stored in the register 613, and the coordinate dividing circuit 609 generates the coordinate Q 32 which is obtained by dividing the sitting Q 22 and Q 23 by the ratio ts: 1−ts and stored in the register 616. To do. further,
The coordinate dividing circuit 610 generates the coordinate Q 41 by dividing the coordinates Q 31 and Q 32 by the ratio ts: 1−ts and stores them in the registers 614 and 615. At this time, as shown in FIG. 2, the coordinate Q 41 is Q 11 , Q 12 , Q 13 , Q 14
It becomes a coordinate on the curve divided by the curve ratio ts: 1-ts given by, and at the same time, the curve has two curves (Q 11 , Q 21 , Q 31 , Q 41 and Q 41 , Q 32 , It is divided into Q 23 and Q 14 ).

なお、第6図におけるレジスタ601〜604の入力座標Q
11〜Q14のデータ入力回路501もしくは誤差判別回路504
への切替は図示しないスイッチによって行われる。
The input coordinates Q of the registers 601 to 604 in FIG.
11 to Q 14 data input circuit 501 or error determination circuit 504
The switch to is performed by a switch (not shown).

第6図の各座標分割回路605〜610は、たとえば、第7
図に示すように、乗算器701,702、および加算器703によ
り構成される。
The coordinate division circuits 605 to 610 shown in FIG.
As shown in the figure, it is composed of multipliers 701 and 702 and an adder 703.

第3図の線分▲▼の中点Rと線分▲
▼の中点Pとの距離を演算する場合、2中点の
座標を(X1,Y1),(X2,Y2)とすると、2点間の距離の
計算は、式(1)に示すように表される。
Midpoint R and line segment of line segment ▲ ▼ in Fig. 3
▼ When calculating the distance from the midpoint P, assuming that the coordinates of the two midpoints are (X 1 , Y 1 ), (X 2 , Y 2 ), the distance between the two points can be calculated by the equation (1). It is expressed as shown in.

距離={(X1−X2+(Y1−Y21/2 …(1) 式(1)では、乗除算を必要とするため、高速な処理
を要求される場合には、不利である。これを加減算のみ
で処理を行うために、式(2)に示すように、2点間の
座標差を用いる。
Distance = In {(X 1 -X 2) 2 + (Y 1 -Y 2) 2} 1/2 ... (1) Equation (1), since it requires multiplication and division, if required high-speed processing Is at a disadvantage. In order to perform this processing only by addition and subtraction, the coordinate difference between two points is used as shown in equation (2).

座標差=|X1−X2|+|Y1−Y2| …(2) このようにすることで、演算を単純にかつ高速に実行
することができ、また、式(2)により求められた座標
差は、式(1)により求められた距離より必ず長くな
る。このため、求められた座標差を座標差の閾値と比較
し判断する場合に、近似された曲線の精度が低下するこ
とがないため、近似された曲線がなめらかである。
Coordinate difference = | X 1 −X 2 | + | Y 1 −Y 2 |… (2) By doing this, the operation can be executed simply and at high speed, and it is calculated by the equation (2). The obtained coordinate difference is always longer than the distance obtained by the equation (1). For this reason, when the obtained coordinate difference is compared with the coordinate difference threshold value for determination, the accuracy of the approximated curve does not decrease, and the approximated curve is smooth.

式(2)に示す座標差を演算するための第5図の誤差
演算回路503の詳細は第8図に示される。第8図におい
て、801,802,803,804,808はレジスタ、805,806は入力さ
れた2つの座標の中点を求める中点演算回路、807は入
力された2つの中点座標R,Pから式(2)に示した計算
式により求められる座標差を演算する座標差分演算回路
である。中点演算回路805,806は、たとえば、第9図に
示すように、加算器901および除算器902により構成され
る。
Details of the error calculation circuit 503 of FIG. 5 for calculating the coordinate difference shown in Expression (2) are shown in FIG. In FIG. 8, 801, 802, 803, 804, 808 are registers, 805, 806 are midpoint arithmetic circuits for obtaining the midpoints of the two input coordinates, and 807 is the calculation formula shown in the equation (2) from the two midpoint coordinates R, P input. It is a coordinate difference calculation circuit for calculating the coordinate difference obtained by The midpoint arithmetic circuits 805 and 806 are composed of an adder 901 and a divider 902, for example, as shown in FIG.

最初に、データ入力回路50より出力された座標差演算
に必要なQ11,Q12,Q13,Q14が、それぞれ、レジスタ801〜
804に格納される。ここで、Q11は始点、Q14は終点、
Q12,Q13は制御点である。この結果、中点演算回路805に
は、Q12とQ13が入力され、中点演算回路805を出力とし
て制御点Q12,Q13を結ぶ線分の中点Rが求められる。ま
た、中点演算回路806には、Q11とQ14が入力され、中点
演算回路806の出力として、始点Q11と終点Q14を結ぶ線
分の中点Pが求められる。さらに、座方差分演算回路80
7には、中点演算回路805により求められた中点Rと中点
演算回路806により求められた中点Pとが入力され、座
標差分演算回路807の出力として、この2つの中点の差
分が求められる。この演算結果が誤差eとして、レジス
タ808に格納される。
First, Q 11 , Q 12 , Q 13 , and Q 14 necessary for coordinate difference calculation output from the data input circuit 50 are respectively registered in the registers 801-
Stored in 804. Where Q 11 is the start point, Q 14 is the end point,
Q 12 and Q 13 are control points. As a result, Q 12 and Q 13 are input to the midpoint arithmetic circuit 805, and the midpoint R of the line segment connecting the control points Q 12 and Q 13 is obtained using the midpoint arithmetic circuit 805 as an output. Further, Q 11 and Q 14 are input to the midpoint arithmetic circuit 806, and the midpoint P of the line segment connecting the start point Q 11 and the end point Q 14 is obtained as the output of the midpoint arithmetic circuit 806. Furthermore, the sitting difference calculation circuit 80
The midpoint R obtained by the midpoint arithmetic circuit 805 and the midpoint P obtained by the midpoint arithmetic circuit 806 are input to 7 and the difference between the two midpoints is output as the output of the coordinate difference arithmetic circuit 807. Is required. The calculation result is stored in the register 808 as the error e.

なお、第8図におけるレジスタ801〜804の入力座標Q
11〜Q14のデータ入力回路501もしくは曲線分割回路502
への切替は図示しないスイッチによって行われる。
The input coordinates Q of the registers 801 to 804 in FIG.
11 to Q 14 data input circuit 501 or curve division circuit 502
The switch to is performed by a switch (not shown).

上述の誤差eを、第5図の誤差判定回路504が閾値と
比較して、座標差が閾値より小さい場合には、線分▲
▼がデータ出力部806より出力される。ま
た、座標差が閾値より大きい場合には、曲線Q11,Q21,Q
31,Q41が再び曲線分割回路502に入力され、分割され
る。このとき、もう1つの曲線であるQ41,Q32,Q23,Q14
は、誤差判定回路504内部に一時的に保持しておき、曲
線Q11,Q21,Q31,Q41の分割が終了した時点で、曲線分割
回路502に入力され、処理が行われる。
The above-mentioned error e is compared with the threshold value by the error determination circuit 504 in FIG. 5, and if the coordinate difference is smaller than the threshold value, the line segment ▲
▼ is output from the data output unit 806. If the coordinate difference is larger than the threshold value, the curves Q 11 , Q 21 , Q
31 and Q 41 are again input to the curve division circuit 502 and divided. At this time, another curve Q 41 , Q 32 , Q 23 , Q 14
Are temporarily stored in the error determination circuit 504, and when the curves Q 11 , Q 21 , Q 31 , and Q 41 are divided, they are input to the curve division circuit 502 and processed.

この一連の処理により、3次のベジェ曲線は折線近似
され出力される。
Through this series of processing, the cubic Bezier curve is approximated to a broken line and output.

上述の実施例は汎用のマイクロコンピュータを用いて
そのプログラムとして実現することも可能である。たと
えば、第10図に示すように、ステップ1001にて3次ベジ
ェ曲線用データQ11〜Q14を入力し、ステップ1002にて上
述式(2)にもとづき座標差eを演算し、ステップ1003
にて座標差eが閾値以下か否かを判別する。この結果、
座標差e≦閾値であればステップ1006にて折線データと
して線分▲▼を出力し、座標差e>閾値で
あればステップ1004,1005に進む。
The above-described embodiment can be realized as a program using a general-purpose microcomputer. For example, as shown in FIG. 10, in step 1001, cubic Bezier curve data Q 11 to Q 14 are input, in step 1002 the coordinate difference e is calculated based on the above equation (2), and in step 1003
At, it is determined whether the coordinate difference e is less than or equal to the threshold value. As a result,
If the coordinate difference e ≦ threshold value, a line segment ▲ ▼ is output as broken line data in step 1006. If the coordinate difference e> threshold value, the process proceeds to steps 1004 and 1005.

ステップ1004では、3次ベジェ曲線データを生成する
ことにより曲線の分割を行い、ステップ1005にて8個の
Q11,Q21,…,Q14をメモリに格納する。そして、ステップ
1002に戻る。
In step 1004, the curve is divided by generating cubic Bezier curve data.
Store Q 11 , Q 21 , ..., Q 14 in the memory. And step
Return to 1002.

すなわち、曲線分割を繰り返す。また、ステップ100
7,1008にて曲線のすべて折線近似が終了するまでステッ
プ1002〜1006が繰り返される。
That is, curve division is repeated. Step 100
At steps 1002 to 1008, steps 1002 to 1006 are repeated until all polygonal line approximations of the curve are completed.

〔発明の効果〕〔The invention's effect〕

以上説明したように本発明によれば、曲線の曲率に応
じて分割回数すなわち近似折線の数が変化するので、処
理時間およびデータ量を増大させることなく、曲線を効
率よく、なめらかに折線近似することができる。
As described above, according to the present invention, the number of divisions, that is, the number of approximated polygonal lines changes according to the curvature of the curved line, so that the curved line can be approximated efficiently and smoothly without increasing the processing time and the amount of data. be able to.

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

第1図は本発明の基本構成を示す図、 第2図は3次ベジェ曲線の分割を説明する図、 第3図は本発明の作用を説明する図、 第4図は本発明に係る曲線の折線近似装置が適用される
図形表示装置を示すブロック回路図、 第5図は本発明に係る曲線の折線近似装置の一実施例を
示すブロック回路図、 第6図は第5図の曲線分割回路を示すブロック図、 第7図は第6図の座標分割回路の一例を示す回路図、 第8図は第5図の誤差演算回路を示す回路図、 第9図は第8図の中心演算回路を示す回路図、 第10図は他の実施例を示すフローチャートである。 501……データ入力回路、502……曲線分割回路、 503……誤差演算回路、504……誤差判別回路、 505……データ出力回路。
FIG. 1 is a diagram showing a basic configuration of the present invention, FIG. 2 is a diagram illustrating division of a cubic Bezier curve, FIG. 3 is a diagram illustrating an operation of the present invention, and FIG. 4 is a curve relating to the present invention. FIG. 5 is a block circuit diagram showing a figure display device to which the broken line approximation device of FIG. 5 is applied. FIG. 5 is a block circuit diagram showing an embodiment of a curved line approximation device according to the present invention. FIG. 7 is a block diagram showing a circuit, FIG. 7 is a circuit diagram showing an example of the coordinate division circuit shown in FIG. 6, FIG. 8 is a circuit diagram showing an error calculation circuit shown in FIG. 5, and FIG. 9 is a central calculation shown in FIG. FIG. 10 is a circuit diagram showing a circuit, and FIG. 10 is a flow chart showing another embodiment. 501 ... Data input circuit, 502 ... Curve division circuit, 503 ... Error calculation circuit, 504 ... Error determination circuit, 505 ... Data output circuit.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】3次ベジェ曲線の始点(Q11)、第1の制
御点(Q12)、第2の制御点(Q13)、および終点
(Q14)を入力する3次ベジェ曲線座標入力手段と、 前記始点(Q11)と前記終点(Q14)とを結ぶ線分▲
▼の中点(P)と、前記第1の制御点(Q12
と前記第2の制御点(Q13)とを結ぶ線分(▲
▼)の中点(R)と、座標差を演算する誤差演算手
段と、 該座標差が所定値以上か否かを判定する誤差判別手段
と、 該座標差が所定値未満の場合には当該曲線の始点および
終点を結ぶ線分(▼)を前記曲線の折線デ
ータとして発生する折線データ発生手段と、 前記座標差が所定値以上の場合には前記3次ベジェ曲線
を分割し、該分割された各3次ベジェ曲線に対して前記
誤差演算手段および前記誤差判別手段の動作を繰り返さ
せる曲線分割手段と、 を具備する3次ベジェ曲線の折線近似装置。
1. Cubic Bezier curve coordinates for inputting a starting point (Q 11 ), a first control point (Q 12 ), a second control point (Q 13 ), and an end point (Q 14 ) of a cubic Bezier curve. A line segment connecting the input means and the start point (Q 11 ) and the end point (Q 14 ) ▲
▼ Midpoint (P) and the first control point (Q 12 )
And the line segment connecting the second control point (Q 13 ) (▲
▼) middle point (R), an error calculating means for calculating a coordinate difference, an error determining means for determining whether the coordinate difference is a predetermined value or more, and an error determining means for determining whether the coordinate difference is less than the predetermined value. A polygonal line data generating means for generating a line segment (▼) connecting the start point and the end point of the curve as polygonal line data of the curve, and dividing the cubic Bezier curve when the coordinate difference is a predetermined value or more, and dividing A polygonal line approximation device for a cubic Bezier curve, comprising: a curve dividing unit that repeats the operations of the error calculating unit and the error determining unit for each cubic Bezier curve.
JP22243888A 1988-06-29 1988-09-07 A polygonal line approximation device for cubic Bezier curves Expired - Fee Related JP2677273B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP22243888A JP2677273B2 (en) 1988-09-07 1988-09-07 A polygonal line approximation device for cubic Bezier curves
EP89306213A EP0349182B1 (en) 1988-06-29 1989-06-20 Method and apparatus for approximating polygonal line to curve
DE68927786T DE68927786D1 (en) 1988-06-29 1989-06-20 Method and device for approximating a curve with a polygonal line
KR1019890009097A KR920003479B1 (en) 1988-06-29 1989-06-29 Method and apparatus for piecewise curve approximation
US07/795,253 US5214754A (en) 1988-06-29 1991-11-19 Method and apparatus for approximating polygonal line to curve

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22243888A JP2677273B2 (en) 1988-09-07 1988-09-07 A polygonal line approximation device for cubic Bezier curves

Publications (2)

Publication Number Publication Date
JPH0271384A JPH0271384A (en) 1990-03-09
JP2677273B2 true JP2677273B2 (en) 1997-11-17

Family

ID=16782401

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22243888A Expired - Fee Related JP2677273B2 (en) 1988-06-29 1988-09-07 A polygonal line approximation device for cubic Bezier curves

Country Status (1)

Country Link
JP (1) JP2677273B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02176879A (en) * 1988-12-28 1990-07-10 Toshiba Corp Parameter curved line generator
FI84253C (en) * 1989-12-18 1991-11-11 Kone Oy Capture device for a lift
EP2278550B1 (en) * 2009-06-17 2013-08-14 Canon Kabushiki Kaisha Method of encoding and decoding a graphics path sequence into a layered scheme
JP5247671B2 (en) * 2009-12-22 2013-07-24 ルネサスエレクトロニクス株式会社 Display data correction device, display panel driver using the same, and display device
GB2486021B (en) * 2010-12-02 2017-07-19 Agustawestland Ltd Aerofoil
JP2014010572A (en) * 2012-06-28 2014-01-20 Strauss Technology Co Ltd Vector image drawing device and vector image drawing method

Also Published As

Publication number Publication date
JPH0271384A (en) 1990-03-09

Similar Documents

Publication Publication Date Title
US5367617A (en) System and method of hybrid forward differencing to render Bezier splines
JP2501580B2 (en) Curved image visual display generator
US5309521A (en) Method and apparatus for generating a character curve by dividing and developing a bezier curve
US5363479A (en) System and method for rendering bezier splines
US5214754A (en) Method and apparatus for approximating polygonal line to curve
JPH06110992A (en) Shape deformation input operation method in cad system
JP2677273B2 (en) A polygonal line approximation device for cubic Bezier curves
EP0349182B1 (en) Method and apparatus for approximating polygonal line to curve
JP2961121B2 (en) Curve approximation device
JP2538645B2 (en) Curved line approximation device
US6005988A (en) Method and apparatus for rapid digital image resizing
JP3059739B2 (en) Information processing apparatus with curve drawing function and processing method
JPH05508724A (en) Apparatus and method for calculating exponential functions
JP2737933B2 (en) Division device
JPH06274149A (en) Method and device for varying width of outline font
JPH0293772A (en) Contour approximating system
JP3066060B2 (en) Polygonal approximation method for Besee curve section
JP3039387B2 (en) Apparatus for calculating intersection of B-spline curve and straight line in three-dimensional CAD
JP3118064B2 (en) Curve drawing device
JP3035141B2 (en) Character creation device and character creation method
JPH0991447A (en) Device for approximating bezier curve
JPH03198169A (en) Curve generating system
JPH07181944A (en) Outline font drawing device
JP2770560B2 (en) Graphic processing unit
EP0631253A2 (en) A device for use in the digital processing of a graphic image containing a straight line

Legal Events

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