WO2010053176A1 - ベジェ曲線描画装置、ベジェ曲線描画方法および記録媒体 - Google Patents
ベジェ曲線描画装置、ベジェ曲線描画方法および記録媒体 Download PDFInfo
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/20—Drawing 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.
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Generation (AREA)
Abstract
Description
ベジェ曲線の複数の制御点の座標を取得する制御点取得手段と、
前記ベジェ曲線を表示する解像度の最小距離を単位として、前記ベジェ曲線の隣り合う制御点間の水平方向の距離又は垂直方向の距離のいずれか大きい方を選択し、当該選択した距離を各制御点間について合計し、当該合計した値を、前記ベジェ曲線の長さの指標として算出する距離指標算出手段と、
前記長さの指標に基づいて、前記ベジェ曲線を分割して描画する際の分割数を設定する分割数設定手段と、
前記分割数設定手段が設定した分割数に従って、前記ベジェ曲線を分割した各区間の端点の座標を算出する分割点演算手段と、
を備えることを特徴とする。
ベジェ曲線の複数の制御点の座標を取得する制御点取得ステップと、
前記ベジェ曲線を表示する解像度の最小距離を単位として、前記ベジェ曲線の隣り合う制御点間の水平方向の距離又は垂直方向の距離のいずれか大きい方を選択し、当該選択した距離を各制御点間について合計し、当該合計した値を、前記ベジェ曲線の長さの指標として算出する距離指標算出ステップと、
前記長さの指標に基づいて、前記ベジェ曲線を分割して描画する際の分割数を設定する分割数設定ステップと、
前記分割数設定ステップにおいて設定された分割数に従って、前記ベジェ曲線を分割した各区間の端点の座標を算出する分割点演算ステップと、
を備えることを特徴とする。
ベジェ曲線の複数の制御点の座標を取得する制御点取得ステップと、
前記ベジェ曲線を表示する解像度の最小距離を単位として、前記ベジェ曲線の隣り合う制御点間の水平方向の距離又は垂直方向の距離のいずれか大きい方を選択し、当該選択した距離を各制御点間について合計し、当該合計した値を、前記ベジェ曲線の長さの指標として算出する距離指標算出ステップと、
前記長さの指標に基づいて、前記ベジェ曲線を分割して描画する際の分割数を設定する分割数設定ステップと、
前記分割数設定ステップにおいて設定された分割数に従って、前記ベジェ曲線を分割した各区間の端点の座標を算出する分割点演算ステップと、
を実行させるプログラムを記録することを特徴とする。
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が得られる。
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が得られる。
ベジェ曲線の長さは、制御点の間の距離の和に概ね比例すると考えられる。さらに、制御点の間の距離は、隣り合う制御点のx座標の差とy座標の差のいずれか大きい方で評価できる。そこで、隣り合う制御点のx座標の差の絶対値(水平距離)とy座標の差の絶対値(垂直距離)のいずれか大きい方を、制御点間について合計した値を、距離パラメータ13として演算する。すなわち、数式で記述すれば、以下のように表せる。
L01 = max(|x0 - x1|,|y0 - y1|)
L12 = max(|x1 - x2|,|y1 - y2|)
L = L01 + L12
である。
L01 = max(|x0 - x1|,|y0 - y1|)
L12 = max(|x1 - x2|,|y1 - y2|)
L23 = max(|x2 - x3|,|y2 - y3|)
L = L01 + L12 + L23
である。
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
と表される。
4桁以下(0≦L<16)の場合は、分割数を23=8に、
4桁を超え8桁以下(16≦L<256)の場合は、24=16に、
8桁を超え10桁以下(256≦L<1024)の場合は、25=32に、および、
10桁を超える(1024≦L)場合は、26=64に設定する。
好ましくは、前記分割数設定手段は、前記長さの指標を2のべき乗の数値で区切り、当該区切った段階ごとに前記分割数を設定することを特徴とする。
好ましくは、前記分割数設定ステップにおいて、前記長さの指標を2のべき乗の数値で区切り、当該区切った段階ごとに前記分割数を設定することを特徴とする。
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)
- ベジェ曲線の複数の制御点の座標を取得する制御点取得手段と、
前記ベジェ曲線を表示する解像度の最小距離を単位として、前記ベジェ曲線の隣り合う制御点間の水平方向の距離又は垂直方向の距離のいずれか大きい方を選択し、当該選択した距離を各制御点間について合計し、当該合計した値を、前記ベジェ曲線の長さの指標として算出する距離指標算出手段と、
前記長さの指標に基づいて、前記ベジェ曲線を分割して描画する際の分割数を設定する分割数設定手段と、
前記分割数設定手段が設定した分割数に従って、前記ベジェ曲線を分割した各区間の端点の座標を算出する分割点演算手段と、
を備えることを特徴とするベジェ曲線描画装置。 - 前記分割数設定手段は、前記長さの指標を2のべき乗の数値で区切り、当該区切った段階ごとに前記分割数を設定することを特徴とする請求項1に記載のベジェ曲線描画装置。
- 前記分割数設定手段は、前記長さの指標が2進数で4桁以下の場合、4桁を超え8桁以下の場合、8桁を超え10桁以下の場合、および10桁を超える場合に分けて、それぞれの場合に対応して前記分割数を設定することを特徴とする請求項2に記載のベジェ曲線描画装置。
- 前記分割数設定手段は、前記分割数を2のべき乗の数とすることを特徴とする請求項1に記載のベジェ曲線描画装置。
- 前記分割数設定手段は、前記分割数を8、16、32、又は64のいずれかに設定することを特徴とする請求項4に記載のベジェ曲線描画装置。
- ベジェ曲線の複数の制御点の座標を取得する制御点取得ステップと、
前記ベジェ曲線を表示する解像度の最小距離を単位として、前記ベジェ曲線の隣り合う制御点の間の水平方向の距離又は垂直方向の距離のいずれか大きい方を選択し、当該選択した距離を各制御点間について合計し、当該合計した値を、前記ベジェ曲線の長さの指標として算出する距離指標算出ステップと、
前記長さの指標に基づいて、前記ベジェ曲線を分割して描画する際の分割数を設定する分割数設定ステップと、
前記分割数設定ステップにおいて設定された分割数に従って、前記ベジェ曲線を分割した各区間の端点の座標を算出する分割点演算ステップと、
を備えることを特徴とするベジェ曲線描画方法。 - 前記分割数設定ステップにおいて、前記長さの指標を2のべき乗の数値で区切り、当該区切った段階ごとに前記分割数を設定することを特徴とする請求項6に記載のベジェ曲線描画方法。
- 前記分割数設定ステップにおいて、前記長さの指標が2進数で4桁以下の場合、4桁を超え8桁以下の場合、8桁を超え10桁以下の場合、および10桁を超える場合に分けて、それぞれの場合に対応して前記分割数を設定することを特徴とする請求項7に記載のベジェ曲線描画方法。
- 前記分割数設定ステップにおいて、前記分割数を2のべき乗の数とすることを特徴とする請求項6に記載のベジェ曲線描画方法。
- 前記分割数設定ステップにおいて、前記分割数を8、16、32、又は64のいずれかに設定することを特徴とする請求項9に記載のベジェ曲線描画方法。
- コンピュータに、
ベジェ曲線の複数の制御点の座標を取得する制御点取得ステップと、
前記ベジェ曲線を表示する解像度の最小距離を単位として、前記ベジェ曲線の隣り合う制御点間の水平方向の距離又は垂直方向の距離のいずれか大きい方を選択し、当該選択した距離を各制御点間について合計し、当該合計した値を、前記ベジェ曲線の長さの指標として算出する距離指標算出ステップと、
前記長さの指標に基づいて、前記ベジェ曲線を分割して描画する際の分割数を設定する分割数設定ステップと、
前記分割数設定ステップにおいて設定された分割数に従って、前記ベジェ曲線を分割した各区間の端点の座標を算出する分割点演算ステップと、
を実行させることを特徴とするプログラムを記録する記録媒体。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CA2743039A CA2743039C (en) | 2008-11-07 | 2009-11-09 | Bezier curve drawing device, bezier curve drawing method, 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 |
EP09824873.5A EP2346000A4 (en) | 2008-11-07 | 2009-11-09 | APPARATUS FOR DRAWING BEZIER CURVES, METHOD FOR DRAWING BEZIER CURVES 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)
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 |
WO2015087594A1 (ja) * | 2013-12-13 | 2015-06-18 | コニカミノルタ株式会社 | 分光ユニットおよびこれを用いた分光装置 |
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)
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)
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 |
-
2008
- 2008-11-07 JP JP2008287183A patent/JP5294313B2/ja not_active Expired - Fee Related
-
2009
- 2009-11-09 CA CA2743039A patent/CA2743039C/en not_active Expired - Fee Related
- 2009-11-09 US US13/125,838 patent/US20110199381A1/en not_active Abandoned
- 2009-11-09 WO PCT/JP2009/069048 patent/WO2010053176A1/ja active Application Filing
- 2009-11-09 EP EP09824873.5A patent/EP2346000A4/en not_active Withdrawn
Patent Citations (1)
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)
Title |
---|
See also references of EP2346000A4 * |
Also Published As
Publication number | Publication date |
---|---|
CA2743039A1 (en) | 2010-05-14 |
EP2346000A1 (en) | 2011-07-20 |
US20110199381A1 (en) | 2011-08-18 |
JP2010113624A (ja) | 2010-05-20 |
EP2346000A4 (en) | 2016-10-05 |
JP5294313B2 (ja) | 2013-09-18 |
CA2743039C (en) | 2014-07-08 |
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 | |
JPH05307610A (ja) | テクスチャマッピング方法およびその装置 | |
KR100887462B1 (ko) | 감마 정정의 결여를 보상하기 위한 알파 정정 | |
KR100241060B1 (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) | 映像信号処理装置、映像信号処理方法、及び表示装置 | |
JP2000182035A (ja) | 画像処理方法及び装置 | |
US20240242404A1 (en) | System and Method for Rendering a Path Using a Clockwise Fill Rule | |
JPH11242585A (ja) | 除算回路およびグラフィック演算装置 | |
JP4244444B2 (ja) | データ処理装置、除算回路および画像処理装置 | |
JP2008112391A (ja) | フォグ効果処理方法、グラフィックス装置、グラフィックス用半導体集積回路装置及びフォグ効果処理プログラム | |
KR100686357B1 (ko) | 로그 연산 방법 및 그 방법을 수행하는 3차원 그래픽 처리장치 | |
JP4224887B2 (ja) | 信号処理装置および画像処理装置 | |
JP2000030081A (ja) | 凹凸ポリゴンの描画方法および三次元描画装置 | |
GB2318958A (en) | An apparatus for generating a subpixel mask for a computer graphics system |
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 |