JPH0271384A - Broken line approximating device for cubic bezier curve - Google Patents

Broken line approximating device for cubic bezier curve

Info

Publication number
JPH0271384A
JPH0271384A JP63222438A JP22243888A JPH0271384A JP H0271384 A JPH0271384 A JP H0271384A JP 63222438 A JP63222438 A JP 63222438A JP 22243888 A JP22243888 A JP 22243888A JP H0271384 A JPH0271384 A JP H0271384A
Authority
JP
Japan
Prior art keywords
curve
error
point
broken line
bezier curve
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.)
Granted
Application number
JP63222438A
Other languages
Japanese (ja)
Other versions
JP2677273B2 (en
Inventor
Masayuki Okamoto
雅之 岡本
Mitsuru Yamauchi
山内 満
Toshiya Mima
美間 俊哉
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

Abstract

PURPOSE:To effectively and smoothly approximate a curve to a broken line without increasing the processing time and the quantity of data by changing the dividing frequency, i.e., the number of approximate curves in accordance with the curvature of the curve. CONSTITUTION:A cubic Bezier curve coordinate input means input a start point Q11, a 1st control point Q12, a 2nd control point Q13, and an end point Q14 of a cubic Bezier curve. An error arithmetic means calculates the errors of a middle point P of a segment Q11Q14 connecting both points Q11 and Q14 and a middle point R of a segment Q12Q13 connecting both points Q12 and Q13. An error discriminating means discriminates whether those calculated errors are larger than the prescribed value or not. If not, a broken line data generating means produces the segment Q11Q14 connecting the start and end points of the corresponding curve as the broken line data on a curve. While the curve is divided and the actions are repeated in case the errors are larger than the prescribed value.

Description

【発明の詳細な説明】 〔概 要〕 たとえばコンピュータグラフィック表示装置、図形印刷
装置等に用いられる3次ヘジ、曲線の折線近似装置に関
し、 処理時間およびデータ量を増大させることなく曲線を折
線で近似させるごとを目的とし、3次ベジェ曲線の始点
、第1の制御点、第2の制御点、および終点を入力する
3次へジを曲線座標入力手段と、前記始点と前記終点と
を結ぶ線分の中点と、前記第1の制御点と前記第2の制
御点とを結ぶ線分の中点と、の誤差を演算する誤差演算
手段と、該誤差か所定値以上か否かを判別するt!′(
差判別手段と、該誤差が所定値未満の場合には当該曲線
の始点および終点を結ぶ線分を前記曲線の折線う一一夕
として発生する折線データ発生手段と、前記誤差が所定
4W以十の場合tこは前記3次ヘソエ曲線を分割し、該
分割さJ′シた各3次−・シェ曲線に処1シ2て前記誤
差演算手段および前記誤差判別1段の動作を繰り返さ一
已る曲線分割手段とを具備するように構成する。
[Detailed Description of the Invention] [Summary] Regarding cubic heges and curve line approximation devices used, for example, in computer graphic display devices, figure printing devices, etc., curves can be approximated by broken lines without increasing processing time and data amount. A curve coordinate input means for inputting a starting point, a first control point, a second control point, and an end point of a cubic Bezier curve, and a line connecting the starting point and the ending point. error calculation means for calculating an error between the midpoint of the minute and the midpoint of the line segment connecting the first control point and the second control point; and determining whether the error is greater than or equal to a predetermined value. Do it! ′(
a difference determining means; a broken line data generating means for generating a line segment connecting the starting point and the ending point of the curve as a broken line of the curve when the error is less than a predetermined value; In the case of t, divide the cubic Hessoe curve, process each of the divided cubic Hessoe curves, and repeat the operations of the error calculation means and the error discrimination stage 1. and curve dividing means.

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

本発明はたLえば二Iンピ7.−タグラフイック表示装
;〃、図形印刷装置等ムご用いられる3次ヘジェ曲線の
折線近似装置に関する。
The present invention is limited to two insulators7. - Taggraphic display device: This invention relates to a broken line approximation device for a cubic Hezier curve, which is used in graphic printing devices and the like.

〔従来の技術〕[Conventional technology]

一般的に、;3次ヘジ工曲線は、第2図に示すように、
始点QI +、終点(、l 、 4.2つの制御点Q、
2Q1.の4つの曲線定着座4g1により、曲線が表さ
れる。この3次・\ジー1−曲線の曲線トの点は、この
4つの曲線定義座標を用いることにより、節Ipに求め
ることができる(山口富十夫著“二1/ビブ、−タデイ
スプレイによる形状処理T学(2)  pi(1〜15
、日刊T業、昭和57)。ずなわち、CL、(始点)、
Q、2(制御点)、Ql:l(制御点) 、Q、、(終
点)Q) 4つの曲線定義座標が与えられたとき、以ト
の手順により曲線を比率ts : ]−13で分割・す
る曲線1の点を求めることができる。
Generally, the cubic curve is, as shown in Figure 2,
Starting point QI +, ending point (,l, 4. Two control points Q,
2Q1. A curved line is represented by the four curved fixing seats 4g1. The point of the curve T of this cubic/G1-curve can be found at the node Ip by using these four curve definition coordinates (according to Tomio Yamaguchi's "21/Bib,-Tade Display"). Shape processing T science (2) pi (1-15
, Nikkan T-gyo, 1982). Zunai, CL, (starting point),
Q, 2 (control point), Ql:l (control point), Q,, (end point) Q) When four curve definition coordinates are given, divide the curve by the ratio ts: ]-13 using the following procedure.・You can find the points on curve 1.

(1) Q、I 、 Ql2間を比率ts+]−tsで
内分する点をQ2□とし、Q、□、Q、、間を比率ts
:ltsで内分する点をQ22とし、Q、1.Q、、間
を比tjLs:Itsで内分する点をQ2.とする。
(1) The point where Q, I, Ql2 is internally divided by the ratio ts+]-ts is defined as Q2□, and the point between Q, □, Q, , is defined as the ratio ts
: Let the point to be internally divided by lts be Q22, and Q, 1. The point that internally divides the interval between Q and , by the ratio tjLs:Its is defined as Q2. shall be.

(2)さらに、Q2..022間を比率Ls:14sで
内分する点をQllとし、Q2.、Q2y間を比率is
 : ]tsで内分する点をQ、2とする。
(2) Furthermore, Q2. .. 022 internally divided by the ratio Ls:14s is defined as Qll, and Q2. , Q2y is the ratio is
: ] Let the point internally divided by ts be Q, 2.

(3)さらにもう−・度、0. 、 、 、0. :1
2間を比率L:、:1−1sで内分する点をQ4.とす
る。
(3) Furthermore, -・degree, 0. , , ,0. :1
2 internally divided by the ratio L:, :1-1s is Q4. shall be.

このとき、Q4□は、Qz 、CL2.Ql:1.Qx
6ごより与えられた曲線を比率ts:ILsで分割する
曲線にの点となる。
At this time, Q4□ is Qz, CL2. Ql:1. Qx
6, it becomes a point on the curve that divides the given curve by the ratio ts:ILs.

同時に、Qx、Q+□、Ql3 、 Q14の4゛っの
曲線定義座標により表されたもとの3次ヘジエ曲線は、
Q、ll 、 Q21 、 Q:ll 、 Q4+の4
つの曲線定義座標により表される3次ヘジェ曲線と、と
Q41.Q3□Q2.、Q、、の4つの曲線定義座標に
より表される3次ヘン五曲線の2つの曲線に分割される
At the same time, the original cubic Hezier curve expressed by the 4' curve defining coordinates of Qx, Q+□, Ql3, and Q14 is
4 of Q, ll, Q21, Q:ll, Q4+
a cubic Hezier curve represented by two curve-defining coordinates, and Q41. Q3□Q2. , Q, , is divided into two cubic curves represented by four curve-defining coordinates.

従来、3次へノ五曲線を直線列で近似する場合には、上
述の方法による分割を予め決められた回数だi−1繰り
返し行い、求められた曲線上の点を順番に結んだ直線列
としていた。
Conventionally, when approximating a cubic curve with a straight line, the above-mentioned division is repeated i-1 times a predetermined number of times, and a straight line is created by sequentially connecting the points on the obtained curve. It was.

[発明が解決しようとずろ課題〕 分割の回数と求められる曲vAJ−1の点の数には、指
数関数に比例する関係があり、従って、曲率が大きい曲
線を折線で高精度で表すためには、上記同数を増加させ
る必要があり、この結果、処理時間およびデータψが増
大する一方、曲率が小さい曲線に対して過剰の精度とな
り、逆の場合には、曲率が大きい曲線の近似された曲線
の品質が低下するという課題かある。
[Problem to be solved by the invention] There is a relationship proportional to an exponential function between the number of divisions and the number of points of the music vAJ-1 to be found. Therefore, in order to express a curve with a large curvature with a broken line with high precision, needs to be increased by the same number as above, which results in an increase in processing time and data ψ, but also excessive accuracy for curves with small curvature, and vice versa There is a problem that the quality of the curve deteriorates.

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

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

」−述の課題を解決するだめの手段4.4第1図にボさ
れる。すなわち、3次ヘジェ曲線座標入力手段は、3次
ヘジエ曲線の始点Qlい第1の制御点Q、2、第2の制
御点Q19、および終点0,4を入力し、誤差演算手段
は始点Qllと終点Q14とを結ぶ線分Q、、Q14の
中点Pと、第1の制御点Q、2と第2の制御点QI3と
を結ぶ線分Q1□QIffの中点Rと、の誤差を演算し
、誤差判別手段は誤差が所定埴以」二か否かを判別する
。この結果、誤差か所定値未満の場合には、折線データ
発生手段が当該曲線の始点および終点を結ぶ線分Q、、
Q、、を曲線の折線データとして発生する。他方、誤差
が所定値以1−の場合には、曲線分割手段は、3次ヘジ
ェ曲綿を分割し、これら分割された3次ヘジy−+fb
 ’rr’Rにり、ナして誤差演算手段および誤差判別
手段の動作を繰り返さ−υるものである。
” - Alternative means for solving the above problem 4.4 are shown in FIG. That is, the cubic Hezier curve coordinate input means inputs the starting point Ql, the first control point Q, 2, the second control point Q19, and the end point 0, 4 of the cubic Hezier curve, and the error calculation means inputs the starting point Qll. Calculate the error between the midpoint P of the line segment Q, , Q14 that connects and the end point Q14, and the midpoint R of the line segment Q1□QIff that connects the first control point Q, 2 and the second control point QI3. The error determining means determines whether the error is within a predetermined value or not. As a result, if the error is less than a predetermined value, the line segment Q connecting the starting point and ending point of the curve,
Q, , is generated as curved line data. On the other hand, if the error is 1- or more than the predetermined value, the curve dividing means divides the cubic Hezi curve and divides the divided cubic Hezi y-+fb
In 'rr'R, the operations of the error calculating means and the error determining means are repeated.

C作 用〕 」−述の手段によれは、第3図に不ずように、誤差とし
Cは、近イ以された線分Q、、Q、、と、その区間の実
際の曲線Xとの最大距離を用いる。このとき、曲線×と
線分Q + + (、l l 4との距離をiit:R
することは困難であるため、3次ヘジエ曲線の性質であ
る凸閉包(発生される曲線Xは14つの曲線定義座標の
内側に存在する)を利用し、ヘジェ曲線の始点QIIと
終点Q、を結ぶ線分の中点Pと、2つの制御点Q1□、
Q13間を結ぶ線分中点Rとの距離を誤差として用いる
。点Pと点0間の距離は、3次ヘジ五曲線の凸閉包より
、線分QllQ14と曲線Xとの最大距離よりも長くな
る。点Pと点Qとの距離(誤差)が大きい場合には、3
次・\ジェ曲線は分割される。従って、この分割回数は
曲線Xの形状変化に合わせて変化する。この結果、曲率
が大きい曲線に対しては分割回数は増加するが、曲率が
小さい曲線に対しては分割回数は減少する。
C action] - By using the above-mentioned means, as shown in Figure 3, the error C is the difference between the line segment Q, , Q,, which was drawn near A, and the actual curve X in that section. Use the maximum distance of At this time, the distance between the curve × and the line segment Q + + (, l l 4 is iit:R
Since it is difficult to do so, we use the convex hull (the generated curve The midpoint P of the connecting line segment and the two control points Q1□,
The distance from the midpoint R of the line segment connecting Q13 is used as the error. The distance between the point P and the point 0 is longer than the maximum distance between the line segment QllQ14 and the curve X due to the convex closure of the cubic Hezi pentagonal curve. If the distance (error) between point P and point Q is large, 3
Next \Je curve is divided. Therefore, the number of divisions changes according to changes in the shape of the curve X. As a result, the number of divisions increases for a curve with a large curvature, but the number of divisions decreases for a curve with a small curvature.

〔実施例〕〔Example〕

第4図は本発明に係る曲線の折線近似装置が適用される
図形表示装置である。第4図るこおいて、1は図形デー
タ入力装置、2は座標変換装置、;シは曲線発生装置1
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 the fourth figure, 1 is a figure data input device, 2 is a coordinate transformation device, and shi is a curve generator 1.
4 is a drawing processing device, and 5 is a display control device that controls the CRT 6. The curved line approximation device according to the present invention is used as a curve generation device. Further, the present invention is also applied to a graphic printing device.

この場合には、第4図の表示制御装′#、5およびCR
T6は印刷制御装置および印刷装置となる。
In this case, the display control device '#, 5 and CR of FIG.
T6 is a print control device and a printing device.

第5図は本発明に係る曲線の折線近似装置の一実施例を
示すブロック回路図である。第5図において、データ入
力回路501は3次ヘシ丁−曲線を表す4つの曲線定義
座標011〜Q14を入力処理する。
FIG. 5 is a block circuit diagram showing an embodiment of the curved line approximation device according to the present invention. In FIG. 5, a data input circuit 501 inputs and processes four curve definition coordinates 011 to Q14 representing a cubic Hessian curve.

曲線分割回路502はデータ入力回路501からの人力
座標の曲線もしくは誤差判定回路504から戻された曲
線データの曲線をts:]−tsで分I、す処理をづる
。誤差演算回路503はデータ入力回路501からの入
力座標もしくは分割された曲線とそれを近イρする線分
との誤差を演算する。誤差判別回路504は誤差演算回
路503により計算された誤差と、予め設定された誤差
の闇値との比較を行い、誤差か闇値以内である場合には
、データをデータ出力回路505に渡し、闇値以内でな
い場合には、データを再び曲線分割回路502に戻す。
The curve division circuit 502 divides the curve of the human coordinates from the data input circuit 501 or the curve data returned from the error determination circuit 504 by ts:]-ts. The error calculation circuit 503 calculates the error between the input coordinates from the data input circuit 501 or the divided curve and the line segment that approximates it. The error determination circuit 504 compares the error calculated by the error calculation circuit 503 with a preset error value, and if the error is within the error value, passes the data to the data output circuit 505. If it is not within the dark value, the data is returned to the curve dividing circuit 502 again.

データ出力回路505は、折線近似された曲線のデータ
を出力する処理を行う。
The data output circuit 505 performs a process of outputting data of a curve approximated by a broken line.

以下、各回路502 、503について詳述する。Each circuit 502 and 503 will be described in detail below.

曲線分割回路502は、たとえば、3次のヘジエ曲線の
性質から曲線を比率Ls:1−tsで分割する曲線」−
の点を求める方法(参考文献:LllLJ富十夫著°“
コンピュータデイスプレィによる形状処理工学(2) 
 ” FI Fll T’、lA pQ〜15、昭和5
7)ヲ用イテ、曲線を分割するものである。第6図に示
すように、曲線分割回路502は、レジスタ601〜6
04、座標分割回路605〜6Q、レジスタ611〜6
18 Gコより構成されている。すなわち、第2図に示
すように、曲線を表す座標としてQl、〜Q+4か与え
られたとすると、これらの座標はレジスタに01〜60
4に格納される。座4ffQ++ 、Qlaはそのまま
レジスタ611.618に格納される。座標分割回路(
)05は座標Q、、、Q、2間を比率Ls+I−Lsで
分割した座標Q21を発生してレジスタ612に格納し
、座標分割回路606は座標Ql2.Q、1間を比率t
s:1−1sで分割し7た座標Q22を発生し、座標分
割回路607は座標Q、34Q14間を比率ts : 
Ltsで分割した座標Q21を発生してレジスタ617
に格納する。また、座標分割回路608は座標Q2. 
、 Q2□間を比率ts:I−Lsで分割した座標Q、
1を発生してレジスタ613に格納し、座標分割回路6
09ば座標Q2□、Cl23間を比率Ls:14sで分
割した座標Q、2を発11ニジてレジスタ616ζこ格
納する。さらに、座標分割111J i踏6Qは座標Q
3+、(11□を比率ts : l−1sで分割した座
標Q、1を発生してレジスタ614 .615に格納す
る。
The curve dividing circuit 502 divides the curve at a ratio Ls:1-ts based on the properties of a cubic Hezier curve, for example.
How to find the point (Reference: Written by LllLJ Tomio °“
Shape processing engineering using computer display (2)
" FI Fl T', lA pQ~15, Showa 5
7) It is used to divide a curve. As shown in FIG. 6, the curve dividing circuit 502 includes registers 601 to 6.
04, coordinate division circuits 605-6Q, registers 611-6
It is composed of 18 G. That is, as shown in Figure 2, if Ql, ~Q+4 are given as coordinates representing a curve, these coordinates are stored in the register as 01~60.
It is stored in 4. Locus 4ffQ++ and Qla are stored as they are in registers 611 and 618. Coordinate division circuit (
)05 generates the coordinate Q21 obtained by dividing the coordinates Q, , , Q, 2 by the ratio Ls+I−Ls and stores it in the register 612, and the coordinate dividing circuit 606 generates the coordinate Q21, which is obtained by dividing the coordinates Q, . The ratio t between Q and 1
The coordinate division circuit 607 generates the coordinate Q22 divided by s:1-1s, and the coordinate division circuit 607 divides the coordinates Q and 34Q14 into the ratio ts:
Generates the coordinate Q21 divided by Lts and stores it in the register 617.
Store in. Further, the coordinate dividing circuit 608 has the coordinate Q2.
, the coordinate Q obtained by dividing the space between Q2□ by the ratio ts:ILs,
1 is generated and stored in the register 613, and the coordinate division circuit 6
09, the coordinates Q, 2 obtained by dividing the coordinates Q2□ and Cl23 by the ratio Ls: 14s are output 11 and stored in the register 616ζ. Furthermore, the coordinate division 111J i step 6Q is the coordinate Q
3+, (11□ divided by the ratio ts:l-1s) generates coordinates Q, 1 and stores them in registers 614 and 615.

このとき、第2図に示すように座標の4.ば、QQ+z
+ Q13+ Qlaにより与えられた曲線比率ts・
1−tsで分割する曲線上の座標となり、また同時に、
この座標において曲線は2つの曲線(にl11.Q2Q
、、、Q、、とQ、、、Q3□、 Q2:1 、0.1
−)に分割される。
At this time, as shown in FIG. 2, the coordinates 4. Ba, QQ+z
+ Q13+ Curve ratio ts・ given by Qla
The coordinates are on the curve divided by 1-ts, and at the same time,
At this coordinate, the curve is divided into two curves (l11.Q2Q
, ,Q, , and Q, ,Q3□, Q2:1 ,0.1
−).

なお、第6 IN’l 4こおけるレジスタ601〜6
04の入力座標Q、〜Q、のデータ入力回路501 も
しくは誤差判別回路504・\の切替は図示し2ないス
イッチによって行われる。
Note that the registers 601 to 6 in the 6th IN'l 4
Switching of the data input circuit 501 or the error determination circuit 504 for the input coordinates Q, .about.Q of 04 is performed by a switch (2) not shown.

第6図の各座標分割回路605〜6Qは、たとえば、第
7図Gこ小ずように、乗葬器701  、702 、お
よびIJII′lJ、器703により構成される。
Each of the coordinate division circuits 605 to 6Q in FIG. 6 is constituted by, for example, the mounting devices 701, 702, IJII'lJ, and the device 703 as shown in FIG. 7G.

第3図の線分Q12Q11の中点Rと線分Q、、Q、。The midpoint R of the line segment Q12Q11 in FIG. 3 and the line segment Q,,Q,.

の中点Pとの誤差(距離)を演算する場合、2中It人
の座標を(XI  、Yl)、(X2  、Yz)とす
ると、2点間の17(i離の計算は、r((1)に示す
ように表される。
When calculating the error (distance) from the midpoint P, if the coordinates of It people in 2 are (XI, Yl), (X2, Yz), the calculation of 17 (i distance) between the two points is r( It is expressed as shown in (1).

距離−1(X、−X、)24− いr、   Y2)Z
 I I/2・・(1) 式(1)では、乗除算を必要とするため、高速な処理を
要求される場合には、不利である。これを加減算のみで
処理を行うため乙こ、式(2)に示すよう6ご、2点間
の座標差を用いる。
Distance -1(X, -X,)24-ir, Y2)Z
I I/2 (1) Equation (1) requires multiplication and division, which is disadvantageous when high-speed processing is required. In order to process this using only addition and subtraction, the coordinate difference between the two points is used as shown in equation (2).

距離−I XI −X2 1 t l Yl  ’−Y
z  :・・・(2)このようにすることで、演算を単
純にかつ高速に実行することができ、また、式(2)に
より求められた距離は、式(1)により求められた距に
1より必ず長くなる。このため、求められた距離を誤差
と比較し判断する場合に、近似された曲線の精度が低ト
ーすることがないため、近(11Jされた曲線がなめら
かである。
Distance-I XI-X2 1 t l Yl'-Y
z:...(2) By doing this, the calculation can be performed simply and at high speed, and the distance calculated by equation (2) is the same as the distance calculated by equation (1). is always longer than 1. Therefore, when comparing the obtained distance with the error and making a judgment, the accuracy of the approximated curve does not become low, so the approximated curve is smooth.

弐(2)に示す誤差を演算するだめの第5図の誤差演算
回路503の詳細は第8図に示3トれる。第8図におい
て、801,802,803,804,808 +:+
レジスタ、805 、 806は入力された2つの座標
の中点を求める中点演算回路、807は人力された2り
の中点坤標R、Pから式(2)に示したAI算式乙、二
より求められる座標誤差を演算する座標差公演′Q回路
である。中点演算回路805  、804iは、たとえ
ば、第9図に示すように、加算器901および除’42
器902により構成される。
Details of the error calculation circuit 503 shown in FIG. 5, which is used to calculate the error shown in (2), are shown in FIG. In Figure 8, 801, 802, 803, 804, 808 +:+
Registers 805 and 806 are midpoint calculation circuits that calculate the midpoint of the two input coordinates, and 807 is a midpoint calculation circuit that calculates the midpoint of the two input coordinates, and 807 calculates the AI formula shown in equation (2) from the two manually entered midpoints R and P. This is a coordinate difference performance 'Q circuit that calculates the coordinate error determined by For example, as shown in FIG. 9, the midpoint calculation circuits 805 and 804i include an adder 901 and a divider
902.

最初に、データ入力回路401 よの出力されたよ1′
4差演算に必要なQz 、 Q、+2 、 Qll、 
Q14が、それぞれ、レジスタ801〜804に格納さ
れる。ごごで、Q、1は始点、Q14は終点、Q、、、
Q、lは制御点で(I2) ある。この結果、中点演算回路805には、Q、□と(
1,3が入力され、中点演算回路805の出力として制
御点Q、2.Q、3を結ぶ線分の中点Rが求められる。
First, the data input circuit 401 outputs 1'
Qz, Q, +2, Qll, required for 4-difference calculation
Q14 are stored in registers 801-804, respectively. Gogode, Q, 1 is the starting point, Q14 is the ending point, Q...
Q and l are control points (I2). As a result, the midpoint calculation circuit 805 has Q, □ and (
1, 3 are input, and the control points Q, 2 . The midpoint R of the line segment connecting Q and 3 is found.

また、中点演算回路806には、QllとQ14が人力
され、中点演算回路806の出力として、始点Ql+と
終点Q14を結ぶ線分の中点Pが求められる。
Further, Qll and Q14 are manually input to the midpoint calculation circuit 806, and the midpoint P of the line segment connecting the starting point Ql+ and the ending point Q14 is obtained as an output of the midpoint calculation circuit 806.

さらに、座標差分演算回路807には、中点演算回路8
05により求められた中点Rと中点演算rgJ路806
により求められた中点Pとが入力され、座標差分演算回
路807の出力として、この2つの中点の差分が求めら
れる。この演算結果が誤差eとして、レジスタ8084
.:格納される。
Furthermore, the coordinate difference calculation circuit 807 includes a midpoint calculation circuit 8
Midpoint R found by 05 and midpoint calculation rgJ path 806
The midpoint P found by is input, and the difference between these two midpoints is determined as the output of the coordinate difference calculation circuit 807. This calculation result is stored in the register 8084 as the error e.
.. : Stored.

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

[述の誤差eを、第5図の誤差判定回路504が閾値と
比較して、誤差が閾値より小さい場合には、線分Q、、
Q、、かデータ出力部805より出力される。
[The error determination circuit 504 in FIG. 5 compares the above error e with a threshold value, and if the error is smaller than the threshold value, the line segment Q,...
Q, , is output from the data output section 805.

また、+i!′i差か闇値より大きい場合には、曲線Q
llQ21 + Qtl + Q41が再び曲線分割回
路502に入力され、分割される。このとき、もう1つ
の曲線であるQ41.Q3□、 Q23. Q、、は、
誤差判定回路504内部に一時的に保持しておき、曲線
Q、。
Also, +i! ′i difference is larger than the dark value, the curve Q
llQ21 + Qtl + Q41 is again input to the curve dividing circuit 502 and divided. At this time, another curve, Q41. Q3□, Q23. Q...
The curve Q, is temporarily held inside the error determination circuit 504.

Q21 、 Q31. Qa+(IJ分割’l>(Pニ
アした時点で、曲線分割回路502に入力され、処理が
行われる。
Q21, Q31. When Qa+(IJ division 'l>(P near), it is input to the curve division circuit 502 and processed.

この一連の処理により、3次のヘジェ曲線は折線近イ以
され出力される。
Through this series of processing, the third-order Hezier curve is output as a polygonal line.

上述の実施例は汎用のマイクロコンピュータを用いてそ
のプログラムとして実現することも可能である。たとえ
ば、第Q図に示すように、ステップQ0Hこて3次ヘジ
ェ曲線用データ(コ8.〜Q1イを入力し、ステップQ
02にて−に述弐(2)にもとづき距離(誤差)eを演
算し、ステップQ03にて距1%leが闇値以下か否か
を判別する。この結果、距fd4e≦闇値であればステ
ップQ06にて折線データとして線分Q、、Q、、を出
力し、距離(・〉閾値であればステップQ04 、Q0
5に進む。
The above-described embodiment can also be implemented as a program using a general-purpose microcomputer. For example, as shown in FIG.
In step Q02, the distance (error) e is calculated based on the statement (2), and in step Q03, it is determined whether the distance 1%le is less than the darkness value. As a result, if the distance fd4e≦darkness value, the line segments Q, , Q, are output as broken line data in step Q06, and if the distance (・〉threshold value), the line segments Q04, Q0 are output.
Proceed to step 5.

ステップQ04では、3次ヘジェ曲線データをイI;成
することにより曲線の分割を行い、ステ、ブQ05にて
8個のQ1□、 Q2. 、・・・、Q14をメモリに
格納する。ぞして、ステップ1o02cこ戻る。
In step Q04, the curve is divided by forming cubic Heger curve data, and in step Q05, it is divided into eight pieces Q1□, Q2. ,..., Q14 is stored in memory. Then, return to step 1o02c.

ずなわら、曲線弁、l;+1を繰り返−4゜また、ステ
ップQF+7 、 HIO2にて曲線のず−て折線近似
が終了するま−Cスス−−ノブQ02〜Q06が繰り返
される。
Then, the curve valve 1; +1 is repeated -4 degrees. Also, the curve C knobs Q02 to Q06 are repeated until the polygonal line approximation of the curve is completed in steps QF+7 and HIO2.

(発明の効果) 以り説明したように本発明によれは、曲線の曲率に応1
ノで分割回数すなわち近似折線の数か変化−するので、
処理時間およびデータ量を増大さ一ロるごとなく、曲線
を効・rよく、なめらかに折線近似することかできる。
(Effect of the invention) As explained above, according to the present invention, the curvature of the curve is
Since the number of divisions, that is, the number of approximate broken lines changes with ,
It is possible to efficiently and smoothly approximate a curved line without increasing the processing time or the amount of data.

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

第1図は本発明の基本構成を2iず図、第2図は;(次
ヘジェ曲線の分割を説明する図、第;3図は本発明の詳
細な説明する図、第4図は本発明に係る曲線の折線近似
装置が適用される図形表示装置を示ず)l:I−、り回
路図、第5図は本発明に係る曲線の折線近似装置の一実
施例を21辷4゛ブ11・り回路図、第6図は第5図の
曲線分割回路を示すプロ、り図、 第7図は第6図の座標分割回路の一例を示す回路図、 第8図は第5図の誤差演算回路を示1回路図、第9図は
第8図の中心演算回路を示す回路図、第Q図は他の実施
例を示すフローチャートである。 501・・・データ入力回路、502・・・曲線分割回
路、503・・・誤差演算回路、 504・・誤差判別
回路、505・・・データ出力回路。
Figure 1 is a diagram illustrating the basic configuration of the present invention; Figure 2 is a diagram explaining the division of the following Heje curve; Figure 3 is a diagram explaining the details of the present invention; Figure 4 is a diagram explaining the invention Figure 5 shows an embodiment of the curved line approximation device according to the present invention in 21 x 4 blocks. 11. Figure 6 is a circuit diagram showing the curve division circuit in Figure 5. Figure 7 is a circuit diagram showing an example of the coordinate division circuit in Figure 6. Figure 8 is a circuit diagram showing an example of the coordinate division circuit in Figure 5. 1 is a circuit diagram showing the error calculation circuit, FIG. 9 is a circuit diagram showing the central calculation circuit of FIG. 8, and FIG. Q is a flowchart showing another embodiment. 501...Data input circuit, 502...Curve division circuit, 503...Error calculation circuit, 504...Error discrimination circuit, 505...Data output circuit.

Claims (1)

【特許請求の範囲】 1、3次ベジェ曲線の始点(Q_1_1)、第1の制御
点(Q_1_2)、第2の制御点(Q_1_3)、およ
び終点(Q_1_4)を入力する3次ベジェ曲線座標入
力手段と、前記始点(Q_1_1)と前記終点(Q_1
_4)とを結ぶ線分(Q_1_1Q_1_4)の中点(
P)と、前記第1の制御点(Q_1_2)と前記第2の
制御点(Q_1_3)とを結ぶ線分(Q_1_2Q_1
_3)の中点(R)と、の誤差を演算する誤差演算手段
と、 該誤差が所定値以上か否かを判別する誤差判別手段と、 該誤差が所定値未満の場合には当該曲線の始点および終
点を結ぶ線分(Q_1_1Q_1_4)を前記曲線の折
線データとして発生する折線データ発生手段と、前記誤
差が所定値以上の場合には前記3次ベジェ曲線を分割し
、該分割された各3次ベジェ曲線に対して前記誤差演算
手段および前記誤差判別手段の動作を繰り返させる曲線
分割手段と を具備する3次ベジェ曲線の折線近似装置。 2、前記誤差演算手段は、前記誤差として、前記2つの
中点(P、R)の距離を演算する請求項1に記載の3次
ベジェ曲線の折線近似装置。 3、前記誤差演算手段は、前記2つの中点(P、R)の
距離として座標差を演算する請求項2に記載の3次ベジ
ェ曲線の折線近似装置。
[Claims] 1. Cubic Bezier curve coordinate input for inputting the starting point (Q_1_1), first control point (Q_1_2), second control point (Q_1_3), and end point (Q_1_4) of the cubic Bezier curve. means, the starting point (Q_1_1) and the ending point (Q_1
The midpoint of the line segment (Q_1_1Q_1_4) connecting _4) with
P) and a line segment (Q_1_2Q_1) connecting the first control point (Q_1_2) and the second control point (Q_1_3).
_3) An error calculating means for calculating the error between the midpoint (R), an error determining means for determining whether the error is greater than or equal to a predetermined value, and an error determining means for determining whether the error is greater than or equal to a predetermined value; broken line data generating means for generating a line segment (Q_1_1Q_1_4) connecting the starting point and the ending point as broken line data of the curve; and dividing the cubic Bezier curve when the error is greater than a predetermined value, and dividing each of the divided three A broken line approximation device for a cubic Bezier curve, comprising curve dividing means for repeating the operations of the error calculating means and the error determining means for the next Bezier curve. 2. The broken line approximation device for a cubic Bezier curve according to claim 1, wherein the error calculation means calculates a distance between the two midpoints (P, R) as the error. 3. The broken line approximation device for a cubic Bezier curve according to claim 2, wherein the error calculation means calculates a coordinate difference as a distance between the two midpoints (P, R).
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 true JPH0271384A (en) 1990-03-09
JP2677273B2 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)

Cited By (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
US5159995A (en) * 1989-12-18 1992-11-03 Kone Elevator Gmbh Safety gear for an elevator
CN101930613A (en) * 2009-06-17 2010-12-29 佳能株式会社 Method with figure path sequence Code And Decode component layer scheme
JP2011133578A (en) * 2009-12-22 2011-07-07 Renesas Electronics Corp Display data correction apparatus, and display panel driver and display device using the same
JP2012116477A (en) * 2010-12-02 2012-06-21 Agustawestland Ltd Aerofoil
JP2014010572A (en) * 2012-06-28 2014-01-20 Strauss Technology Co Ltd Vector image drawing device and vector image drawing method

Cited By (9)

* 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
US5159995A (en) * 1989-12-18 1992-11-03 Kone Elevator Gmbh Safety gear for an elevator
CN101930613A (en) * 2009-06-17 2010-12-29 佳能株式会社 Method with figure path sequence Code And Decode component layer scheme
JP2011044134A (en) * 2009-06-17 2011-03-03 Canon Inc Method of encoding and decoding graphics path sequence in layered scheme
US8930924B2 (en) 2009-06-17 2015-01-06 Canon Kabushiki Kaisha Method of encoding and decoding a graphics path sequence into a layered scheme
JP2011133578A (en) * 2009-12-22 2011-07-07 Renesas Electronics Corp Display data correction apparatus, and display panel driver and display device using the same
JP2012116477A (en) * 2010-12-02 2012-06-21 Agustawestland Ltd Aerofoil
JP2017024717A (en) * 2010-12-02 2017-02-02 アグスタウエストランド リミテッド 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
JP2677273B2 (en) 1997-11-17

Similar Documents

Publication Publication Date Title
Ottmann et al. Numerical stability of geometric algorithms
US5570463A (en) Bresenham/DDA line draw circuitry
JP2938547B2 (en) Method and device for arithmetic processing
JPS6347874A (en) Arithmetic unit
US4992968A (en) Division method and apparatus including use of a Z--Z plot to select acceptable quotient bits
JPH0271384A (en) Broken line approximating device for cubic bezier curve
JPS6385988A (en) Data conversion method and apparatus for graphic display system
JP3059739B2 (en) Information processing apparatus with curve drawing function and processing method
JP2538645B2 (en) Curved line approximation device
Keller et al. The calcualtion of multiplicative inverses over GF (p) efficiently where p is a Mersenne prime
JPH02176879A (en) Parameter curved line generator
JPS60200371A (en) Graphic generator
JPS63113734A (en) Arithmetic unit for fuzzy inference
JPS6272078A (en) Paint-out drawing device in circle
JPH1049652A (en) Method for calculating intersection of b-spline curve and straight line in three-dimensional cad
JP2691812B2 (en) Scale information generator
JPH02114324A (en) Multiplier
JPH0261779A (en) Coordinate data processing unit
JPH0452880A (en) Line plotting address generating circuit
JPH0749784A (en) Method and device for fuzzy number operation
JPS63138475A (en) Straight line generating circuit
JPH04119483A (en) Computing element
JPH03198169A (en) Curve generating system
JPH02252023A (en) Divider for executing division by subtracting method or retracting method algorism
JPH02181786A (en) Vector clipping processor

Legal Events

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