JPH02310783A - Curve interpolating system - Google Patents

Curve interpolating system

Info

Publication number
JPH02310783A
JPH02310783A JP13359089A JP13359089A JPH02310783A JP H02310783 A JPH02310783 A JP H02310783A JP 13359089 A JP13359089 A JP 13359089A JP 13359089 A JP13359089 A JP 13359089A JP H02310783 A JPH02310783 A JP H02310783A
Authority
JP
Japan
Prior art keywords
coordinate
curve
points
coordinate data
data
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.)
Pending
Application number
JP13359089A
Other languages
Japanese (ja)
Inventor
Aramichi Wakizaka
新路 脇坂
Kazuko Hasegawa
和子 長谷川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP13359089A priority Critical patent/JPH02310783A/en
Publication of JPH02310783A publication Critical patent/JPH02310783A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PURPOSE:To perform curve interpolation with high accuracy at high speed by finding the sum of the larger length of each neighboring control coordinate point in an axial direction, and deciding the number of developmental data points corresponding to the value. CONSTITUTION:The length of control coordinate data in the axial direction of each coordinate between the neighboring coordinate points, and the number of coordinate data points generated by attaching positive correlative relation with the sum of the larger length of the each neighboring coordinate point in a direction of coordinate axis is decided. In other words, distances x1 and y1 for an x<->axial direction and a y<->axial direction between control data C0 and C1 are calculated, respectively, and the y1 with a larger value is selected, and a distance x2 with the larger value between the control data C1 and C2 is selected similarly, and distance y3 with the large value between the control data C2 and C3 is selected similarly. Then, the number of developmental data points can be obtained from the range of the value of the sum ( y1 + x2 + y3) with a developmental data point number table for coordinate data P0 - Pn-1 on Bezier curve corresponding to the range. Thereby, it is possible to realize the acceleration of processing speed without lowering the accuracy of the curve interpolation.

Description

【発明の詳細な説明】 〔産業上の利用分野] 曲線を規定する制御座標データから曲線上の座標データ
を発生させ、発生座標点を直線で結ぶことにより、疑似
的に曲線を発生する曲線補間方式において9発生座標デ
ータから必要な曲線上の座標データを抽出する曲線補間
方式に関する。
[Detailed Description of the Invention] [Industrial Application Field] Curve interpolation that generates a pseudo curve by generating coordinate data on a curve from control coordinate data that defines the curve and connecting the generated coordinate points with a straight line. The present invention relates to a curve interpolation method for extracting necessary coordinate data on a curve from generated coordinate data.

[従来の技術] 従来、3次のベジェ(Bezier)曲線の発生方法に
ついては、ポストスクリプト・ランゲージ・リファラン
スマニュアル(PO5TSCRIPT Languag
eReference Ma、nual、(1985)
 )第140および第215頁、あるいは、 Davi
d F、Rogsrs、 J、Alan Adams共
著、山口富士夫訳「コンピュータグラフィックス」日刊
工業新聞社発行第154〜161頁において論じられて
いる。
[Prior Art] Conventionally, a method for generating a cubic Bezier curve is described in the PostScript Language Reference Manual (PO5TSCRIPT Language Reference Manual).
eReference Ma, nual, (1985)
) pages 140 and 215, or Davi
Discussed in "Computer Graphics", co-authored by F., Rogsrs, J. and Alan Adams, translated by Fujio Yamaguchi, published by Nikkan Kogyo Shimbun, pp. 154-161.

3次のベジェ曲線の発生は、ベジェ曲線発生の式を用い
て1曲線上のデータを計算し、算出した座標点を直線で
結んでいくことから曲線を疑似的に発生させる。
To generate a cubic Bezier curve, data on one curve is calculated using a Bezier curve generation formula, and the calculated coordinate points are connected with straight lines, thereby generating a pseudo curve.

そこで、曲線上のデータ計算において算出した座標点を
結んだ直線、すなわち疑似的な曲線とベジェ曲、線式が
表わす曲線との距離(flatnessparamet
er)を算出し、その値がトレランス(toleran
ce)とよばれる許容できる誤差内に収まるように曲線
上のデータを抽出する。
Therefore, the distance (flatnessparamet
er), and its value is the tolerance (toleran
Data on the curve is extracted so that it falls within an allowable error called ce).

