Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3913832B2 - Circular interpolation processing method - Google Patents
[go: Go Back, main page]

JP3913832B2 - Circular interpolation processing method - Google Patents

Circular interpolation processing method Download PDF

Info

Publication number
JP3913832B2
JP3913832B2 JP08132697A JP8132697A JP3913832B2 JP 3913832 B2 JP3913832 B2 JP 3913832B2 JP 08132697 A JP08132697 A JP 08132697A JP 8132697 A JP8132697 A JP 8132697A JP 3913832 B2 JP3913832 B2 JP 3913832B2
Authority
JP
Japan
Prior art keywords
point
arc
line segment
segment 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.)
Expired - Fee Related
Application number
JP08132697A
Other languages
Japanese (ja)
Other versions
JPH10275240A (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.)
Mutoh Industries Ltd
Original Assignee
Mutoh Industries 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 Mutoh Industries Ltd filed Critical Mutoh Industries Ltd
Priority to JP08132697A priority Critical patent/JP3913832B2/en
Publication of JPH10275240A publication Critical patent/JPH10275240A/en
Application granted granted Critical
Publication of JP3913832B2 publication Critical patent/JP3913832B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
この発明は、文字フォント等の曲線部を円弧データによって指定した場合の円弧補間処理方法に関する。
【0002】
【従来の技術】
文字フォントデータの曲線部は、通常は2次ベジェ曲線や2次スプライン等によって指定されるが、より簡易で高速な方法として、曲線部を円弧データで指定する方法がある。この場合、円弧データは、始点、通過点及び終点で指定される。円弧データは、処理速度を高めるため通常はプロットする直前に線分データに分割される。分割された線分データは、例えば図8に示すように、実際の円弧に対して誤差を生じる。この誤差は、円弧の中心点から円弧の始点及び終点までの線分のなす角度をζとすると、
【0003】
【数1】
誤差=r{1−cos(ζ/2)}
【0004】
で表され、この誤差が所定の誤差e以下となるように角度ζが選択される。この角度ζを分割角と呼ぶ。
【0005】
従来、この分割角ζとその回転方向とを求めるため、次のような処理を行っていた。
即ち、図9に示すように、与えられた始点P1、通過点P2及び終点P3のデータから、円弧の中心点P0を求める。次に中心点P0と始点P1との距離を算出して円弧の半径rを求め、求められた半径rから分割角ζを求める。更に、中心点P0から始点P1、通過点P2及び終点P3にそれぞれ向かうベクトルとのなす角度θ1,θ2,θ3を求める。これらの角度θ1〜θ3から回転方向を決定し、分割角ζの符号を決定する。
【0006】
【発明が解決しようとする課題】
しかし、上述した従来の円弧補間処理方法では、角度θ1〜θ3を算出する際に、アークタンジェント演算が必要になる。このアークタンジェント演算は、繰り返しが多いため、処理時間の増大を招くという問題がある。また、アークタンジェント演算をテーブルの参照によって行おうとしても、インデックスが0から無限大まで必要となるので、テーブルの作成も困難であるという問題がある。
【0007】
この発明は、このような問題点に鑑みなされたもので、高速処理が可能な円弧補間処理方法を提供することを目的とする。
【0008】
【課題を解決するための手段】
この発明に係る円弧補間処理方法は、始点、通過点及び終点の3点で指定される円弧のデータから当該円弧を近似する複数の線分データを生成するための円弧補間処理方法において、前記指定された3点のデータから前記円弧の中心点を算出する中心点算出ステップと、前記3点のデータの少なくとも1つと前記算出された中心点とから前記円弧の半径に対応する値を算出して分割角を決定する分割角決定ステップと、前記始点から前記通過点までのベクトルと前記通過点から前記終点までのベクトルとの外積を求め、その符号に基づいて前記分割角の回転方向を決定する回転方向決定ステップと、前記円弧を前記決定された分割角毎に前記決定された回転方向に分割して線分データを順次生成すると共に、前記線分データの終点が前記円弧の終点を超えたときに前記線分データの生成を終了する線分データ生成ステップとを備え、前記線分データ生成ステップは、線分データを生成する毎にその線分データの始点から円弧の終点へ延びるベクトルと線分データの終点から円弧の終点へ延びるベクトルとの内積を求め、その符号に基づいて線分データの生成を終了するステップであることを特徴とする。
【0009】
この発明によれば、円弧のデータとして与えられた始点、通過点及び終点のデータのうち、始点から通過点までのベクトルと通過点から終点までのベクトルとの外積を求め、その符号に基づいて分割角の回転方向を決定するようにしているので、アークタンジェント演算を必要とせず、演算処理は単純な四則演算だけとなるので、処理速度が従来に比べて格段に高速になる。また、線分データを生成する毎にその線分データの始点から円弧の終点へ延びるベクトルと線分データの終点から円弧の終点へ延びるベクトルとの内積を求め、その符号に基づいて線分データの生成を終了するようにしているので、終了判定も単純な演算で行え、処理速度は更に向上する。
【0010】
また、与えられた3点のデータの少なくとも一つと中心点とから円弧の半径の2乗値を求め、この半径の2乗値に基づいて分割角を決定するようにすると、平方根演算も不要となるので、処理速度は更に向上する
【0011】
【発明の実施の形態】
以下、図面を参照して、この発明の好ましい実施の形態を説明する。
図1は、この発明の実施例に係る円弧補間処理を実現するシステムの機能ブロック図である。
このシステムは、円弧補間処理部1、分割角決定テーブル2及び三角関数テーブルを備えて構成される。
【0012】
上位システムから与えられた文字コードに基づいて、フォントテーブルから読み出されたフォントデータのうち、曲線の部分は、始点P1、通過点P2及び終点P3により特定される円弧データとなっており、これら3点のデータP1,P2,P3が円弧補間処理部1に供給されると、図2に示すような円弧補間処理が実行される。
【0013】
この円弧補間処理は、与えられた3点のデータから中心座標P0を決定するステップ(S1)と、半径の2乗から分割角を決定するステップ(S2)と、回転方向を決定するステップ(S3)と、分割角毎に回転方向に沿って分割点列、即ち分割線分を求めるステップ(S4)と、線分分割を終了するための判定ステップ(S5)とから構成される。以下、各ステップについて説明する。
【0014】
(1)中心座標P0の決定(S1)
図3に示すように、P0を中心とする円弧上に3点のデータP1,P2,P3が配置されているとして、中心点P0に対して円弧上の点P1と点対称の位置に第4の点P4を配置した場合、P1からP2へのベクトルV21と、P2からP4へのベクトルV42とのなす角度は90°となり、同じくP1からP3へのベクトルV31と、P3からP4へのベクトルV43とのなす角度も90°となる。従って、ベクトルV21,V42の内積とベクトルV31,V43の内積は共に0になる。即ち、P1,P2,P3,P4の座標をそれぞれ(x1,y1),(x2,y2),(x3,y3),(x4,y4)とすると、
【0015】
【数2】
21・V42
=(x2−X1)(x4−x2)+(y2−y1)(y4−y2
=0
31・V43
=(x3−X1)(x4−x3)+(y3−y1)(y4−y3
=0
【0016】
数2をx4及びy4について解くと、数3のようになる。
【0017】
【数3】

Figure 0003913832
【0018】
ここで変数P1,P2,P3を16ビット精度とすると、数3のx4,y4を求める式の分母及びc1,c2を求める式は、32ビット整数型で精度を維持することができる。P4は、16ビット整数となる。x4,y4を求めるときの最終手順で乗算2回と、除算1回に浮動小数点演算を必要とする。数3より、円弧の中心座標P0=(x0,y0)はP1,P4の中点として求められるが、切り捨て誤差を防ぐため、数4のように求められる。
【0019】
【数4】
0=(x4+x1+1)/2
0=(y4+y1+1)/2
【0020】
(2)分割角の決定(S2)
分割角ζは、数1に基づいて決定するのが理想的であるが、この場合、演算には高い処理能力が要求されるので、ここでは高速処理が可能な次のような手順で分割角を決定する。即ち、半径rの2乗値は、数5のように整数演算によって求められる。
【0021】
【数5】
2=(x1−x02+(y1−y02
【0022】
分割角決定テーブル2には、図4に示すような変換表が予め格納されており、数5で求められた半径の2乗値r2をインデックスとして分割角決定テーブル2から分割角ζを決定する。ここでは誤差eを13ドット程度に設定した。
この方式によれば、▲1▼半径算出のための平方根演算が不要であること、▲2▼逆コサイン変換が不要なこと、から処理時間を大幅に短縮することができる。
【0023】
(3)回転方向の決定(S3)
円弧の回転方向は、図5に示すように、始点P1から通過点P2に延びるベクトルV21と、通過点P2から終点P3に延びるベクトルV32とのなす角度θが正であるか負であるかによって決定することができる。即ち、図5(a)のように、V21とV32とのなす角度θが正である場合には反時計回りであり、同図(b)のように、V21とV32とのなす角度θが負である場合には時計回りである。2本のベクトルV21,V32の外積は、数6のように求められる。
【0024】
【数6】
21×V32
=|V21||V32|sinθ
=(x2−x1)(y3−y2)−(y2−y1)(x3−x2
【0025】
この値の正負の符号をそのまま分割角ζの回転方向とする。この演算も整数処理のみで行える。
【0026】
(4)線分への分割処理(S4)
円弧の中心点P0と符号付き分割角ζとが求まったら、図6に示すように、線分への分割処理を繰り返して、各分割点をPd1,Pd2,…求めていく。これにより分割ベクトルVd1,Vd2,…が求められる。いま、円弧の中心点P0から分割点Pdn-1,Pdnへ延びるベクトルをそれぞれVrn-1,Vrnとすると、
【0027】
【数7】
Figure 0003913832
【0028】
で表せる。従って、n番目の分割点Pdnの座標(xdn,ydn)は、次のように求められる。
【0029】
【数8】
dn=(xdn-1−x0)cosζ−(ydn-1−y0)sinζ+x0
dn=(xdn-1−x0)sinζ+(ydn-1−y0)cosζ+y0
【0030】
このとき、sinζ及びcosζは、三角関数テーブル3を参照することにより求める。分割角としては0°から180°までを想定しておけば充分であるが、図4に示すような分割角決定テーブル2を用いた場合には、2°から15°までの14通りの配列を用意しておけば足りる。sinζ及びcosζは、線分分割時に一度求めておけば良く、数8の演算も単純であるから、高速処理が可能になる。
【0031】
(5)分割終了判定(S5)
分割処理の終了は、分割点が円弧の終点P3を超えたかどうかにより判定する。
図7に示すように、分割点Pdn-1から終了点P3に延びるベクトルをV1とし、次の分割点Pdnから終了点P3に延びるベクトルをV2とすると、同図(a)のように、分割点Pdnが終了点P3の手前に存在する場合には、ベクトルV1とベクトルV2とのなす角度は90°以下となるが、同図(b)のように、分割点Pdnが終了点P3を超えた場合には、ベクトルV1とベクトルV2とのなす角度は90°を超える。従って、ベクトルV1,V2の内積を求め、その符号が負になったことをもって分割点Pdnが終了点P3を超えたと判断することができる。即ち、
【0032】
【数9】
1・V2
=(x3−xdn-1)(x3−xdn)+(y3−ydn-1)(y3−ydn)≦0
【0033】
を検出したら、分割線分Vdnは使用せずに、終点P3に至る線分V1を最終線分とする。
以上の処理により、円弧補間処理の速度を大幅に向上させることができる。
【0034】
【発明の効果】
以上述べたように、この発明によれば、円弧のデータとして与えられた始点、通過点及び終点のデータのうち、始点から通過点までのベクトルと通過点から終点までのベクトルとの外積を求め、その符号に基づいて分割角の回転方向を決定するようにしているので、アークタンジェント演算を必要とせず、演算処理は四則演算だけとなるので、処理速度が従来に比べて格段に高速になるという効果を奏する。また、線分データを生成する毎にその線分データの始点から円弧の終点へ延びるベクトルと線分データの終点から円弧の終点へ延びるベクトルとの内積を求め、その符号に基づいて線分データの生成を終了するようにしているので、終了判定も単純な演算で行え、処理速度は更に向上するという効果を奏する。
【図面の簡単な説明】
【図1】 この発明の一実施例に係る円弧補間処理を実現するシステムの機能ブロック図である。
【図2】 同円弧補間処理のフローチャートである。
【図3】 同処理における円弧の中心点座標の算出手順を説明するための図である。
【図4】 同処理における分割角の決定手順に用いられる分割角決定テーブルの一例を示す図である。
【図5】 同処理における分割角の回転方向決定手順を説明するための図である。
【図6】 同処理における線分分割手順を説明するための図である。
【図7】 同処理における線分分割終了判定手順を説明するための図である。
【図8】 円弧の線分分割角度と誤差との関係を示す図である。
【図9】 従来の円弧補間処理方法を説明するための図である。
【符号の説明】
1…円弧補間処理部、2…分割角決定テーブル、3…三角関数テーブル。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a circular interpolation processing method when a curved portion such as a character font is designated by circular arc data.
[0002]
[Prior art]
The curved portion of the character font data is normally designated by a quadratic Bezier curve, a quadratic spline, or the like. As a simpler and faster method, there is a method of designating the curved portion by arc data. In this case, the arc data is designated by a start point, a passing point, and an end point. Arc data is usually divided into line segment data immediately before plotting in order to increase the processing speed. The divided line segment data causes an error with respect to an actual arc as shown in FIG. This error is given by ζ as the angle formed by the line segment from the center point of the arc to the start point and end point of the arc.
[0003]
[Expression 1]
Error = r {1-cos (ζ / 2)}
[0004]
The angle ζ is selected so that this error is equal to or less than a predetermined error e. This angle ζ is called a split angle.
[0005]
Conventionally, in order to obtain the division angle ζ and the rotation direction, the following processing has been performed.
That is, as shown in FIG. 9, the center point P 0 of the arc is obtained from the given data of the start point P 1 , the passing point P 2 and the end point P 3 . Next, the distance between the center point P 0 and the start point P 1 is calculated to obtain the radius r of the arc, and the division angle ζ is obtained from the obtained radius r. Further, angles θ 1 , θ 2 , and θ 3 formed by vectors from the center point P 0 to the start point P 1 , the passing point P 2, and the end point P 3 are obtained. The rotation direction is determined from these angles θ 1 to θ 3, and the sign of the division angle ζ is determined.
[0006]
[Problems to be solved by the invention]
However, in the conventional circular interpolation processing method described above, arc tangent calculation is required when calculating the angles θ 1 to θ 3 . This arc tangent calculation has a problem of increasing the processing time because it is frequently repeated. In addition, even if the arctangent calculation is performed by referring to the table, since the index is required from 0 to infinity, it is difficult to create the table.
[0007]
The present invention has been made in view of such problems, and an object thereof is to provide a circular interpolation processing method capable of high-speed processing.
[0008]
[Means for Solving the Problems]
The circular interpolation processing method according to the present invention is the circular interpolation processing method for generating a plurality of line segment data approximating the circular arc from the circular arc data specified by the start point, the passing point, and the end point. A center point calculating step for calculating the center point of the arc from the three data points, and calculating a value corresponding to the radius of the arc from at least one of the three point data and the calculated center point; A division angle determination step for determining a division angle, and an outer product of a vector from the start point to the passing point and a vector from the passing point to the end point are determined, and the rotation direction of the division angle is determined based on the sign. A rotation direction determining step, and sequentially generating line segment data by dividing the arc into the determined rotation direction for each determined division angle, and an end point of the line segment data is the arc And a said line segment data generating step of terminating the generation of the line segment data when exceeding the end point, the line segment data generating step, from the starting point of the line segment data each time generating the segment data arc end point And calculating the inner product of the vector extending to the end point of the arc from the end point of the line segment data to the end point of the arc, and ending the generation of the line segment data based on the sign .
[0009]
According to the present invention, the cross product of the vector from the start point to the pass point and the vector from the pass point to the end point is obtained from the start point, pass point and end point data given as the arc data, and based on the sign Since the rotation direction of the split angle is determined, the arctangent calculation is not required, and the calculation process is only a simple four-rule calculation, so that the processing speed is remarkably higher than the conventional one. Each time line data is generated, an inner product of a vector extending from the start point of the line segment data to the end point of the arc and a vector extending from the end point of the line segment data to the end point of the arc is obtained, and the line segment data is calculated based on the sign. Therefore, the end determination can be performed by a simple calculation, and the processing speed is further improved.
[0010]
Further, if the square value of the radius of the arc is obtained from at least one of the given three points data and the center point, and the division angle is determined based on the square value of the radius, the square root calculation is not required. Therefore, the processing speed is further improved .
[0011]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a functional block diagram of a system for realizing circular interpolation processing according to an embodiment of the present invention.
This system includes an arc interpolation processing unit 1, a split angle determination table 2, and a trigonometric function table.
[0012]
Of the font data read from the font table based on the character code given from the host system, the curve portion is arc data specified by the start point P 1 , the passing point P 2 and the end point P 3. When these three points of data P 1 , P 2 , and P 3 are supplied to the circular interpolation processing unit 1, circular interpolation processing as shown in FIG. 2 is executed.
[0013]
This circular interpolation processing includes a step of determining the center coordinate P 0 from the given three points data (S1), a step of determining a split angle from the square of the radius (S2), and a step of determining the rotation direction ( S3), a step (S4) for obtaining a division point sequence, that is, a division line segment, along the rotation direction for each division angle, and a determination step (S5) for ending the line segment division. Hereinafter, each step will be described.
[0014]
(1) Determination of center coordinate P 0 (S1)
As shown in FIG. 3, as the data P 1 at three points on an arc centered on the P 0, P 2, P 3 is located, a point P 1 and the point on the arc relative to the center point P 0 If a fourth point P 4 of and placed symmetrically, the vector V 21 from P 1 to P 2, the angle is 90 ° next to the vector V 42 from P 2 to P 4, as well from P 1 a vector V 31 to P 3, the angle also 90 ° between the vector V 43 from P 3 to P 4. Accordingly, the inner product of the vectors V 21 and V 42 and the inner product of the vectors V 31 and V 43 are both zero. That is, if the coordinates of P 1 , P 2 , P 3 , and P 4 are (x 1 , y 1 ), (x 2 , y 2 ), (x 3 , y 3 ), and (x 4 , y 4 ), respectively. ,
[0015]
[Expression 2]
V 21 · V 42
= (X 2 -X 1) ( x 4 -x 2) + (y 2 -y 1) (y 4 -y 2)
= 0
V 31・ V 43
= (X 3 -X 1 ) (x 4 -x 3 ) + (y 3 -y 1 ) (y 4 -y 3 )
= 0
[0016]
Solving Equation 2 for x 4 and y 4 gives Equation 3.
[0017]
[Equation 3]
Figure 0003913832
[0018]
Here, assuming that the variables P 1 , P 2 , and P 3 are 16-bit precision, the denominator of the expression for obtaining x 4 and y 4 of Equation 3 and the expression for obtaining c 1 and c 2 are 32-bit integer types and maintain precision. can do. P 4 is a 16-bit integer. In the final procedure for obtaining x 4 and y 4 , a floating point operation is required twice for multiplication and once for division. From Equation 3, the center coordinates P 0 = (x 0 , y 0 ) of the arc are obtained as the midpoints of P 1 and P 4 , but are obtained as in Equation 4 in order to prevent truncation errors.
[0019]
[Expression 4]
x 0 = (x 4 + x 1 +1) / 2
y 0 = (y 4 + y 1 +1) / 2
[0020]
(2) Determination of split angle (S2)
Ideally, the division angle ζ is determined based on Equation 1, but in this case, since a high processing capacity is required for the calculation, here, the division angle ζ is performed by the following procedure capable of high-speed processing. To decide. That is, the square value of the radius r is obtained by integer calculation as shown in Equation 5.
[0021]
[Equation 5]
r 2 = (x 1 −x 0 ) 2 + (y 1 −y 0 ) 2
[0022]
A conversion table as shown in FIG. 4 is stored in advance in the split angle determination table 2, and the split angle ζ is determined from the split angle determination table 2 using the squared value r 2 of the radius obtained in Equation 5 as an index. To do. Here, the error e is set to about 13 dots.
According to this method, (1) the square root calculation for calculating the radius is unnecessary, and (2) the inverse cosine transform is unnecessary, so that the processing time can be greatly shortened.
[0023]
(3) Determination of rotation direction (S3)
As shown in FIG. 5, the rotation direction of the arc is positive when the angle θ formed by the vector V 21 extending from the start point P 1 to the passing point P 2 and the vector V 32 extending from the passing point P 2 to the end point P 3 is positive. Can be determined by whether it is negative or negative. That is, as shown in FIG. 5 (a), the in the case where the angle between V 21 and V 32 theta is positive is counterclockwise, as shown in FIG. (B), the V 21 and V 32 When the formed angle θ is negative, it is clockwise. The outer product of the two vectors V 21 and V 32 is obtained as shown in Equation 6.
[0024]
[Formula 6]
V 21 × V 32
= | V 21 || V 32 | sinθ
= (X 2 -x 1) ( y 3 -y 2) - (y 2 -y 1) (x 3 -x 2)
[0025]
The sign of this value is directly used as the rotation direction of the dividing angle ζ. This operation can also be performed only by integer processing.
[0026]
(4) Dividing process into line segments (S4)
When the arc center point P 0 and the signed division angle ζ are obtained, the division processing into line segments is repeated as shown in FIG. 6 to obtain the division points P d1 , P d2,. Thereby, divided vectors V d1 , V d2 ,... Are obtained. Now, let V rn-1 and V rn be vectors extending from the center point P 0 of the arc to the dividing points P dn-1 and P dn , respectively.
[0027]
[Expression 7]
Figure 0003913832
[0028]
It can be expressed as Accordingly, the coordinates (x dn , y dn ) of the nth division point P dn are obtained as follows.
[0029]
[Equation 8]
x dn = (x dn-1 -x 0 ) cosζ- (y dn-1 -y 0 ) sinζ + x 0
y dn = (x dn-1 -x 0 ) sinζ + (y dn-1 -y 0 ) cosζ + y 0
[0030]
At this time, sinζ and cosζ are obtained by referring to the trigonometric function table 3. Assuming that the division angle is from 0 ° to 180 °, it is sufficient, but when the division angle determination table 2 as shown in FIG. 4 is used, 14 arrangements from 2 ° to 15 ° are provided. It is enough if you have prepared. sinζ and cosζ may be obtained once at the time of dividing the line segment, and since the calculation of Expression 8 is simple, high-speed processing is possible.
[0031]
(5) Determination of division end (S5)
End of division processing is checked by whether the division point exceeds the arc end point P 3.
As shown in FIG. 7, when a vector extending from the dividing point P dn-1 to the end point P 3 is V 1 and a vector extending from the next dividing point P dn to the end point P 3 is V 2 , ), When the dividing point P dn exists before the end point P 3 , the angle formed by the vector V 1 and the vector V 2 is 90 ° or less, as shown in FIG. When the dividing point P dn exceeds the end point P 3 , the angle formed by the vector V 1 and the vector V 2 exceeds 90 °. Therefore, it can be determined that the calculated inner product of vectors V1, V2, dividing points Pdn with a that the sign becomes negative has exceeded the end point P 3. That is,
[0032]
[Equation 9]
V 1・ V 2
= (X 3 −x dn−1 ) (x 3 −x dn ) + (y 3 −y dn−1 ) (y 3 −y dn ) ≦ 0
[0033]
Is detected, the segment V 1 that reaches the end point P 3 is determined as the final segment without using the segment segment V dn .
With the above processing, the speed of the circular interpolation processing can be greatly improved.
[0034]
【The invention's effect】
As described above, according to the present invention, the cross product of the vector from the start point to the pass point and the vector from the pass point to the end point is obtained from the start point, pass point and end point data given as the arc data. Since the rotation direction of the split angle is determined based on the sign, the arc tangent calculation is not required, and the arithmetic processing is only four arithmetic operations. Therefore, the processing speed is remarkably higher than the conventional one. There is an effect. Each time line data is generated, an inner product of a vector extending from the start point of the line segment data to the end point of the arc and a vector extending from the end point of the line segment data to the end point of the arc is obtained, and the line segment data is based on the sign. Therefore, the end determination can be performed by a simple calculation, and the processing speed is further improved.
[Brief description of the drawings]
FIG. 1 is a functional block diagram of a system for realizing circular interpolation processing according to an embodiment of the present invention.
FIG. 2 is a flowchart of the circular interpolation process.
FIG. 3 is a diagram for explaining a calculation procedure of a center point coordinate of an arc in the same processing.
FIG. 4 is a diagram showing an example of a split angle determination table used in a split angle determination procedure in the same process.
FIG. 5 is a diagram for explaining a procedure for determining a rotation direction of a split angle in the same process.
FIG. 6 is a diagram for explaining a line segment dividing procedure in the same processing;
FIG. 7 is a diagram for explaining a line segment division end determination procedure in the same process;
FIG. 8 is a diagram illustrating a relationship between an arc segment dividing angle and an error.
FIG. 9 is a diagram for explaining a conventional circular interpolation processing method;
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Circular interpolation process part, 2 ... Division angle determination table, 3 ... Trigonometric function table.

Claims (2)

始点、通過点及び終点の3点で指定される円弧のデータから当該円弧を近似する複数の線分データを生成するための円弧補間処理方法において、
前記指定された3点のデータから前記円弧の中心点を算出する中心点算出ステップと、
前記3点のデータの少なくとも1つと前記算出された中心点とから前記円弧の半径に対応する値を算出して分割角を決定する分割角決定ステップと、
前記始点から前記通過点までのベクトルと前記通過点から前記終点までのベクトルとの外積を求め、その符号に基づいて前記分割角の回転方向を決定する回転方向決定ステップと、
前記円弧を前記決定された分割角毎に前記決定された回転方向に分割して線分データを順次生成すると共に、前記線分データの終点が前記円弧の終点を超えたときに前記線分データの生成を終了する線分データ生成ステップとを備え、
前記線分データ生成ステップは、前記線分データを生成する毎にその線分データの始点から前記円弧の終点へ延びるベクトルと前記線分データの終点から前記円弧の終点へ延びるベクトルとの内積を求め、その符号に基づいて前記線分データの生成を終了するステップである
ことを特徴とする円弧補間処理方法。
In the circular interpolation processing method for generating a plurality of line segment data approximating the arc from the arc data designated by the start point, the passing point, and the end point,
A center point calculating step of calculating a center point of the arc from the specified three points of data;
A split angle determining step of determining a split angle by calculating a value corresponding to the radius of the arc from at least one of the data of the three points and the calculated center point;
A rotation direction determining step for obtaining a cross product of a vector from the start point to the passing point and a vector from the passing point to the end point, and determining a rotation direction of the split angle based on the sign;
The line segment data is sequentially generated by dividing the arc in the determined rotation direction at the determined division angles, and the line segment data is generated when the end point of the line segment data exceeds the end point of the arc. and a line segment data generating step of terminating the generation of,
The line segment data generation step calculates an inner product of a vector extending from the start point of the line segment data to the end point of the arc and a vector extending from the end point of the line segment data to the end point of the arc every time the line segment data is generated. A circular interpolation processing method characterized in that it is a step of obtaining and ending generation of the line segment data based on the sign .
前記分割角決定ステップは、前記3点のデータの少なくとも一つと前記中心点とから前記円弧の半径の2乗値を求め、この半径の2乗値に基づいて分割角を決定するステップである
ことを特徴とする請求項1記載の円弧補間処理方法。
The division angle determining step is a step of obtaining a square value of the radius of the arc from at least one of the data of the three points and the center point, and determining a division angle based on the square value of the radius. The circular interpolation processing method according to claim 1.
JP08132697A 1997-03-31 1997-03-31 Circular interpolation processing method Expired - Fee Related JP3913832B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP08132697A JP3913832B2 (en) 1997-03-31 1997-03-31 Circular interpolation processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP08132697A JP3913832B2 (en) 1997-03-31 1997-03-31 Circular interpolation processing method

Publications (2)

Publication Number Publication Date
JPH10275240A JPH10275240A (en) 1998-10-13
JP3913832B2 true JP3913832B2 (en) 2007-05-09

Family

ID=13743274

Family Applications (1)

Application Number Title Priority Date Filing Date
JP08132697A Expired - Fee Related JP3913832B2 (en) 1997-03-31 1997-03-31 Circular interpolation processing method

Country Status (1)

Country Link
JP (1) JP3913832B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6163733B2 (en) * 2012-11-09 2017-07-19 オムロン株式会社 Control device and control program
CN114492092B (en) * 2022-04-15 2022-07-15 杭州捷配信息科技有限公司 Method and device for generating circular arc gong edge of circuit board
CN116048004B (en) * 2022-12-14 2024-04-19 天津理工大学 Archimedes spiral real-time interpolation method and device based on tangent vector in numerical control system

Also Published As

Publication number Publication date
JPH10275240A (en) 1998-10-13

Similar Documents

Publication Publication Date Title
US4414754A (en) High resolution compass card position decoder
US5363479A (en) System and method for rendering bezier splines
EP0787973A1 (en) Method and apparatus for processing angular data from encoder
JPH05266146A (en) Object shape expression device
JPH06507477A (en) Method for positioning a position control element in relation to a reference body and apparatus for implementing the method
JP3913832B2 (en) Circular interpolation processing method
JP2710202B2 (en) Method and data processor for bordering closed contour image with convex polygon
US6501537B1 (en) Range finding
US5280569A (en) Three dimensional model describing method
Jafri et al. Efficient algorithm for the detection of parabolic curves
JPH0523439B2 (en)
JPH05266161A (en) Device for correcting vector type data
JPS59211165A (en) Circular arc generating system
JPH07210688A (en) Device for calculating polygon area
Manmatha et al. Issues in extracting motion parameters and depth from approximate translational motion
JP2567372B2 (en) Robot coordinate correction processing method
KR100465507B1 (en) Apparatus for measuring displacements of rotating body and method thereof
JP3781215B2 (en) Method for detecting feature points of image data
JPS63140382A (en) Plotting method for polygonal approximation of circles
JPH05324835A (en) Method and device for pattern matching of two-dimensional figure
JPH06259567A (en) Free curve interpolation method
JPH01270784A (en) Controller for motor
Pizer Image Loci are Ridges in Geometric Spaces
JPH11232071A5 (en)
JP3332502B2 (en) Offset figure creation method and apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040121

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061002

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061017

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061218

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070116

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070201

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20100209

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20110209

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120209

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120209

Year of fee payment: 5

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20130209

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees