JP2522109B2 - Curve fitting method - Google Patents

Curve fitting method

Info

Publication number
JP2522109B2
JP2522109B2 JP2278101A JP27810190A JP2522109B2 JP 2522109 B2 JP2522109 B2 JP 2522109B2 JP 2278101 A JP2278101 A JP 2278101A JP 27810190 A JP27810190 A JP 27810190A JP 2522109 B2 JP2522109 B2 JP 2522109B2
Authority
JP
Japan
Prior art keywords
curve
data
value
stored
small
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
JP2278101A
Other languages
Japanese (ja)
Other versions
JPH04153695A (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.)
Seikosha KK
Original Assignee
Seikosha KK
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 Seikosha KK filed Critical Seikosha KK
Priority to JP2278101A priority Critical patent/JP2522109B2/en
Publication of JPH04153695A publication Critical patent/JPH04153695A/en
Application granted granted Critical
Publication of JP2522109B2 publication Critical patent/JP2522109B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Image Generation (AREA)
  • Controls And Circuits For Display Device (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明はアウトラインフォントにおける曲線の近似方
法に関する。
The present invention relates to a method for approximating a curve in an outline font.

[従来の技術] 文字や図形等の曲線を表す手段として、アウトライン
フォントを用いたものが近年急速に普及しつつある。
[Prior Art] As a means for expressing a curve such as a character or a figure, a font using an outline font has been rapidly spread in recent years.

従来、アウトラインフォントにより実際に曲線を表示
する場合には、隣接した分割点が同一点に縮退するまで
曲線を順次分割し、各分割点を直線で順次結んで曲線を
近似的に表していた。
Conventionally, in the case of actually displaying a curve using an outline font, the curve is sequentially divided until adjacent division points degenerate to the same point, and each division point is sequentially connected by a straight line to approximately represent the curve.

[解決しようとする課題] 上記従来の方法では、アウトラインフォントの曲線デ
ータを生成するたびに多大な演算処理を必要とし、アウ
トラインフォントの生成に多大な時間を要するという問
題点があった。
[Problems to be Solved] The above-described conventional method has a problem that a large amount of arithmetic processing is required each time curve data of an outline font is generated, and a large amount of time is required to generate the outline font.

本発明の目的は、アウトラインフォントの生成に要す
る時間を短縮することである。
An object of the present invention is to reduce the time required to generate an outline font.

[課題を解決するための手段] 本発明は、二つのアンカーポイントと少なくとも一つ
のコントロールポイントとを用いてパラメトリック表現
された曲線式に基いて曲線を表し、この曲線を複数の部
分に分割して互いに隣り合った分割点を直線で結び、曲
線を近似的に表す方法において、曲線式のn個のパラメ
ータ値についてそれぞれ定まる曲線式のパラメータ関数
の値を予め記憶しておき、表現しようとする曲線に応じ
て、n個のパラメータ値のうちm個(m<n)について
のみ、パラメータ関数の値に基いて曲線式の値を求め、
m個のパラメータ値に対応して定まる分割点を直線で結
ぶものである。
[Means for Solving the Problem] The present invention represents a curve based on a curve formula parametrically expressed using two anchor points and at least one control point, and divides the curve into a plurality of parts. In the method of approximating a curve by connecting adjacent division points with a straight line, the values of the parameter functions of the curve equations that are determined for each of the n parameter values of the curve equation are stored in advance and the curve to be represented According to the above, only for m (m <n) of the n parameter values, the value of the curve expression is obtained based on the value of the parameter function,
A straight line connects the division points determined corresponding to the m parameter values.

[実施例] 以下、添付図面を参照して本発明の実施例の説明をす
る。
Embodiments Embodiments of the present invention will be described below with reference to the accompanying drawings.

以下に示す実施例では、特に断らない限り、アウトラ
インフォントを表現する曲線には3次ベジェ曲線や3次
スプライン曲線等の3次曲線を用いるものとする。これ
らの曲線をパラメトリック表現すると以下のようにな
る。
In the embodiments described below, unless otherwise specified, a cubic curve such as a cubic Bezier curve or a cubic spline curve is used as a curve expressing an outline font. Parametric representation of these curves is as follows.

Q=WA×PA+WB×PB +WC×PC+WD×PD …(1) ここで、WA、WB、WCおよびWDはパラメータ“t"を用い
て表される関数であり、例えば3次ベジェ曲線の場合に
は以下のようになる。
Q = WA x PA + WB x PB + WC x PC + WD x PD (1) where WA, WB, WC and WD are functions expressed using the parameter "t", for example, in the case of cubic Bezier curve It looks like this:

WA=(1−t) …(2a) WB=3t・(1−t) …(2b) WC=3t2・(1−t) …(2c) WD=t3 …(2d) (0≦t≦1) PA、PB、PCおよびPDは曲線の形状を決定するX−Y平
面上の座標であり、それぞれ以下の通りである。
WA = (1-t) 3 (2a) WB = 3t ・ (1-t) 2 (2b) WC = 3t 2・ (1-t) (2c) WD = t 3 (2d) (0 ≤t≤1) PA, PB, PC and PD are coordinates on the XY plane that determine the shape of the curve, and are as follows.

PA(x,y):アンカーポイント PB(x,y):コントロールポイント PC(x,y):コントロールポイント PD(x,y):アンカーポイント ここで(1)式について考えると、パラメータ関数W
A、WB、WCおよびWDは例えば(2a)〜(2d)式で示され
るように3次曲線の種類によって一義的に決まるもので
あり、PA、PB、PCおよびPDは曲線の形状に応じて予め決
められているものである。従って、パラメータ関数WA、
WB、WCおよびWDについては、第5図に示すようにパラメ
ータ“t"を細分化し、各tの値に対応して予めWA、WB、
WCおよびWDの値を計算して、その計算結果をデータテー
ブルに記憶しておくことができる。PA、PB、PCおよびPD
についても、予めその座標(x,y)をデータテーブルに
記憶しておくことができる。このようにしてデータテー
ブルに各データを記憶しておき、マルチプライアおよび
アダーを用いて(1)式に基いたハードウエア計算をす
れば、高速に曲線データを生成することができる。すな
わち、第5図に示すようにt(0≦t≦1)を256分割
して、各t毎に予めパラメータ関数WA、WB、WCおよびWD
を求めておき、(1)式に基いたハードウエア計算をす
れば、合計257点の曲線上の座標を求めることができ
る。そしてこれらの座標を順次直線で結べば曲線を近似
表現することができる。
PA (x, y): Anchor point PB (x, y): Control point PC (x, y): Control point PD (x, y): Anchor point Considering equation (1), the parameter function W
A, WB, WC, and WD are uniquely determined by the type of cubic curve as shown in equations (2a) to (2d), and PA, PB, PC, and PD depend on the shape of the curve. It is predetermined. Therefore, the parameter function WA,
For WB, WC and WD, the parameter “t” is subdivided as shown in FIG. 5, and WA, WB, and
The values of WC and WD can be calculated and the calculation results can be stored in a data table. PA, PB, PC and PD
As for, also, the coordinates (x, y) can be stored in advance in the data table. In this way, if each data is stored in the data table and the hardware calculation based on the equation (1) is performed using the multiplier and the adder, the curve data can be generated at high speed. That is, as shown in FIG. 5, t (0 ≦ t ≦ 1) is divided into 256, and the parameter functions WA, WB, WC, and WD are previously set for each t.
Then, if the hardware calculation is performed based on the equation (1), a total of 257 points on the curve can be obtained. A curve can be approximated by connecting these coordinates with a straight line.

ところで、上記の例でいえば曲線を256分割して近似
表現することになるが、例えば曲率の小さな曲線では、
それほど分割数を多くしなくても十分精度のよい近似曲
線を表すことができる。このことを第3図、第4図
(A)および第4図(B)を用いて以下に説明する。第
3図に示した曲線は、合計14の小曲線C1〜C14で構成さ
れている。すなわち、各小曲線C1〜C14は、それぞれ異
なったアンカーポイントおよびコントロールポイントを
用いて、それぞれ(1)式で表されることになる。第4
図(A)および第4図(B)は、第3図に示した小曲線
C1およびC2をそれぞれ示したものである。小曲線C1は第
4図(A)に示すように16分割され、小曲線C1上の17点
Q0,0〜Q0,16で近似表現される。従って第5図の例でい
えば、n=0、16、32、………、256というように、n
を16ステップ(256/16=16)ずつ増加させて、これらの
nに対してだけ計算を行えばよい。小曲線C2は第4図
(B)に示すように32分割され、小曲線C2上の33点Q0,0
〜Q0,32で近似表現される。従って5図の例では、n=
0、8、16、………、256というように、nを8ステッ
プ(256/32=8)ずつ増加させて、これらのnに対して
だけ計算を行えばよい。このように、曲線に応じて適当
な分割数を予め求めておき、その分の計算だけを行え
ば、ハードウエア計算をより高速化することが可能であ
る。なお、分割数を求める具体的な方法に関しては後述
する。
By the way, in the above example, the curve is divided into 256 to be approximated, but for example, for a curve with a small curvature,
An approximate curve with sufficient accuracy can be expressed without increasing the number of divisions so much. This will be described below with reference to FIG. 3, FIG. 4 (A) and FIG. 4 (B). The curve shown in FIG. 3 is composed of a total of 14 small curves C1 to C14. That is, each of the small curves C1 to C14 is represented by the equation (1) by using different anchor points and control points. Fourth
Figures (A) and 4 (B) show the small curves shown in Figure 3.
C1 and C2 are shown respectively. The small curve C1 is divided into 16 as shown in FIG. 4 (A), and 17 points on the small curve C1
It is approximately expressed by Q0,0 to Q0,16. Therefore, in the example of FIG. 5, n = 0, 16, 32, ...
Is increased by 16 steps (256/16 = 16), and the calculation may be performed only for these n. The small curve C2 is divided into 32 as shown in FIG. 4 (B), and 33 points Q0,0 on the small curve C2
Approximately represented by ~ Q0,32. Therefore, in the example of FIG.
It is only necessary to increase n by 8 steps (256/32 = 8), such as 0, 8, 16, ... In this way, it is possible to further speed up the hardware calculation by previously obtaining an appropriate number of divisions according to the curve and performing only the calculation. A specific method for obtaining the number of divisions will be described later.

以上述べたことを参考にして、第3図に示した曲線の
近似方法について以下説明する。
The method for approximating the curve shown in FIG. 3 will be described below with reference to the above description.

第1図は、第3図に示した曲線を近似表現するときに
用いるハードウエアを示したブロック図である。
FIG. 1 is a block diagram showing the hardware used to approximate the curve shown in FIG.

CPU0はマイクロプロセッサであり、ハードウエア全体
の制御を行うものである。
CPU0 is a microprocessor that controls the entire hardware.

ROM0はリードオンリメモリであり、マイクロプロセッ
サCPU0が行う各種処理のプログラムを記憶しておくもの
である。
ROM0 is a read-only memory and stores programs for various processes performed by the microprocessor CPU0.

RAM0はランダムアクセスメモリであり、後述の各デー
タを予め記憶しておくものである。RAM0には、3次ベジ
ェ曲線に関するデータのほかに3次スプライン曲線に関
するデータ等、各種の曲線に関するデータが記憶されて
おり、これらのデータは必要に応じて後述のRAM1、RAM2
およびRAM3に送られる。
RAM0 is a random access memory, and stores each data described later in advance. RAM0 stores not only data related to cubic Bezier curves but also data related to various curves such as data related to cubic spline curves. These data are stored in RAM1 and RAM2, which will be described later, as necessary.
And sent to RAM3.

RAM1はランダムアクセスメモリであり、第5図に示し
たパラメータ関数WA、WB、WCおよびWDの各値を記憶する
ものである。これらのデータWA0〜WA256、WB0〜WB256、
WC0〜WC256、WD0〜WD256はRAM0から送られてくるもので
あり、第6図に示すようにしてRAM1内に記憶される。
RAM1 is a random access memory, and stores the values of the parameter functions WA, WB, WC and WD shown in FIG. These data WA0-WA256, WB0-WB256,
WC0 to WC256 and WD0 to WD256 are sent from RAM0 and are stored in RAM1 as shown in FIG.

RAM2はランダムアクセスメモリであり、第3図に示し
た各小曲線C1〜C14毎に、アンカーポイントPAおよびP
D、コントロールポイントPBおよびPCの各座標データを
記憶するものである。これらの各座標データはRAM0から
送られてくるものであり、第7図に示すようにしてRAM2
内に記憶される。第7図において、PAX0〜PDX0は小曲線
C1におけるアンカーポイントおよびコントロールポイン
トの各x座標、PAY0〜PDY0はこれらのポイントの各y座
標、PAX1〜PDX1は小曲線C2におけるこれらのポイントの
各x座標、PAY1〜PDY1はこれらのポイントの各y座標で
ある。
RAM2 is a random access memory, and anchor points PA and P are provided for each of the small curves C1 to C14 shown in FIG.
It stores each coordinate data of D, control point PB, and PC. Each of these coordinate data is sent from RAM0, and as shown in FIG.
Be stored in. In Figure 7, PAX0 to PDX0 are small curves
Each x coordinate of the anchor point and control point in C1, PAY0 to PDY0 is each y coordinate of these points, PAX1 to PDX1 is each x coordinate of these points in the minor curve C2, and PAY1 to PDY1 is each y of these points. Coordinates.

RAM3はランダムアクセスメモリであり、第3図に示し
た各小曲線C1〜C14の分割数に対応したデータを、各小
曲線C1〜C14毎に予め記憶しておくものである。分割数
に対応したデータとしては、分割数そのものでもよい
し、第5図に示したnのステップ数でもよい。本実施例
においては、ランダムアクセスメモリRAM3には、第8図
に示すように、nのステップ数すなわちnの増加分Δn
が記憶される。第8図において、Δn1、Δn2、………
は、第3図に示した小曲線C1、C2、………にそれぞれ対
応して記憶されたステップ数である。これらのデータΔ
n1、Δn2、………は、RAM0から送られてくるものであ
り、第8図に示すようにしてRAM3内に記憶される。
The RAM 3 is a random access memory and stores in advance data corresponding to the number of divisions of the small curves C1 to C14 shown in FIG. 3 for each of the small curves C1 to C14. The data corresponding to the number of divisions may be the number of divisions itself or the number of n steps shown in FIG. In the present embodiment, as shown in FIG. 8, the random access memory RAM3 has a step number n, that is, an increment Δn of n.
Is stored. In FIG. 8, Δn1, Δn2, ...
Is the number of steps stored corresponding to each of the small curves C1, C2, ... Shown in FIG. These data Δ
n1, .DELTA.n2, ... Are sent from RAM0 and are stored in RAM3 as shown in FIG.

RAM4はランダムアクセスメモリであり、(1)式に基
いて行われたハードウエア計算の結果、言い換えると各
小曲線C1〜C14上の座標データQ(x,y)を記憶するもの
である。これらの座標データQ(x,y)は、第9図に示
すようにしてRAM4に記憶される。第9図において、デー
タX0,0〜X0,16およびY0,0〜Y0,16は、第4図(A)の小
曲線C1上の点Q0,0〜Q0,16のそれぞれxおよびy座標で
あり、データX1,0〜X1,32およびY1,0〜Y1,32は、第4図
(B)の小曲線C2上の点Q1,0〜Q1,32のそれぞれxおよ
びy座標である。
The RAM 4 is a random access memory and stores the result of the hardware calculation based on the equation (1), in other words, the coordinate data Q (x, y) on each of the small curves C1 to C14. These coordinate data Q (x, y) are stored in the RAM 4 as shown in FIG. In FIG. 9, the data X0,0 to X0,16 and Y0,0 to Y0,16 are the x and y coordinates of the points Q0,0 to Q0,16 on the small curve C1 in FIG. 4 (A), respectively. Yes, the data X1,0 to X1,32 and Y1,0 to Y1,32 are the x and y coordinates of the points Q1,0 to Q1,32 on the minor curve C2 of FIG. 4 (B), respectively.

PNT1はRAM1のアドレスポインタであり、独立のアドレ
スポインタPNT1A、PNT1B、PNT1CおよびPNT1Dによって構
成されている。PNT1A、PNT1B、PNT1CおよびPNT1Dは、RA
M1に記憶されているデータWA0〜WA256、WB0〜WB256、WC
0〜WC256、WD0〜WD256(第6図参照)のアドレスをそれ
ぞれ指定するものである。
PNT1 is an address pointer of RAM1 and is composed of independent address pointers PNT1A, PNT1B, PNT1C and PNT1D. RA for PNT1A, PNT1B, PNT1C and PNT1D
Data stored in M1 WA0 to WA256, WB0 to WB256, WC
The addresses 0 to WC256 and WD0 to WD256 (see FIG. 6) are designated.

PNT2はRAM2のアドレスポインタであり、RAM2に記憶さ
れているアンカーポイントおよびコントロールポイント
の各座標データ(第7図参照)のアドレスを指定するも
のである。
PNT2 is an address pointer of RAM2, and designates the address of each coordinate data (see FIG. 7) of anchor points and control points stored in RAM2.

PNT3はRAM3のアドレスポインタであり、RAM3に記憶さ
れているステップ数Δn1、Δn2、………(第8図参照)
のアドレスを指定するものである。
PNT3 is an address pointer of RAM3, and the number of steps stored in RAM3 is Δn1, Δn2, ... (See Fig. 8).
The address of is specified.

PNT4はRAM4のアドレスポインタであり、ハードウエア
計算によって得られる座標データX0,0〜X0,16およびY0,
0〜Y0,16等(第9図参照)のアドレスを指定するもので
ある。
PNT4 is an address pointer of RAM4, coordinate data X0,0 to X0,16 and Y0, obtained by hardware calculation.
The addresses 0 to Y0,16 etc. (see FIG. 9) are designated.

STPはラッチ回路であり、RAM3に記憶されているステ
ップ数Δn1、Δn2、………(第8図参照)をラッチする
ものである。
STP is a latch circuit for latching the step numbers Δn1, Δn2, ... (See FIG. 8) stored in the RAM3.

ADDはアダー回路であり、現在選択されているアドレ
スポインタ(PNT1A、PNT1B、PNT1CまたはPNT1D)の値と
ラッチ回路STPの値とを加算し、その加算結果を現在選
択されているアドレスポインタに送るものである。つま
り、アドレスポインタの値をラッチ回路STPにラッチさ
れているステップ数Δn1、Δn2、………だけ増加する役
割を果すことになる。
ADD is an adder circuit that adds the value of the currently selected address pointer (PNT1A, PNT1B, PNT1C or PNT1D) and the value of the latch circuit STP and sends the addition result to the currently selected address pointer Is. That is, it plays a role of increasing the value of the address pointer by the number of steps Δn1, Δn2, ... Latched by the latch circuit STP.

MLTはマルチプライア回路であり、第6図に示すRAM1
に記憶されているデータと第7図に示すRAM2に記憶され
ているデータとの乗算を行うものである。つまり、
(1)式における乗算(例えば、WA×PA)部分の演算を
行うことになる。
MLT is a multiplier circuit, and RAM1 shown in FIG.
The data stored in the RAM 2 and the data stored in the RAM 2 shown in FIG. 7 are multiplied. That is,
The multiplication (for example, WA × PA) portion in the equation (1) is calculated.

ALUは算術論理回路であり、マルチプライア回路MLTの
乗算値と後述のアキュムレータACCの値とを加算するも
のである。
ALU is an arithmetic logic circuit that adds the multiplication value of the multiplier circuit MLT and the value of an accumulator ACC described later.

ACCはアキュムレータであり、算術論理回路ALUの演算
結果を保持するとともに、この演算結果を算術論理回路
ALUの一方の入力に送出するものである。つまり、算術
論理回路ALUとアキュムレータACCとにより、(1)式に
おける加算部分の演算を行うことになる。
ACC is an accumulator, which holds the operation result of the arithmetic logic circuit ALU and stores this operation result in the arithmetic logic circuit.
It is sent to one input of the ALU. That is, the arithmetic logic circuit ALU and the accumulator ACC perform the operation of the addition part in the equation (1).

CONTはコントロール回路であり、マイクロプロセッサ
CPU0からの命令を受けて上記各演算処理の制御を行うも
のである。このコントロール回路CONTには、上記各演算
処理に対するマイクロプログラムが含まれている。
CONT is a control circuit, a microprocessor
Upon receiving an instruction from the CPU0, it controls each of the above arithmetic processing. The control circuit CONT includes a micro program for each of the above arithmetic processing.

つぎに、第2図(A)、(B)および(C)に示した
フローチャートを参考にして、第1図に示した回路の動
作について説明する。
Next, the operation of the circuit shown in FIG. 1 will be described with reference to the flowcharts shown in FIGS. 2 (A), (B) and (C).

まず、マイクロプロセサCPU0からの信号に基いて初期
設定が行なわれる。
First, initialization is performed based on the signal from the microprocessor CPU0.

(a):RAM0からRAM1には、第5図に示したパラメータ
関数WA、WB、WCおよびWDの各tに対応したデータが送ら
れ、これらのデータは第6図に示すようにしてRAM1内に
記憶される。RAM0からRAM2には、第3図に示した各小曲
線C1〜C14毎に、アンカーポイントおよびコントロール
ポイントの各座標データが送られ、これらのデータは第
7図に示すようにしてRAM2内に記憶される。RAM0からRA
M3には、第3図に示した各小曲線C1〜C14の各分割数に
対応して、各小曲線C1〜C14毎のステップ数データΔn
1、Δn2、………が送られ、これらのデータは第8図に
示すようにしてRAM3内に記憶される。
(A): Data corresponding to t of each of the parameter functions WA, WB, WC, and WD shown in FIG. 5 is sent from RAM0 to RAM1, and these data are stored in RAM1 as shown in FIG. Memorized in. Coordinate data of anchor points and control points are sent from RAM0 to RAM2 for each of the small curves C1 to C14 shown in FIG. 3, and these data are stored in RAM2 as shown in FIG. To be done. RAM0 to RA
In M3, the step number data Δn for each of the small curves C1 to C14 corresponding to the number of divisions of each of the small curves C1 to C14 shown in FIG.
1, Δn2, ... Are sent and these data are stored in the RAM 3 as shown in FIG.

(b):アドレスポインタPNT2、PNT3、PNT4がそれぞれ
“0"に設定される。その結果、第7図に示すデータPAX0
が記憶されているアドレス、第8図に示すデータΔn1が
記憶されているアドレス、第9図に示すデータX0,0を記
憶するアドレスが、それぞれ指定されるわけである。
(B): The address pointers PNT2, PNT3, PNT4 are set to "0". As a result, the data PAX0 shown in FIG.
Is stored, the address where the data .DELTA.n1 shown in FIG. 8 is stored, and the address where the data X0,0 shown in FIG. 9 is stored are designated.

以上のようにして初期設定が終了し、つぎに第3図お
よび第4図(A)で示す小曲線C1に対する演算処理が行
われる。
The initial setting is completed as described above, and then the arithmetic processing for the small curve C1 shown in FIGS. 3 and 4 (A) is performed.

(c):アドレスポインタPNT1Aには“0が、アドレス
ポインタPNT1Bには“257"が、アドレスポインタPNT1Cに
は“514"が、アドレスポインタPNT1Dには“771"が、そ
れぞれ設定される。すなわち、第6図に示すように、デ
ータWA0、WB0、WC0およびWD0が記憶されているアドレス
がそれぞれ指定されるわけである。ラッチ回路STPに
は、アドレスポインタPNT3で指定されるRAM3のアドレス
“0000"に記憶されているデータM[PNT3]がラッチさ
れる。つまり、第8図に示すステップ数Δn1(第4図
(A)に示す小曲線C1の分割数に対応したステップ数
“16")がラッチされることになる。
(C): “0” is set in the address pointer PNT1A, “257” is set in the address pointer PNT1B, “514” is set in the address pointer PNT1C, and “771” is set in the address pointer PNT1D. 6, the addresses at which the data WA0, WB0, WC0 and WD0 are stored are designated respectively, and the latch circuit STP designates the address "0000" of the RAM3 designated by the address pointer PNT3. The data M [PNT3] stored in is latched, that is, the step number Δn1 shown in Fig. 8 (the step number "16" corresponding to the number of divisions of the small curve C1 shown in Fig. 4 (A)) is Will be latched.

(d):つぎに、第2図(B)に示す計算ルーチンが以
下のようにして行われる。
(D): Next, the calculation routine shown in FIG. 2 (B) is performed as follows.

まず、第4図(A)に示した点Q0,0のx座標を求める
ために、(1)式の“WA×PA+WB×PB+PC×PC+WD×P
D"の値が以下のようにして計算される。
First, in order to obtain the x coordinate of the point Q0,0 shown in FIG. 4 (A), “WA × PA + WB × PB + PC × PC + WD × P” in the equation (1) is used.
The value of D "is calculated as follows.

(d1):アキュムレータACCがクリアされ、“0"がセッ
トされる。
(D1): Accumulator ACC is cleared and “0” is set.

(d2):アドレスポインタPNT1Aで指定されるRAM1のア
ドレス“0000"に記憶されているデータM[PNT1A]すな
わち“WA0"(第6図参照)が、マルチプライア回路WLT
の“X"入力に送られる。アドレスポインタPNT2で指定さ
れるRAM2のアドレス“0000"に記憶されているデータM
[PNT2]すなわち“PAX0"(第7図参照)が、マルチプ
ライア回路MLTの“Y"入力に送られる。
(D2): The data M [PNT1A] stored in the address "0000" of the RAM1 designated by the address pointer PNT1A, that is, "WA0" (see FIG. 6) is the multiplier circuit WLT.
Sent to the "X" input of. Data M stored at address "0000" of RAM2 designated by address pointer PNT2
[PNT2] or "PAX0" (see FIG. 7) is sent to the "Y" input of the multiplier circuit MLT.

(d3):第2図(C)に示す積和計算が以下のようにし
て行われる。
(D3): The sum of products calculation shown in FIG. 2 (C) is performed as follows.

(d101):マルチプライア回路MLTの“X"入力の値“WA
0"と“Y"入力の値“PAX0"の積“WA0×PAX0"が、マルチ
プライア回路MLTの“Z"に出力される。すなわち(1)
式の“WA×PA"に相当する計算が行われる。この計算結
果は算術論理回路ALUの“Y"入力に送られ、一方アキュ
ムレータACCのデータ“0"が算術論理回路ALUの“X"入力
に送られる。
(D101): Multiplier circuit MLT "X" input value "WA"
The product "WA0 x PAX0" of "0" and the value "PAX0" of the "Y" input is output to "Z" of the multiplier circuit MLT.
The calculation corresponding to the expression "WA x PA" is performed. The result of this calculation is sent to the "Y" input of the arithmetic logic circuit ALU, while the data "0" of the accumulator ACC is sent to the "X" input of the arithmetic logic circuit ALU.

(d102):算術論理回路ALUの“X"入力の値と算術論理
回路ALUの“Y"入力の値との和が計算され、この計算結
果がアキュムレータACCに送られる。その結果、アキュ
ムレータACCには“WA0×PAX0"の値が保持されることに
なる。
(D102): The sum of the value of the "X" input of the arithmetic logic circuit ALU and the value of the "Y" input of the arithmetic logic circuit ALU is calculated, and the calculation result is sent to the accumulator ACC. As a result, the value of “WA0 × PAX0” is held in the accumulator ACC.

(d103):アドレスポインタPNT2の値に“1"が加算さ
れ、その結果ポインタ値が“0001"となる。
(D103): "1" is added to the value of the address pointer PNT2, and as a result, the pointer value becomes "0001".

(d4):アドレスポインタPNT1Bで指定されるRAM1のア
ドレス“0257"に記憶されているデータM[PNT1B]すな
わち“WB0"(第6図参照)が、マルチプライア回路MLT
の“X"入力に送られる。アドレスポインタPNT2で指定さ
れるRAM2のアドレス“0001"に記憶されているデータM
[PNT2]すなわち“PBX0"(第7図参照)が、マルチプ
ライア回路MLTの“Y"入力に送られる。
(D4): The data M [PNT1B] stored in the address "0257" of the RAM1 designated by the address pointer PNT1B, that is, "WB0" (see FIG. 6) is the multiplier circuit MLT.
Sent to the "X" input of. Data M stored at address "0001" of RAM2 designated by address pointer PNT2
[PNT2], that is, "PBX0" (see FIG. 7) is sent to the "Y" input of the multiplier circuit MLT.

(d5):第2図(C)に示す積和計算が行われる。基本
的な動作は上記(d3)で述べたものと同様である。マル
チプライア回路MLTでは、第6図に示した“WB0"と第7
図に示した“PBX0"との積“WB0×PBX0"、すなわち
(1)式の“WB×PB"に相当する計算が行われる。算術
論理回路ALUでは、この計算結果“WB0×PBX0"とアキュ
ムレータACCに保持されている値“WA0×PAX0"との和が
計算される。この計算結果“WA0×PAX0+WB0×PBX0"は
アキュムレータACCに保持される。すなわち、ここでは
(1)式の“WA×PA+WB×PB"に相当する計算が行われ
るわけである。
(D5): The sum of products calculation shown in FIG. 2 (C) is performed. The basic operation is the same as that described in (d3) above. In the multiplier circuit MLT, "WB0" shown in FIG.
Calculation corresponding to the product “WB0 × PBX0” with “PBX0” shown in the figure, that is, “WB × PB” in the equation (1) is performed. The arithmetic logic circuit ALU calculates the sum of this calculation result “WB0 × PBX0” and the value “WA0 × PAX0” held in the accumulator ACC. The calculation result “WA0 × PAX0 + WB0 × PBX0” is held in the accumulator ACC. That is, here, the calculation corresponding to “WA × PA + WB × PB” in the equation (1) is performed.

(d6):アドレスポインタPNT1Cで指定されるRAM1のア
ドレス“0514"に記憶されているデータM[PNT1C]すな
わち“WC0"(第6図参照)が、マルチプライア回路MLT
の“X"入力に送られる。アドレスポインタPNT2で指定さ
れるRAM2のアドレス“0002"に記憶されているデータM
[PNT2]すなわち“PCX0"(第7図参照)が、マルチプ
ライア回路MLTの“Y"入力に送られる。
(D6): The data M [PNT1C] stored in the address “0514” of RAM1 designated by the address pointer PNT1C, that is, “WC0” (see FIG. 6) is the multiplier circuit MLT.
Sent to the "X" input of. Data M stored at address "0002" of RAM2 designated by address pointer PNT2
[PNT2] or "PCX0" (see FIG. 7) is sent to the "Y" input of the multiplier circuit MLT.

(d7):第2図(C)に示す積和計算が行われる。基本
的な動作は上記(d3)で述べたものと同様である。マル
チプライア回路MLTでは、第6図に示した“WC0"と第7
図に示した“PCX0"との積“WC0×PCX0"、すなわち
(1)式の“WC×PC"に相当する計算が行われる。算術
論理回路ALUでは、この計算結果“WC0×PCX0"とアキュ
ムレータACCに保持されている値“WA0×PAX0+WB0×PBX
0"との和が計算される。この計算結果“WA0×PAX0+WB0
×PBX0+WC0×PCX0"はアキュムレータACCに保持され
る。すなわち、ここでは(1)式の“WA×PA+WB×PB+
WC×PC"に相当する計算が行われるわけである。
(D7): The sum of products calculation shown in FIG. 2 (C) is performed. The basic operation is the same as that described in (d3) above. In the multiplier circuit MLT, "WC0" shown in FIG.
Calculation corresponding to the product “WC0 × PCX0” with “PCX0” shown in the figure, that is, “WC × PC” in the equation (1) is performed. In the arithmetic logic circuit ALU, this calculation result “WC0 × PCX0” and the value “WA0 × PAX0 + WB0 × PBX” held in the accumulator ACC.
The sum is calculated with "0". The result of this calculation is "WA0 × PAX0 + WB0
“× PBX0 + WC0 × PCX0” is held in the accumulator ACC. That is, here, “WA × PA + WB × PB +” in the equation (1).
The calculation equivalent to WC x PC "is performed.

(d8):アドレスポインタPNT1Dで指定されるRAM1のア
ドレス“0771"に記憶されているデータM[PNT1D]すな
わち“WD0"(第6図参照)が、マルチプライア回路MLT
の“X"入力に送られる。アドレスポインタPNT2で指定さ
れるRAM2のアドレス“0003"に記憶されているデータM
[PNT2]すなわち“PDX0"(第7図参照)が、マルチプ
ライア回路MLTの“Y"入力に送られる。
(D8): The data M [PNT1D] stored in the address "0771" of RAM1 designated by the address pointer PNT1D, that is, "WD0" (see FIG. 6) is the multiplier circuit MLT.
Sent to the "X" input of. Data M stored at address "0003" of RAM2 designated by address pointer PNT2
[PNT2], that is, "PDX0" (see FIG. 7) is sent to the "Y" input of the multiplier circuit MLT.

(d9):第2図(C)に示す積和計算が行われる。基本
的な動作は上記(d3)で述べたものと同様である。マル
チプライア回路MLTでは、第6図に示した“WD0"と第7
図に示した“PDX0"との積“WD0×PDX0"、すなわち
(1)式の“WD×PD"に相当する計算が行われる。算術
論理回路ALUでは、この計算結果“WD0×PDX0"とアキュ
ムレータACCに保持されている値“WA0×PAX0+WB0×PBX
0+WC0×PCX0"との和が計算される。この計算結果“WA0
×PAX0+WB0×PBX0+WC0×PCX0+WD0×PDX0"はアキュム
レータACCに保持される。すなわち、ここでは(1)式
の“WA×PA+WB×PB+WC×PC+WD×PD"に相当する計算
が行われるわけである。
(D9): The sum of products calculation shown in FIG. 2 (C) is performed. The basic operation is the same as that described in (d3) above. In the multiplier circuit MLT, "WD0" shown in FIG.
Calculation corresponding to the product “WD0 × PDX0” with “PDX0” shown in the figure, that is, “WD × PD” in the equation (1) is performed. In the arithmetic logic circuit ALU, this calculation result “WD0 × PDX0” and the value held in the accumulator ACC “WA0 × PAX0 + WB0 × PBX”
The sum of 0 + WC0 x PCX0 "is calculated. The calculation result" WA0
“× PAX0 + WB0 × PBX0 + WC0 × PCX0 + WD0 × PDX0” is held in the accumulator ACC. That is, here, the calculation corresponding to “WA × PA + WB × PB + WC × PC + WD × PD” in the equation (1) is performed.

(d10):以上のようにして、第4図(A)に示した点Q
0,0のx座標が計算されるわけである。アキュムレータA
CCに保持されいる上記計算結果は、アドレスポインタPN
T4で指定されるRAM4のアドレス“0000"に記憶される。
この記憶データM[PNT4]は、第9図において“X0,0"
と表される。
(D10): Point Q shown in FIG. 4 (A) as described above
The x coordinate of 0,0 is calculated. Accumulator A
The above calculation result stored in CC is the address pointer PN
It is stored in the address "0000" of RAM4 specified by T4.
This stored data M [PNT4] is "X0,0" in FIG.
It is expressed as

(d11):アドレスポインタPNT4の値に“1"が加算さ
れ、その結果ポインタ値が“0001"となる。
(D11): "1" is added to the value of the address pointer PNT4, and as a result, the pointer value becomes "0001".

(d12)〜(d21):つぎに、第4図(A)に示した点Q
0,0のy座標を求めるために、上記(d1)〜(d10)の処
理と同様にして、第2図(B)に示した(d12)〜(d2
1)の処理が行われる。得られた計算結果“WA0×PAY0+
WB0×PBY0+WC0×PCY0+WD0×PDY0"は、アドレスポイン
タPNT4で指定されるRAM4のアドレス“0001"に記憶され
る。この記憶データM[PNT4]は、第9図において“Y
0,0"と表される。
(D12) to (d21): Next, point Q shown in FIG.
In order to obtain the y coordinate of 0,0, similar to the processing of (d1) to (d10), (d12) to (d2) shown in FIG. 2 (B).
The process of 1) is performed. Obtained calculation result “WA0 × PAY0 +
WB0 × PBY0 + WC0 × PCY0 + WD0 × PDY0 "is stored at the address" 0001 "of the RAM4 designated by the address pointer PNT4. This stored data M [PNT4] is" Y "in FIG.
It is expressed as 0,0 ".

(d22):アドレスポインタPNT4の値に“1"が加算さ
れ、その結果ポインタ値が“0002"となる。
(D22): "1" is added to the value of the address pointer PNT4, and as a result, the pointer value becomes "0002".

(d23):アドレスポインタPNT2の値から8が減算さ
れ、その結果ポインタ値が“0000"となる。
(D23): 8 is subtracted from the value of the address pointer PNT2, and as a result, the pointer value becomes "0000".

以上のようにして、第2図(A)に示す計算ルーチン
が終了し、第4図(A)に示す点Q0,0のx座標“X0,0"
およびy座標“Y0,0"がRAM4に記憶される(第9図参
照)。
As described above, the calculation routine shown in FIG. 2 (A) ends, and the x coordinate “X0,0” of the point Q0,0 shown in FIG. 4 (A).
And the y-coordinate "Y0,0" is stored in the RAM 4 (see FIG. 9).