[発明が解決しようとする課M] 発生した座標点を結んだ疑似曲線と曲線式が表わす曲線
との距離をパラメータとして、その値が許容誤差内番S
収まるように曲線上の座標データを決める前述した3次
のベジェ曲線の描画方法においては、曲線上の座標デー
タを計算し、さらに、発生座標データを結んだ直線と曲
線との距離を計算し、また、その値が許容誤差に収まっ
ているかを判定し、判定の結果から最終的な曲線上の座
標データを決定するという種々の処理を行うため、処理
が複雑になる。したがって、高速の曲線補間処理ができ
ないという問題があった。特に1文字の輪郭線を定義す
る主要な座標データを基に高品位の文字を表示あるいは
印刷する、いわゆるアウトラインフォントを用いた処理
においては、曲線補間の精度およびその処理速度が問題
であった。
[Problem M to be solved by the invention] The distance between the pseudo-curve connecting the generated coordinate points and the curve represented by the curve equation is used as a parameter, and its value is the tolerance number S.
In the aforementioned method of drawing a cubic Bezier curve, the coordinate data on the curve is calculated, and then the distance between the curve and the straight line connecting the generated coordinate data is calculated, In addition, various processes are performed, such as determining whether the value falls within an allowable error and determining final coordinate data on the curve based on the determination result, which makes the process complicated. Therefore, there was a problem that high-speed curve interpolation processing could not be performed. Particularly in processing using so-called outline fonts, in which high-quality characters are displayed or printed based on main coordinate data that defines the outline of a single character, the precision of curve interpolation and the processing speed are problems.

本発明の一つの目的は、発生する疑似的な曲線の精度を
低下させずに、簡単な処理で疑似的な曲線を描画するこ
とができる曲線補間方式を提供することである。
One object of the present invention is to provide a curve interpolation method that can draw pseudo curves with simple processing without reducing the accuracy of the generated pseudo curves.

本発明の他の目的は、ベジェ曲線を高速に描画すること
ができる曲線補間方式を提供することである。
Another object of the present invention is to provide a curve interpolation method that can draw Bezier curves at high speed.

[課題を解決するための手段] 上記目的を達成するために1本発明による曲線補間方式
は、曲線を規定する制御座標データから曲線上の座標デ
ータを発生させ、該発生した座標点を直線で連結するこ
とにより、疑似的に曲線を発生する曲線補間方式におい
て、上記制御座標データの各隣接座標点間の各座標軸方
向の長さを求め、各隣接座標点について長い方の座標軸
方向長さの総和を算出し、該総和と正の相関関係をもた
せて上記発生する座標データの点数を決定するようにし
たものである。
[Means for Solving the Problems] In order to achieve the above object, the curve interpolation method according to the present invention generates coordinate data on the curve from control coordinate data defining the curve, and connects the generated coordinate points with a straight line. In the curve interpolation method that generates a pseudo curve by connecting, the length in each coordinate axis direction between each adjacent coordinate point of the above control coordinate data is determined, and the length in the longer coordinate axis direction for each adjacent coordinate point is calculated. The total sum is calculated, and the number of coordinate data points generated is determined by having a positive correlation with the total sum.

この方式においては、例えば、上記長い方の座標軸方向
の長さの総和を予め複数の範囲に分類し、該複数の範囲
ごとに上記発生する座標データの点数を定めたテーブル
を参照して、上記座標データの点数を決定する。
In this method, for example, the total length in the direction of the longer coordinate axis is classified in advance into a plurality of ranges, and the number of points of the coordinate data generated is determined for each of the plurality of ranges by referring to a table. Determine the number of coordinate data points.

また、好ましくは、上記各隣接座標点について長い方の
座標軸方向長さがすべて同一軸方向に属する場合、上記
発生する座標データ点数を、同一軸方向に属さない場合
より小さい値に決定する。
Preferably, when the longer coordinate axis direction lengths of the adjacent coordinate points all belong to the same axial direction, the number of generated coordinate data points is determined to be a smaller value than when they do not belong to the same axial direction.

本発明による他の曲線補間方式は、曲線を規定する制御
座標データから曲線上の座標データを発生させ、該発生
した座標点を直線で連結することにより、疑似的に曲線
を発生する曲線補間方式において、上記発生した座標デ
ータ点のうち、隣り合う3座標点の端点と他の2点とを
結ぶ2直線のなす角度を求め、該角度が予め定めた許容
範囲内にあった場合、当該3座標点中の他の端点の座標
データを削除するようにしたものである。
Another curve interpolation method according to the present invention is a curve interpolation method in which coordinate data on a curve is generated from control coordinate data that defines a curve, and a curve is generated in a pseudo manner by connecting the generated coordinate points with a straight line. Among the coordinate data points generated above, find the angle formed by two straight lines connecting the end points of the three adjacent coordinate points and the other two points, and if the angle is within a predetermined tolerance range, the three The coordinate data of other end points in the coordinate points are deleted.

この場合、好ましくは、上記隣り合う3座標点の端点間
の各座標軸方向の長さを求め、いずれが一方が予め定め
た許容範囲を超えた場合は、上記2直線のなす角度が許
容範囲内にある場合であっても、上記他端点の座標デー
タを削除しないようにする。
In this case, preferably, the length in each coordinate axis direction between the end points of the three adjacent coordinate points is determined, and if one of them exceeds a predetermined tolerance range, the angle formed by the two straight lines is within the tolerance range. The coordinate data of the other end point should not be deleted even if the coordinate data is in the other end point.

