JPH0363891A - Bezier curved surface approximation circuit - Google Patents
Bezier curved surface approximation circuitInfo
- Publication number
- JPH0363891A JPH0363891A JP20163789A JP20163789A JPH0363891A JP H0363891 A JPH0363891 A JP H0363891A JP 20163789 A JP20163789 A JP 20163789A JP 20163789 A JP20163789 A JP 20163789A JP H0363891 A JPH0363891 A JP H0363891A
- Authority
- JP
- Japan
- Prior art keywords
- curved surface
- bezier curve
- point
- bezier curved
- alus
- 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
Links
- 238000000034 method Methods 0.000 abstract description 22
- 238000010586 diagram Methods 0.000 description 9
- 230000000694 effects Effects 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 1
- 239000013256 coordination polymer Substances 0.000 description 1
Landscapes
- Image Generation (AREA)
- Complex Calculations (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、ベジェ曲線発生回路に関し、特にベジェ曲線
を直線で近似する回路に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a Bezier curve generation circuit, and particularly to a circuit that approximates a Bezier curve with a straight line.
一般に、ベジェ曲線を表わすには、1本のベジェ曲線を
数本の直線で近似する方法が行われ、この直線を求める
方法としては、従来ソフトウェアで行われていた。Generally, a Bezier curve is expressed by approximating one Bezier curve with several straight lines, and the method for finding this straight line has conventionally been done using software.
従来の技術について、第3図のフローチャートおよび第
4図のベジェ曲線の座標図により説明する。ベジェ曲線
の直線近似の方法として関数による方法と幾何学的方法
があるが、処理速度の点で幾何学的手法が多く用いられ
る。第4図は幾何学的手法を説明する座標図である。点
P。l pHP2゜P3は、ベジェ曲線Bを一義的に定
めるフントロール点であり、ベジェ曲線Bはコントロー
ル点P o ” P 3で定められる。幾何学的方法で
は、コントロール点P。〜P3で作られる線分の各中点
m。。The conventional technique will be explained with reference to a flowchart in FIG. 3 and a coordinate diagram of a Bezier curve in FIG. 4. There are two methods for linear approximation of a Bezier curve: a functional method and a geometric method, but the geometric method is often used in terms of processing speed. FIG. 4 is a coordinate diagram explaining the geometric method. Point P. l pHP2゜P3 is the Huntroll point that uniquely defines the Bezier curve B, and the Bezier curve B is defined by the control point P o "P3. In the geometric method, it is created by the control points P. to P3. Each midpoint m of the line segment.
rnl、 m2.を求める。さらに、これら中点m。〜
m2で作られる線分のそれぞれの中点n。rnlを求め
、その後線分n。、nlの中点Ooを求める。rnl, m2. seek. Furthermore, these midpoints m. ~
The midpoint n of each line segment made by m2. Find rnl, then line segment n. , nl, find the midpoint Oo.
この過程で求まった0゜は、ベジェ曲線B上の−・点と
一致する。線分丁子「;、σJ1は、ベジェ曲線Bを直
線近似する時の直線となる。0° found in this process coincides with the - point on the Bezier curve B. The line segment ``;, σJ1 becomes a straight line when the Bezier curve B is approximated by a straight line.
次に、幾何学的方法においては、線分P。Oo 。Next, in the geometric method, line segment P. Oo.
Oo P 3で十分近似されているか否かの判定を行う
。始点P。から終点O6のベジェ曲線は台形P。2mo
、no、Oo内にあり、線分P o Ooと点m0もし
くはn。の距離に’ 、Kがある定められた範囲内であ
れば、線分P。Oo、0oP3はベジェ曲線Bを直線近
似するに十分であると判断する。もし、距離に’、Kが
定められた値より大であれば、点Pa。It is determined whether the approximation is sufficient using Oo P 3. Starting point P. The Bezier curve from the end point O6 is a trapezoid P. 2mo
, no, Oo, and the line segment P o Oo and the point m0 or n. If the distance ', K is within a certain range, then the line segment P. It is determined that Oo and 0oP3 are sufficient to linearly approximate the Bezier curve B. If the distance ', K is greater than the defined value, then the point Pa.
mo、 nog Ooで再定義されるベジェ曲線を再帰
的に直線近似する。同様に点Oo+ n++ mz+
P3についても直線近似を行う。つまり、線分P。P3
とコントロール点P2,3との距離42. !!’があ
る値より大であれば、点Ooを求める処理を開始すると
いう過程を再帰的に行うことになる。mo, nog The Bezier curve redefined by Oo is recursively approximated by a straight line. Similarly, the point Oo+ n++ mz+
Linear approximation is also performed for P3. In other words, line segment P. P3
and the distance 42. between the control points P2 and P3. ! ! If ' is larger than a certain value, the process of starting the process of finding the point Oo is performed recursively.
これを第3図のフロー図により説明する。幾何学的手法
によるベジェ曲線近似をソフトウェアで行う時、まず、
ステップ101で一連の中点を求める処理を行い、点m
o、 mlz l11z+ no+ nl+ ooを求
める。次に、ステップ102でこの直線近似で十分か否
かの収束条件を求め、条件が成立する(ステップ103
)まで行われる。この例では、線分Poooと点m。+
nOの距離に’ 、Kを求める。この時、乗算を含むか
なり繁雑な処理を必要とする。This will be explained using the flow diagram shown in FIG. When approximating Bezier curves using geometric methods using software, first,
In step 101, a process of finding a series of midpoints is performed, and the point m
Find o, mlz l11z+ no+ nl+ oo. Next, in step 102, a convergence condition is determined to determine whether this linear approximation is sufficient, and the condition is satisfied (step 103).
). In this example, line segment Pooo and point m. +
Find K at the distance nO. At this time, quite complicated processing including multiplication is required.
上述した従来のベジェ曲線発生方法は、収束条件の判定
を近似された直線と新たなベジェ曲線のコントロール点
との距離を求めていたので、非常に繁雑な処理を必要と
していた。このためハードウェアによる実現が困難で高
速化できないという欠点があった。In the conventional Bezier curve generation method described above, the convergence condition is determined by determining the distance between the approximated straight line and the control point of the new Bezier curve, which requires extremely complicated processing. For this reason, it is difficult to implement with hardware and has the disadvantage that it cannot be made faster.
本発明の目的は、直線近似の収束条件を求める過程を単
純化することでノ・−ドウエア化をして高速処理を可能
としたベジェ曲線発生回路を提供することにある。SUMMARY OF THE INVENTION An object of the present invention is to provide a Bezier curve generating circuit which can be implemented as a node and which can perform high-speed processing by simplifying the process of determining convergence conditions for linear approximation.
本発明のベジェ曲線近似回路の構成は、CPUからXお
よびyの各座標点をそれぞれ格納する第1および第2の
レジスタファイルと、これら各レジスタファイルからの
データを受け座標点の中点計算をそれぞれ行う第1およ
び第2のALUと、これら2組のALUの演算結果から
加算演算を行う第3のALUと、前述各レジスタファイ
ルおよび各ALUを制御する制御回路とを備え、ベジェ
曲線を直線により近似して得ることを特徴とする。The configuration of the Bezier curve approximation circuit of the present invention includes first and second register files that respectively store X and y coordinate points from the CPU, and receives data from these register files and calculates the midpoint of the coordinate points. It is equipped with first and second ALUs that perform the respective operations, a third ALU that performs addition operations from the operation results of these two sets of ALUs, and a control circuit that controls each register file and each ALU described above, and converts the Bezier curve into a straight line. It is characterized in that it can be obtained by approximating.
次に、本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.
第1図は、本発明の一実施例のブロック図、第2図は本
実施例の処理を説明する座標図である。FIG. 1 is a block diagram of an embodiment of the present invention, and FIG. 2 is a coordinate diagram illustrating the processing of this embodiment.
先ず、第2図について説明する。点P0+Pl+P21
P3はベジェ曲線Bのコントロール点であり、点m0.
m1.m2は線分P OP !、 P IP 2. P
2P 3の中点であり、点n。+nlは線分m。ml
、m1m2の中点であり、点Ooは線分n。nlの中点
である。First, FIG. 2 will be explained. Point P0+Pl+P21
P3 is the control point of the Bezier curve B, and the point m0.
m1. m2 is the line segment P OP ! , P IP 2. P
2P is the midpoint of 3, and is the point n. +nl is line segment m. ml
, m1m2, and point Oo is the line segment n. It is the midpoint of nl.
これら各中点は、第3図と同じであり、点m3は線分P
3 P oの中点である。These midpoints are the same as in FIG. 3, and the point m3 is the line segment P
3 It is the midpoint of P o.
次に、ベジェ曲線Bが線分P。Oo、0OP3の近似で
十分かどうかの判定を行う収束条件を求めるために、距
離QおよびQ′を求める。距離QとQ′を加えた値は、
線分P 3 P oと点Ooの距離Sに比例して大きく
なる。ベジェ曲線を表示させる装置が、CRTやプリン
タの場合、解像度が比較的大きくないので、点を表示す
るピクセルは離散的となり、距離Sの大小にて収束条件
の成立を判断できる。従って、従来技術の第3図のよう
に、距離に、に’を計算する必要はなく、距離Q。Next, Bezier curve B is line segment P. In order to find a convergence condition for determining whether the approximation of Oo, 0OP3 is sufficient, the distances Q and Q' are found. The sum of distances Q and Q' is
It increases in proportion to the distance S between the line segment P 3 P o and the point Oo. If the device for displaying the Bezier curve is a CRT or a printer, the resolution is relatively low, so the pixels that display the points are discrete, and it is possible to determine whether the convergence condition is met based on the size of the distance S. Therefore, it is not necessary to calculate the distance Q as shown in FIG. 3 of the prior art.
Q′を求める事で等価的に収束条件の成立を判定可能と
している。By determining Q', it is possible to equivalently determine whether the convergence condition is met.
次に、第1図について説明する。21.22は座標点を
格納するレジスタファイルであり、レジスタファイル2
1には座標点のX座標、レジスタファイル22には座標
店のy座標が格納される。Next, FIG. 1 will be explained. 21 and 22 are register files that store coordinate points, and register file 2
1 stores the X coordinate of the coordinate point, and the register file 22 stores the Y coordinate of the coordinate store.
ベジェ曲線Bを定義するコントロール点P。、Pl。Control point P that defines Bezier curve B. ,Pl.
P2.P3はデータ線31.32を経由してホストCP
Uより与えられるものとする。ALUII。P2. P3 is connected to the host CP via data lines 31 and 32.
It is assumed that it is given by U. ALUII.
13は加算、減算、右1bitシフトの機能を有してい
る。このALUII、13は加算及び右1bitシフト
を用いて、X及びy座標の中点を求める。つまり、AL
UII、13を用いて処理r(PO+Pl)/2−m0
Jが行われる。13 has functions of addition, subtraction, and right 1-bit shift. This ALU II, 13 uses addition and right 1-bit shift to find the midpoint of the X and y coordinates. In other words, A.L.
Process r(PO+Pl)/2-m0 using UII, 13
J is performed.
一連の中点を求める処理が行われ、レジスタファイル2
1.22には中点、及びコントロール点mar mll
m2.1113. not n、++ Oar PO
+ P3が格納される。Processing to find a series of midpoints is performed, and register file 2
1.22 has a midpoint and a control point mar mll
m2.1113. not n, ++ Oar PO
+P3 is stored.
次にALUII、13を用いて点0゜と線分丁]可の距
離Sに比例した値QおよびQ′をそれぞれ求める。AL
UII、13でそれぞれ求まった値Q。Next, using ALU II, 13, values Q and Q' proportional to the distance S between the point 0° and the line segment D] are obtained, respectively. AL
The values Q found in UII and 13, respectively.
Q′をALU12にて加算し、その結果を制御回路3に
与える。この制御回路3は、ALU12からの結果を基
に収束条件成立か否かを判断し、成立するなら点Ooを
データ線31.32を介してホストCPUに送る。Q' is added by the ALU 12 and the result is given to the control circuit 3. The control circuit 3 determines whether the convergence condition is satisfied based on the result from the ALU 12, and if the convergence condition is satisfied, sends the point Oo to the host CPU via the data lines 31 and 32.
もし、収束条件が成立していなければ、点0゜ホストC
PUに送ると共に、レジスタファイル21.22にベジ
ェ曲線の新たなコントロール点として点P。、mo+
no、Ooを再セットし、前述の処理をくりかえす。If the convergence condition does not hold, the point 0° host C
Along with sending it to PU, point P is added to the register files 21 and 22 as a new control point of the Bezier curve. , mo+
Reset no and Oo and repeat the above process.
一方のコントロール点0゜、rl、mtr P3につい
ても同様にくりかえす。Repeat the same process for one control point 0°, rl, mtr P3.
制御回路3は、ホス)CPUとのデータのやり取り及び
ALUII、12,13、レジスタファイル21.22
の制御を行う。The control circuit 3 exchanges data with the host CPU, ALU II, 12, 13, and register files 21 and 22.
control.
以上説明したように本発明は、収束条件の判定をベジェ
曲線の表示を行う装置の解像度を考慮して単純化するこ
とにより、ベジェ曲線の直線近似をハードウェアを可能
にし、処理を高速化できるという効果がある。As explained above, the present invention simplifies the determination of the convergence condition by taking into account the resolution of the device that displays the Bezier curve, thereby making it possible to perform linear approximation of the Bezier curve using hardware, thereby speeding up the processing. There is an effect.
第1図は本発明の一実施例の回路図、第2図は本実施例
の処理を説明する座標図、第3図は従来のベジェ曲線発
生法の処理のフローチャート、第4図は従来のベジェ曲
線発生方法を説明する座標図である。
3・・・・・・制御回路、5・・・・・・R/W線、6
・・・・・・制御線、11〜13・・・・・・ALU、
21,22・・・・・・レジスタファイル、31.32
・・・・・・データ線、101〜103・・・・・・処
理ステップ。Fig. 1 is a circuit diagram of an embodiment of the present invention, Fig. 2 is a coordinate diagram explaining the processing of this embodiment, Fig. 3 is a flowchart of the processing of the conventional Bezier curve generation method, and Fig. 4 is a diagram of the conventional Bezier curve generation method. FIG. 2 is a coordinate diagram illustrating a Bezier curve generation method. 3...Control circuit, 5...R/W line, 6
...Control line, 11-13...ALU,
21, 22...Register file, 31.32
...Data line, 101-103...Processing step.
Claims (1)
1および第2のレジスタファイルと、これら各レジスタ
ファイルからのデータを受け座標点の中点計算をそれぞ
れ行う第1および第2のALUと、これら2組のALU
の演算結果から加算演算を行う第3のALUと、前述各
レジスタファイルおよび各ALUを制御する制御回路と
を備え、ベジェ曲線を直線により近似して得ることを特
徴とするベジェ曲線近似回路。first and second register files that respectively store x and y coordinate points from the CPU; first and second ALUs that receive data from these register files and calculate the midpoint of the coordinate points, respectively; These two sets of ALUs
1. A Bezier curve approximation circuit, comprising: a third ALU that performs an addition operation from the operation results; and a control circuit that controls each register file and each ALU, and obtains a Bezier curve by approximating it with a straight line.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP20163789A JPH0363891A (en) | 1989-08-02 | 1989-08-02 | Bezier curved surface approximation circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP20163789A JPH0363891A (en) | 1989-08-02 | 1989-08-02 | Bezier curved surface approximation circuit |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0363891A true JPH0363891A (en) | 1991-03-19 |
Family
ID=16444382
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP20163789A Pending JPH0363891A (en) | 1989-08-02 | 1989-08-02 | Bezier curved surface approximation circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0363891A (en) |
-
1989
- 1989-08-02 JP JP20163789A patent/JPH0363891A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5309521A (en) | Method and apparatus for generating a character curve by dividing and developing a bezier curve | |
| JP2002298153A (en) | Generation of partial derivative for perspective correction texture coordinate in four-pixel texture pipeline | |
| JPH0363891A (en) | Bezier curved surface approximation circuit | |
| JP2677273B2 (en) | A polygonal line approximation device for cubic Bezier curves | |
| KR910012997A (en) | Shading Apparatus and Method for Computer Graphics | |
| JP3059739B2 (en) | Information processing apparatus with curve drawing function and processing method | |
| JPS63186329A (en) | Pre-processor for trigonometric function | |
| JPH11185052A (en) | Apparatus and method for calculating texture mapping coordinates of three-dimensional computer graphics | |
| JPS6015773A (en) | Free curve generation method | |
| JP2538645B2 (en) | Curved line approximation device | |
| JPH0261779A (en) | Coordinate data processing unit | |
| JP3039387B2 (en) | Apparatus for calculating intersection of B-spline curve and straight line in three-dimensional CAD | |
| JP3090712B2 (en) | Molded product design equipment | |
| JP2894042B2 (en) | Image operation method | |
| JP2844387B2 (en) | A fast method for generating elliptical figures in computer graphics | |
| JPH09134441A (en) | Device for approximating curve with straight line | |
| JPH10161799A (en) | Coordinate input device and processing method of handwritten locus | |
| JP2780496B2 (en) | Clipping method for drawing equipment | |
| JP4089806B2 (en) | Curve generating device and method, and storage medium | |
| JPH03176776A (en) | Circle picking processing system | |
| JPH0248780A (en) | Straight line generator | |
| JPS61128318A (en) | Erasing area determining device of character and graphic input device | |
| JPH05233184A (en) | Curve drawing circuit | |
| JPS6329840A (en) | Bit arithmetic processing unit | |
| JPS62184576A (en) | clipping circuit |