(e):アドレスポインタPNT1A、PNT1B、PNT1CおよびP
NT1Dの値に、ラッチ回路STPにラッチされているステッ
プ数Δn1(第4図(A)に示す小曲線C1の分割数に対応
したステップ数“16")がそれぞれ加算される。従っ
て、アドレスポインタPNT1A、PNT1B、PNT1C、PNT1Dのポ
インタ値は、それぞれ“16"、“273"(257+16)、“53
0"(514+16)、“787"(771+16)となる。
(E): Address pointers PNT1A, PNT1B, PNT1C and P
The number of steps Δn1 (the number of steps “16” corresponding to the number of divisions of the small curve C1 shown in FIG. 4A) latched by the latch circuit STP is added to the value of NT1D. Therefore, the pointer values of the address pointers PNT1A, PNT1B, PNT1C and PNT1D are "16", "273" (257 + 16) and "53", respectively.
It will be 0 "(514 + 16) and" 787 "(771 + 16).

(f):アドレスポインタPNT1Aの値が“256"よりも大
きいかどうか判断される。
(F): It is determined whether the value of the address pointer PNT1A is larger than "256".

アドレスポインタPNT1Aの現在値は“0016"なので、計
算ルーチン(d)に処理が移り、上記(d)で述べた処
理と同様の処理が行われる。その結果、第4図(A)に
示す点Q0,1のx座標“X0,1"およびy座標“Y0,1"がRAM4
に記憶される(第9図参照)。具体的なデータは、“X
0,1"が“WA16×PAX0+WB16×PBX0+WC16×PCX0+WD16×
PDX0"であり、“Y0,1"が“WA16×PAY0+WB16×PBY0+WC
16×PCY0+WD16×PDY0"である(第6図、第7図参
照)。
Since the current value of the address pointer PNT1A is "0016", the processing shifts to the calculation routine (d), and the same processing as the processing described in (d) above is performed. As a result, the x coordinate “X0,1” and the y coordinate “Y0,1” of the point Q0,1 shown in FIG.
(See FIG. 9). The specific data is "X
0,1 "is" WA16 x PAX0 + WB16 x PBX0 + WC16 x PCX0 + WD16 x
PDX0 "and" Y0,1 "is" WA16 x PAY0 + WB16 x PBY0 + WC "
16 × PCY0 + WD16 × PDY0 ”(see FIGS. 6 and 7).

以上のようにして、アドレスポインタPNT1Aの値が“2
56"より大くなるまで同様な処理が行われる。その結
果、第4図(A)に示す点Q0,0〜Q0,16のx座標“X0,0"
〜“X0,16"およびy座標“Y0,0"〜“Y0,16"が、順次RAM
4に記憶される(第9図参照)。
As described above, the value of the address pointer PNT1A is "2.
Similar processing is performed until it becomes larger than 56 ". As a result, the x coordinate" X0,0 "of points Q0,0 to Q0,16 shown in FIG.
~ "X0,16" and y coordinate "Y0,0" to "Y0,16" are sequentially RAM
It is stored in 4 (see FIG. 9).

(g):アドレスポインタPNT1Aの値が“256"よりも大
きくなると、以下の処理が行なわれる。アドレスポイン
タPNT2の値に8が加算され、その結果ポインタ値が“00
08"となる(第7図参照)。アドレスポインタPNT3の値
に1が加算され、その結果ポインタ値が“0001"となる
(第8図参照)。
(G): When the value of the address pointer PNT1A becomes larger than "256", the following processing is performed. 8 is added to the value of the address pointer PNT2, and as a result, the pointer value is "00.
08 "(see FIG. 7). 1 is added to the value of the address pointer PNT3, and as a result, the pointer value becomes" 0001 "(see FIG. 8).