[作 用] 曲線を規定する制御座標データから曲線上の座標データ
を発生させ1発生座標点を直線で結ぶことにより、疑似
的に曲線を発生する曲線補間方式において、曲線補間の
精度および処理速度を向上させるために、本発明者らは
、各隣接制御座標点間の各座標軸方向の長さく距11)
に着目した。すなわち、各隣接制御座標点間の長い方の
軸方向長さを加算した値(総和)と1曲線の長さあるい
は複雑さとの間には相関関係があることに気付き、この
各隣接制御座標点間の長い方の軸方向長さの総和を求め
、この値に応じて、発生データ点数を決定することに想
到した。すなわち、長い曲線に対しては、発生データ点
数を多くし、短い曲線に対しては1発生データ点数を少
なくする。これにより、曲線補間の精度を低下させるこ
となく、処理速度の高速化を実現することができる。
[Function] In a curve interpolation method that generates a pseudo curve by generating coordinate data on a curve from control coordinate data that defines the curve and connecting one generation coordinate point with a straight line, the accuracy and processing speed of curve interpolation are improved. In order to improve
We focused on In other words, we realized that there is a correlation between the sum of the longer axial lengths between adjacent control coordinate points and the length or complexity of one curve. We came up with the idea of finding the sum of the longer axial lengths between them and determining the number of generated data points according to this value. That is, for a long curve, the number of generated data points is increased, and for a short curve, the number of generated data points is decreased. This makes it possible to increase the processing speed without reducing the accuracy of curve interpolation.

また、上記長い方の軸方向長さの総和が同じであっても
、X軸およびY#!に河するものが混在する場合に比べ
、すべて同じ座標軸方向に属する場合の曲線は比較的な
めらかな曲線であることが予想される。したがって、こ
のような場合には、原則的に発生データ点数を小さくす
ることができる。
Also, even if the sum of the longer axial lengths is the same, the X-axis and Y#! It is expected that the curve in the case where all the coordinates belong to the same coordinate axis direction will be a relatively smooth curve compared to the case where there are a mixture of rivers. Therefore, in such a case, the number of generated data points can be reduced in principle.

ただし、この場合でも小さい方の軸方向長さの和の大き
さによって曲線の曲率が変わると考えられるので、この
値に基づいて発生データ点数を決定する。これによって
、なめらかな曲線に対しては。
However, even in this case, it is considered that the curvature of the curve changes depending on the size of the sum of the smaller axial lengths, so the number of generated data points is determined based on this value. This allows for smooth curves.

曲線補間の精度を低下させることなく、さらに発生デー
タ点数を少なくして処理速度の高速化が図れる。
The processing speed can be increased by further reducing the number of generated data points without reducing the accuracy of curve interpolation.

また、本発明によれば、任意の方式で発生した座標デー
タ点のうち、隣り合う3座標点の端点と他の2点とを結
ぶ2直線のなす角が、許容範囲にあった場合、当該3座
標点中の他端点の座標データを削除し、残りの座標デー
タを直線で結ぶことにより1曲線補間の精度を維持しな
がら最終座標点数を低減できる。
Further, according to the present invention, among the coordinate data points generated by any method, if the angle formed by two straight lines connecting the end points of three adjacent coordinate points and the other two points is within the allowable range, the corresponding By deleting the coordinate data of the other end point among the three coordinate points and connecting the remaining coordinate data with a straight line, the final number of coordinate points can be reduced while maintaining the accuracy of one-curve interpolation.

さらに、上記2直線のなす角が許容範囲内にあった場合
でも、上記隣り合う3座標点の端点間の各座標軸方向の
長さのうち、最大値が許容範囲を超えた場合、上記他端
点の座標データを削除せず。
Furthermore, even if the angle formed by the two straight lines is within the allowable range, if the maximum value of the length in each coordinate axis direction between the end points of the three adjacent coordinate points exceeds the allowable range, the other end point without deleting coordinate data.

残りの座標データを直線で結ぶことにより5曲率の小さ
い部分と大きい部分からなる曲線においても、曲線補間
の精度を上げることができる。
By connecting the remaining coordinate data with straight lines, it is possible to improve the accuracy of curve interpolation even for curves consisting of 5 small and large curvature parts.

[実施例] 以下、本発明の実施例を図面により説明する。[Example] Embodiments of the present invention will be described below with reference to the drawings.

3次のベジェ曲線を規定する制御座標データc、、c1
.c、、c、に基づいて、3次(k=3)のベジェ曲線
式は次のように表わされる。
Control coordinate data c, , c1 defining a cubic Bezier curve
.. Based on c,,c,, the cubic (k=3) Bezier curve equation is expressed as follows.

