WO2010053176A1 - ベジェ曲線描画装置、ベジェ曲線描画方法および記録媒体 - Google Patents

ベジェ曲線描画装置、ベジェ曲線描画方法および記録媒体 Download PDF

Info

Publication number
WO2010053176A1
WO2010053176A1 PCT/JP2009/069048 JP2009069048W WO2010053176A1 WO 2010053176 A1 WO2010053176 A1 WO 2010053176A1 JP 2009069048 W JP2009069048 W JP 2009069048W WO 2010053176 A1 WO2010053176 A1 WO 2010053176A1
Authority
WO
WIPO (PCT)
Prior art keywords
bezier curve
division number
distance
digits
dividing
Prior art date
Application number
PCT/JP2009/069048
Other languages
English (en)
French (fr)
Inventor
潤一 玉井
Original Assignee
Necシステムテクノロジー株式会社
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 Necシステムテクノロジー株式会社 filed Critical Necシステムテクノロジー株式会社
Priority to EP09824873.5A priority Critical patent/EP2346000A4/en
Priority to US13/125,838 priority patent/US20110199381A1/en
Priority to CA2743039A priority patent/CA2743039C/en
Publication of WO2010053176A1 publication Critical patent/WO2010053176A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles

Definitions

  • the present invention relates to a Bezier curve drawing device, a Bezier curve drawing method, and a recording medium for drawing a Bezier curve on a display device or the like.
  • Bezier curves are often used when writing smooth curves on a computer.
  • An arbitrary curve can be approximated by a plurality of Bezier curves and displayed smoothly.
  • Bezier curves are used for vector graphics, especially for drawing characters.
  • Patent Document 1 discloses a technique of performing polygonal line approximation of a Bezier curve using a control point sequence of the Bezier curve and drawing polygonal line data approximating the Bezier curve.
  • it is evaluated whether or not subdivision is performed, and the target curve is subdivided only when it is evaluated that subdivision is necessary.
  • the polygonal line approximation is performed recursively. The evaluation of whether or not the subdivision is performed uses the chord length estimated value of the Bezier curve and the arc length estimated value of the Bezier curve as evaluation criteria.
  • Patent Document 2 the standard segment is recursively divided until the distance between the midpoint of the two control points and the straight line connecting the start point and the end point is less than the allowable value, and the distance becomes less than the allowable value.
  • Patent Document 3 discloses the following technique. A cubic Bezier curve is divided into two in advance to obtain first and second Bezier curves. Next, for each Bezier curve, the straight line approximation process consisting of an error determination step and a division step is recursively repeated, and the outer sides of each defined polygon of each Bezier curve finally obtained are set as an approximate straight line group of the original Bezier curve. To do.
  • Patent Documents 1 to 3 in addition to a method of evaluating the degree of approximation of each division for approximating a Bezier curve and recursively dividing it, the sum of the distances between coordinate points that determine the Bezier curve is used.
  • a method for determining the number of samplings, which is the number of approximate straight lines when linearly approximating the Bezier curve, is also disclosed in Patent Document 4.
  • JP 2002-117411 A Japanese Patent Application Laid-Open No. 11-203489 JP-A-10-198811 Japanese Patent Laid-Open No. 02-126376
  • Patent Documents 1 to 3 when a Bezier curve is displayed on a display device using a method of approximating a Bezier curve with a plurality of line segments, if the number of divisions is constant regardless of the size of the Bezier curve, For a small Bezier curve, the number of divisions becomes excessive, and the effect of improving the smoothness of the displayed curve is small compared to the amount of calculation processing. On the other hand, for a Bezier curve having a large shape, there are cases where the number of divisions is insufficient, resulting in unsatisfactory drawing quality.
  • the present invention has been made in view of the above-described circumstances.
  • a Bezier curve is divided into lines and drawn, a Bezier curve that can select an appropriate number of divisions in consideration of drawing quality and drawing speed.
  • An object of the present invention is to provide a drawing apparatus and a method thereof.
  • a Bezier curve drawing device is: Control point acquisition means for acquiring the coordinates of a plurality of control points of a Bezier curve; Using the minimum distance of the resolution for displaying the Bezier curve as a unit, select either the horizontal distance or the vertical distance between adjacent control points of the Bezier curve, and select the selected distance as each control point.
  • Distance index calculating means for calculating the distance between the two and calculating the total value as an index of the length of the Bezier curve;
  • a division number setting means for setting a division number when dividing and drawing the Bezier curve based on the index of the length;
  • Division point calculation means for calculating coordinates of end points of each section obtained by dividing the Bezier curve according to the division number set by the division number setting means; It is characterized by providing.
  • a Bezier curve drawing method includes: A control point acquisition step of acquiring the coordinates of a plurality of control points of the Bezier curve; Using the minimum distance of the resolution for displaying the Bezier curve as a unit, select either the horizontal distance or the vertical distance between adjacent control points of the Bezier curve, and select the selected distance as each control point.
  • a distance index calculating step for calculating the distance between the two, and calculating the total value as an index of the length of the Bezier curve;
  • a division number setting step for setting a division number when dividing and drawing the Bezier curve based on the index of the length;
  • a dividing point calculating step for calculating coordinates of end points of each section obtained by dividing the Bezier curve according to the dividing number set in the dividing number setting step; It is characterized by providing.
  • a recording medium is provided in a computer.
  • a distance index calculating step for calculating the distance between the two, and calculating the total value as an index of the length of the Bezier curve;
  • a division number setting step for setting a division number when dividing and drawing the Bezier curve based on the index of the length;
  • a dividing point calculating step for calculating coordinates of end points of each section obtained by dividing the Bezier curve according to the dividing number set in the dividing number setting step;
  • a program for executing is recorded.
  • the amount of calculation processing is reduced while maintaining the image quality for a Bezier curve with a small shape, and appropriate calculation processing is performed for a Bezier curve with a large shape.
  • the amount of image quality can be improved.
  • the drawing speed can be improved while maintaining the drawing quality.
  • a Bezier curve is used to draw a smooth curve in a vector graphic.
  • An outline of a Bezier curve will be described with reference to FIG.
  • a secondary Bezier curve 101 and a cubic Bezier curve 102 are mainly used.
  • the quadratic Bezier curve 101 is expressed by the following equation (1) with t as a parameter.
  • the cubic Bezier curve 102 is expressed by the following equation (2).
  • x x0 ⁇ (1-t) 3 + 3 ⁇ x1 ⁇ (1-t) 2 ⁇ t + 3 ⁇ x2 ⁇ (1 - t) ⁇ t 2 + x3 ⁇ t 3
  • y y0 ⁇ (1-t) 3 + 3 ⁇ y1 ⁇ (1-t) 2 ⁇ t + 3 ⁇ y2 ⁇ (1 - t) ⁇ t 2 + y3 ⁇ t 3 0 ⁇ t ⁇ 1
  • the coordinates of the control points of the cubic Bezier curve 102 are given by (x0, y0), (x1, y1), (x2, y2), (x3, y3).
  • FIG. 2 is a block diagram showing a configuration example of the drawing apparatus according to the embodiment of the present invention.
  • the Bezier curve drawing device 1 includes a control point coordinate acquisition unit 10, an inter-control point distance calculation unit 11, a division number setting unit 12, and a Bezier division vertex calculation unit 16.
  • the division number setting unit 12 includes a Bezier division table 12a.
  • the Bezier curve drawing device 1 calculates the coordinates of points that divide the Bezier curve (hereinafter referred to as “divided points”) based on the coordinates of the control points that define the Bezier curve, and connects the calculated coordinates with line segments. Thus, it has a function of approximating a Bezier curve with a line segment (hereinafter referred to as “polyline approximation”).
  • FIG. 3 is a block diagram illustrating a configuration example of a drawing apparatus including the Bezier curve drawing apparatus 1.
  • the drawing apparatus 100 includes a Bezier curve drawing apparatus 1, a coordinate conversion unit 103, a contour generation unit 104, an antialiasing circuit 105, an outline buffer 106, a mask generation unit 107, a painting unit 108, a synthesis unit 109, A dither unit 110, an image buffer 111, a filter unit 112, and a color conversion unit 113 are included.
  • the line segment drawing unit 18 in FIG. 2 corresponds to each unit and buffer after the coordinate conversion unit 103 in FIG. 3.
  • the outline of the processing of the drawing apparatus 100 will be described.
  • the coordinate conversion unit 103 converts the coordinates of the dividing points into coordinates in the entire screen to be displayed.
  • the contour generation unit 104 stores pixel information (hereinafter referred to as “contour data”) through which each line segment passes from the coordinates of the dividing point in the outline buffer 106.
  • the anti-aliasing circuit 105 performs anti-aliasing processing on the contour data generated by the contour generation unit 104 according to the resolution to be displayed.
  • the mask generation unit 107 generates mask data from the contour data subjected to the anti-aliasing process.
  • the painting unit 108 performs painting processing according to the mask data.
  • the image data is stored in the image buffer 111.
  • the image data is subjected to processing such as edge enhancement by the filter unit 112 and singular point removal by the color conversion unit 113, and is subjected to color conversion in accordance with the display device, and then synthesized with the image generated from the contour data.
  • the dither unit applies the dither effect so that it can be easily seen on the screen, and generates the drawing data 19 (FIG. 2).
  • the control point coordinate acquisition unit 10 acquires the coordinates of the control points of the Bezier curve.
  • a Bezier curve represented by a set of control points is generated by a Bezier curve generation unit (not shown) or given from another device.
  • the inter-control point distance calculation unit 11 calculates a distance parameter 13 that is an index of the length of the Bezier curve from the coordinates of the control points of the Bezier curve acquired by the control point coordinate acquisition unit 10.
  • the control point distance calculation unit 11 outputs the calculated distance parameter 13 to the division number setting unit 12.
  • the division number setting unit 12 Upon receiving the distance parameter 13, the division number setting unit 12 outputs a division number 14 corresponding to the distance parameter 13 to the Bezier division vertex calculation unit 16. This division number 14 is used to determine the division number of the parameter t of the Bezier curve equation.
  • the distance parameter 13 is a value for setting the number of divisions approximated by a broken line when displaying a Bezier curve, and is an index of the length of the Bezier curve.
  • the number of divisions of the Bezier curve approximated by a broken line varies depending on the resolution to be displayed even if the Bezier curve has the same control point coordinates. Accordingly, the distance parameter 13 is calculated in units of the minimum resolution distance for displaying the Bezier curve.
  • the control point coordinate acquisition unit 10 acquires a scale for converting the control point coordinates into the display resolution. Then, the control point distance calculation unit 11 converts the control point coordinates with a scale, and calculates the distance parameter 13 using the minimum distance of the resolution to be displayed as a unit. Or the control point coordinate converted into the resolution displayed beforehand may be given. In the following description, it is assumed that the control point coordinates are converted to display resolution.
  • the control point distance calculation unit 11 outputs the coordinate parameter 15 to the Bezier division vertex calculation unit 16.
  • the coordinate parameter 15 is the same as the coordinates of the control point.
  • the Bezier division vertex calculation unit 16 divides the Bezier curve using the coordinate parameter 15 and the division number 14, and calculates the coordinates (line segment parameter 17) of each vertex of the approximate polygonal line. Then, the Bezier division vertex calculation unit 16 outputs the line segment parameter 17 to the line segment drawing unit 18.
  • the line segment drawing unit 18 generates line drawing data 19 for displaying a Bezier curve on a display device by drawing a line segment based on the line segment parameter 17.
  • the processing until the drawing data 19 is obtained will be described in detail.
  • the distance calculation part 11 between control points calculates the distance parameter 13 as follows.
  • the length of the Bezier curve is considered to be approximately proportional to the sum of the distances between the control points.
  • the distance between the control points can be evaluated by the larger one of the difference between the x coordinates and the difference between the y coordinates of adjacent control points. Therefore, the distance parameter 13 is obtained by adding the larger of the absolute value (horizontal distance) of the difference between the x coordinates of adjacent control points or the absolute value (vertical distance) of the difference between the y coordinates as a distance parameter 13. Calculate. In other words, it can be expressed as follows if it is described by mathematical expressions.
  • L01 max (
  • L12 max (
  • L L01 + L12 It is.
  • L12 max (
  • L23 max (
  • ) L L01 + L12 + L23 It is.
  • L12 max (
  • Ln-1n max (
  • ) L L01 + L12 + ... + Ln-1n It is expressed.
  • the distance parameter 13 (L) described above is smaller than the sum of the Euclidean distances between the control points, but the distance parameter 13 (L) generally represents the size of the Bezier curve.
  • the distance parameter 13 (L) By adjusting the number of divisions corresponding to L) well, a polygonal line can be approximated while maintaining the display quality of the Bezier curve.
  • the distance calculation unit 11 between control points outputs the calculated distance parameter 13 (L) to the division number setting unit 12.
  • the division number setting unit 12 calculates the division number corresponding to the distance parameter 13 (L) with reference to the Bezier division table 12a. This number of divisions is used as the number of divisions of the value of the Bezier curve parameter t.
  • the Bezier division table 12a in FIG. 4 is a diagram illustrating an example of a correspondence relationship between the distance parameter 13 (L) and the number of divisions. As shown in FIG. 4, the value of the distance parameter 13 (L) is divided by a power of 2 and the number of divisions is set for each stage. In other words, when the distance parameter 13 (L) is represented by a binary number, the division number is set stepwise according to the number of digits of the value represented by the binary number.
  • the distance parameter 13 is a binary number of 4 digits or less (0 ⁇ L ⁇ 16), when it exceeds 4 digits and is 8 digits or less (16 ⁇ L ⁇ 256), it exceeds 8 digits and is 10 digits or less.
  • the number of divisions is set corresponding to each of the cases of (256 ⁇ L ⁇ 1024) and the case of exceeding 10 digits (1024 ⁇ L).
  • the calculation processing of the division number setting unit 12 becomes extremely simple. Since these operations can be performed using bit shifts and bit logical operations, they are extremely simple even when implemented in a circuit.
  • the human sense is approximately logarithmic, and if the stage and the number of divisions are set as a power as described above, a sensibly uniform scale can be obtained.
  • the division number setting unit 12 outputs the division number 14 to the Bezier division vertex calculation unit 16.
  • the Bezier division vertex calculation unit 16 calculates a line segment parameter 17 based on the given coordinate parameter 15 and division number 14.
  • the minimum and maximum values of the parameter t are always 0 and 1.
  • the Bezier curve of FIG. 1 is calculated, and the coordinates (x, y) for the value of each parameter t are calculated.
  • the value of the parameter t can be calculated by a binary counter.
  • FIG. 6 is a flowchart showing an example of the operation of the Bezier curve dividing process according to the present embodiment.
  • the Bezier curve dividing process in FIG. 6 is started every time a Bezier curve is read in the drawing process.
  • the control point coordinate acquisition unit 10 acquires the coordinates of the control points of the Bezier curve (step S1). As described above, a scale for converting the control point coordinates into the display resolution is obtained at the same time.
  • the inter-control point distance calculation unit 11 converts the control point coordinates into a display resolution scale, and the absolute value (horizontal distance) of the difference between the x coordinates of adjacent control points and the absolute value (vertical distance) of the difference between the y coordinates. Whichever is larger is selected, the absolute values selected between the control points are summed, and the sum is set as the distance parameter 13 (step S2). Then, the control point distance calculation unit 11 outputs the distance parameter 13 to the division number setting unit 12. At the same time, the coordinate parameter 15 that is the coordinate of the control point of the Bezier curve is output to the Bezier division vertex calculation unit 16.
  • the division number setting unit 12 sets a Bezier curve division number 14 from the distance parameter 13 with reference to, for example, a Bezier division table 12a as shown in FIG. 4 (step S3).
  • the distance parameter 13 is divided by a power of 2
  • it can be determined by the number of digits of the distance parameter 13 expressed in binary.
  • the division number is set to 1 in any bit of the binary number.
  • the division number setting unit 12 outputs the set division number 14 to the Bezier division vertex calculation unit 16.
  • the Bezier division vertex calculation unit 16 divides the domain of the parameter t of the Bezier curve from the division number 14 and the coordinate parameter 15 into the same number of sections as the division number, and the x coordinate of each end point (polygonal vertex) The y coordinate is calculated (step S4).
  • the Bezier division vertex calculation unit 16 outputs the coordinates (line segment parameter 17) of each vertex of the polygonal line that approximates the Bezier curve to the line segment drawing unit 18, and ends the process of dividing one Bezier curve.
  • the number of divisions for drawing a Bezier curve is set based on a parameter (index) related to the distance between control points of the Bezier curve.
  • a small Bezier curve can set a small number of divisions, and a large Bezier curve can set a large number of divisions.
  • the numerical value of the stage of the distance parameter 13 and the numerical value of the division number given in the example of the embodiment are preferable examples, and may be arbitrarily set according to the size of the screen to be displayed, the resolution, and the Bezier curve. Can do. For example, when printing a Bezier curve, it is desirable to change the stage of the distance parameter 13, the numerical value of the division, and the number of divisions according to the resolution.
  • the sum of the absolute value of the difference between the x coordinates and the absolute value of the difference between the y coordinates and the sum of the control points can be used as the distance parameter.
  • the distance parameter is larger than the sum of the Euclidean distances between the control points, but by adjusting the number of divisions corresponding to the distance parameter well, a polygonal line approximation can be performed while maintaining the display quality of the Bezier curve. . In this case, it is not necessary to judge by comparing the difference between the x coordinate and the difference between the y coordinate.
  • FIG. 7 is a block diagram showing an example of a physical configuration when the Bezier curve drawing apparatus 1 is mounted on a computer.
  • the Bezier curve drawing device 1 according to the present embodiment can be realized by the same hardware configuration as a general computer device.
  • the Bezier curve drawing apparatus 1 includes a control unit 21, a main storage unit 22, an external storage unit 23, an operation unit 24, a display unit 25, and an input / output unit 26.
  • the main storage unit 22, the external storage unit 23, the operation unit 24, the display unit 25, and the input / output unit 26 are all connected to the control unit 21 via the internal bus 20.
  • the control unit 21 includes a CPU (Central Processing Unit) and the like, and executes processing for drawing a Bezier curve according to a program 30 stored in the external storage unit 23.
  • CPU Central Processing Unit
  • the main storage unit 22 is composed of a RAM (Random-Access Memory) or the like, loads a program 30 stored in the external storage unit 23, and is used as a work area of the control unit 21.
  • the above-described Bezier division table 12 a is loaded from the external storage unit 23 and configured in the main storage unit 22.
  • the external storage unit 23 includes a non-volatile memory such as a flash memory, a hard disk, a DVD-RAM (Digital Versatile Disc Random-Access Memory), a DVD-RW (Digital Versatile Disc Disc ReWritable), and the above processing is performed by the control unit 21.
  • a program 30 to be executed is stored in advance, and data stored in the program 30 is supplied to the control unit 21 in accordance with an instruction from the control unit 21, and the data supplied from the control unit 21 is stored.
  • the operation unit 24 includes a pointing device such as a keyboard and a mouse, and an interface device that connects the keyboard and the pointing device to the internal bus 20. Instructions for creating, inputting, and transmitting / receiving image data including a Bezier curve, designation of an image to be displayed, drawing area range, enlargement ratio, position of the drawing area on the display device, and the like are input via the operation unit 24, and control is performed. Supplied to the unit 21.
  • the display unit 25 includes a CRT (Cathode Ray Tube) or an LCD (Liquid Crystal Display), and displays a drawn image.
  • CTR Cathode Ray Tube
  • LCD Liquid Crystal Display
  • the input / output unit 26 includes a wireless transmitter / receiver, a wireless modem or a network termination device, and a serial interface or a LAN (Local Area Network) interface connected thereto. Image data including a Bezier curve can be received and transmitted via the input / output unit 26.
  • a Bezier curve drawing apparatus 1 is configured as an electronic circuit by mounting a circuit composed of hardware components such as LSI (Large Scale Integration) incorporating a circuit for realizing the function of drawing the above-mentioned Bezier curve. can do.
  • the Bezier curve drawing apparatus 1 can be realized in software by executing a Bezier curve drawing program for performing the above functions by the control unit 21 on the computer processing apparatus. In that case, the CPU of the control unit 21 loads the program 30 stored in the external storage unit 23 to the main storage unit 22 and executes it, and controls the operation of each unit to perform the above functions. The processing of the Bezier curve drawing device 1 is executed.
  • the process of calculating the number of divisions of the Bezier curve can be configured by simple addition / subtraction, bit shift, and logical operation. Multiplication and division do not appear until the parameter t is calculated. Therefore, the arithmetic processing and the circuit can be easily configured, and the arithmetic processing for Bezier curve drawing can be performed at high speed.
  • the first effect is that the control point distance calculation unit 11 can dynamically change the number of segment divisions of the Bezier curve by calculating the distance parameter of the Bezier curve.
  • the control point distance calculation unit 11 can dynamically change the number of segment divisions of the Bezier curve by calculating the distance parameter of the Bezier curve.
  • the second effect is that the processing circuit in hardware can be reduced by simplifying the processing of the control point distance calculation unit 11.
  • a value that includes the sum of the distances between the control points of the Bezier curve, whichever is greater between the horizontal distance and the vertical distance between adjacent control points of the Bezier curve, is calculated as an index of the length of the Bezier curve Therefore, the calculation of the index of the size of the Bezier curve is easy. Furthermore, since the length index is divided by the power of 2, and the number of divisions is set in stages, the calculation for setting the number of divisions is simple.
  • the third effect is that by making the number of divisions to a power of 2, the increment of the Bezier parameter t is easily expressed in one digit in binary, and the arithmetic circuit can be easily implemented in hardware.
  • the fourth effect is that the set value of the number of divisions is variable. It is easy to change the number of divisions of the Bezier curve according to the required drawing performance and drawing quality.
  • the division number setting means divides the length index by a power of 2 and sets the division number for each divided stage.
  • the division number setting means is configured such that the length indicator is a binary number of 4 digits or less, more than 4 digits and less than 8 digits, more than 8 digits and less than 10 digits, and more than 10 digits. According to the case, the number of divisions is set corresponding to each case.
  • the division number setting means sets the division number to a power of two.
  • the division number setting means sets the division number to any of 8, 16, 32, or 64.
  • the length index is divided by a power of 2 and the division number is set for each divided stage.
  • the length indicator is a binary number of 4 digits or less, when it exceeds 4 digits and is 8 digits or less, when it exceeds 8 digits and is 10 digits or less, and exceeds 10 digits
  • the number of divisions is set corresponding to each case.
  • the division number is a power of two.
  • the division number is set to any of 8, 16, 32, or 64.
  • the central part for processing of the Bezier curve drawing apparatus 1 including the control unit 21, the main storage unit 22, the external storage unit 23, the operation unit 24, the input / output unit 26 and the internal bus 20 is based on a dedicated system. Instead, it can be realized using a normal computer system.
  • a computer program for executing the above operation is stored and distributed in a computer-readable recording medium (flexible disk, CD-ROM, DVD-ROM, etc.), and the computer program is installed in the computer.
  • the Bezier curve drawing device 1 that executes the above-described processing may be configured.
  • the computer program may be stored in a storage device included in a server device on a communication network such as the Internet, and the Bezier curve drawing device 1 may be configured by being downloaded by a normal computer system.
  • the functions of the Bezier curve drawing device 1 are realized by sharing an OS (operating system) and an application program, or by cooperation between the OS and the application program, only the application program portion is stored in a recording medium or a storage device. It may be stored.
  • the computer program may be posted on a bulletin board (BBS, “Bulletin“ Board ”System) on a communication network, and the computer program distributed via the network.
  • BSS bulletin board
  • the computer program may be started and executed in the same manner as other application programs under the control of the OS, so that the above-described processing may be executed.

Abstract

 ベジェ曲線描画装置は以下のように構成する。制御点座標取得部(10)は、ベジェ曲線の複数の制御点の座標を取得する。制御点間距離演算部(11)は、前記ベジェ曲線を表示する解像度の最小距離を単位として、前記ベジェ曲線の隣り合う制御点間の水平方向の距離又は垂直方向の距離のいずれか大きい方を選択し、当該選択した距離を各制御点間について合計し、当該合計した値を、前記ベジェ曲線の長さの指標として算出する。分割数設定部(12)は、前記長さの指標に基づいて、前記ベジェ曲線を分割して描画する際の分割数を設定する。ベジェ分割頂点演算部(16)は、前記分割数設定部(12)が設定した分割数に従って、前記ベジェ曲線を分割した各区間の端点の座標を算出する。

Description

ベジェ曲線描画装置、ベジェ曲線描画方法および記録媒体
 本発明は、ベジェ曲線を表示装置などに描画するベジェ曲線描画装置、ベジェ曲線描画方法および記録媒体に関する。
 コンピュータ上で滑らかな曲線を書く場合にベジェ曲線を利用することが多い。任意の曲線を複数のベジェ曲線で近似して滑らかに表示することができる。ベジェ曲線はベクターグラフィクス、とりわけ文字の描画に用いられる。
 実際にコンピュータの画面上にベジェ曲線を表示する場合、ベジェ曲線を分割して、分割した各部分を線分で近似し、ベジェ曲線全体を折れ線で描く手法(折れ線近似)が用いられている。この分割数を決める手法がいくつか提案されている。例えば、特許文献1には、ベジェ曲線の制御点列を用いて当該ベジェ曲線を折れ線近似し、ベジェ曲線を近似した折れ線データの描画を行う手法が開示されている。上記折れ線近似においては、再分割を行うか否かを評価し、再分割が必要と評価された場合にのみ、対象となる曲線を再分割する。そして、折れ線近似は、再帰的に実行される。また、再分割を行うか否かの評価は、ベジェ曲線の弦長さ見積値と、ベジェ曲線の弧長さ見積値とを評価基準として利用する。
 特許文献2には、標準形のセグメントに対し、2制御点の中点と始点終点を結ぶ直線との距離が許容値以下になるまで再帰的に分割を行い、前記距離が許容値以下になった場合、当該セグメントを線分で近似する手法が開示されている。また、特許文献3には、以下の手法が開示されている。3次のベジェ曲線を予め2分割し、第1および第2のベジェ曲線とする。次いで各ベジェ曲線について、誤差判定ステップと分割ステップからなる直線近似処理を再帰的に繰り返し、最終的に得られた各ベジェ曲線の各定義多角形の外郭辺を元のベジェ曲線の近似直線群とする。
 特許文献1乃至3に示すように、ベジェ曲線を折れ線近似するための各分割の近似度を評価して再帰的に分割する手法以外に、ベジェ曲線を決定する座標点の間の距離の和に比例して、そのベジェ曲線を直線近似する際の近似直線の数であるサンプリング数を決定する手法も、特許文献4に開示されている。
特開2002-117411号公報 特開平11-203489号公報 特開平10-198811号公報 特開平02-126376号公報
 特許文献1乃至3に示すように、ベジェ曲線を複数の線分で近似する手法を用いて表示装置にベジェ曲線を表示する場合、ベジェ曲線の大きさに関わらず分割数を一定にすると、形状の小さいベジェ曲線に関しては過剰な分割数となり、演算処理量に比較して表示された曲線の滑らかさの向上効果が小さい。一方、形状の大きいベジェ曲線に関しては、分割数が不足するといったケースが発生し、結果描画品質として満足できないものとなってしまう。
 しかし、前述の各分割の近似度を評価して再帰的に分割する方法では、ベジェ曲線の形状に応じた滑らかな表示を得ることができるが、近似度の評価の演算処理に距離の評価が必要であり、分割数に比例して演算処理量が増大する。このため、描画品質を維持しようとすると、描画速度が低下してしまう。また、特許文献4の手法でも、制御点間の距離を計算するため2乗と平方根の計算が必要であり、制御点が多いほど演算処理量が多くなり、描画速度が低下してしまう。
 本発明は上述の事情に鑑みてなされたもので、ベジェ曲線を線分で分割して描画する際に、描画品質及び描画速度を考慮して、適当な分割数を選択することができるベジェ曲線描画装置およびその方法を提供することを目的とする。
 本発明の第1の観点に係るベジェ曲線描画装置は、
 ベジェ曲線の複数の制御点の座標を取得する制御点取得手段と、
 前記ベジェ曲線を表示する解像度の最小距離を単位として、前記ベジェ曲線の隣り合う制御点間の水平方向の距離又は垂直方向の距離のいずれか大きい方を選択し、当該選択した距離を各制御点間について合計し、当該合計した値を、前記ベジェ曲線の長さの指標として算出する距離指標算出手段と、
 前記長さの指標に基づいて、前記ベジェ曲線を分割して描画する際の分割数を設定する分割数設定手段と、
 前記分割数設定手段が設定した分割数に従って、前記ベジェ曲線を分割した各区間の端点の座標を算出する分割点演算手段と、
 を備えることを特徴とする。
 本発明の第2の観点に係るベジェ曲線描画方法は、
 ベジェ曲線の複数の制御点の座標を取得する制御点取得ステップと、
 前記ベジェ曲線を表示する解像度の最小距離を単位として、前記ベジェ曲線の隣り合う制御点間の水平方向の距離又は垂直方向の距離のいずれか大きい方を選択し、当該選択した距離を各制御点間について合計し、当該合計した値を、前記ベジェ曲線の長さの指標として算出する距離指標算出ステップと、
 前記長さの指標に基づいて、前記ベジェ曲線を分割して描画する際の分割数を設定する分割数設定ステップと、
 前記分割数設定ステップにおいて設定された分割数に従って、前記ベジェ曲線を分割した各区間の端点の座標を算出する分割点演算ステップと、
 を備えることを特徴とする。
 本発明の第3の観点に係る記録媒体は、コンピュータに、
 ベジェ曲線の複数の制御点の座標を取得する制御点取得ステップと、
 前記ベジェ曲線を表示する解像度の最小距離を単位として、前記ベジェ曲線の隣り合う制御点間の水平方向の距離又は垂直方向の距離のいずれか大きい方を選択し、当該選択した距離を各制御点間について合計し、当該合計した値を、前記ベジェ曲線の長さの指標として算出する距離指標算出ステップと、
 前記長さの指標に基づいて、前記ベジェ曲線を分割して描画する際の分割数を設定する分割数設定ステップと、
 前記分割数設定ステップにおいて設定された分割数に従って、前記ベジェ曲線を分割した各区間の端点の座標を算出する分割点演算ステップと、
 を実行させるプログラムを記録することを特徴とする。
 本発明によれば、ベジェ曲線の大きさに応じて分割数を設定するので、形状が小さいベジェ曲線では、画質を維持しながら演算処理量を削減し、形状が大きいベジェ曲線では適切な演算処理量で画質を向上させることができる。その結果、描画品質を維持して描画速度を向上できる。
ベジェ曲線を説明する図である。 ベジェ曲線を説明する図である。 本発明の実施の形態に係るベジェ曲線描画装置の構成例を示すブロック図である。 ベジェ曲線描画装置を含む描画装置の構成例を示すブロック図である。 分割数を設定する一例を示す図である。 ベジェ曲線を分割して計算するパラメータの一例を示す図である。 実施の形態に係るベジェ曲線分割処理の動作の一例を示すフローチャートである。 ベジェ曲線描画装置をコンピュータに実装する場合の、物理的な構成の一例を示すブロック図である。
 ベクターグラフィックにおいて滑らかな曲線を描く場合に、ベジェ曲線が利用される。図1を用いてベジェ曲線の概略を説明する。ベクターグラフィックの曲線描画では、主に2次ベジェ曲線101、3次ベジェ曲線102が利用される。2次ベジェ曲線101はtを媒介変数として次の式(1)で表される。
  x = x0・(1 - t)2 + 2・x1・(1 - t)・t + x2・t2
  y = y0・(1 - t)2 + 2・y1・(1 - t)・t + y2・t2
  0 ≦ t ≦ 1                          (1)
2次ベジェ曲線101の制御点の座標は、(x0,y0)、(x1,y1)、(x2,y2)で与えられる。媒介変数tの値を0から1まで変化させることにより、2次ベジェ曲線101が得られる。
 また、3次ベジェ曲線102は次の式(2)で表される。
  x = x0・(1 - t)3 + 3・x1・(1 - t)2・t
     + 3・x2・(1 - t)・t2 + x3・t3
  y = y0・(1 - t)3 + 3・y1・(1 - t)2・t
     + 3・y2・(1 - t)・t2 + y3・t3
  0 ≦ t ≦ 1                          (2)
3次ベジェ曲線102の制御点の座標は、(x0,y0)、(x1,y1)、(x2,y2)、(x3,y3)で与えられる。媒介変数tの値を0から1まで変化させることにより、3次ベジェ曲線102が得られる。
 図2は、本発明の実施の形態に係る描画装置の構成例を示すブロック図である。ベジェ曲線描画装置1は、制御点座標取得部10と、制御点間距離演算部11と、分割数設定部12と、ベジェ分割頂点演算部16と、から構成される。分割数設定部12は、ベジェ分割テーブル12aを含む。ベジェ曲線描画装置1は、ベジェ曲線を規定する制御点の座標に基づいてベジェ曲線を分割する点(以下、「分割点」という)の座標を算出し、算出した座標間を線分で結ぶことにより、ベジェ曲線を線分で近似(以下、「折れ線近似」という)する機能を有する。
 図3は、ベジェ曲線描画装置1を含む描画装置の構成例を示すブロック図である。描画装置100は、ベジェ曲線描画装置1と、座標変換部103と、輪郭生成部104と、アンチエイリアス回路105と、アウトラインバッファ106と、マスク生成部107と、塗りつぶし部108と、合成部109と、ディザー部110と、イメージバッファ111と、フィルタ部112と、色変換部113と、から構成される。図2の線分描画部18は、図3の座標変換部103以降の各部及びバッファに相当する。
 描画装置100の処理の概要を説明する。ベジェ曲線描画装置1が、ベジェ曲線を折れ線近似するための分割点の座標を出力すると、座標変換部103は分割点の座標を、表示する画面全体の中の座標に変換する。輪郭生成部104は、分割点の座標から各線分が通る画素の情報(以下、「輪郭データ」という)をアウトラインバッファ106に格納する。アンチエイリアス回路105は、表示する解像度に応じて、輪郭生成部104が生成した輪郭データに対してアンチエイリアシング処理を行う。次に、マスク生成部107は、アンチエイリアシング処理が施された輪郭データからマスクデータを生成する。そして、塗りつぶし部108は、マスクデータに従って、塗りつぶし処理を行う。
 一方、ビットマップなどの画素ごとの色および輝度のデータで表された画像データと重ね合わせる場合に、その画像データはイメージバッファ111に格納される。画像データはフィルタ部112がエッジ強調、色変換部113が特異点除去などの処理を施して、表示装置に合わせて色変換したのち、輪郭データから生成された画像と合成される。最後に、ディザー部が、画面で見やすいようにディザー効果をかけて、描画データ19(図2)を生成する。
 図2に戻って、ベジェ曲線描画装置1の構成を説明する。制御点座標取得部10は、ベジェ曲線の制御点の座標を取得する。制御点の組で表されるベジェ曲線は、図示しないベジェ曲線生成部により生成されるか、又は、別の装置から与えられる。
 制御点間距離演算部11は、制御点座標取得部10が取得したベジェ曲線の制御点の座標から、ベジェ曲線の長さの指標である距離パラメータ13を算出する。制御点間距離演算部11は、算出した距離パラメータ13を分割数設定部12に出力する。分割数設定部12は、距離パラメータ13を受け取ると、距離パラメータ13に応じた分割数14をベジェ分割頂点演算部16に出力する。この分割数14は、ベジェ曲線の式の媒介変数tの分割数を決定するのに用いられる。
 距離パラメータ13は、ベジェ曲線を表示するときの、折れ線で近似する分割数を設定するための値であって、ベジェ曲線の長さの指標である。ベジェ曲線の折れ線近似の分割数は、同じ制御点座標のベジェ曲線であっても、表示する解像度によって変化する。したがって、距離パラメータ13は、ベジェ曲線を表示する解像度の最小距離を単位として算出する。制御点座標取得部10は、制御点座標を表示解像度に換算する尺度を取得する。そして、制御点間距離演算部11は、制御点座標を尺度で換算して、表示する解像度の最小距離を単位として距離パラメータ13を算出する。又は、あらかじめ表示する解像度に換算された制御点座標が与えられてもよい。以下では、制御点座標を表示解像度に換算されたものとして説明する。
 制御点間距離演算部11は、ベジェ分割頂点演算部16に座標パラメータ15を出力する。ここで、この座標パラメータ15は、制御点の座標と同一である。ベジェ分割頂点演算部16は、座標パラメータ15および分割数14を用いてベジェ曲線を分割し、近似する折れ線の各頂点の座標(線分パラメータ17)を算出する。そして、ベジェ分割頂点演算部16は、線分パラメータ17を線分描画部18に出力する。線分描画部18は、線分パラメータ17に基づいて線分を描画することにより、ベジェ曲線を表示装置に表示するための描画データ19を生成する。以下、描画データ19が得られるまでの処理を詳細に説明する。
 制御点間距離演算部11は、距離パラメータ13を以下のように演算する。
 ベジェ曲線の長さは、制御点の間の距離の和に概ね比例すると考えられる。さらに、制御点の間の距離は、隣り合う制御点のx座標の差とy座標の差のいずれか大きい方で評価できる。そこで、隣り合う制御点のx座標の差の絶対値(水平距離)とy座標の差の絶対値(垂直距離)のいずれか大きい方を、制御点間について合計した値を、距離パラメータ13として演算する。すなわち、数式で記述すれば、以下のように表せる。
 距離パラメータ13をLとして、2次のベジェ曲線の場合は、
  L01 = max(|x0 - x1|,|y0 - y1|)
  L12 = max(|x1 - x2|,|y1 - y2|)
  L = L01 + L12
である。
 3次のベジェ曲線の場合の距離パラメータ13(L)は、
  L01 = max(|x0 - x1|,|y0 - y1|)
  L12 = max(|x1 - x2|,|y1 - y2|)
  L23 = max(|x2 - x3|,|y2 - y3|)
  L = L01 + L12 + L23
である。
 一般に、n次のベジェ曲線の距離パラメータ13(L)は、
  L01 = max(|x0 - x1|,|y0 - y1|)
  L12 = max(|x1 - x2|,|y1 - y2|)
   ・・・
  Ln-1n = max(|xn-1 - xn|,|yn-1 - yn|)
  L = L01 + L12 + ・・・ + Ln-1n
と表される。
 上述の距離パラメータ13(L)は、制御点間のユークリッド距離の合計より小さい値になっているが、距離パラメータ13(L)は概ねベジェ曲線の大きさを表しているので、距離パラメータ13(L)に対応する分割数をうまく調節することによって、ベジェ曲線の表示品質を保って折れ線近似できる。
 制御点間距離演算部11は、算出した距離パラメータ13(L)を、分割数設定部12に出力する。分割数設定部12は、ベジェ分割テーブル12aを参照して、距離パラメータ13(L)に対応する分割数を算出する。この分割数は、ベジェ曲線の媒介変数tの値の分割数として利用される。
 図4のベジェ分割テーブル12aは、距離パラメータ13(L)と分割数との対応関係の一例を示す図である。図4に示すように、距離パラメータ13(L)の値を2のべき乗の数値で区切って、その段階ごとに分割数を設定する。言い換えれば、距離パラメータ13(L)を2進数で表した場合に、2進数で表された値の桁数に応じて段階的に分割数を設定する。
 図4の例では、距離パラメータ13が2進数で4桁以下(0≦L<16)の場合、4桁を超え8桁以下(16≦L<256)の場合、8桁を超え10桁以下(256≦L<1024)の場合、および10桁を超える(1024≦L)場合に分けて、それぞれの場合に対応して分割数を設定する。図4の例は、表示画面横幅の解像度の最大値を2048とした場合に、その1/2(2048・1/2=1024)で区切り、次は1/2の2乗の1/4(1024・1/4=256)で区切る。さらに同様にして、1/4の2乗の1/16(256・1/16=16)で区切る。
 図4の例ではさらに、分割数を2のべき乗に設定する。すなわち、距離パラメータ13が2進数で
 4桁以下(0≦L<16)の場合は、分割数を2=8に、
 4桁を超え8桁以下(16≦L<256)の場合は、2=16に、
 8桁を超え10桁以下(256≦L<1024)の場合は、2=32に、および、
 10桁を超える(1024≦L)場合は、2=64に設定する。
 距離パラメータ13の段階と分割数を2のべき乗とすることにより、分割数設定部12の演算処理が極めて簡単になる。これらの演算は、ビットシフトとビットの論理演算とを用いてできるので、回路で実装する場合にも極めて簡単である。また、人間の感覚はおおよそ対数関数的であって、以上のようにべき乗で段階と分割数とを設定すると、感覚的に均一なスケールが得られる。
 分割数設定部12は、分割数14をベジェ分割頂点演算部16に出力する。ベジェ分割頂点演算部16は、与えられた座標パラメータ15および分割数14に基づいて線分パラメータ17の算出を行う。
 図5を参照して、分割数が2=8、および分割数が2=16の場合を例に説明する。分割数が2のとき、ベジェ分割頂点演算部16では、2+1回=合計9回の演算を行う。媒介変数tの最小値および最大値は、必ず0および1となる。媒介変数tを増加させるたびに、図1のベジェ曲線の演算を行い、それぞれの媒介変数tの値に対する座標(x,y)を算出する。ここで、分割数を2のべき乗に設定すると、媒介変数tの値は、2進数のカウンタで演算することができる。
 分割数が2=16の場合は、tの入力回数(合計17回)にしたがって、それぞれ図1の式により(x,y)が合計17回算出される。線分描画部18がこの(x,y)を直線でつなげたものが描画データ19となる。ここでも、分割数が2のべき乗に設定されているので、媒介変数tの値は、2進数のカウンタで演算することができる。
 図6は、本実施の形態に係るベジェ曲線分割処理の動作の一例を示すフローチャートである。図6のベジェ曲線分割処理は、描画処理の中でベジェ曲線を読み込むごとに起動される。ベジェ曲線分割処理が起動されると、制御点座標取得部10は、そのベジェ曲線の制御点の座標を取得する(ステップS1)。前述のとおり、同時に制御点座標を表示解像度に換算する尺度を取得する。
 制御点間距離演算部11は、制御点座標を表示解像度の尺度に変換して、隣り合う制御点のx座標の差の絶対値(水平距離)とy座標の差の絶対値(垂直距離)のいずれか大きい方を選択し、各制御点間について選択された絶対値を合計し、合計した値を距離パラメータ13とする(ステップS2)。そして、制御点間距離演算部11は、距離パラメータ13を分割数設定部12に出力する。同時に、ベジェ曲線の制御点の座標である座標パラメータ15をベジェ分割頂点演算部16に出力する。
 分割数設定部12は、例えば図4に示すようなベジェ分割テーブル12aを参照して、距離パラメータ13からベジェ曲線の分割数14を設定する(ステップS3)。距離パラメータ13を2のべき乗の数値で区切る場合には、2進数で表した距離パラメータ13の桁数で判定できる。また、分割数が2のべき乗の場合は、分割数を2進数のいずれかのビットを1にすることになる。分割数設定部12は、設定した分割数14をベジェ分割頂点演算部16に出力する。
 ベジェ分割頂点演算部16は、分割数14と座標パラメータ15とから、ベジェ曲線の媒介変数tの定義域を分割数と同じ数の区間に分割して、各端点(折れ線頂点)のx座標とy座標を演算する(ステップS4)。ベジェ分割頂点演算部16は、ベジェ曲線を近似する折れ線の各頂点の座標(線分パラメータ17)を線分描画部18に出力し、1つのベジェ曲線の分割処理を終了する。
 本実施の形態のベジェ曲線描画装置1によれば、ベジェ曲線の制御点の間の距離に関するパラメータ(指標)に基づいて、ベジェ曲線を描画するための分割数が設定される。そして、小さいベジェ曲線では分割数を少なく、大きいベジェ曲線は分割数を多く設定することができる。
 なお、実施の形態の例に挙げた距離パラメータ13の段階の数値および分割数の数値は、好ましい例であって、表示する画面の大きさ、解像度、およびベジェ曲線に合わせて任意に設定することができる。例えば、ベジェ曲線を印刷する場合には、その解像度に合わせて、距離パラメータ13の段階とその区切りの数値、および分割数を変更することが望ましい。
 また、x座標の差の絶対値とy座標の差の絶対値の和を、制御点間について合計した値を距離パラメータとすることもできる。その場合は、距離パラメータは、制御点間のユークリッド距離の合計より大きい値になっているが、距離パラメータに対応する分割数をうまく調節することによって、ベジェ曲線の表示品質を保って折れ線近似できる。この場合は、x座標の差とy座標の差を比較して判断する必要がない。
 図7は、ベジェ曲線描画装置1をコンピュータに実装する場合の、物理的な構成の一例を示すブロック図である。本実施の形態に係るベジェ曲線描画装置1は、一般的なコンピュータ装置と同様のハードウェア構成によって実現することができる。ベジェ曲線描画装置1は、図7に示すように、制御部21と、主記憶部22と、外部記憶部23と、操作部24と、表示部25と、入出力部26と、を備える。主記憶部22と、外部記憶部23と、操作部24と、表示部25と、入出力部26とはいずれも内部バス20を介して制御部21に接続される。
 制御部21は、CPU(Central Processing Unit)等から構成され、外部記憶部23に記憶されているプログラム30に従って、ベジェ曲線を描画するための処理を実行する。
 主記憶部22は、RAM(Random-Access Memory)等から構成され、外部記憶部23に記憶されているプログラム30をロードし、制御部21の作業領域として用いられる。上述のベジェ分割テーブル12aは、外部記憶部23からロードされて主記憶部22の中に構成される。
 外部記憶部23は、フラッシュメモリ、ハードディスク、DVD-RAM(Digital Versatile Disc Random-Access Memory)、DVD-RW(Digital Versatile Disc ReWritable)等の不揮発性メモリから構成され、前記の処理を制御部21に行わせるためのプログラム30を予め記憶し、また、制御部21の指示に従って、このプログラム30が記憶するデータを制御部21に供給し、制御部21から供給されたデータを記憶する。
 操作部24は、キーボードおよびマウスなどのポインティングデバイス等と、キーボードおよびポインティングデバイス等を内部バス20に接続するインタフェース装置から構成されている。操作部24を介して、ベジェ曲線を含む画像データの作成、入力、送受信などの指示、表示する画像の指定、描画領域の範囲、拡大率、描画領域の表示装置における位置などが入力され、制御部21に供給される。
 表示部25は、CRT(Cathode Ray Tube)又はLCD(Liquid Crystal Display)などから構成され、描画された画像を表示する。
 入出力部26は、無線送受信機、無線モデム又は網終端装置、およびそれらと接続するシリアルインタフェース又はLAN(Local Area Network)インタフェース等から構成される。入出力部26を介して、ベジェ曲線を含む画像データを受信し、また送信できる。
 本発明によるベジェ曲線描画装置1は、上記のベジェ曲線を描画する機能を実現する回路を組み込んだLSI(Large Scale Integration)等のハードウェア部品から構成される回路を実装して、電子回路として構成することができる。また、上記の各機能を行うベジェ曲線描画プログラムを、コンピュータ処理装置上の制御部21で実行することにより、ソフトウェア的にベジェ曲線描画装置1を実現することができる。その場合、制御部21のCPUは、外部記憶部23に格納されているプログラム30を、主記憶部22にロードして実行し、各部の動作を制御して上記の各機能を行わせることによって、ベジェ曲線描画装置1の処理を実行する。
 上述のとおり、本実施の形態のベジェ曲線描画装置1では、ベジェ曲線の分割数を算出する処理は、単純な加減算、ビットシフトおよび論理演算で構成できる。媒介変数tの算出までに乗算および除算は現れない。したがって、演算処理および回路が簡単に構成できて、ベジェ曲線描画の演算処理を高速に行うことができる。
 以上に説明したように、本実施の形態のベジェ曲線描画装置1によれば、以下に記載するような効果を奏する。
 第1の効果は、制御点間距離演算部11が、ベジェ曲線の距離パラメータを算出することにより、ベジェ曲線の線分分割数を動的に変更できる。これにより、サイズの比較的小さいベジェ曲線では、分割数を減らすことにより、ベジェ分割頂点演算部16の処理回数を減らすことができ、サイズの比較的多いベジェ曲線では、分割数を増やすことにより、描画されるベジェ曲線の品質を向上できる。
 第2の効果は、制御点間距離演算部11の処理を簡易にすることによりハードウェアでの処理回路を小さくできる。ベジェ曲線の隣り合う制御点の間の水平方向の距離又は垂直方向の距離のいずれか大きい方を、ベジェ曲線の制御点間について合計した和を含む値を、ベジェ曲線の長さの指標として算出するので、ベジェ曲線の大きさの指標の演算が簡単である。さらに、長さの指標を2のべき乗の数で区切って、段階的に分割数を設定するので、分割数を設定する演算が簡単である。
 第3の効果は、分割数を2のべき乗にすることにより、ベジェ曲線の媒介変数tの増分が2進数の1桁で表現しやすい形式となり、演算回路をハードウェアに実装しやすい。
 第4の効果は、分割数の設定値が可変であることが挙げられる。要求される描画性能や描画品質に応じて、ベジェ曲線の分割数を変更することが容易である。
 その他、本発明の好適な変形として、以下の構成が含まれる。
 本発明の第1の観点に係るベジェ曲線描画装置について、
 好ましくは、前記分割数設定手段は、前記長さの指標を2のべき乗の数値で区切り、当該区切った段階ごとに前記分割数を設定することを特徴とする。
 好ましくは、前記分割数設定手段は、前記長さの指標が2進数で4桁以下の場合、4桁を超え8桁以下の場合、8桁を超え10桁以下の場合、および10桁を超える場合に分けて、それぞれの場合に対応して前記分割数を設定することを特徴とする。
 好ましくは、前記分割数設定手段は、前記分割数を2のべき乗の数とすることを特徴とする。
 さらに好ましくは、前記分割数設定手段は、前記分割数を8、16、32、又は64のいずれかに設定することを特徴とする。
 本発明の第2の観点に係るベジェ曲線描画方法について、
 好ましくは、前記分割数設定ステップにおいて、前記長さの指標を2のべき乗の数値で区切り、当該区切った段階ごとに前記分割数を設定することを特徴とする。
 好ましくは、前記分割数設定ステップにおいて、前記長さの指標が2進数で4桁以下の場合、4桁を超え8桁以下の場合、8桁を超え10桁以下の場合、および10桁を超える場合に分けて、それぞれの場合に対応して前記分割数を設定することを特徴とする。
 好ましくは、前記分割数設定ステップにおいて、前記分割数を2のべき乗の数とすることを特徴とする。
 さらに好ましくは、前記分割数設定ステップにおいて、前記分割数を8、16、32、又は64のいずれかに設定することを特徴とする。
 その他、前記のハードウエェア構成やフローチャートは一例であり、任意に変更および修正が可能である。
 制御部21、主記憶部22、外部記憶部23、操作部24、入出力部26および内部バス20から構成されるベジェ曲線描画装置1の処理を行う中心となる部分は、専用のシステムによらず、通常のコンピュータシステムを用いて実現可能である。例えば、前記の動作を実行するためのコンピュータプログラムを、コンピュータが読み取り可能な記録媒体(フレキシブルディスク、CD-ROM、DVD-ROM等)に格納して配布し、当該コンピュータプログラムをコンピュータにインストールすることにより、前記の処理を実行するベジェ曲線描画装置1を構成してもよい。また、インターネット等の通信ネットワーク上のサーバ装置が有する記憶装置に当該コンピュータプログラムを格納しておき、通常のコンピュータシステムがダウンロード等することでベジェ曲線描画装置1を構成してもよい。
 また、ベジェ曲線描画装置1の機能を、OS(オペレーティングシステム)とアプリケーションプログラムの分担、又はOSとアプリケーションプログラムとの協働により実現する場合などには、アプリケーションプログラム部分のみを記録媒体や記憶装置に格納してもよい。
 また、搬送波にコンピュータプログラムを重畳し、通信ネットワークを介して配信することも可能である。例えば、通信ネットワーク上の掲示板(BBS, Bulletin Board System)に前記コンピュータプログラムを掲示し、ネットワークを介して前記コンピュータプログラムを配信してもよい。そして、このコンピュータプログラムを起動し、OSの制御下で、他のアプリケーションプログラムと同様に実行することにより、前記の処理を実行できるように構成してもよい。
 本出願は、2008年11月7日に出願された、日本国特許出願2008-287183号に基づく。本明細書中に日本国特許出願2008-287183号の明細書、特許請求の範囲、図面全体を参照として取り込むものとする。
 1、100  ベジェ曲線描画装置
 10  制御点座標取得部
 11  制御点間距離演算部
 12  分割数設定部
 12a ベジェ分割テーブル
 16  ベジェ分割頂点演算部
 18  線分描画部
 21  制御部
 22  主記憶部
 23  外部記憶部
 24  操作部
 25  表示部
 26  入出力部
 30  プログラム
 103 座標変換部
 104 輪郭生成部
 105 アンチエイリアス回路
 106 アウトラインバッファ
 107 マスク生成部
 108 塗りつぶし部
 109 合成部
 110 ディザー部
 111 イメージバッファ
 112 フィルタ部
 113 色変換部

Claims (11)

  1.  ベジェ曲線の複数の制御点の座標を取得する制御点取得手段と、
     前記ベジェ曲線を表示する解像度の最小距離を単位として、前記ベジェ曲線の隣り合う制御点間の水平方向の距離又は垂直方向の距離のいずれか大きい方を選択し、当該選択した距離を各制御点間について合計し、当該合計した値を、前記ベジェ曲線の長さの指標として算出する距離指標算出手段と、
     前記長さの指標に基づいて、前記ベジェ曲線を分割して描画する際の分割数を設定する分割数設定手段と、
     前記分割数設定手段が設定した分割数に従って、前記ベジェ曲線を分割した各区間の端点の座標を算出する分割点演算手段と、
     を備えることを特徴とするベジェ曲線描画装置。
  2.  前記分割数設定手段は、前記長さの指標を2のべき乗の数値で区切り、当該区切った段階ごとに前記分割数を設定することを特徴とする請求項1に記載のベジェ曲線描画装置。
  3.  前記分割数設定手段は、前記長さの指標が2進数で4桁以下の場合、4桁を超え8桁以下の場合、8桁を超え10桁以下の場合、および10桁を超える場合に分けて、それぞれの場合に対応して前記分割数を設定することを特徴とする請求項2に記載のベジェ曲線描画装置。
  4.  前記分割数設定手段は、前記分割数を2のべき乗の数とすることを特徴とする請求項1に記載のベジェ曲線描画装置。
  5.  前記分割数設定手段は、前記分割数を8、16、32、又は64のいずれかに設定することを特徴とする請求項4に記載のベジェ曲線描画装置。
  6.  ベジェ曲線の複数の制御点の座標を取得する制御点取得ステップと、
     前記ベジェ曲線を表示する解像度の最小距離を単位として、前記ベジェ曲線の隣り合う制御点の間の水平方向の距離又は垂直方向の距離のいずれか大きい方を選択し、当該選択した距離を各制御点間について合計し、当該合計した値を、前記ベジェ曲線の長さの指標として算出する距離指標算出ステップと、
     前記長さの指標に基づいて、前記ベジェ曲線を分割して描画する際の分割数を設定する分割数設定ステップと、
     前記分割数設定ステップにおいて設定された分割数に従って、前記ベジェ曲線を分割した各区間の端点の座標を算出する分割点演算ステップと、
     を備えることを特徴とするベジェ曲線描画方法。
  7.  前記分割数設定ステップにおいて、前記長さの指標を2のべき乗の数値で区切り、当該区切った段階ごとに前記分割数を設定することを特徴とする請求項6に記載のベジェ曲線描画方法。
  8.  前記分割数設定ステップにおいて、前記長さの指標が2進数で4桁以下の場合、4桁を超え8桁以下の場合、8桁を超え10桁以下の場合、および10桁を超える場合に分けて、それぞれの場合に対応して前記分割数を設定することを特徴とする請求項7に記載のベジェ曲線描画方法。
  9.  前記分割数設定ステップにおいて、前記分割数を2のべき乗の数とすることを特徴とする請求項6に記載のベジェ曲線描画方法。
  10.  前記分割数設定ステップにおいて、前記分割数を8、16、32、又は64のいずれかに設定することを特徴とする請求項9に記載のベジェ曲線描画方法。
  11.  コンピュータに、
     ベジェ曲線の複数の制御点の座標を取得する制御点取得ステップと、
     前記ベジェ曲線を表示する解像度の最小距離を単位として、前記ベジェ曲線の隣り合う制御点間の水平方向の距離又は垂直方向の距離のいずれか大きい方を選択し、当該選択した距離を各制御点間について合計し、当該合計した値を、前記ベジェ曲線の長さの指標として算出する距離指標算出ステップと、
     前記長さの指標に基づいて、前記ベジェ曲線を分割して描画する際の分割数を設定する分割数設定ステップと、
     前記分割数設定ステップにおいて設定された分割数に従って、前記ベジェ曲線を分割した各区間の端点の座標を算出する分割点演算ステップと、
     を実行させることを特徴とするプログラムを記録する記録媒体。
     
     
PCT/JP2009/069048 2008-11-07 2009-11-09 ベジェ曲線描画装置、ベジェ曲線描画方法および記録媒体 WO2010053176A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP09824873.5A EP2346000A4 (en) 2008-11-07 2009-11-09 APPARATUS FOR DRAWING BEZIER CURVES, METHOD FOR DRAWING BEZIER CURVES AND RECORDING MEDIUM
US13/125,838 US20110199381A1 (en) 2008-11-07 2009-11-09 Bezier curve drawing device, bezier curve drawing method, and recording medium
CA2743039A CA2743039C (en) 2008-11-07 2009-11-09 Bezier curve drawing device, bezier curve drawing method, and recording medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2008287183A JP5294313B2 (ja) 2008-11-07 2008-11-07 ベジェ曲線描画装置、ベジェ曲線描画方法およびプログラム
JP2008-287183 2008-11-07

Publications (1)

Publication Number Publication Date
WO2010053176A1 true WO2010053176A1 (ja) 2010-05-14

Family

ID=42152981

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2009/069048 WO2010053176A1 (ja) 2008-11-07 2009-11-09 ベジェ曲線描画装置、ベジェ曲線描画方法および記録媒体

Country Status (5)

Country Link
US (1) US20110199381A1 (ja)
EP (1) EP2346000A4 (ja)
JP (1) JP5294313B2 (ja)
CA (1) CA2743039C (ja)
WO (1) WO2010053176A1 (ja)

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901488B (zh) 2009-05-25 2015-09-09 富士通株式会社 用于曲线近似的方法和装置以及图形显示控制方法和装置
US9224218B2 (en) * 2012-06-05 2015-12-29 Apple Inc. System and method for loading and rendering curved features in a map
US9401034B2 (en) * 2013-04-30 2016-07-26 Microsoft Technology Licensing, Llc Tessellation of two-dimensional curves using a graphics pipeline
FR3005775B1 (fr) * 2013-05-15 2015-06-26 Thales Sa Procede et systeme de construction d'au moins une ligne de guidage d'aeronef dans un reseau de navigation aeroportuaire
US9841323B2 (en) 2013-12-13 2017-12-12 Konica Minolta, Inc. Spectroscopic unit and spectroscopic device using same
DE102014007914A1 (de) * 2014-05-27 2015-12-03 Elektrobit Automotive Gmbh Graphisches Darstellen von Straßen und Routen unter Benutzung von Hardware-Tesselierung
US20160122224A1 (en) 2014-11-03 2016-05-05 Ppg Industries Ohio, Inc. Automated float glass system
JP6756320B2 (ja) * 2017-09-20 2020-09-16 株式会社ニューフレアテクノロジー 描画データ生成方法、プログラム、マルチ荷電粒子ビーム描画装置、及びパターン検査装置
CN110297677B (zh) * 2018-03-22 2022-12-23 斑马智行网络(香港)有限公司 绘制方法、装置、设备以及存储介质
CN109408161A (zh) * 2018-08-22 2019-03-01 安徽慧视金瞳科技有限公司 一种模拟毛笔笔触的绘制算法
JP7172420B2 (ja) * 2018-10-15 2022-11-16 株式会社ニューフレアテクノロジー 描画データ生成方法及びマルチ荷電粒子ビーム描画装置
CN109949393B (zh) * 2019-01-09 2023-09-12 广州小鹏汽车科技有限公司 一种动画效果处理方法、系统及装置
CN109933932B (zh) * 2019-03-21 2022-09-20 山东女子学院 一种基于Bézier曲线的路径优化方法及系统
CN110716493B (zh) * 2019-09-10 2022-03-04 天津大学 一种五轴微线段加工路径光顺方法
CN111913644B (zh) * 2020-07-29 2022-06-24 北京大麦地信息技术有限公司 一种白板的线条绘制方法及装置、可读存储介质
JP2022053208A (ja) * 2020-09-24 2022-04-05 株式会社ニューフレアテクノロジー データ生成方法、荷電粒子ビーム照射装置及びプログラム
CN112419444B (zh) * 2020-12-09 2024-03-29 北京维盛视通科技有限公司 服装板片绘制方法、装置、电子设备及存储介质
CN112738627B (zh) * 2020-12-23 2022-05-20 上海哔哩哔哩科技有限公司 播放控制方法及装置
JP2023025503A (ja) 2021-08-10 2023-02-22 株式会社ニューフレアテクノロジー データ生成方法、荷電粒子ビーム照射装置及びプログラム
CN114065673B (zh) * 2022-01-18 2022-04-19 北京智芯仿真科技有限公司 集成电路快速计算中贝塞尔积分自适应分段方法及系统
CN114818181B (zh) * 2022-04-21 2023-08-25 哈尔滨工程大学 基于齿廓线直齿圆柱齿轮有限元网格自动生成方法和设备
CN116092095B (zh) * 2023-04-13 2023-07-28 江苏中威科技软件系统有限公司 原笔迹手写笔锋的生成方法

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002117411A (ja) * 2000-10-12 2002-04-19 Matsushita Electric Ind Co Ltd 曲線描画方法、曲線描画装置および曲線描画プログラムを記録した記録媒体

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5381521A (en) * 1993-05-14 1995-01-10 Microsoft Corporation System and method of rendering curves
US5940081A (en) * 1995-01-27 1999-08-17 Sony Corporation Method and apparatus for forming a font and the font produced method and apparatus for drawing a blurred figure

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002117411A (ja) * 2000-10-12 2002-04-19 Matsushita Electric Ind Co Ltd 曲線描画方法、曲線描画装置および曲線描画プログラムを記録した記録媒体

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2346000A4 *

Also Published As

Publication number Publication date
US20110199381A1 (en) 2011-08-18
EP2346000A4 (en) 2016-10-05
JP2010113624A (ja) 2010-05-20
CA2743039C (en) 2014-07-08
EP2346000A1 (en) 2011-07-20
CA2743039A1 (en) 2010-05-14
JP5294313B2 (ja) 2013-09-18

Similar Documents

Publication Publication Date Title
WO2010053176A1 (ja) ベジェ曲線描画装置、ベジェ曲線描画方法および記録媒体
JP2910979B2 (ja) コンピュータグラフィックシステムのサブピクセルマスク発生方法および装置
US8289323B2 (en) Drawing processing apparatus, texture processing apparatus, and tessellation method
US7986330B2 (en) Method and apparatus for generating gammacorrected antialiased lines
US8704830B2 (en) System and method for path rendering with multiple stencil samples per color sample
US7554546B1 (en) Stippled lines using direct distance evaluation
JP4937359B2 (ja) 図形描画装置及び図形描画方法
US7764292B2 (en) Three dimensional graphics processing apparatus, image display apparatus, three dimensional graphics processing method, control program and computer-readable recording medium
US8928667B2 (en) Rendering stroked curves in graphics processing systems
US20060028482A1 (en) Filtering unit for floating-point texture data
JPH05307610A (ja) テクスチャマッピング方法およびその装置
KR100241060B1 (ko) 컴퓨터 그래픽스에서 텍스쳐 맵핑을 위한 상세 레벨의 결정 방법 및 회로
KR20040048839A (ko) 감마 정정의 결여를 보상하기 위한 알파 정정
JP2018073388A (ja) テクスチャ処理方法及びその装置
US6711603B1 (en) Fractional, arithmetic unit, fractional arithmetic method, set-up engine for handling graphic images and computer-readable medium
JPWO2012107952A1 (ja) メータ表示装置
JP2009049752A (ja) 映像信号処理装置、映像信号処理方法、及び表示装置
US6460063B1 (en) Division circuit and graphic display processing apparatus
JP2000182035A (ja) 画像処理方法及び装置
JP4244444B2 (ja) データ処理装置、除算回路および画像処理装置
JP2008112391A (ja) フォグ効果処理方法、グラフィックス装置、グラフィックス用半導体集積回路装置及びフォグ効果処理プログラム
KR100686357B1 (ko) 로그 연산 방법 및 그 방법을 수행하는 3차원 그래픽 처리장치
JP4224887B2 (ja) 信号処理装置および画像処理装置
JP4635379B2 (ja) 画像処理装置
JP2000030081A (ja) 凹凸ポリゴンの描画方法および三次元描画装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09824873

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 13125838

Country of ref document: US

REEP Request for entry into the european phase

Ref document number: 2009824873

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2009824873

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2743039

Country of ref document: CA

NENP Non-entry into the national phase

Ref country code: DE