以上のようにして、第3図および第4図(A)に示す
小曲線C1に対する処理が終了する。
As described above, the processing for the small curve C1 shown in FIGS. 3 and 4A is completed.

(h):アドレスポインタPNT3の値が“14"になったか
どうか判断される。この“14"という値は第3図に示す
曲線の分割数に相当するものであり、この値は各曲線毎
に適宜選定されているものである。
(H): It is judged whether or not the value of the address pointer PNT3 becomes "14". This value of "14" corresponds to the number of divisions of the curve shown in FIG. 3, and this value is appropriately selected for each curve.

アドレスポインタPNT3の現在値は“0001"なので、計
算ルーチン(c)に処理が移り、上記(c)〜(g)で
述べた処理と同様の処理が行われる。その結果、第4図
(B)に示す点Q1,0〜Q1,32のx座標“X1,0"〜“X1,32"
およびy座標“Y1,0"〜“Y1,32"が、順次RAM4に記憶さ
れる(第9図参照)。
Since the current value of the address pointer PNT3 is "0001", the processing shifts to the calculation routine (c), and the same processing as the processing described in (c) to (g) above is performed. As a result, the x-coordinates "X1,0" to "X1,32" of points Q1,0 to Q1,32 shown in FIG.
And the y-coordinates "Y1,0" to "Y1,32" are sequentially stored in the RAM 4 (see FIG. 9).

以上のようにして、アドレスポインタPNT3の値が“1
4"になるまで、第3図に示す小曲線C1〜C14に対して同
様な処理が行わる。アドレスポインタPNT3の値が“14"
になると、第3図に示す小曲線C1〜C14に対する処理が
終了したと判断される。
As described above, the value of the address pointer PNT3 is "1".
Similar processing is performed on the small curves C1 to C14 shown in FIG. 3 until the value becomes 4 ". The value of the address pointer PNT3 is" 14 ".
Then, it is determined that the processing for the small curves C1 to C14 shown in FIG. 3 has been completed.

すでに述べたように、各小曲線はその曲率等に応じて
適当な分割数を選定することができ、各小曲線毎に最適
な分割数を選定すればハードウエア計算を高速化するこ
とが可能である。一般的には、曲率が小さいときには、
少ない分割数でも精度よく近似曲線を表すことができ
る。
As already mentioned, it is possible to select an appropriate number of divisions for each small curve according to its curvature, etc., and it is possible to speed up hardware calculation by selecting the optimal number of divisions for each small curve. Is. Generally, when the curvature is small,
An approximate curve can be represented accurately even with a small number of divisions.

そこで、小曲線の最適な分割数を求める方法について
以下に述べる。
Therefore, a method for obtaining the optimum number of divisions of the small curve will be described below.