P(t)=  ΣctJ、1(t)   (o≦t≦1
)ここに、J h、 I(t)はkの値が決まったとき
、tの値により予め定まる係数であり、tの値を与える
ことにより求める座sPが得られる。したがって、与え
るtの値の個数が発生データの点数に対応する。なお、
ベジェ曲線の詳細については、前記公知文献を参照され
たい。
P(t) = ΣctJ, 1(t) (o≦t≦1
) Here, J h, I(t) is a coefficient that is predetermined by the value of t when the value of k is determined, and the sought locus sP can be obtained by giving the value of t. Therefore, the number of values of t to be given corresponds to the number of generated data points. In addition,
For details on Bezier curves, please refer to the above-mentioned known documents.

第1図は、このベジェ曲線式を用い、制御座標データC
,,C工、c、、C,に基づいて発生した曲線2上の座
標データP、、P工、P2.・・・pfi−□をプロッ
トした図である。
FIG. 1 shows the control coordinate data C using this Bezier curve equation.
,,C-work,c,,C,The coordinate data P on curve 2 generated based on,,P-work,P2. ... is a diagram in which pfi-□ is plotted.

本実施例における曲線補間にあたって、まず初めに、制
御データC,,C,間のy軸方向、y軸方向それぞれに
ついて距離ΔX工、Δy1を計算する。
In the curve interpolation in this embodiment, first, the distances ΔX and Δy1 are calculated in the y-axis direction and the y-axis direction between the control data C, , C, respectively.

両者を比較し、その結果、第1図の例ではΔy1〉Δx
Lであることから、値の大きいΔy□を選択する。次に
、制御データC1,C2間について同様にして、距離Δ
X 2 wΔy2を計算し、両者を比較する。ΔX、)
Δy2であることから、大きい方ΔX2を選択する。さ
らに、制御データC,,C3間についても同様にして、
距離へX3tΔy3を計算し、両者を比較する。Δy 
s >ΔX、であることがら大きい方Δy8を選択する
Compare the two, and as a result, in the example of Figure 1, Δy1>Δx
Since it is L, Δy□ with a large value is selected. Next, in the same way between the control data C1 and C2, the distance Δ
Calculate X 2 wΔy2 and compare the two. ΔX, )
Since Δy2, the larger one ΔX2 is selected. Furthermore, similarly for the control data C, , C3,
Calculate the distance X3tΔy3 and compare the two. Δy
Since s > ΔX, the larger one Δy8 is selected.

第5図に示すように、選択された大きい方の軸方向距離
のすべての和(Δy1+Δx2+Δyz)12の値の範
囲すなわち距離範囲15がら、その範囲に対応したベジ
ェ曲線上の座標データPの発生データ点数テーブル16
により、発生データ点数nが得られる。例えば、距離筒
g115が“Q2″′である場合、対応する発生データ
点数nは114 IIとなる。この場合、ベジェ曲線式
の1 (0≦t≦1)を、例えば、t=1/4.2/4
.3/4.4/4(t=oの始点は除く)に変化させて
ベジェ曲線上の座標データPを算出し、直線で結ぶこと
により、疑似的に曲線を発生する。
As shown in FIG. 5, within a range of values of the sum of all selected larger axial distances (Δy1+Δx2+Δyz)12, that is, a distance range 15, the occurrence data of coordinate data P on the Bezier curve corresponding to that range Score table 16
Thus, the number n of generated data points is obtained. For example, when the distance cylinder g115 is "Q2"', the corresponding number of generated data points n is 114 II. In this case, 1 (0≦t≦1) of the Bezier curve equation, for example, t=1/4.2/4
.. 3/4.4/4 (excluding the starting point of t=o), calculate the coordinate data P on the Bezier curve, and connect them with straight lines to generate a pseudo curve.

この曲線補間方式により、長さの長いあるいは複雑な曲
線においては、発生座標データPの数を多くすることか
ら、発生する近似曲線の精度を上げることができる。逆
に、長さの短い曲線においては、発生座標データPの数
を少なくして近似精度を低下させるデータを排除し、高
速にベジェ曲線を発生できる。また、制御データC0〜
C3から発生座標データPの発生データ点数を決定し、
発生データPを算出するので、ベジェ曲線の描画速度の
向上が期待できる。
With this curve interpolation method, the accuracy of the generated approximate curve can be increased because the number of generated coordinate data P is increased in the case of a long or complicated curve. Conversely, for a short curve, the number of generated coordinate data P is reduced to eliminate data that degrades the approximation accuracy, and a Bezier curve can be generated at high speed. In addition, control data C0~
Determine the number of generated data points of the generated coordinate data P from C3,
Since the generated data P is calculated, an improvement in the drawing speed of Bezier curves can be expected.

次に、曲線形状がなだらかな場合について、第2図を用
いて説明する。第2図は、3次のベジェ曲線を規定する
制御座標データC,,Cよ、C2゜C1から、3次ベジ
ェ曲線2上の座標データP0゜pl、 p2・・・P□
−1を計算し、プロットした図である。
Next, a case where the curve shape is gentle will be explained using FIG. 2. FIG. 2 shows control coordinate data C,,C, which defines a cubic Bezier curve, from C2°C1 to coordinate data P0°pl, p2...P□ on the cubic Bezier curve 2.
-1 is calculated and plotted.

第1図で説明したものと同様に、初めに制御データC,
,C,間のX軸方向、y軸方向それぞれについて距離Δ
X工、Δy1を計算する。両者を比較し、その結果ΔX
1>Δy工であることがらΔX□を選択する。次に、制
御データC工、02間について同様な処理を行う。その
結果、ΔX2>Δy2であることがらΔx2を選択する
。同様に、制御データC,,C,間については、ΔX1
が選択される。
Similarly to what was explained in FIG. 1, first the control data C,
, C, in the X-axis direction and the y-axis direction, respectively.
Calculate X engineering and Δy1. Compare the two, and the result is ΔX
Since 1>Δy, select ΔX□. Next, similar processing is performed for the control data C and 02. As a result, since ΔX2>Δy2, Δx2 is selected. Similarly, for control data C, ,C, ΔX1
is selected.

選択された値は、すべてX軸方向における制御座標デー
タ間の距離である。すなわち、この3次のベジェ曲線の
形状は、X軸方向に延びたなだらかな曲線であることが
制御座標データC6−C5のみから推定できる。よって
、この場合は第1図で説明したような曲線の長さに相当
する発生データ点数よりも少ない点数で曲線補間を行っ
ても問題はない。そこで、制御データC0〜C3のX軸
方向、y軸方向それぞれについて距離ΔX、Δyを計算
、比較し、その結果すべてが同じ軸上の値であったなら
ば(ΔX〉Δy)、第5図に示すように、セレクタ14
により値の小さいΔyを選択するようにし、選択された
すべての和(Δy工+Δy、+Δys)13の値の範囲
15から、その範囲に対応したベジェ曲線上の座標デー
タPの発生データ点数テーブル16により、発生データ
点数をm点(m<n:nはΔXの総和に対応した発生デ
ータ点数)に減らすことができ、さらにベジェ曲線の描
画速度の向上が期待できる。
The selected values are all distances between control coordinate data in the X-axis direction. That is, it can be estimated from only the control coordinate data C6-C5 that the shape of this third-order Bezier curve is a gentle curve extending in the X-axis direction. Therefore, in this case, there is no problem even if curve interpolation is performed using fewer points than the number of generated data points corresponding to the length of the curve as explained in FIG. Therefore, the distances ΔX and Δy are calculated and compared in the X-axis direction and the y-axis direction of the control data C0 to C3, respectively, and if the results are all values on the same axis (ΔX>Δy), as shown in FIG. As shown in the selector 14
Δy with the smaller value is selected, and from the range 15 of values of all the selected sums (Δy + Δy, +Δys) 13, a table 16 of the number of generated data points of coordinate data P on the Bezier curve corresponding to that range is created. As a result, the number of generated data points can be reduced to m points (m<n: n is the number of generated data points corresponding to the sum of ΔX), and it is expected that the drawing speed of Bezier curves will be further improved.

なお、第5図の距離範囲15および発生データ点数テー
ブル16は、メモリあるいは組合せ論理回路により容易
に構成することができる。この例では、最大値の和12
と最小値の和13とに対して同一の距離範囲15および
発生データ点数テーブル16を用いたが、双方に別個に
用意してもよい。
Note that the distance range 15 and generated data point number table 16 shown in FIG. 5 can be easily constructed using a memory or a combinational logic circuit. In this example, the sum of the maximum values is 12
Although the same distance range 15 and generated data point number table 16 are used for the sum of minimum values 13 and 13, they may be prepared separately for both.

第3図は1本発明の他の実施例を説明するための図であ
る。第3図(a)は、あらかじめ計算された3次のベジ
ェ曲線上の座標データPから隣り合う3座標データの端
点と他の2点を結んだ2直線のなす角をパラメータとし
て、最終的に抽出される曲線上の座標データP (P、
、 Pl、 P、、 P、。
FIG. 3 is a diagram for explaining another embodiment of the present invention. Figure 3 (a) shows the final result obtained from the coordinate data P on the cubic Bezier curve calculated in advance, using the angle formed by two straight lines connecting the end points of the adjacent three coordinate data and the other two points as parameters. Coordinate data on the curve to be extracted P (P,
, Pl, P,, P,.

・・・)をプロットした図である。...) is plotted.