まず、第10図を参照して第1の方法について説明す
る。
First, the first method will be described with reference to FIG.

第10図において、PAおよびPDは小曲線CV1のアンカー
ポイント、PBおよびPCは小曲線CV1のコントロールポイ
ントである。Lab、Lbc、Lbc、Lcd、Ldaは、それぞ
れPAとPB間、PBとPC間、PCとPD間、PDとPA間を直線で結
んだ線分の長さである。一般的に線分LabおよびLcdの
長さは、小曲線CV1の曲率が大きいほど長くなる。従っ
て、以下の評価式を用いて小曲線CV1の最適な分割数
“N"を求めることができる。
In FIG. 10, PA and PD are anchor points of the minor curve CV1, and PB and PC are control points of the minor curve CV1. Lab, Lbc, Lbc, Lcd, and Lda are the lengths of straight line segments connecting between PA and PB, between PB and PC, between PC and PD, and between PD and PA, respectively. Generally, the lengths of the line segments Lab and Lcd become longer as the curvature of the small curve CV1 is larger. Therefore, the optimum number of divisions “N” of the small curve CV1 can be obtained using the following evaluation formula.

ΔL=(Lab+Lbc +Lcd−Lda)+1 …(3) N=2{log(a)ΔL} …(4) 2≦a≦8(“a"は底) なお底“a"は、曲線の近似精度に応じて適宜選定され
るものであり、また(4)式で示される分割数“N"がデ
ータテーブルにおける分割数(第6図の例では“256")
を越えないように選択される。
ΔL = (Lab + Lbc + Lcd−Lda) +1 (3) N = 2 {log (a) ΔL} (4) 2 ≦ a ≦ 8 (“a” is the bottom) The bottom “a” is the approximation accuracy of the curve. The number of divisions “N” shown in the equation (4) is the number of divisions in the data table (“256” in the example of FIG. 6).
Is chosen not to exceed.

上記評価式を用いて分割数を求めた例(“a"=3の場
合)を第11図に示す。これは、コントロールポイントPB
およびPCのそれぞれのy座標を順次小さくした場合、す
なわち小曲線の曲率を順次小さくした場合の例を示した
ものである。なお、11図に示した“ステップ”とは“25
6/N"の値であり、第8図に示したステップ数データΔn
1、Δn2、………に相当するものである。第11図に示し
たように、上記評価式を用いた場合には、小曲線の曲率
が小さくなるほど分割数が少なくなることがわかる。
FIG. 11 shows an example (when “a” = 3) of obtaining the number of divisions using the above evaluation formula. This is the control point PB
2 shows an example in which the y-coordinates of PC and PC are sequentially reduced, that is, the curvature of the small curve is sequentially reduced. The "step" shown in Fig. 11 is "25
6 / N ", which is the step number data Δn shown in FIG.
It is equivalent to 1, Δn2, ………. As shown in FIG. 11, when the above evaluation formula is used, it is understood that the smaller the curvature of the small curve, the smaller the number of divisions.

なお、(3)式においては各線分の値をそのまま用い
たが、これらの線分の長さを二乗した値を用いてもよ
い。
Although the values of the respective line segments are used as they are in the equation (3), a value obtained by squaring the lengths of these line segments may be used.

つぎに、第12図および第13図を参照して第2の方法に
ついて説明する。
Next, the second method will be described with reference to FIGS. 12 and 13.

第12図において、PAおよびPDは小曲線CV2のアンカー
ポイント、PBおよびPCは小曲線CV2のコントロールポイ
ントである。S1は上記ポイントPA、PB、PCおよびPDを順
次直線で結んだときに形成される四角形の面積である。
一般的に上記四角形の面積S1は、小曲線CV2の曲率が大
きいほど大きくなる。従って、以下の評価式により小曲
線CV2の最適な分割数“N"を求めることができる。
In FIG. 12, PA and PD are anchor points of the small curve CV2, and PB and PC are control points of the small curve CV2. S1 is an area of a quadrangle formed when the points PA, PB, PC and PD are sequentially connected by a straight line.
Generally, the area S1 of the quadrangle increases as the curvature of the small curve CV2 increases. Therefore, the optimum number of divisions “N” of the small curve CV2 can be obtained by the following evaluation formula.

N=2{log(a)S1} …(5) 2≦a≦8(“a"は底) なお底“a"は、曲線の近似精度に応じて適宜選択され
るものであり、また(5)式で示される分割数“N"がデ
ータテーブルにおける分割数(第6図の例では“256")
を越えないように選択される。
N = 2 {log (a) S1} (5) 2 ≦ a ≦ 8 (“a” is the bottom) The bottom “a” is appropriately selected according to the approximation accuracy of the curve, and ( The number of divisions “N” shown in equation 5) is the number of divisions in the data table (“256” in the example of FIG. 6)
Is chosen not to exceed.

第13図において、PAおよびPDは小曲線CV3のアンカー
ポイント、PBおよびPCは小曲線CV3のコントロールポイ
ントである。S2は上記ポイントPA、PBおよびPDを順次直
線で結んだときに形成される三角形の面積であり、S3は
上記ポイントPA、PCおよびPDを順次直線で結んだときに
形成される三角形の面積である。
In FIG. 13, PA and PD are anchor points of the small curve CV3, and PB and PC are control points of the small curve CV3. S2 is the area of a triangle formed when the points PA, PB and PD are sequentially connected by a straight line, and S3 is the area of a triangle formed when the points PA, PC and PD are sequentially connected by a straight line. is there.

一般的に上記三角形S2およびS3のそれぞれ面積の和
“S2+S3"は、小曲線CV3の曲率が大きいほど大きくな
る。従って、以下の評価式により小曲線CV3の最適な分
割数“N"を求めることができる。
Generally, the sum “S2 + S3” of the areas of the triangles S2 and S3 increases as the curvature of the small curve CV3 increases. Therefore, the optimum number of divisions “N” of the small curve CV3 can be obtained by the following evaluation formula.

N=2{log(a)(S2+S3)} …(6) 2≦a≦8(“a"は底) なお底“a"は、曲線の近似精度に応じて適宜選択され
るものであり、また(6)式で示される分割数“N"がデ
ータテーブルにおける分割数(第6図の例では“256")
を越えないように選択される。
N = 2 {log (a) (S2 + S3)} (6) 2 ≦ a ≦ 8 (“a” is the bottom) The bottom “a” is appropriately selected according to the approximation accuracy of the curve, Further, the number of divisions “N” shown in the equation (6) is the number of divisions in the data table (“256” in the example of FIG. 6)
Is chosen not to exceed.

なお、(5)式および(6)式においては各面積の値
をそのまま用いたが、これらの面積を二乗した値を用い
てもよい。
Although the values of the respective areas are used as they are in the expressions (5) and (6), a value obtained by squaring these areas may be used.

つぎに、第14図を参照して第3の方法について説明す
る。
Next, the third method will be described with reference to FIG.

第14図において、PAおよびPDは小曲線CV0のアンカー
ポイント、PBおよびPCは小曲線CV0のコントロールポイ
ントである。D1は小曲線CV0上の第1の分割点であり、
アンカーポイントPAおよびPD以外の点である。具体的に
は、(2a)〜(2d)式においてt=1/2としてWA〜WDの
値を求め、これらを(1)式に代入して求めたものであ
る。なお、小曲線CV0のうち、点PDと第1の分割点D1と
の間にあるものを第1の分割曲線とよぶ。D2はPDとD1と
の間に位置する小曲線CV0上の第2の分割点であり、PD
とD1以外の点である。具体的には、(2a)〜(2d)式に
おいてt=3/4(=1/2+1/4)としてWA〜WDの値を求
め、これらを(1)式に代入して求めたものである。な
お、小曲線CV0のうち、点PDと第2の分割点D2との間に
あるものを第2の分割曲線とよぶ。以下同様にして、t
=7/8(=1/2+1/4+1/8)における小曲線CV0上の第3
の分割点をD3(図示せず。)、t=15/16(=1/2+1/4
+1/8+1/16)における小曲線CV0上の第4の分割点をD4
(図示せず。)、というようにして、順次小曲線CV0上
の分割点Dn(図示せず。)が定まる。なお、このように
して上記第1〜nの分割点D1〜Dnを求める場合、第5図
に示したデータテーブルを用いると高速に求めることが
できる。L1は点PAと点PDとを直線で結んだ線分の長さ、
L2は点PAと第1の分割点D1とを直線で結んだ線分の長
さ、L3は点PDと第1の分割点D1とを直線で結んだ線分の
長さ、L4は第1の分割点D1と第2の分割点D2とを直線で
結んだ線分の長さ、L5は点PDと第2の分割点D2とを直線
で結んだ線分の長さである。
In FIG. 14, PA and PD are anchor points of the small curve CV0, and PB and PC are control points of the small curve CV0. D1 is the first division point on the small curve CV0,
Points other than anchor points PA and PD. Specifically, the values of WA to WD are calculated with t = 1/2 in the expressions (2a) to (2d), and these values are substituted into the expression (1). The small curve CV0 between the point PD and the first division point D1 is called the first division curve. D2 is the second dividing point on the small curve CV0 located between PD and D1, and PD
And points other than D1. Specifically, the values of WA to WD are calculated with t = 3/4 (= 1/2 + 1/4) in the equations (2a) to (2d), and these values are substituted into the equation (1). is there. The small curve CV0 between the point PD and the second division point D2 is called a second division curve. Similarly, t
The third on the small curve CV0 at = 7/8 (= 1/2 + 1/4 + 1/8)
The division point of D3 (not shown), t = 15/16 (= 1/2 + 1/4)
+ 1/8 + 1/16) D4 to the fourth dividing point on the small curve CV0
(Not shown), and so on, the division points Dn (not shown) on the small curve CV0 are sequentially determined. When the first to nth division points D1 to Dn are obtained in this way, it can be obtained at high speed by using the data table shown in FIG. L1 is the length of the line segment connecting point PA and point PD with a straight line,
L2 is the length of the line segment connecting the point PA and the first division point D1 with a straight line, L3 is the length of the line segment connecting the point PD and the first division point D1 with a straight line, and L4 is the first line segment. Is the length of a line segment connecting the dividing point D1 and the second dividing point D2 with a straight line, and L5 is the length of the line segment connecting the point PD and the second dividing point D2 with a straight line.

以下、第14図を用いて分割数を求める動作について述
べる。
The operation for obtaining the number of divisions will be described below with reference to FIG.

第1の分割点D1を求めた後、線分L1、L2、およびL3の
長さをそれぞれ求め、以下の差分データを計算をする。
After obtaining the first division point D1, the lengths of the line segments L1, L2, and L3 are obtained, and the following difference data is calculated.

ΔL1=L2+L3−L1 …(7a) 第1の差分データΔL1が以下の条件を満たしているか
どうかを判定する。
ΔL1 = L2 + L3-L1 (7a) It is determined whether the first difference data ΔL1 satisfies the following conditions.

ΔL1<ΔL0 …(7b) ただし、ΔL0は予め決められた定数である。第1の差
分データΔL1が(7b)式の条件を満たしているときに
は、第14図の小曲線CV0の分割数は“1"となる。第1の
差分データΔL1が(7b)式の条件を満たしていないとき
には、第2の分割点D2を求めた後、線分L4およびL5の長
さをそれぞれ求め、以下の計算をする。
ΔL1 <ΔL0 (7b) where ΔL0 is a predetermined constant. When the first difference data ΔL1 satisfies the condition of the expression (7b), the number of divisions of the small curve CV0 in FIG. 14 becomes “1”. When the first difference data ΔL1 does not satisfy the condition of the expression (7b), after obtaining the second dividing point D2, the lengths of the line segments L4 and L5 are respectively obtained, and the following calculation is performed.

ΔL2=L4+L5−L3 …(8a) 第2の差分データΔL2が以下の条件を満たしているか
どうかを判定する。
ΔL2 = L4 + L5-L3 (8a) It is determined whether the second difference data ΔL2 satisfies the following condition.

ΔL2<ΔL0 …(8b) 第2の差分データΔL2が(8b)式の条件を満たしてい
るときには、第14図の小曲線CV0の分割数は“2"とな
る。第2の差分データΔL2が(8b)式の条件を満たして
いないときには、上記の方法と同様にして分割を行い、
順次分割点D3、D4、……、Dnおよび差分データΔL3、Δ
L4、……、ΔLnを求める。第nの差分データΔLnが以下
の条件を満たしているかどうかを判定する。
ΔL2 <ΔL0 (8b) When the second difference data ΔL2 satisfies the condition of expression (8b), the number of divisions of the small curve CV0 in FIG. 14 is “2”. When the second difference data ΔL2 does not satisfy the condition of the expression (8b), the division is performed in the same manner as the above method,
Sequential division points D3, D4, ..., Dn and difference data ΔL3, Δ
L4, ..., Calculate ΔLn. It is determined whether or not the nth difference data ΔLn satisfies the following conditions.

ΔLn<ΔL0 …(9b) 第nの差分データΔLnが(9b)式の条件を満たしてい
るときには、第14図の小曲線CV0の分割数は“2n-1"とな
る。
ΔLn <ΔL0 (9b) When the nth difference data ΔLn satisfies the condition of expression (9b), the number of divisions of the small curve CV0 in FIG. 14 is “2 n-1 ”.

なお、以上述べた第4の方法では、(2a)〜(2d)式
において、t=1/2、t=3/4(=1/2+1/4)、t=7/8
(=1/2+1/4+1/8)、t=15/16(=1/2+1/4+1/8+1
/16)、……として各分割点を求めたが、例えば、t=1
/2、t=1/4(=1/2−1/4)、t=3/8(=1/2−1/4+1/
8)、t=5/16(=1/2−1/4+1/8−1/16)、……として
各分割点を求めてもよい。要するに、第k番めの分割点
を求める場合には、第(k−1)番めの分割点における
“t"の値に対して、“1/2n"を加算しても減算してもよ
い。
In the fourth method described above, t = 1/2, t = 3/4 (= 1/2 + 1/4), t = 7/8 in the equations (2a) to (2d).
(= 1/2 + 1/4 + 1/8), t = 15/16 (= 1/2 + 1/4 + 1/8 + 1)
/ 16), ... We obtained each division point as, for example, t = 1
/ 2, t = 1/4 (= 1 / 2-1 / 4), t = 3/8 (= 1 / 2-1 / 4 + 1 /
8), t = 5/16 (= 1 / 2−1 / 4 + 1 / 8−1 / 16), ... In short, when obtaining the kth division point, subtraction is performed even if "1/2 n " is added to the value of "t" at the (k-1) th division point. Good.

[効果] 本発明によれば、予め曲線式のパラメータ関数の値を
記憶しておき、必要な数のパラメータ関数だけを用いて
曲線式の値を求めるため、曲線データを生成するたびに
多大な演算処理を必要とせず、アウトラインフォントの
生成に要する時間を大幅に短縮することができる。
[Effect] According to the present invention, the value of the parameter function of the curve formula is stored in advance, and the value of the curve formula is obtained using only the necessary number of parameter functions. Therefore, a large amount of data is generated each time the curve data is generated. The calculation processing is not required, and the time required to generate the outline font can be significantly reduced.

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

第1図〜第14図はいずれも本発明における実施例を説明
したものであり、第1図はブロック図、第2図(A)、
第2図(B)および第2図(C)は第1図の動作を示し
たフローチャート、第3図、第4図(A)および第4図
(B)はアウトラインフォントの説明図、第5図はデー
タテーブルの概念図、第6図〜第9図はRAMに記憶され
た各データのアドレスマップ、第10図は小曲線の分割数
を求める第1の方法に関する説明図、第11図は第1の方
法で分割数を求めたときの具体例を示した図、第12図お
よび第13図は小曲線の分割数を求める第2の方法に関す
る説明図、第14図は小曲線の分割数を求める第3の方法
に関する説明図である。 PA、PD……アンカーポイント PB、PC……コントロールポイント
1 to 14 are all for explaining an embodiment of the present invention, and FIG. 1 is a block diagram, FIG. 2 (A),
FIGS. 2 (B) and 2 (C) are flowcharts showing the operation of FIG. 1, FIGS. 3, 4 (A) and 4 (B) are explanatory diagrams of outline fonts, and FIG. FIG. 6 is a conceptual diagram of a data table, FIGS. 6 to 9 are address maps of each data stored in RAM, FIG. 10 is an explanatory diagram regarding the first method for obtaining the number of divisions of a small curve, and FIG. 11 is The figure which shows the specific example when the number of divisions is obtained by the first method, FIGS. 12 and 13 are explanatory diagrams regarding the second method of obtaining the number of divisions of the small curve, and FIG. 14 is the division of the small curve It is explanatory drawing regarding the 3rd method of calculating | requiring a number. PA, PD …… Anchor point PB, PC …… Control point

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】二つのアンカーポイントと少なくとも一つ
のコントロールポイントとを用いてパラメトリック表現
された曲線式に基いて曲線を表し、上記曲線を複数の部
分に分割して互いに隣り合った分割点を直線で結び、上
記曲線を近似的に表す方法において、 上記曲線式のn個のパタメータ値についてそれぞれ定ま
る上記曲線式のパラメータ関数の値を予め記憶してお
き、 表現しようとする曲線に応じて、上記n個のパラメータ
値のうちm個(m<n)について、上記パラメータ関数
の値に基いて上記曲線式の値を求め、 上記m個のパラメータ値に対応して定まる分割点を直線
で結ぶ ことを特徴とする曲線近似方法。
1. A curve is expressed based on a parametric expression using two anchor points and at least one control point, the curve is divided into a plurality of parts, and adjacent division points are straight lines. In the method of approximating the above curve, the values of the parameter functions of the above curve equations, which are determined respectively for the n parameter values of the above curve equation, are stored in advance, and the values are calculated according to the curve to be represented. For m (m <n) out of n parameter values, obtain the value of the above curve formula based on the value of the above parameter function, and connect a dividing point determined corresponding to the above m parameter values with a straight line. Curve approximation method characterized by.
JP2278101A 1990-10-17 1990-10-17 Curve fitting method Expired - Fee Related JP2522109B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2278101A JP2522109B2 (en) 1990-10-17 1990-10-17 Curve fitting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2278101A JP2522109B2 (en) 1990-10-17 1990-10-17 Curve fitting method

Publications (2)

Publication Number Publication Date
JPH04153695A JPH04153695A (en) 1992-05-27
JP2522109B2 true JP2522109B2 (en) 1996-08-07

Family

ID=17592647

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2278101A Expired - Fee Related JP2522109B2 (en) 1990-10-17 1990-10-17 Curve fitting method

Country Status (1)

Country Link
JP (1) JP2522109B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2701195B2 (en) * 1994-02-25 1998-01-21 和男 寅市 Sign making equipment
CN115619894A (en) * 2021-07-08 2023-01-17 荣耀终端有限公司 Icon rounded angle processing method and device

Also Published As

Publication number Publication date
JPH04153695A (en) 1992-05-27

Similar Documents

Publication Publication Date Title
Bentley et al. A general method for solving divide-and-conquer recurrences
US5808619A (en) Real-time rendering method of selectively performing bump mapping and phong shading processes and apparatus therefor
EP0577130B1 (en) System and method for rendering bézier splines
JP2961121B2 (en) Curve approximation device
US5388058A (en) Statistical processor
US6317133B1 (en) Graphics processor with variable performance characteristics
JP2522109B2 (en) Curve fitting method
JP2522107B2 (en) Curve fitting method
JP2522108B2 (en) Curve fitting method
EP0349182B1 (en) Method and apparatus for approximating polygonal line to curve
US6005988A (en) Method and apparatus for rapid digital image resizing
US5521828A (en) Unit and method for setup-change instruction and the production system
JP2677273B2 (en) A polygonal line approximation device for cubic Bezier curves
US5742751A (en) Curve approximation method
JP3064799B2 (en) Texture mapping device
JP2538645B2 (en) Curved line approximation device
JPH0293772A (en) Contour approximating system
JPH0991447A (en) Device for approximating bezier curve
JP3059739B2 (en) Information processing apparatus with curve drawing function and processing method
JPH07120429B2 (en) Curve fitting method
JPH03223977A (en) Graphic processor
JP2000339486A (en) Picture processing method and volume rendering processor
US8180608B1 (en) Variable transport delay modeling mechanism
JP3118064B2 (en) Curve drawing device
JPH05314164A (en) Calculating method for differential value and integral value

Legal Events

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