初めに、ベジェ曲線の長さに合わせて、ベジェ曲線式の
tを変化させて、最大発生データ点数N maxの座標
データP Or pxl PZ+ ”’PHt+ax−
1を算出する。次に、Poから順に直線P0P工を基準
にして、2直線P。Pl、POP、のなす角を計算する
。その角度が、許容範囲以内であれば、座標データP2
を削除する。さらに、2直線P。P工IPOP、のなす
角を計算する。その角度が許容範囲外になったならば、
座標データP3を抽出する。次に、直線p1p3を基準
にして、2直線r’、P、、P□P、のなす角を計算す
る。その角度が、許容範囲内であれば、抽出データP、
を削除する。さらに、2直線P1P、、PIF、のなす
角を計算する。その角度が許容範囲外になったならば座
標データP。
First, t of the Bezier curve equation is changed according to the length of the Bezier curve, and the coordinate data P Or pxl PZ+ ”'PHt+ax− of the maximum number of generated data points N max is
Calculate 1. Next, from Po, two straight lines P based on the straight line P0P work. Calculate the angle formed by Pl and POP. If the angle is within the allowable range, coordinate data P2
Delete. Furthermore, two straight lines P. Calculate the angle formed by P-work IPOP. If the angle is outside the allowable range,
Extract coordinate data P3. Next, the angle formed by the two straight lines r', P, , P□P is calculated using the straight line p1p3 as a reference. If the angle is within the allowable range, the extracted data P,
Delete. Furthermore, the angle formed by the two straight lines P1P, , PIF, is calculated. If the angle is outside the allowable range, the coordinate data P.

を抽出する。同様な処理を繰り返していき、R終的に残
された座標データP OT pt+ P31 PSI・
・・が曲線上の座標データPとして決定される。この方
式により、発生データ点数を減らして、ベジェ曲線の近
似精度の高いベジェ曲線の描画が実現できる。
Extract. Repeating the same process, the coordinate data P OT pt+ P31 PSI・
... is determined as the coordinate data P on the curve. With this method, it is possible to reduce the number of generated data points and draw a Bezier curve with high approximation accuracy.

さらに、曲線形状がなだらかな部分と、急に曲率がはげ
しくなる部分とが混在する曲線の場合は、2直線のなす
角がいつまでたっても、許容範囲を超えずに、あるとき
急に超えるようなことが起きる可能性があり、これによ
って、ベジェ曲線近似精度の低下をまねくことが考えら
れる。そこで、第3図(a)で説明した2直線のなす角
を第1のパラメータとし、さらに第3図(b)に示すよ
うに。
Furthermore, in the case of a curve that has a mixture of gentle parts and parts where the curvature suddenly becomes severe, the angle between the two straight lines will not exceed the allowable range, but will suddenly exceed it at some point. There is a possibility that this may occur, and this may lead to a decrease in Bezier curve approximation accuracy. Therefore, the angle formed by the two straight lines explained in FIG. 3(a) is set as the first parameter, and as shown in FIG. 3(b).

座標データPのXn方向、y軸方向それぞれの座標デー
タ間の距離の大きい方(ΔX、Δyいずれか)を第2の
パラメータとして、いずれか一方がそれぞれの許容範囲
を超えたとき、座標データを抽出し、最終的な座標デー
タPを決定する。この方式により、さらに、ベジェ曲線
のより近似精度の高いベジェ曲線描画が実現できる。
The larger distance between the coordinate data in the Xn direction and the y-axis direction of the coordinate data P (either ΔX or Δy) is used as the second parameter, and when either one exceeds the respective allowable range, the coordinate data is Then, the final coordinate data P is determined. With this method, it is possible to draw a Bezier curve with higher approximation accuracy.

第4図は、本発明の他の実施例を示す図であり、ベジェ
曲線上の座標データPを計算する前述したベジェ曲線式
において、計数J K、 L (e)をテーブルにもた
せたハードウェア構成を3次のベジェ曲線式(k=3)
の場合で説明する。
FIG. 4 is a diagram showing another embodiment of the present invention, in which hardware is used to provide the coefficients J K, L (e) on a table in the Bezier curve equation described above for calculating the coordinate data P on the Bezier curve. The configuration is a cubic Bezier curve formula (k=3)
This will be explained in the case of

曲線式における制御座標データCiの各座標値9と、糸
数J 3. I (t)のテーブル8から1乗算器10
と加算器11の演算をへて、曲線上の座標データが算出
される。このハードウェア構成から高速なベジェ曲線補
間処理が実現できる。また、tを172Nにとり、糸数
Jを分数として分母、分子に分割したテーブル8をもた
せることにより、上記曲線補間におけるより高速なハー
ドウェア構成を実現できる。
Each coordinate value 9 of the control coordinate data Ci in the curve formula and the number of threads J3. I (t) table 8 to 1 multiplier 10
Through the calculations of the adder 11, coordinate data on the curve is calculated. This hardware configuration enables high-speed Bezier curve interpolation processing. Further, by setting t to 172N and providing a table 8 in which the number of threads J is divided into a denominator and a numerator as a fraction, a faster hardware configuration in the curve interpolation described above can be realized.

さらに、いままで述べてきた実施例は2次元で説明され
ているが、3次元においても実現できる。
Furthermore, although the embodiments described so far have been described in two dimensions, they can also be implemented in three dimensions.

[発明の効果] 以上説明したように本発明によれば、曲線を規定する制
御座標データから曲線上の座標データを発生させ1発生
座標データを直線で結ぶことにより、疑似的に曲線を発
生する曲線補間方式において、制御座標データ間の各座
標軸方向の距離の相関により発生座標データ点数を決め
て1曲線上の座標データを算出するので、補間精度の高
い曲線補間を高速に行うことかできる。
[Effects of the Invention] As explained above, according to the present invention, coordinate data on a curve is generated from control coordinate data that defines a curve, and one generated coordinate data is connected with a straight line, thereby generating a pseudo curve. In the curve interpolation method, the number of generated coordinate data points is determined based on the correlation of distances in each coordinate axis direction between control coordinate data and coordinate data on one curve is calculated, so curve interpolation with high interpolation accuracy can be performed at high speed.

さらに本発明によれば、上記曲線補間方式において、曲
線上の座標データを発生し、隣り合う3座標点の端点と
他の2点とを結ぶ2直線のなす角度により、座標データ
を抽出するので1曲線補間の精度を上げることができる
Furthermore, according to the present invention, in the curve interpolation method described above, coordinate data on the curve is generated, and the coordinate data is extracted based on the angle formed by two straight lines connecting the end points of three adjacent coordinate points and the other two points. The accuracy of single-curve interpolation can be improved.

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

第1図は1本発明の一実施例のベジェ曲線発生における
曲線補間方式の説明図、第2図は第1図の実施例におい
て曲線がなだらかな場合の曲線補間方式の説明図、第3
図は1本発明の他の実施例のベジェ曲線発生における曲
線補間方式の説明図、第4図は本発明の一実施例のハー
ドウェアにおけるベジェ曲線上座標データの計算装置の
ブロック図、第5図は距離の総和から発生データ点数を
求める手段の構成を示す概念図である。 2・・・ベジェ曲線式の表わすベジェ曲線。 60〜C1・・・3次のベジェ曲線規定制御座標データ
、P0〜Pn−+・・・ベジェ曲線上の発生座標データ
1 is an explanatory diagram of the curve interpolation method for generating a Bezier curve according to an embodiment of the present invention; FIG. 2 is an explanatory diagram of the curve interpolation method when the curve is gentle in the embodiment of FIG. 1;
Figure 1 is an explanatory diagram of a curve interpolation method in generating a Bezier curve according to another embodiment of the present invention, Figure 4 is a block diagram of a calculation device for coordinate data on a Bezier curve in hardware according to an embodiment of the present invention, and Figure 5 The figure is a conceptual diagram showing the configuration of means for calculating the number of generated data points from the sum of distances. 2... Bezier curve expressed by the Bezier curve formula. 60 to C1... Third-order Bezier curve prescribed control coordinate data, P0 to Pn-+... Occurrence coordinate data on the Bezier curve.

Claims (1)

【特許請求の範囲】 1、曲線を規定する制御座標データから曲線上の座標デ
ータを発生させ、該発生した座標点を直線で連結するこ
とにより、擬似的に曲線を発生する曲線補間方式におい
て、 上記制御座標データの各隣接座標点間の各座標軸方向の
長さを求め、各隣接座標点について長い方の座標軸方向
長さの総和を算出し、該総和と正の相関関係をもたせて
上記発生する座標データの点数を決定することを特徴と
する曲線補間方式。 2、上記長い方の座標軸方向の長さの総和を予め複数の
範囲に分類し、該複数の範囲ごとに上記発生する座標デ
ータの点数を定めたテーブルを参照して、上記座標デー
タの点数を決定する請求項1記載の曲線補間方式。 3、上記各隣接座標点について長い方の座標軸方向長さ
がすべて同一軸方向に属する場合、上記発生する座標デ
ータ点数を、同一軸方向に属さない場合より小さい値に
決定することを特徴とする請求項1または2記載の曲線
補間方式。 4、曲線を規定する制御座標データから曲線上の座標デ
ータを発生させ、該発生した座標点を直線で連結するこ
とにより、疑似的に曲線を発生する曲線補間方式におい
て、 上記発生した座標データ点のうち、隣り合う3座標点の
端点と他の2点とを結ぶ2直線のなす角度を求め、該角
度が予め定めた許容範囲内にあった場合、当該3座標点
中の他の端点の座標データを削除することを特徴とする
曲線補間方式。 5、上記隣り合う3座標点の端点間の各座標軸方向の長
さを求め、いずれか一方が予め定めた許容範囲を超えた
場合は、上記2直線のなす角度が許容範囲内にある場合
であっても、上記他端点の座標データを削除しないこと
を特徴とする請求項4記載の曲線補間方式。
[Claims] 1. A curve interpolation method that generates a pseudo curve by generating coordinate data on a curve from control coordinate data that defines the curve and connecting the generated coordinate points with straight lines, The length in each coordinate axis direction between each adjacent coordinate point of the above control coordinate data is calculated, and the sum of the lengths in the longer coordinate axis direction is calculated for each adjacent coordinate point. A curve interpolation method characterized by determining the number of coordinate data points. 2. Classify the total length in the direction of the longer coordinate axis in advance into a plurality of ranges, and calculate the number of points of the coordinate data by referring to a table that determines the number of points of the coordinate data generated for each of the plurality of ranges. The curve interpolation method according to claim 1, wherein the curve interpolation method is determined. 3. When the lengths of the longer coordinate axes of the adjacent coordinate points all belong to the same axial direction, the number of generated coordinate data points is determined to be a smaller value than when they do not belong to the same axial direction. The curve interpolation method according to claim 1 or 2. 4. In a curve interpolation method that generates a pseudo curve by generating coordinate data on a curve from control coordinate data that defines the curve and connecting the generated coordinate points with a straight line, the generated coordinate data points are Among them, find the angle formed by the two straight lines connecting the end point of the three adjacent coordinate points and the other two points, and if the angle is within a predetermined tolerance range, calculate the angle between the other end point of the three coordinate points. A curve interpolation method characterized by deleting coordinate data. 5. Find the length in each coordinate axis direction between the end points of the three adjacent coordinate points above, and if either one exceeds the predetermined tolerance range, if the angle formed by the two straight lines is within the tolerance range. 5. The curve interpolation method according to claim 4, wherein the coordinate data of the other end point is not deleted even if the coordinate data of the other end point exists.
JP13359089A 1989-05-26 1989-05-26 Curve interpolating system Pending JPH02310783A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13359089A JPH02310783A (en) 1989-05-26 1989-05-26 Curve interpolating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13359089A JPH02310783A (en) 1989-05-26 1989-05-26 Curve interpolating system

Publications (1)

Publication Number Publication Date
JPH02310783A true JPH02310783A (en) 1990-12-26

Family

ID=15108368

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13359089A Pending JPH02310783A (en) 1989-05-26 1989-05-26 Curve interpolating system

Country Status (1)

Country Link
JP (1) JPH02310783A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04346391A (en) * 1991-05-24 1992-12-02 Matsushita Electric Ind Co Ltd Vector font plotting device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60144883A (en) * 1984-01-07 1985-07-31 Fuji Xerox Co Ltd Straight line recognizer
JPS61128389A (en) * 1984-11-28 1986-06-16 Matsushita Electric Ind Co Ltd Linear approximating and encoding device of linear graphic
JPS6347888A (en) * 1986-08-18 1988-02-29 Mitsubishi Precision Co Ltd Dummy generating method for graphic contour
JPH0196770A (en) * 1987-10-09 1989-04-14 Canon Inc Linear component extracting device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60144883A (en) * 1984-01-07 1985-07-31 Fuji Xerox Co Ltd Straight line recognizer
JPS61128389A (en) * 1984-11-28 1986-06-16 Matsushita Electric Ind Co Ltd Linear approximating and encoding device of linear graphic
JPS6347888A (en) * 1986-08-18 1988-02-29 Mitsubishi Precision Co Ltd Dummy generating method for graphic contour
JPH0196770A (en) * 1987-10-09 1989-04-14 Canon Inc Linear component extracting device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04346391A (en) * 1991-05-24 1992-12-02 Matsushita Electric Ind Co Ltd Vector font plotting device

Similar Documents

Publication Publication Date Title
JPH0766290B2 (en) Tool path generation method
WO2019167650A1 (en) Method and device for generating tool paths
JP2008040702A (en) Program and method of generating approximate curve from approximate point group data
CN112906215B (en) Pipe tool path generation method based on SolidWorks secondary development
CN113490894A (en) Machining program conversion device, numerical control device, machining program conversion method, and machine learning device
EP0661669A2 (en) Character pattern generation apparatus and method
JPH02310783A (en) Curve interpolating system
CN110929455B (en) Curvature distribution-based three-dimensional curved surface self-adaptive discrete method
EP1061424B1 (en) Three-dimensional machining method
JPH0368086A (en) Linear interpolating circuit
JP3305395B2 (en) Figure division device
US6957176B2 (en) Reduction processing method and computer readable storage medium having program stored thereon for causing computer to execute the method
JP3344538B2 (en) Character generator
JP2768331B2 (en) Curve linear approximation device
JP3025739B2 (en) Character pattern generation device and character pattern generation method
JP3524380B2 (en) Broken line drawing device, broken line drawing method, and storage medium
JPH0589251A (en) Picture drawing device
JP3035141B2 (en) Character creation device and character creation method
JP3057959B2 (en) Data converter
JPH07160873A (en) Method for converting picture data including bezier curve
JP3471939B2 (en) Character pattern generating apparatus and method
CN114612325A (en) Method for synthesizing welding seam noise image
JP2881884B2 (en) Document creation device
CN117725713A (en) Determination method of complex pipe jacking space path based on Revit platform
JPH0869537A (en) Graphic processor