WO2012140910A1 - 曲線描画装置、曲線描画方法、曲線描画プログラム及び集積回路 - Google Patents

曲線描画装置、曲線描画方法、曲線描画プログラム及び集積回路 Download PDF

Info

Publication number
WO2012140910A1
WO2012140910A1 PCT/JP2012/002590 JP2012002590W WO2012140910A1 WO 2012140910 A1 WO2012140910 A1 WO 2012140910A1 JP 2012002590 W JP2012002590 W JP 2012002590W WO 2012140910 A1 WO2012140910 A1 WO 2012140910A1
Authority
WO
WIPO (PCT)
Prior art keywords
points
point
curve
division
line
Prior art date
Application number
PCT/JP2012/002590
Other languages
English (en)
French (fr)
Other versions
WO2012140910A9 (ja
Inventor
隆昭 守山
安弘 伊藤
Original Assignee
パナソニック株式会社
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 パナソニック株式会社 filed Critical パナソニック株式会社
Priority to US13/699,157 priority Critical patent/US9092905B2/en
Priority to CN201280001516.7A priority patent/CN102918566B/zh
Priority to JP2013509802A priority patent/JPWO2012140910A1/ja
Publication of WO2012140910A1 publication Critical patent/WO2012140910A1/ja
Publication of WO2012140910A9 publication Critical patent/WO2012140910A9/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
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/17Function evaluation by approximation methods, e.g. inter- or extrapolation, smoothing, least mean square method
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/22Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of characters or indicia using display control signals derived from coded signals representing the characters or indicia, e.g. with a character-code memory
    • G09G5/24Generation of individual character patterns
    • G09G5/28Generation of individual character patterns for enhancement of character form, e.g. smoothing

Definitions

  • the present invention relates to a curve drawing technique for approximating a curve portion of a contour line such as a character or a figure with a plurality of line segments.
  • drawing a curved portion of a character such as a font or a graphic includes a process of approximating the curved portion of the outline with a plurality of line segments and filling the inside of the outline represented by the line segment.
  • Graphics technology is used.
  • the quality of characters and figures approximated by this technique depends on the smoothness of the connecting portion (hereinafter referred to as an edge) between the line segments used for the approximation. Therefore, as a result of performing the approximation process as a result, if the edge is not smooth enough, further approximation is performed using a line segment so that the edge is swollen.
  • Patent Document 1 discloses a technique for determining whether or not further approximation is necessary depending on whether or not the angle formed by two line segments constituting an edge satisfies a predetermined condition derived from an empirical rule. Is disclosed.
  • an object of the present invention is to provide a curve drawing apparatus that determines whether further approximation is necessary or not by a simple method with a lower calculation load than in the past.
  • the present invention is a curve drawing apparatus that linearly approximates a contour line of a curve having a width, which is defined by a center line and a line width, on the center line that divides the center line
  • Dividing point calculation means for calculating a plurality of dividing points, and for each of the dividing points, a dividing point calculation for calculating two separating points that are equidistant from the dividing point along the normal line of the center line passing through the dividing points.
  • the separation points of each set when the separation points on the same side with respect to the straight line passing through the two division points are paired
  • the curve drawing apparatus of the present invention has the above-described configuration, and compares two distances between the separation points to determine whether the longer one of the partial contours is approximated by more line segments than the shorter one. This can be determined by a simple method with a lower calculation load than before.
  • the figure which represented typically a part of curve which should be drawn based on one embodiment of this invention The block diagram which shows the structure of the curve drawing apparatus which concerns on one embodiment of this invention The figure which expanded further a part of curve of FIG. 1 based on one embodiment of this invention.
  • generated by the curve formation part based on one embodiment of this invention The flowchart which shows the approximation process based on one embodiment of this invention
  • finish of a basic approximate calculation in the case of n 0 based on one embodiment of this invention.
  • a curve drawing apparatus is an apparatus that draws a curve having a width by approximating a contour line of the curve with a plurality of line segments.
  • the information given to the curve drawing device regarding the curve to be drawn is (a) path information representing the path that is the center line of the curve to be drawn, and (b) line width information representing the line width of the curve to be drawn. is there.
  • FIG. 1 is a diagram schematically showing a part of a curve to be drawn.
  • contour lines 102 and 103 indicate the contour lines of the curve to be drawn
  • path 101 indicates the path that is the center line of the curve to be drawn.
  • the contour line 102 and the path are separated by half the line width (hereinafter referred to as half width) of the curve to be drawn, and the contour line 103 and the path are separated by half width.
  • the curve drawing apparatus When performing the approximation process, the curve drawing apparatus first generates divided paths (D1 to D7 in the figure) by dividing the path into a predetermined length. The curve drawing apparatus performs an approximation process in units of this divided path. Next, the curve drawing apparatus calculates the normal lines (normal lines N1 to N8) of the paths at the end points (divided points P1 to P8) of the divided path. These normals delimit contour lines as shown in the figure. Hereinafter, each portion of the contour line delimited by the normal line is referred to as a “partial contour line” (O11 to O17, O21 to O27 in the figure).
  • partial contour lines two of the partial contour lines that are divided by the normal line passing through the two end points of the certain divided path (hereinafter referred to as “partial contour lines corresponding to the divided path”) are divided into two.
  • partial contour lines corresponding to the divided path D5, O15 and O25.
  • the longer one is called “long side” and the shorter one is called “short side”.
  • the curve drawing apparatus approximates a curve using a plurality of line segments for a longer one of the partial outlines corresponding to the division pass (hereinafter referred to as “long partial outline”), or creates a partial outline.
  • a determination is made as to whether or not to approximate one line segment connecting the end points of the line (hereinafter also referred to as “approximation determination”).
  • the curve drawing apparatus performs this approximation determination by simple calculation of whether or not the ratio ( ⁇ ) of the lengths of the long side and the short side corresponding to the divided path is larger than a predetermined value (for example, 2).
  • the curve drawing apparatus always approximates the shorter one of the partial contour lines corresponding to the divided path (hereinafter referred to as “short partial contour line”) with one line segment,
  • short partial contour line the partial contour lines corresponding to the divided path
  • each divided path is a smooth curve when the approximate curve approximated by one line segment is displayed on the display device for the short partial contour corresponding to the divided path. Is divided into lengths that are visible.
  • ⁇ in FIG. 1 represents the ratio of the length of the long side to the short side for each of the divided paths.
  • the ratio ⁇ of the long side (L11) and the short side (L21) corresponding to the divided path D1 is 1.2. Therefore, the curve drawing apparatus determines that ⁇ is 2 or less, and approximates the longer partial contour line O11 of the partial contour lines O11 and O21 corresponding to the divided path D1 to L11 which is one line segment. To do.
  • is 2 or less, so the curve drawing apparatus approximates the long partial outline corresponding to each divided path with one line segment.
  • the curve drawing apparatus determines that the ratio ⁇ of the lengths of the long side (L14) and the short side (L24) is 3, which is larger than 2. Therefore, the curve drawing apparatus approximates O14, which is the longer one of the partial contour lines O14 and O24 corresponding to the division path D4, with an approximate line A14 formed by connecting a plurality of line segments. Also for the divided path D5, the curve drawing apparatus determines that the ratio ⁇ of the length of the long side (L15) to the short side (L25) is 3.2 and is larger than the predetermined value 2.
  • FIG. 2 is a block diagram showing a configuration of the curve drawing apparatus 1 according to an embodiment of the present invention.
  • the curve drawing device 1 includes a path dividing unit 10, a tangent vector calculating unit 11, a contour point calculating unit 12, a determining unit 13, a contour approximate line generating unit 14, a division coefficient determining unit 15, a curve forming unit 16, and a drawing unit 17. Consists of including.
  • the path dividing unit 10 acquires, as inputs, path information representing a path that is a center line of a curve to be drawn and line width information representing a line width of the curve to be drawn.
  • the path information is represented by a coordinate sequence of end points and control points of a cubic Bezier curve.
  • the path dividing unit 10 When acquiring the path information, the path dividing unit 10 generates a divided path by dividing the path into a predetermined length. At this time, the path dividing unit 10 holds division points that divide the path into predetermined lengths.
  • division points, straight lines, points on the curve, and other points are expressed in a coordinate format such as (x coordinate, y coordinate). It may be expressed in the form of Hereinafter, “calculating the coordinates of a point on the coordinate axis” is expressed as “calculating a point” for convenience.
  • the tangent vector calculation unit 11 calculates a tangent (represented by a tangent vector) and a normal (represented by a normal vector) for the path at each division point calculated by the path division unit 10.
  • the contour point calculation unit 12 calculates a contour point corresponding to each division point.
  • the contour point is a point separated from the dividing point by a half width along the normal vector of the path at the dividing point. That is, there are two contour points corresponding to one division point.
  • FIG. 3 is a diagram schematically showing a part of a curve to be drawn (hereinafter referred to as a partial curve), and is an enlarged part of FIG.
  • symbol is attached
  • the contours of the partial curves are the contour line 102 and the contour line 103.
  • a path 101 indicates a partial curve path.
  • the division points P4 to P7 indicate the division points that divide the path 101.
  • the division path D4 indicates a division path in which the path 101 is divided by division points P4 and P5.
  • the division path D5 and the division path D6 indicate a division path in which the path 101 is divided by division points P5 and P6, and a division path in which the path 101 is divided by division points P6 and P7, respectively.
  • the segments 131 to 133 are line segments connecting adjacent division points P4 and P5, line segments connecting division points P5 and P6, and line segments connecting division points P6 and P7. .
  • a line segment connecting two division points is referred to as a “segment”.
  • the tangent vector 141 indicates a tangent vector at the dividing point P5 for the path 101.
  • the tangent vector 142 indicates a tangent vector at the dividing point P6 for the path 101.
  • the direction of the tangent vector at each division point is defined to match the direction from the start point to the end point of the path.
  • the start point is a dividing point P4 and the end point is a dividing point P7.
  • the tangent vector at each division point is a unit vector having a size of 1.
  • Normal vectors 151 and 152 indicate normal vectors at the dividing point P5 for the path 101.
  • the normal vectors 153 and 154 indicate normal vectors at the dividing point P6 for the path 101.
  • the normal vector at each division point is a unit vector having a size of one.
  • the contour point 162 and the contour point 172 are contour points that are separated from each other by half width in the two directions of the normal vector 151 and the normal vector 152 along the normal line from the dividing point P5.
  • the “contour point separated from the division point by a half width along the normal” is hereinafter referred to as “contour point corresponding to the division point”.
  • the contour points corresponding to the dividing point P4 are the contour point 161 and the contour point 171
  • the contour points corresponding to the dividing point P6 are the contour point 163 and the contour point 173.
  • Contour points corresponding to the point P7 are a contour point 164 and a contour point 174.
  • Each contour point is a point on one of the contour line 102 and the contour line 103.
  • the determination unit 13 determines whether the contour point calculated by the contour point calculation unit 12 is approximated between two adjacent contour points by the first linear approximation method or the second linear approximation method. This determination is made for each divided path. Specifically, the determination unit 13 first selects two division points that are end points of the division path (for example, division points P5 and P6 in FIG. 3). Next, the determination unit 13 is on the same side of the four contour points (contour points 162, 172, 163, and 173 as examples) corresponding to the two selected division points with respect to a straight line passing through the two division points. Distance between the contour points of each set (corresponding to the length of L15 and L25). ) Respectively.
  • the line segment connecting the longer contour points of the two calculated distances is the aforementioned long side (L15 as an example), and the line segment connecting the shorter contour points is the aforementioned short side ( An example is L25).
  • the determination unit 13 determines whether or not the ratio of the calculated two distances, that is, the ratio of the length of the long side to the short side is greater than a predetermined value.
  • the predetermined value is 2 as an example.
  • the calculated ratio is a ratio of the long side to the short side, and is always 1 or more.
  • the second straight line approximation method is used, assuming that further linear approximation is necessary, and when it is determined that the calculated ratio is equal to or less than the predetermined value, It is determined that a further straight line approximation is unnecessary and the first straight line approximation method is used.
  • the first straight line approximation method is a method of connecting two adjacent contour points with one line segment. As described above, the long partial contour is approximated by either the first linear approximation method or the second linear approximation method, but the short partial contour is always determined by the first linear approximation method. Approximate.
  • the contour approximation line generation unit 14 approximates the long partial contour line by the first linear approximation method when the determination unit 13 determines that the ratio of the length of the long side to the short side is equal to or less than a predetermined value. .
  • the contour approximation connecting the contour point 162 and the contour point 163 between the contour point 162 and the contour point 163 is performed. It is approximated by a line L15.
  • the curve forming unit 16 When the determination unit 13 determines that the ratio of the length of the long side to the short side is greater than a predetermined value, the curve forming unit 16 performs an approximation operation on the long partial contour line.
  • the contour approximated line generation unit 14 approximates the long partial contour line with a plurality of line segments using the result of calculation by the curve forming unit 16.
  • the division coefficient determination unit 15 determines how many line segments the long partial outline is approximated when the determination unit 13 determines that the ratio of the length of the long side to the short side is greater than a predetermined value.
  • a division coefficient d which is a coefficient is determined.
  • the long partial outline is approximated by 2 (d + 1) line segments.
  • the division coefficient d is calculated by the following equation as an example.
  • floor (x) represents the maximum integer that is less than or equal to the real number x.
  • the curve forming unit 16 approximates the long partial outline by the second linear approximation method when the determination unit 13 determines that the ratio of the length of the long side to the short side is greater than a predetermined value.
  • the curve forming unit 16 includes a sub-contour point calculation unit 20, a tangent vector calculation unit 21, an intersection calculation unit 22, and an intersection vector calculation unit 23.
  • the description of each configuration of the curve forming unit 16 will be made while explaining the second linear approximation method supplementarily using FIG. 4 for convenience of explanation.
  • FIG. 4 is a diagram illustrating the approximate curve generated by the curve forming unit.
  • the points a 0 and b 0 in FIG. 4 indicate the end points of the long partial outline that is the target of the approximation process.
  • the points a 0 and b 0 correspond to the contour points 162 and 163 in FIG. 3
  • the line segment connecting the points a 0 and b 0 corresponds to L15, which is the long side to be approximated. To do
  • the sub-contour point calculation unit 20 calculates sub-contour points a n and b n using the following equations 2 and 3.
  • the sub-contour points a n and b n are points that are end points of line segments when the contour points a 0 and b 0 are approximated by a plurality of line segments.
  • a n a n-1 +2 n-1-d (c n-1 -a n-1 ) (Formula 2)
  • b n b n-1 +2 n-1-d (c n-1 -b n-1 ) (Formula 3)
  • n 0, the contour points a 0 and b 0 are given as the initial values as described above, and the calculation using the equations 2 and 3 is not performed.
  • the intersection c n (or c n-1 ) will be described later.
  • (B) tangent vector s n, calculated tangent vector calculation unit 21 of t n is, using equations 4 and 5 below, the sub-contour points tangent vector at a n s n, and the tangent vector t at sub contour point b n Calculate n .
  • the tangent vectors s n and t n are used to calculate an intersection c n described later.
  • s n 2 ⁇ d ⁇ (2 d ⁇ (n ⁇ 1) ⁇ 1) u n ⁇ 1 + s n ⁇ 1 ) ⁇ (Formula 4)
  • t n 2 ⁇ d ⁇ (2 d ⁇ (n ⁇ 1) ⁇ 1) ( ⁇ u n ⁇ 1 ) + t n ⁇ 1 ) ⁇ (Formula 5)
  • the vector ( ⁇ u n ⁇ 1 ) in Expression 5 indicates a vector whose direction is reversed with respect to an intersection vector u n ⁇ 1 described later.
  • tangent vector for t n is used referred to as "tangent vector” but does not have a significance as a tangent in the secondary contour point a n, b n. However, since it is calculated from a recurrence formula with tangent vectors s 0 and t 0 as initial values, the term “tangent vector” is used for convenience.
  • intersection calculation unit 22 of intersection c n calculates a straight line extending tangent vector s n direction a n as a base point, an intersection point c n of a straight line extending tangent vector t n direction b n as a base point .
  • intersection vector u n calculated intersection vector calculating unit 23, using equation 6 below, the vector u n (hereinafter, referred to as "intersection vector”.) At the intersection c n is calculated.
  • Equation 6 the vector ( ⁇ t n ) is a vector obtained by inverting the direction with respect to the tangent vector t n .
  • the drawing unit 17 fills an approximate curve that approximates the contour line 102 generated by the contour approximate line generation unit 14 and an area between the approximate curve that approximates the contour line 103 and displays the region on a display or the like. ⁇ 1-3. Operation> Hereinafter, the approximation process by the curve drawing apparatus 1 configured as described above will be described.
  • FIG. 5 is a flowchart showing the procedure of the approximation process.
  • the path dividing unit 10 acquires path information and line width information as input (S10).
  • the path dividing unit 10 calculates a dividing point for dividing the path represented by the input path information into a predetermined length (S11).
  • the tangent vector calculation unit 11 calculates a tangent vector and a normal vector for the path at each division point calculated by the path division unit 10 (S12).
  • the contour point calculation unit 12 calculates, for each division point calculated by the path division unit 10, a contour point that is separated from the division point by a half width (S13).
  • the determination unit 13 selects two adjacent dividing points among all the dividing points calculated by the path dividing unit 10 (S14), and 2 for the four contour points corresponding to the selected two dividing points.
  • a distance between contour points on the same side with respect to the divided path divided by the two divided points is calculated (S15). Then, the determination unit 13 calculates a ratio of the calculated distances between the contour points, and determines whether the calculated ratio is greater than a predetermined value (S16). When the calculated ratio is larger than the predetermined value (YES in S16), a process of approximating the long partial outline by the second linear approximation method is performed (S17), and when the ratio is equal to or smaller than the predetermined value (NO in S16), The long partial outline is approximated by the first straight line approximation method (S18). Details of S17 will be described later with reference to FIG.
  • the determination unit 13 determines whether or not the basic approximation calculation has been performed for all adjacent pairs of division points (S19). If not (NO in S19), the process proceeds to S14. On the other hand, when the basic approximation calculation is completed for all the groups of adjacent dividing points (YES in S19), the drawing unit 17 generates and draws an approximate curve by painting the area sandwiched between the approximated contour lines. (S20).
  • FIG. 6 is a diagram showing an approximation process by the second linear approximation method corresponding to S17 of FIG.
  • the control unit of the curve forming unit 16 initializes the variable n with an initial value 0 (S51).
  • the intersection calculation unit 22 includes the contour points a 0 and b 0 calculated by the contour point calculation unit 12 and the tangent vectors s 0 and t 0 at the contour points a 0 and b 0 calculated by the tangent vector calculation unit 11. It is used to calculate the intersection point c 0 (S52). Then, the intersection vector calculation unit 23 calculates the intersection vector u 0 (S53).
  • the control unit of the curve forming unit 16 determines whether (n + 1) is larger than d (S54). If not larger (NO in S54), 1 is added to n (S55).
  • the sub-contour point calculation unit 20 calculates sub-contour points a n and b n using Equations 2 and 3 (S56).
  • the tangent vector calculating section 21 the tangent vector s n in the sub-contour point a n, b n using Equation 4 and Equation 5, to calculate the t n (S57).
  • intersection calculation unit 22 calculates a straight line extending tangent vector s n direction a n as a base point, an intersection point c n of both linear (S58).
  • the intersection vector calculating unit 23 using Equation 6 to calculate the intersection point vector u n at the intersection c n (S59).
  • each contour point and sub-contour points a 0 , a 1 , a 2 , a in the approximate curve a 0 -a 1 -a 2 -a 3 -c 3 -b 3 -b 2 -b 1 -b 0 3 , c 3 , b 3 , b 2 , b 1 , b 0 are held (S60).
  • the contour points a 0 and b 0 and the tangent vectors s 0 and t 0 are known before entering the approximation process.
  • c 0 is calculated by the intersection calculation unit 22, and in S53, the intersection vector u 0 is calculated by the intersection vector calculation unit 23.
  • the sub-contour point calculation unit 20 calculates sub-contour points a 1 and b 1 .
  • the tangent vector calculation unit 21 calculates the tangent vectors s 1 and t 1 .
  • the intersection calculation unit 22 calculates the intersection point c 1.
  • the intersection vector calculation unit 23 calculates the intersection vector u 1 .
  • the sub-contour point calculation unit 20 calculates sub-contour points a 2 and b 2 .
  • the tangent vector calculation unit 21 calculates tangent vectors s 2 and t 2 .
  • the intersection calculation unit 22 calculates the intersection point c 2.
  • the intersection vector calculation unit 23 calculates the intersection point vector u 2.
  • the sub-contour point calculation unit 20 calculates sub-contour points a 3 and b 3 .
  • the tangent vector calculation unit 21 calculates tangent vectors s 3 and t 3 .
  • the intersection calculation unit 22 calculates the intersection point c 3.
  • the intersection vector calculation unit 23 calculates the intersection vector u 3 .
  • the path dividing unit 10 divides a path into a predetermined length.
  • the path dividing unit 10 is not limited to the predetermined length, and it is sufficient that the path is divided into units suitable for approximation processing.
  • the division length may be determined in consideration of the balance between the reduction in calculation load required for the approximation processing and the reproducibility of the curve to be drawn based on the approximation processing result. Specifically, in the vicinity of the inflection point of the path, it may be divided more finely than other parts, or the length of the divided path may be reduced by increasing the length of the divided path as the path is closer to a straight line. It may be uniform, or the portion where the path is a straight line may not be divided.
  • the determination unit 13 determines whether or not the long partial contour line is approximated by more line segments depending on whether the ratio of the length of the long side to the short side is greater than a predetermined value. However, it is sufficient if it is possible to determine whether or not the degree of deviation between the lengths of the long side and the short side is equal to or greater than a certain level. For example, four separation points are calculated along each normal of a path passing through two adjacent division points, and separated from each division point by a predetermined distance that is not half the line width as in the above embodiment.
  • the determination unit 13 determines whether or not the ratio of the length of the long side to the short side is larger than the predetermined value, but until the ratio of the long side to the short side is calculated.
  • the division coefficient d is determined by Equation 1, but is not limited to this, and may be a fixed value, or a display curve for displaying the computing capability of the apparatus and an approximate curve.
  • the determination unit 13 determines whether the ratio of the length of the long side to the short side is larger than the predetermined value, the predetermined value is set to 2 as an example. Rather than those, appropriate values corresponding to the reproducibility of the curve required for approximation, the curve display capability of the display for displaying the approximate curve, the calculation capability of the curve drawing device, etc. are calculated and used in advance by simulation etc. It is good as well.
  • the determination unit 13 does not make a determination about a case where normals passing through two adjacent division points intersect each other between the division points and the contour points. In such a unique case where an intersection occurs, a process separate from the case where no intersection occurs may be performed. Specifically, among the partial outlines, the one that is not on the same side as the point that intersects the segment that passes through the two division points (corresponding to the long side) is approximated by a plurality of curves, and the two division points are The side on the same side as the point intersecting the passing segment (corresponding to the short side) may not be approximated.
  • the path information represents, as an example, a path using a coordinate sequence of each control point of a cubic Bezier curve, but is not limited to this expression. Anything that can express (9)
  • Such a recording medium includes an IC card, a hard disk, an optical disk, a flexible disk, a ROM, a flash memory, and the like.
  • the distributed and distributed control program is used by being stored in a memory or the like that can be read by the processor, and the processor executes the control program to realize each function as shown in each embodiment. Will come to be.
  • the processor may be compiled and executed or executed by an interpreter.
  • Each functional component may be realized as a circuit that executes the function, or may be realized by executing a program by one or a plurality of processors.
  • Each functional component described above is typically realized as an LSI that is an integrated circuit. These may be individually made into one chip, or may be made into one chip so as to include a part or all of them.
  • the name used here is LSI, but it may also be called IC, system LSI, super LSI, or ultra LSI depending on the degree of integration.
  • the method of circuit integration is not limited to LSI's, and implementation using dedicated circuitry or general purpose processors is also possible.
  • An FPGA Field Programmable Gate Array
  • a reconfigurable processor that can reconfigure the connection and setting of circuit cells inside the LSI may be used.
  • integrated circuit technology comes out to replace LSI's as a result of the advancement of semiconductor technology or a derivative other technology, it is naturally also possible to carry out function block integration using this technology. Biotechnology can be applied.
  • (11) The above-described embodiments and modifications may be partially combined. ⁇ 3. Supplement>
  • the configuration of the curve drawing device as one embodiment of the present invention, and its modifications and effects will be described.
  • a curve drawing apparatus is a curve drawing apparatus that linearly approximates a contour line of a curve having a width defined by a center line and a line width, and divides the center line.
  • Division point calculation means for calculating a plurality of division points on the center line, and for each of the division points, two separation points that are equidistant from the division point along the normal line of the center line passing through the division point are calculated.
  • each separation point calculating means and the four separation points calculated for two adjacent division points For each of the separation points calculating means and the four separation points calculated for two adjacent division points, each separation point on the same side with respect to a straight line passing through the two division points A distance calculating means for calculating a distance between each pair of separation points; and a ratio of the two distances based on a shorter one of the two calculated distances; and whether the ratio is greater than a predetermined value.
  • the separation point calculating means may calculate a point separated from the division point by half of the line width as two separation points that are equidistant from the division point.
  • the separation point is a point on the contour line, that is, the end point of the partial contour line and the separation point coincide with each other, the process of separately calculating the end point of the partial contour line can be omitted.
  • the curve forming means approximates the shorter one of the partial contour lines by one line segment, and the dividing point calculating means is shorter of the partial contour lines when dividing the center line. It is also possible to divide so that one line segment approximating the direction becomes a predetermined length or less.
  • the curve forming unit may determine the number of line segments used for the approximation according to the ratio calculated by the determining unit. Good.
  • the partial contour line can be approximated by a line segment having an appropriate number of divisions according to the ratio.
  • both end points of the partial contour are set as points a 0 and b 0 , and a vector s 0 is set as the center line a tangent vector at the division point corresponding to the point a 0, the vector t 0, the center line, the tangent vector at the division point corresponding to the point b 0, the point c 0, the vector s 0 as a base point to the point a 0
  • an approximate curve that approximates a partial contour line by a plurality of line segments can be calculated from a simple recurrence formula. (6)
  • the curve forming unit does not depend on the determination result by the determination unit, but the straight line passing through the two division points.
  • a partial contour line that is not on the same side as the intersecting point may be approximated by a plurality of curves.
  • a curve drawing method is defined by a center line and a line width including a dividing point calculating unit, a separation point calculating unit, a distance calculating unit, a determining unit, and a curve forming unit.
  • a dividing point calculating step and the separation point calculating means calculate, for each of the dividing points, two separating points that are equidistant from the dividing point along a normal line of the center line passing through the dividing point.
  • the step and the distance calculation means set the four separation points calculated for two adjacent division points as a pair of separation points on the same side with respect to a straight line passing through the two division points .
  • Separation points for each pair A distance calculating step for calculating the distance between the two distances, and the determination means calculates a ratio of the two distances based on a shorter one of the two calculated distances, and whether the ratio is larger than a predetermined value.
  • a curve drawing program is a curve drawing for causing a computer to function as a curve drawing device that linearly approximates a contour line of a curve having a width defined by a center line and a line width.
  • a separation point calculating means for calculating two separation points that are equidistant from the dividing point along the four separation points calculated for two adjacent dividing points with respect to a straight line passing through the two dividing points
  • a distance calculation means for calculating the distance between each pair of separation points when the separation points on the same side are a pair, and the shorter one of the two calculated distances as a reference Calculating a ratio of two distances, and determining means for determining whether or not the ratio is greater than a predetermined value; and when the ratio is determined to be greater than a predetermined value;
  • An integrated circuit is an integrated circuit used in a curve drawing device that linearly approximates a contour line of a curve having a width, which is defined by a center line and a line width.
  • Dividing point calculating means for calculating a plurality of dividing points on the center line for dividing the line, and for each of the dividing points, two equal distances from the dividing point along the normal line of the center line passing through the dividing point.
  • the separation point calculation means for calculating the separation point and the four separation points calculated for the two adjacent division points the separation points on the same side with respect to the straight line passing through the two division points are paired.
  • a distance calculation means for calculating the distance between each set of separation points, and a ratio of the two distances based on the shorter of the two calculated distances, and the ratio is a predetermined value Judgment whether or not it is larger And when the ratio is determined to be greater than a predetermined value, the longer one of the partial contour lines that are sandwiched between the normal lines passing through the two division points in the contour line is selected from the shorter one. And curve forming means for approximating with many line segments.
  • the curve drawing apparatus calculates outlines of character fonts, figures, etc. using a simple method with a lower calculation load than before, and displays such character fonts, figures, etc. on a display. It is suitable for an apparatus such as an information processing terminal.

Abstract

 本発明は、曲線近似結果に対し更なる近似処理の要否を、従来よりも簡素な手法で判断できる曲線描画装置を提供する。曲線描画装置1は、中心線及び線幅で規定される曲線の輪郭線を直線近似するものであり、中心線を分割する中心線上の複数の分割点を算出するパス分割部10と、分割点を通り中心線の法線に沿い分割点から等距離にある2つの離隔点を算出する輪郭点算出部12と、隣り合う2つの分割点について算出された4つの離隔点について、2つの分割点を通る直線に対して同側にある2つの離隔点間の距離をそれぞれ算出し、2つの距離についての短い方を基準とした場合の比が所定値より大きいか否かを判定する判断部13と、比が所定値より大きいと判定された場合に、輪郭線において2つの分割点それぞれを通る法線に挟まれた部分である部分輪郭線のうち長い方を、短い方よりも多くの線分で近似する曲線形成部16を備える。

Description

曲線描画装置、曲線描画方法、曲線描画プログラム及び集積回路
 本発明は、文字、図形等の輪郭線の曲線部分を複数の線分で近似して描画する曲線描画技術に関する。
 近年、フォントなどの文字や、図形等における曲線部分の描画には、その輪郭線の曲線部分を複数の線分で近似して、線分で表した輪郭の内側を塗りつぶすなどの処理を含むベクターグラフィックス技術が用いられる。この技術により近似された文字、図形の品位は、近似に用いられた線分同士の結合部分(以下、エッジという)の滑らかさに左右される。よって、近似処理を一通り行った結果、エッジに滑らかさが不足している場合には、このエッジに膨らみをつけるように、更に線分を用いて更に近似を行うことになる。このように、エッジについての更なる近似の要否判断は、エッジ毎に行われるものであり実行頻度の高い処理といえる。この近似の要否判断に関しては、特許文献1に、エッジを構成する2線分の成す角度が、経験則により導き出された所定条件を満たすか否かによって更なる近似の要否判断を行う技術が開示されている。
特開平4-174494号公報
 ところで、比較的演算能力の限られた情報処理端末などにおいても、近年のディスプレイ表示能力の向上からベクターグラフィック技術によって文字、図形が描画されるようになってきている。このようなグラフィック処理は、計算負荷が高い上、処理遅れが生じた場合に、ユーザに対し視覚的に違和感を覚えさせやすい処理といえる。よって、上述した近似の要否判断についても、比較的演算能力が限られていても処理遅れが生じないよう、計算負荷の低い簡素な手法で行うことが求められる。
 しかしながら、上述の技術では、近似の要否判断はできるものの、各エッジを構成する2線分の角度を計算する必要があり、角度を計算するには逆三角関数など複雑な演算を行う必要があるという問題がある。
 上記課題に鑑み、本発明は、更なる近似の要否を、従来よりも計算負荷の低い簡素な手法で判断する曲線描画装置を提供することを目的とする。
 上記課題を解決するために、本発明は、中心線及び線幅で規定される、幅を有する曲線の輪郭線を直線近似する曲線描画装置であって、前記中心線を分割する前記中心線上の複数の分割点を算出する分割点算出手段と、前記分割点それぞれについて、当該分割点を通る前記中心線の法線に沿い当該分割点から等距離にある2つの離隔点を算出する離隔点算出手段と、隣り合う2つの分割点について算出された前記4つの離隔点について、当該2つの分割点を通る直線に対して同側にある離隔点同士を組とした場合の、各組の離隔点間の距離をそれぞれ算出する距離算出手段と、前記算出された2つの距離のうち短い方を基準とした当該2つの距離の比を算出し、当該比が所定値より大きいか否かを判定する判定手段と、前記比が所定値より大きいと判定された場合に、前記輪郭線において前記2つの分割点それぞれを通る法線に挟まれた部分である部分輪郭線のうち長い方を、短い方よりも多くの線分で近似する曲線形成手段とを備える。
 本発明の曲線描画装置は、上述の構成を備えることにより、部分輪郭線のうち長い方を、短い方よりも多くの線分で近似するか否かを、離隔点間の2つの距離を比較するという従来よりも計算負荷の低い簡素な手法によって判断することができる。
本発明の一実施の形態に係る、描画すべき曲線の一部分を模式的に表した図 本発明の一実施の形態に係る曲線描画装置の構成を示すブロック図 本発明の一実施の形態に係る、図1の曲線の一部分を更に拡大した図 本発明の一実施の形態に係る、曲線形成部により生成される近似曲線を示す図 本発明の一実施の形態に係る、近似処理を示すフローチャート 本発明の一実施の形態に係る第2の直線近似手法による近似処理を示すフローチャート 本発明の一実施の形態に係る、n=0の場合における基本近似演算終了後の近似曲線について説明するための図 本発明の一実施の形態に係る、n=1の場合における基本近似演算終了後の近似曲線について説明するための図 本発明の一実施の形態に係る、n=2の場合における基本近似演算終了後の近似曲線について説明するための図
 以下、本発明の一実施の形態について、図面を参照しながら説明する。
<1.実施の形態1>
<1-1.概要>
 本発明の一実施の態様である曲線描画装置は、幅を有する曲線について、その曲線の輪郭線を複数の線分で近似して描画する装置である。描画すべき曲線について曲線描画装置に対し与えられる情報は、(a)描画すべき曲線の中心線であるパスを表すパス情報、及び(b)描画すべき曲線の線幅を表す線幅情報である。
 図1は、描画すべき曲線の一部分を模式的に表した図である。図中、輪郭線102及び103が描画すべき曲線の輪郭線を示しており、パス101が描画すべき曲線の中心線であるパスを示している。輪郭線102とパスとは描画すべき曲線の線幅の半分(以下、半幅という。)だけ離隔し、輪郭線103とパスとは半幅だけ離隔している。
 曲線描画装置は、近似処理を行う場合、まずパスを所定長に区切ることにより分割パス(図中D1~D7)を生成する。曲線描画装置は、この分割パス単位で近似処理を行う。次に、曲線描画装置は、分割パスの端点(分割点P1~P8)それぞれにおけるパスの法線(法線N1~N8)を算出する。これらの法線は、図に示すように輪郭線を区切っている。以下、輪郭線において、法線により区切られた部分のそれぞれを「部分輪郭線」(図中O11~O17、O21~O27)という。ここで、部分輪郭線のうち、ある分割パスの両端点を通る法線により区切られているもの(以下、「分割パスに対応する部分輪郭線」という。)は、分割パスを挟んで2つ存在する。例えば、分割パスD5に対応する部分輪郭線は、O15とO25の2つである。ここで、2つの部分輪郭線それぞれについて、部分輪郭線の端点同士を結んだ線分のうち、長い方を「長辺」といい、短い方を「短辺」という。
 曲線描画装置は、分割パス毎に、分割パスに対応する部分輪郭線のうち長い方(以下、「長部分輪郭線」という。)について、複数の線分を用いて曲線近似するか、部分輪郭線の端点を結ぶ1本の線分で近似するかの判断(以下、「近似判断」ともいう。)を行う。曲線描画装置は、この近似判断を、分割パスに対応する長辺と短辺の長さの比(α)が所定値(一例として2)より大きいか否かという簡易な計算により行う。なお、本実施の形態では、曲線描画装置は、分割パスに対応する部分輪郭線のうち短い方(以下、「短部分輪郭線」という。)については常に1本の線分で近似し、近似処理に係る演算負荷を低減している。このようにするために、各分割パスは、分割パスに対応する短部分輪郭線については1本の線分で近似した近似曲線が表示デバイスに表示等したときに、スムーズな曲線であるとユーザにより視認される程度の長さに区切られている。
 ここで、図1を用い、上述の近似判断に関する補足説明を行う。図1中のαは、分割パスそれぞれについての長辺と短辺の長さの比を表している。例えば、分割パスD1に対応する長辺(L11)と短辺(L21)の比αは1.2である。よって、曲線描画装置は、αが2以下であると判断し、分割パスD1に対応する部分輪郭線O11、O21のうち長い方である部分輪郭線O11を1本の線分であるL11で近似する。分割パスD2~D3、D6~D7についても同様にαが2以下であると判断するので、曲線描画装置は、各分割パスに対応する長部分輪郭線を1本の線分で近似する。
 一方、分割パスD4については、曲線描画装置は、長辺(L14)と短辺(L24)の長さの比αが3であり、2より大きいと判断する。よって、曲線描画装置は、分割パスD4に対応する部分輪郭線O14、O24のうち長い方であるO14を、複数の線分が連結して成る近似線A14で近似する。また分割パスD5についても、曲線描画装置は、長辺(L15)と短辺(L25)の長さの比αが3.2であり所定値2より大きいと判断する。よって、曲線描画装置は、分割パスD5に対応する部分輪郭線O15、O25のうち長い方を、複数の線分が連結して成る近似線A15で近似する。以上の処理によって、曲線描画装置は、輪郭線102を近似する近似曲線として、L11、L12、L13、A14、A15、L16、及びL17が連結してなる近似曲線を生成する。また、輪郭線103を近似する近似曲線として、L21、L22、L23、L24、L25、L26、及びL27が連結してなる近似曲線を生成する。以下、曲線描画装置について詳細に説明する。
<1-2.構成>
 図2は、本発明の一実施の態様である曲線描画装置1の構成を示すブロック図である。曲線描画装置1は、パス分割部10、接線ベクトル算出部11、輪郭点算出部12、判断部13、輪郭近似線生成部14、分割係数決定部15、曲線形成部16、及び描画部17を含んで構成される。
 パス分割部10は、入力として、描画すべき曲線の中心線であるパスを表すパス情報、及び描画すべき曲線の線幅を表す線幅情報を取得する。パス情報は、一例として、3次ベジェ曲線の端点と制御点の座標列などで表現される。パス分割部10は、パス情報を取得するとパスを所定長に区切ることにより分割パスを生成する。このとき、パス分割部10は、パスを所定長に区切る分割点を保持しておく。なお、本実施の形態では、曲線描画装置1において、分割点、直線及び曲線上の点、その他の点については(x座標,y座標)のような座標形式で表現するものとするが、他の形式で表現してもよい。また、以下では「座標軸上の点の座標を算出する」ことを便宜上「点を算出する」と表現する。
 接線ベクトル算出部11は、パス分割部10により算出された各分割点における、パスについての接線(接線ベクトルで表す)及び法線(法線ベクトルで表す)を算出する。
 輪郭点算出部12は、各分割点に対応する輪郭点を算出する。ここで、輪郭点は、分割点から、その分割点におけるパスの法線ベクトルに沿って半幅ずつ離隔した点である。すなわち、1つの分割点に対応する輪郭点は2個存在する。
 ここで、図3を用いて、描画すべき曲線、パス、分割点、接線ベクトル、法線ベクトルなどについて具体的に説明する。図3は、描画すべき曲線の一部分(以下、部分曲線という。)を模式的に表した図であり、図1の一部を拡大したものである。なお、図3と図1とで同じものを指し示している場合には、同じ符号を付している。
 部分曲線の輪郭は、輪郭線102及び輪郭線103である。パス101は、部分曲線のパスを示している。
 分割点P4~P7は、パス101を分割する各分割点を示す。分割パスD4は、パス101が分割点P4及びP5により区切られた分割パスを示す。分割パスD5及び分割パスD6は、それぞれ、パス101が分割点P5及びP6により区切られた分割パス、パス101が分割点P6及びP7により区切られた分割パスを示す。セグメント131~133は、それぞれ、隣り合う分割点P4と分割点P5とを結ぶ線分、分割点P5と分割点P6とを結ぶ線分、分割点P6と分割点P7とを結ぶ線分である。以下、2つの分割点を結ぶ線分を「セグメント」という。
 接線ベクトル141は、パス101についての分割点P5における接線ベクトルを示す。また、接線ベクトル142は、パス101についての分割点P6における接線ベクトルを示す。ここで、各分割点における接線ベクトルの向きは、一例として、パスの始点から終点へ向かう向きに一致するものと規定する。パス101について、始点が分割点P4であり、終点が分割点P7であるとする。また、各分割点における接線ベクトルは、大きさが1の単位ベクトルである。
 法線ベクトル151及び152は、パス101についての分割点P5における法線ベクトルを示す。また、法線ベクトル153及び154は、パス101についての分割点P6における法線ベクトルを示す。ここで、各分割点における法線ベクトルは、大きさが1の単位ベクトルである。
 輪郭点162及び輪郭点172は、分割点P5から法線に沿い、即ち法線ベクトル151及び法線ベクトル152の2つの方向に、半幅ずつ離隔した輪郭点である。このように、「分割点から法線に沿って半幅離隔した輪郭点」を以下「分割点に対応する輪郭点」という。分割点P5の場合と同様に、分割点P4に対応する輪郭点が、輪郭点161及び輪郭点171であり、分割点P6に対応する輪郭点が、輪郭点163及び輪郭点173であり、分割点P7に対応する輪郭点が、輪郭点164及び輪郭点174である。なお、各輪郭点は、輪郭線102及び輪郭線103のいずれか一方の線上の点となる。ここで、図2の説明に戻る。
 判断部13は、輪郭点算出部12において算出された輪郭点について、隣り合う2つの輪郭点間を、第1の直線近似手法及び第2の直線近似手法のいずれで近似するか判断する。この判断は、分割パス毎に行う。具体的には、判断部13は、まず、分割パスの端点である2つの分割点(一例として、図3の分割点P5及びP6)を選出する。次に、判断部13は、選出した2つの分割点それぞれに対応する4つの輪郭点(一例として輪郭点162、172、163、及び173)について、2つの分割点を通る直線に対して同側にある分割点同士を組(一例として、輪郭点162と163の組、及び輪郭点172と173の組)とした場合の、各組の輪郭点間の距離(L15及びL25の長さに相当)をそれぞれ算出する。ここで、算出された2つの距離のうち長い方の輪郭点間を結ぶ線分が前述の長辺(一例としてL15)であり、短い方の輪郭点間を結ぶ線分が前述の短辺(一例としてL25)である。そして、判断部13は、算出した2つの距離の比、すなわち長辺と短辺の長さの比が所定値より大きいか否かを判定する。所定値は、一例として2とする。ここで、算出される比は、長辺の短辺に対する比であり、常に1以上となる。判断部13は、算出した比が所定値より大きいと判定した場合には、更なる直線近似が必要とみなして第2の直線近似手法を用い、所定値以下であると判定した場合には、更なる直線近似は不要とみなして第1の直線近似手法を用いると決定する。本実施の形態では、第1の直線近似手法は、隣り合う2つの輪郭点間を1本の線分で結ぶ手法とする。なお、上述の通り、長部分輪郭線については、第1の直線近似手法及び第2の直線近似手法のいずれかの手法により近似するものの、短部分輪郭線については常に第1の直線近似手法により近似する。
 輪郭近似線生成部14は、判断部13において、長辺と短辺の長さの比が所定値以下であると判断された場合に、長部分輪郭線を第1の直線近似手法により近似する。例えば、図3の輪郭点162と輪郭点163との間を第1の直線近似手法により近似する場合、輪郭点162と輪郭点163との間を、輪郭点162と輪郭点163を結ぶ輪郭近似線L15で近似することになる。
 なお、判断部13において、長辺と短辺の長さの比が所定値より大きいと判断された場合には、長部分輪郭線について曲線形成部16による近似演算が行われる。輪郭近似線生成部14は、曲線形成部16による演算の結果を用いて長部分輪郭線を複数の線分で近似することになる。
 分割係数決定部15は、判断部13において、長辺と短辺の長さの比が所定値より大きいと判断された場合に、長部分輪郭線を何本の線分で近似するかを決定づける係数である分割係数dを決定する。長部分輪郭線は、2(d+1)本の線分で近似されることになる。
 ここで、分割係数dは、一例として、下式により算出される。
 d = floor(g×長辺の長さ/短辺の長さ - f)   (式1)
 ここで、floor(x)は、実数x以下である最大の整数を表す。また、g、fは、一例としてg=0.809、f=-0.5である。
 曲線形成部16は、判断部13において長辺と短辺の長さの比が所定値より大きいと判断された場合に、長部分輪郭線を第2の直線近似手法により近似する。曲線形成部16は、図2に示すように、副輪郭点算出部20、接線ベクトル算出部21、交点算出部22、及び交点ベクトル算出部23を含んで構成される。曲線形成部16の各構成の説明は、説明の便宜上、図4を補足的に用い第2の直線近似手法について説明しつつ行う。図4は、曲線形成部により生成される近似曲線について示す図である。図4の点a0、b0が、近似処理の対象となっている長部分輪郭線の端点を示す。例えば、点a0、b0が、図3の輪郭点162及び163に相当し、点a0とb0とを結ぶ線分が、近似処理の対象となっている長辺であるL15に相当する。
 曲線形成部16は、第2の直線近似手法による近似処理として、下記(A)~(D)の演算(以下、「(A)~(D)の演算」を総称して「基本近似演算」という。)を、n=0からn=dまでのnの値それぞれについて行うことによりan、bn、cnを算出し、結果として、近似曲線a0-a1-・・・ad-cd-bd・・・-b1-b0を得る。
 (A)副輪郭点an、bnの算出
 副輪郭点算出部20が、下記の式2及び式3を用いて副輪郭点an、bnを算出する。副輪郭点an、bnは、輪郭点a0、b0間を複数の線分で近似する場合の、線分の端点となる点である。
  an = an-1+2n-1-d(cn-1-an-1)  (式2)
  bn = bn-1+2n-1-d(cn-1-bn-1)  (式3)
 但し、n=0の場合には、上述の通り輪郭点a0、b0が初期値として与えられており、式2及び式3を用いた演算は行わない。交点cn(或いはcn-1)については後述する。
 (B)接線ベクトルsn、tnの算出
 接線ベクトル算出部21が、下記の式4及び式5を用い、副輪郭点anにおける接線ベクトルsn、及び副輪郭点bnにおける接線ベクトルtnを算出する。接線ベクトルsn、tnは、後述の交点cnを算出するために用いられる。
  sn = 2-d{(2d-(n-1)-1)un-1+sn-1)}     (式4)
  tn = 2-d{(2d-(n-1)-1)(-un-1)+tn-1)}   (式5)
 ここで、式5のベクトル(-un-1)は、後述する交点ベクトルun-1について方向を逆にしたベクトルを示している。
 また、n=0の場合、a0における接線ベクトルs0として、a0に対応する分割点における接線ベクトルが用いられる。そして、b0における接線ベクトルt0として、b0に対応する分割点における接線ベクトルの向きを逆にしたベクトルが用いられる。よって、n=0の場合には、式4及び式5を用いた演算は行わない。
 なお、接線ベクトルsn、tnについては、「接線ベクトル」との称呼を用いているが、副輪郭点an、bnにおける接線としての意義を有するものではない。しかし、接線ベクトルs0、t0を初期値とした漸化式から算出されていることから便宜上「接線ベクトル」との称呼を用いている。
 (C)交点cnの算出
 交点算出部22が、anを基点として接線ベクトルsn方向に伸びる直線と、bnを基点として接線ベクトルtn方向に伸びる直線との交点cnを算出する。
 (D)交点ベクトルunの算出
 交点ベクトル算出部23が、下記の式6を用い、交点cnにおけるベクトルun(以下、「交点ベクトル」という。)を算出する。
  un = sn + (-tn)     (式6)
 式6において、ベクトル(-tn)は、接線ベクトルtnについて方向を反転させたベクトルである。
 描画部17は、輪郭近似線生成部14により生成された輪郭線102を近似する近似曲線、及び輪郭線103を近似する近似曲線に挟まれた領域を塗り潰して、ディスプレイ等に表示する。
<1-3.動作>
 以下、上述のように構成された曲線描画装置1による近似処理について説明する。
 図5は、近似処理の手順を示すフローチャートである。
 まず、パス分割部10は、入力としてパス情報及び線幅情報を取得する(S10)。パス分割部10は、入力されたパス情報により表されるパスを所定長に分割する分割点を算出する(S11)。次に、接線ベクトル算出部11は、パス分割部10により算出された各分割点におけるパスについての接線ベクトル及び法線ベクトルを算出する(S12)。そして、輪郭点算出部12が、パス分割部10において算出された各分割点について、その分割点から半幅ずつ離隔した輪郭点を算出する(S13)。そして、判断部13は、パス分割部10により算出された全分割点のうち、隣り合う2つの分割点を選出し(S14)、選出した2つの分割点に対応する4つの輪郭点について、2つの分割点で区切られた分割パスに対し同じ側にある輪郭点間の距離(輪郭点同士を結ぶ輪郭近似線の長さに等しい。)を算出する(S15)。そして、判断部13は、算出した輪郭点間の距離の比を算出し、算出した比が所定値より大きいか否かを判定する(S16)。算出された比が所定値より大きい場合(S16でYES)、長部分輪郭線を第2の直線近似手法により近似する処理を行い(S17)、比が所定値以下の場合(S16でNO)、長部分輪郭線を第1の直線近似手法により近似する(S18)。S17の詳細は、後に図6を用いて説明する。そして、判断部13は、隣り合う分割点の組の全てについて、基本近似演算を行ったか否かを判定し(S19)、行っていない場合(S19でNO)、S14に進む。一方、隣り合う分割点の組の全てについて、基本近似演算を完了した場合(S19でYES)、描画部17が、近似された輪郭線で挟まれた領域を塗りつぶすことにより近似曲線を生成し描画する(S20)。
 図6は、図5のS17に相当する第2の直線近似手法による近似処理を示す図である。
 まず、曲線形成部16の制御部が変数nを初期値0で初期化する(S51)。次に、交点算出部22は、輪郭点算出部12により算出された輪郭点a0、b0、接線ベクトル算出部11により算出された輪郭点a0、b0における接線ベクトルs0、t0を用いて、交点c0を算出する(S52)。そして、交点ベクトル算出部23が、交点ベクトルu0を算出する(S53)。
 曲線形成部16の制御部は、(n+1)がdより大きいか否かを判定し(S54)、大きくない場合(S54でNO)、nに1を加算する(S55)。次に、副輪郭点算出部20は、式2及び式3を用いて副輪郭点an、bnを算出する(S56)。そして、接線ベクトル算出部21が、式4及び式5を用いて副輪郭点an、bnにおける接線ベクトルsn、tnを算出する(S57)。次に、交点算出部22が、anを基点として接線ベクトルsn方向に伸びる直線と、bnを基点として接線ベクトルtn方向に伸びる直線とを算出し、両直線の交点cnを算出する(S58)。そして、交点ベクトル算出部23が、式6を用い、交点cnにおける交点ベクトルunを算出する(S59)。
 また、上述のS54において、(n+1)がdより大きいと判定された場合(S54でYES)、n=0~dそれぞれについて、副輪郭点an、bn、接線ベクトルsn、tn、交点cn、交点ベクトルunが算出されており、最終的な近似曲線a0-a1-a2-a3-c3-b3-b2-b1-b0が得られる。このときの、近似曲線a0-a1-a2-a3-c3-b3-b2-b1-b0における各輪郭点及び副輪郭点a0、a1、a2、a3、c3、b3、b2、b1、b0を保持しておく(S60)。
 ここで、図6の補足説明として、nが0からd(dは説明の便宜上3であるとする。)まで増加するにつれて、近似処理により算出される点、ベクトルについて図7~9及び図4を用いて視覚的に説明する。
 図7は、n=0の場合において基本近似演算が終了した後の近似曲線を表している。輪郭点a0、b0、接線ベクトルs0、t0は、近似処理に入る前に既知である。S52において、交点算出部22によりc0が算出され、S53において、交点ベクトル算出部23により交点ベクトルu0が算出される。S54において、制御部によりn+1(=1)がdより大きくないと判定されるので(S54でNO)、S55において、制御部によりnに1が加算され、S56に進む。
 図8は、n=1の場合において基本近似演算が終了した後の近似曲線を表している。図6のn=1の場合におけるS56において、副輪郭点算出部20が、副輪郭点a1、b1を算出する。次に、S57において、接線ベクトル算出部21が、接線ベクトルs1、t1を算出する。そして、S58において、交点算出部22が、交点c1を算出する。そして、S59において、交点ベクトル算出部23が、交点ベクトルu1を算出する。そして、S54において、制御部によりn+1(=2)がdより大きくないと判定されるので(S54でNO)、S55において、制御部によりnに1が加算され、S56に進む。
 図9は、n=2の場合において基本近似演算が終了した後の近似曲線を表している。図6のn=2の場合におけるS56において、副輪郭点算出部20が、副輪郭点a2、b2を算出する。次に、S57において、接線ベクトル算出部21が、接線ベクトルs2、t2を算出する。そして、S58において、交点算出部22が、交点c2を算出する。そして、S59において、交点ベクトル算出部23が、交点ベクトルu2を算出する。そして、S54において、制御部によりn+1(=3)がdより大きくないと判定されるので(S54でNO)、S55において、制御部によりnに1が加算され、S56に進む。
 図4は、既に少し説明しているが、n=3の場合において基本近似演算が終了した後の近似曲線を表している。図6のn=3の場合におけるS56において、副輪郭点算出部20が、副輪郭点a3、b3を算出する。次に、S57において、接線ベクトル算出部21が、接線ベクトルs3、t3を算出する。そして、S58において、交点算出部22が、交点c3を算出する。そして、S59において、交点ベクトル算出部23が、交点ベクトルu3を算出する。そして、S54において、制御部によりn+1(=4)がdより大きいと判定されるので(S54でYES)、S60に進む。
 以上の処理により、最終的な近似曲線a0-a1-a2-a3-c3-b3-b2-b1-b0が算出され、近似曲線を形成する各点a0、a1、a2、a3、c3、b3、b2、b1、b0を保持する。
<2.変形例その他>
 以上、本発明に係る曲線描画装置の実施形態を説明したが、例示した曲線描画装置を以下のように変形することも可能であり、本発明が上述の実施形態で示した通りの曲線描画装置に限られないことは勿論である。
(1)上記実施形態では、パス分割部10は、パスを所定長に分割することとしたが、所定長に限らず、パスが近似処理を行うのに適した単位に分割されれば足りる。例えば、近似処理に要する演算負荷の低減と、近似処理結果による描画すべき曲線の再現性とのバランスを考慮して分割長を決定してもよい。具体的には、パスの変曲点近辺については、他の箇所よりも細かく分割することとしてもよいし、パスが直線に近いほど分割パスの長さを長くするなど分割パスの長さを不均一にしてもよいし、パスが直線である部分については分割を行わないこととするなどしてもよい。
(2)上記実施形態では、判断部13は、長部分輪郭線を更に多くの線分で近似するか否かを、長辺と短辺の長さの比が所定値より大きいか否かによって判定することとしたが、長辺と短辺の長さの乖離度が一定以上か否か判定できれば足りる。例えば、隣り合う2つの分割点を通るパスの各法線に沿い、各分割点から、上記実施形態のように線幅の半分ではない所定の距離ずつ離れて位置する4つの離隔点を算出し、分割パス(或いはセグメント)に対して同側にある離隔点同士を組とした場合の、各組の離隔点間の距離の比を算出し、この比が所定値より大きいか否かを判定することとしてもよい。また、長辺と短辺との比に代えて、長辺と短辺の比に相当する比、例えば長辺の長さとセグメントの長さとの比や、短辺の長さとセグメントの長さとの比などを用いることとしてもよい。
(3)上記実施形態では、判断部13は、長辺と短辺の長さの比が所定値より大きいか否かを判定することとしたが、長辺と短辺の比を算出するまでもなく、近似処理を行う必要がないことが明らかな場合を検出し、明らかな場合には長辺と短辺の比の算出を省略することとしてもよい。例えば、長辺と短辺の比が所定値より大きいか否かを判定するのに先立ち、長辺の長さが所定長より短いか否かを判断し、短い場合には、近似してもしなくても視覚的に区別できないとして、更なる近似は行わないと判断するなどしてもよい。
(4)上記実施の形態では、分割係数dは、式1によって決定していたが、これに限らず、固定値としてもよいし、装置の演算能力、近似曲線を表示するためのディスプレイの曲線表示能力、近似結果による描画すべき曲線の再現性等に基づいて決定する他の式を用いて決定してもよい。分割係数dを増やすほど、近似曲線は、描画すべき曲線に近づけられると考えられるものの、必要とされる演算処理能力も高くなるためである。
(5)本実施の形態では、判断部13において長辺と短辺の長さの比が所定値より大きいか否かを判定する場合に、一例として所定値を2としたが、これに限るものでは無く、近似について要求される曲線の再現性、近似曲線を表示するためのディスプレイの曲線表示能力、曲線描画装置の演算能力等に応じた適切な値を、シミュレーション等により予め算出して用いることとしてもよい。
(6)本実施の形態では、判断部13において、隣り合う2つの分割点それぞれを通る法線が、分割点と輪郭点との間で交差してしまう場合についての判断は行っていなかった。このように交差が生じるような特異な場合には、交差が生じない場合とは別個の処理を行うこととしてもよい。具体的には、部分輪郭線のうち、2つの分割点を通るセグメントに対し交差する点と同側でない方(長辺に相当)を、複数の曲線で近似することとし、2つの分割点を通るセグメントに対し交差する点と同側の方(短辺に相当)については、近似しないこととしてよい。また、2つの分割点から所定の距離ずつ離れて位置する4つの輪郭点を算出する場合に、その所定の距離をセグメントの1/2未満の長さと定めれば、上述のような交差は生じない。
(7)本実施の形態では、第2の直線近似手法による近似処理として、式1~式6などを用いた近似処理について説明したが、これらは近似処理のアルゴリズムの一例であり、長部分輪郭線を曲線近似できる他のアルゴリズムを用いてもよい。また、本実施の形態では、式2~5において2dなど2を基数とした演算をしているが、これはコンピュータの内部処理など演算の単純化を考慮したものであり、基数を2未満にすることで、結果として得られる近似曲線はより滑らかになり得る。よって、基数として2未満の数を採用することとしてもよい。また、基数として2より大きい数を採用してもよいことは言うまでもない。
(8)本実施の形態では、パス情報は、一例としてパスを3次ベジェ曲線の各制御点の座標列を用いて表現しているものとするが、この表現に限られるものではなく、曲線を表現できるものであれば足りる。
(9)上述の実施形態で示した直線近似処理等を、曲線描画装置のプロセッサ、及びそのプロセッサに接続された各種回路に実行させるための機械語或いは高級言語のプログラムコードからなる制御プログラムを、記録媒体に記録すること、又は各種通信路等を介して流通させ頒布することもできる。このような記録媒体には、ICカード、ハードディスク、光ディスク、フレキシブルディスク、ROM、フラッシュメモリ等がある。流通、頒布された制御プログラムはプロセッサに読み出され得るメモリ等に格納されることにより利用に供され、そのプロセッサがその制御プログラムを実行することにより各実施形態で示したような各機能が実現されるようになる。なお、プロセッサは、制御プログラムを直接実行する他、コンパイルして実行或いはインタプリタにより実行してもよい。
(10)上述の実施形態で示した各機能構成要素(パス分割部10、接線ベクトル算出部11、輪郭点算出部12、判断部13、輪郭近似線生成部14、分割係数決定部15、曲線形成部16、及び描画部17等)は、その機能を実行する回路として実現されてもよいし、1又は複数のプロセッサによりプログラムを実行することで実現されてもよい。なお、上述の各機能構成要素は典型的には集積回路であるLSIとして実現される。これらは個別に1チップされてもよいし、一部又は全てを含むように1チップ化されてもよい。ここでは、LSIとしたが、集積度の違いにより、IC、システムLSI、スーパーLSI、ウルトラLSIと呼称されることもある。また、集積回路化の手法はLSIに限るものではなく、専用回路又は汎用プロセッサで実現してもよい。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサを利用してもよい。更には、半導体技術の進歩又は派生する別技術によりLSIに置き換わる集積回路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積化を行ってもよい。バイオ技術の適応等が可能性としてありえる。
(11)上述の実施形態及び各変形例を、部分的に組み合せてもよい。
<3.補足>
 以下、更に本発明の一実施形態としての曲線描画装置の構成及びその変形例と効果について説明する。
(1)本発明の一実施形態に係る曲線描画装置は、中心線及び線幅で規定される、幅を有する曲線の輪郭線を直線近似する曲線描画装置であって、前記中心線を分割する前記中心線上の複数の分割点を算出する分割点算出手段と、前記分割点それぞれについて、当該分割点を通る前記中心線の法線に沿い当該分割点から等距離にある2つの離隔点を算出する離隔点算出手段と、隣り合う2つの分割点について算出された前記4つの離隔点について、当該2つの分割点を通る直線に対して同側にある離隔点同士を組とした場合の、各組の離隔点間の距離をそれぞれ算出する距離算出手段と、前記算出された2つの距離のうち短い方を基準とした当該2つの距離の比を算出し、当該比が所定値より大きいか否かを判定する判定手段と、前記比が所定値より大きいと判定された場合に、前記輪郭線において前記2つの分割点それぞれを通る法線に挟まれた部分である部分輪郭線のうち長い方を、短い方よりも多くの線分で近似する曲線形成手段とを備える。
 この構成によると、部分輪郭線のうち長い方を、短い方よりも多くの線分で近似するか否かを、離隔点間の2つの距離を比較するという従来よりも計算負荷の低い簡素な手法によって判断することができる。
(2)前記離隔点算出手段は、前記分割点から等距離にある2つの離隔点として、前記分割点から前記線幅の半分ずつ離れた点を算出することとしてもよい。
 この構成によると、離隔点は輪郭線上の点、すなわち部分輪郭線の端点と、離隔点とが一致することとなるので、部分輪郭線の端点を別途算出する処理を省略することができる。
(3)前記曲線形成手段は、前記部分輪郭線のうち短い方を1本の線分で近似し、前記分割点算出手段は、前記中心線を分割する場合に、前記部分輪郭線のうち短い方を近似する1本の線分が所定長以下になるよう分割することとしてもよい。
 この構成によると、全ての短部分輪郭線は、1本の線分で近似するという簡易な近似処理となるので、近似処理全体の処理負荷を低減することができる。
(4)前記曲線形成手段は、前記部分輪郭線のうち長い方を近似する場合に、前記近似に用いる線分の数を、前記判定手段により算出された前記比に応じて決定することとしてもよい。
 この構成によると、部分輪郭線を比に応じた適当な分割数の線分で近似することができる。
(5)前記曲線形成手段は、前記部分輪郭線のうち長い方を近似する場合に、前記部分輪郭線の両端点を点a0及び点b0とし、ベクトルs0を、前記中心線の、点a0に対応する分割点における接線ベクトルとし、ベクトルt0を、前記中心線の、点b0に対応する分割点における接線ベクトルとし、点c0を、点a0を基点としベクトルs0方向に伸びる直線と、点b0を基点としベクトルt0方向に伸びる直線との交点とし、分割係数をdとし、nが1以上d以下である各整数値について、点an、点bn、ベクトルsn、ベクトルtn、ベクトルunを、
  an = an-1+2n-1-d(cn-1-an-1)、
  bn = bn-1+2n-1-d(cn-1-bn-1)、
  sn = 2-d{(2d-(n-1)-1)un-1+sn-1)}、
  tn = 2-d{(2d-(n-1)-1)(-un-1)+tn-1)}、
  un = sn +(-tn)、
  ここで、点cnは、anを基点としベクトルsn方向に伸びる直線と、bnを基点としベクトルtn方向に伸びる直線との交点である、とする式を用いて算出し、前記部分輪郭線のうち長い方を、算出した(d+1)個の点am(mは0以上d以下の各整数)、点cd、及び(d+1)個の点bmを結んだ折れ線で近似することとしてもよい。
 この構成によると、部分輪郭線を複数の線分で近似する近似曲線を単純な漸化式から算出することができる。
(6)前記曲線形成手段は、前記2本の法線における離隔点間の部分が交差する場合には、前記判定手段による判定結果によらずに、前記2つの分割点を通る直線に対し前記交差する点とは同側でない部分輪郭線を複数の曲線で近似することとしてもよい。
 この構成によると、前記交差が生じるような特異な状態においても、2つの部分輪郭線のうち一方を確実に複数の曲線で近似するとの判断をすることができる。
(7)本発明の一実施の態様である曲線描画方法は、分割点算出手段、離隔点算出手段、距離算出手段、判定手段、及び曲線形成手段を備えた、中心線及び線幅で規定される、幅を有する曲線の輪郭線を直線近似する曲線描画装置に用いられる曲線描画方法であって、前記分割点算出手段が、前記中心線を分割する前記中心線上の複数の分割点を算出する分割点算出ステップと、前記離隔点算出手段が、前記分割点それぞれについて、当該分割点を通る前記中心線の法線に沿い当該分割点から等距離にある2つの離隔点を算出する離隔点算出ステップと、前記距離算出手段が、隣り合う2つの分割点について算出された前記4つの離隔点について、当該2つの分割点を通る直線に対して同側にある離隔点同士を組とした場合の、各組の離隔点間の距離をそれぞれ算出する距離算出ステップと、前記判定手段が、前記算出された2つの距離のうち短い方を基準とした当該2つの距離の比を算出し、当該比が所定値より大きいか否かを判定する判定ステップと、前記曲線形成手段が、前記比が所定値より大きいと判定された場合に、前記輪郭線において前記2つの分割点それぞれを通る法線に挟まれた部分である部分輪郭線のうち長い方を、短い方よりも多くの線分で近似する曲線形成ステップとを含む。
 また、本発明の一実施の態様である曲線描画プログラムは、コンピュータを、中心線及び線幅で規定される、幅を有する曲線の輪郭線を直線近似する曲線描画装置として機能させるための曲線描画プログラムであって、前記コンピュータを、前記中心線を分割する前記中心線上の複数の分割点を算出する分割点算出手段と、前記分割点それぞれについて、当該分割点を通る前記中心線の法線に沿い当該分割点から等距離にある2つの離隔点を算出する離隔点算出手段と、隣り合う2つの分割点について算出された前記4つの離隔点について、当該2つの分割点を通る直線に対して同側にある離隔点同士を組とした場合の、各組の離隔点間の距離をそれぞれ算出する距離算出手段と、前記算出された2つの距離のうち短い方を基準とした当該2つの距離の比を算出し、当該比が所定値より大きいか否かを判定する判定手段と、前記比が所定値より大きいと判定された場合に、前記輪郭線において前記2つの分割点それぞれを通る法線に挟まれた部分である部分輪郭線のうち長い方を、短い方よりも多くの線分で近似する曲線形成手段として機能させる。
 また、本発明の一実施の態様である集積回路は、中心線及び線幅で規定される、幅を有する曲線の輪郭線を直線近似する曲線描画装置に用いられる集積回路であって、前記中心線を分割する前記中心線上の複数の分割点を算出する分割点算出手段と、前記分割点それぞれについて、当該分割点を通る前記中心線の法線に沿い当該分割点から等距離にある2つの離隔点を算出する離隔点算出手段と、隣り合う2つの分割点について算出された前記4つの離隔点について、当該2つの分割点を通る直線に対して同側にある離隔点同士を組とした場合の、各組の離隔点間の距離をそれぞれ算出する距離算出手段と、前記算出された2つの距離のうち短い方を基準とした当該2つの距離の比を算出し、当該比が所定値より大きいか否かを判定する判定手段と、前記比が所定値より大きいと判定された場合に、前記輪郭線において前記2つの分割点それぞれを通る法線に挟まれた部分である部分輪郭線のうち長い方を、短い方よりも多くの線分で近似する曲線形成手段とを備える。
 この構成によると、部分輪郭線を近似する線分を更に多くの線分で近似するか否かを、離隔点間の2つの距離を比較するという従来よりも計算負荷の低い簡素な手法によって判断することができる。
 本発明に係る曲線描画装置は、文字フォント、図形などの輪郭線を従来よりも計算負荷の低い簡素な手法を用いて算出するものであり、このような文字フォント、図形などをディスプレイに表示する情報処理端末などの装置に好適である。
  1  曲線描画装置
 10  パス分割部
 11  接線ベクトル算出部
 12  輪郭点算出部
 13  判断部
 14  輪郭近似線生成部
 15  分割係数決定部
 16  曲線形成部
 17  描画部
 20  副輪郭点算出部
 21  接線ベクトル算出部
 22  交点算出部
 23  交点ベクトル算出部
101  パス
102、103  輪郭線
P4~P7  分割点
D4~D6  分割パス
131~133  セグメント
141、142  接線ベクトル
161~164  輪郭点
171~174  輪郭点
L15、L25  輪郭近似線

Claims (9)

  1.  中心線及び線幅で規定される、幅を有する曲線の輪郭線を直線近似する曲線描画装置であって、
     前記中心線を分割する前記中心線上の複数の分割点を算出する分割点算出手段と、
     前記分割点それぞれについて、当該分割点を通る前記中心線の法線に沿い当該分割点から等距離にある2つの離隔点を算出する離隔点算出手段と、
     隣り合う2つの分割点について算出された前記4つの離隔点について、当該2つの分割点を通る直線に対して同側にある離隔点同士を組とした場合の、各組の離隔点間の距離をそれぞれ算出する距離算出手段と、
     前記算出された2つの距離のうち短い方を基準とした当該2つの距離の比を算出し、当該比が所定値より大きいか否かを判定する判定手段と、
     前記比が所定値より大きいと判定された場合に、前記輪郭線において前記2つの分割点それぞれを通る法線に挟まれた部分である部分輪郭線のうち長い方を、短い方よりも多くの線分で近似する曲線形成手段とを備える
     ことを特徴とする曲線描画装置。
  2.  前記離隔点算出手段は、前記分割点から等距離にある2つの離隔点として、前記分割点から前記線幅の半分ずつ離れた点を算出する
     ことを特徴とする請求項1記載の曲線描画装置。
  3.  前記曲線形成手段は、前記部分輪郭線のうち短い方を1本の線分で近似し、
     前記分割点算出手段は、前記中心線を分割する場合に、前記部分輪郭線のうち短い方を近似する1本の線分が所定長以下になるよう分割する
     ことを特徴とする請求項1記載の曲線描画装置。
  4.  前記曲線形成手段は、前記部分輪郭線のうち長い方を近似する場合に、前記近似に用いる線分の数を、前記判定手段により算出された前記比に応じて決定する
     ことを特徴とする請求項1記載の曲線描画装置。
  5.  前記曲線形成手段は、前記部分輪郭線のうち長い方を近似する場合に、前記部分輪郭線の両端点を点a0及び点b0とし、ベクトルs0を、前記中心線の、点a0に対応する分割点における接線ベクトルとし、ベクトルt0を、前記中心線の、点b0に対応する分割点における接線ベクトルとし、点c0を、点a0を基点としベクトルs0方向に伸びる直線と、点b0を基点としベクトルt0方向に伸びる直線との交点とし、分割係数をdとし、nが1以上d以下である各整数値について、点an、点bn、ベクトルsn、ベクトルtn、ベクトルunを、
      an = an-1+2n-1-d(cn-1-an-1)、
      bn = bn-1+2n-1-d(cn-1-bn-1)、
      sn = 2-d{(2d-(n-1)-1)un-1+sn-1)}、
      tn = 2-d{(2d-(n-1)-1)(-un-1)+tn-1)}、
      un = sn +(-tn)、
      ここで、点cnは、anを基点としベクトルsn方向に伸びる直線と、bnを基点としベクトルtn方向に伸びる直線との交点である、
     とする式を用いて算出し、前記部分輪郭線のうち長い方を、算出した(d+1)個の点am(mは0以上d以下の各整数)、点cd、及び(d+1)個の点bmを結んだ折れ線で近似する
     ことを特徴とする請求項4記載の曲線描画装置。
  6.  前記曲線形成手段は、前記2本の法線における離隔点間の部分が交差する場合には、前記判定手段による判定結果によらずに、前記2つの分割点を通る直線に対し前記交差する点とは同側でない部分輪郭線を複数の曲線で近似する
     ことを特徴とする請求項1記載の曲線描画装置。
  7.  分割点算出手段、離隔点算出手段、距離算出手段、判定手段、及び曲線形成手段を備えた、中心線及び線幅で規定される、幅を有する曲線の輪郭線を直線近似する曲線描画装置に用いられる曲線描画方法であって、
     前記分割点算出手段が、前記中心線を分割する前記中心線上の複数の分割点を算出する分割点算出ステップと、
     前記離隔点算出手段が、前記分割点それぞれについて、当該分割点を通る前記中心線の法線に沿い当該分割点から等距離にある2つの離隔点を算出する離隔点算出ステップと、
     前記距離算出手段が、隣り合う2つの分割点について算出された前記4つの離隔点について、当該2つの分割点を通る直線に対して同側にある離隔点同士を組とした場合の、各組の離隔点間の距離をそれぞれ算出する距離算出ステップと、
     前記判定手段が、前記算出された2つの距離のうち短い方を基準とした当該2つの距離の比を算出し、当該比が所定値より大きいか否かを判定する判定ステップと、
     前記曲線形成手段が、前記比が所定値より大きいと判定された場合に、前記輪郭線において前記2つの分割点それぞれを通る法線に挟まれた部分である部分輪郭線のうち長い方を、短い方よりも多くの線分で近似する曲線形成ステップとを含む
     ことを特徴とする曲線描画方法。
  8.  コンピュータを、中心線及び線幅で規定される、幅を有する曲線の輪郭線を直線近似する曲線描画装置として機能させるための曲線描画プログラムであって、
     前記コンピュータを、
     前記中心線を分割する前記中心線上の複数の分割点を算出する分割点算出手段と、
     前記分割点それぞれについて、当該分割点を通る前記中心線の法線に沿い当該分割点から等距離にある2つの離隔点を算出する離隔点算出手段と、
     隣り合う2つの分割点について算出された前記4つの離隔点について、当該2つの分割点を通る直線に対して同側にある離隔点同士を組とした場合の、各組の離隔点間の距離をそれぞれ算出する距離算出手段と、
     前記算出された2つの距離のうち短い方を基準とした当該2つの距離の比を算出し、当該比が所定値より大きいか否かを判定する判定手段と、
     前記比が所定値より大きいと判定された場合に、前記輪郭線において前記2つの分割点それぞれを通る法線に挟まれた部分である部分輪郭線のうち長い方を、短い方よりも多くの線分で近似する曲線形成手段として機能させる
     ことを特徴とする曲線描画プログラム。
  9.  中心線及び線幅で規定される、幅を有する曲線の輪郭線を直線近似する曲線描画装置に用いられる集積回路であって、
     前記中心線を分割する前記中心線上の複数の分割点を算出する分割点算出手段と、
     前記分割点それぞれについて、当該分割点を通る前記中心線の法線に沿い当該分割点から等距離にある2つの離隔点を算出する離隔点算出手段と、
     隣り合う2つの分割点について算出された前記4つの離隔点について、当該2つの分割点を通る直線に対して同側にある離隔点同士を組とした場合の、各組の離隔点間の距離をそれぞれ算出する距離算出手段と、
     前記算出された2つの距離のうち短い方を基準とした当該2つの距離の比を算出し、当該比が所定値より大きいか否かを判定する判定手段と、
     前記比が所定値より大きいと判定された場合に、前記輪郭線において前記2つの分割点それぞれを通る法線に挟まれた部分である部分輪郭線のうち長い方を、短い方よりも多くの線分で近似する曲線形成手段とを備える
     ことを特徴とする集積回路。
PCT/JP2012/002590 2011-04-15 2012-04-13 曲線描画装置、曲線描画方法、曲線描画プログラム及び集積回路 WO2012140910A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US13/699,157 US9092905B2 (en) 2011-04-15 2012-04-13 Curve rendering device, curve rendering method, curve rendering program, and integrated circuit
CN201280001516.7A CN102918566B (zh) 2011-04-15 2012-04-13 曲线描绘装置、曲线描绘方法及集成电路
JP2013509802A JPWO2012140910A1 (ja) 2011-04-15 2012-04-13 曲線描画装置、曲線描画方法、曲線描画プログラム及び集積回路

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2011-090772 2011-04-15
JP2011090772 2011-04-15

Publications (2)

Publication Number Publication Date
WO2012140910A1 true WO2012140910A1 (ja) 2012-10-18
WO2012140910A9 WO2012140910A9 (ja) 2013-10-10

Family

ID=47009099

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/002590 WO2012140910A1 (ja) 2011-04-15 2012-04-13 曲線描画装置、曲線描画方法、曲線描画プログラム及び集積回路

Country Status (4)

Country Link
US (1) US9092905B2 (ja)
JP (1) JPWO2012140910A1 (ja)
CN (1) CN102918566B (ja)
WO (1) WO2012140910A1 (ja)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9153049B2 (en) 2012-08-24 2015-10-06 International Business Machines Corporation Resource provisioning using predictive modeling in a networked computing environment
KR20150145774A (ko) * 2014-06-19 2015-12-31 삼성전자주식회사 필기 애니메이션을 제공하는 전자장치 및 방법
US10347016B2 (en) * 2016-01-12 2019-07-09 Monotype Imaging Inc. Converting font contour curves
WO2017199999A1 (ja) * 2016-05-20 2017-11-23 アイシン・エィ・ダブリュ株式会社 地図表示システムおよび地図表示プログラム
DE112016007244T5 (de) * 2016-10-25 2019-06-27 Mitsubishi Electric Corporation Kartendatenerzeugungsvorrichtung, Endgerätvorrichtung und Kartendatenerzeugungsverfahren
CN107049347B (zh) * 2017-06-14 2020-11-03 珠海和佳医疗设备股份有限公司 X射线机管电流的校准方法
US10650586B2 (en) * 2017-08-10 2020-05-12 Outward, Inc. Automated mesh generation
US10936792B2 (en) 2017-12-21 2021-03-02 Monotype Imaging Inc. Harmonizing font contours
CN111443864B (zh) * 2020-04-14 2023-03-07 重庆赋比兴科技有限公司 基于iOS的曲线绘制方法

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04174494A (ja) * 1990-11-07 1992-06-22 Nec Off Syst Ltd 文字発生方式
JPH0785293A (ja) * 1993-06-26 1995-03-31 Just Syst Corp 情報処理装置

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5408598A (en) * 1991-05-23 1995-04-18 International Business Machines Corporation Method for fast generation of parametric curves employing a pre-calculated number of line segments in accordance with a determined error threshold
EP0604685A1 (en) * 1992-12-28 1994-07-06 Océ-Nederland B.V. Method of modifying the fatness of characters
US5381521A (en) * 1993-05-14 1995-01-10 Microsoft Corporation System and method of rendering curves
JPH11345344A (ja) * 1998-06-01 1999-12-14 Matsushita Electric Ind Co Ltd 3次曲線を与える方法及び装置
DE19901934C2 (de) * 1999-01-19 2001-07-19 Heidelberger Druckmasch Ag Verfahren zur Erzeugung eines Rahmens für grafische Objekte, die durch Bezier-Kurven beschrieben sind
US6501475B1 (en) * 1999-10-22 2002-12-31 Dynalab Inc. Glyph-based outline font generation independent of resolution
US7239319B2 (en) * 2004-08-27 2007-07-03 Microsoft Corporation Rendering outline fonts
GB0818278D0 (en) * 2008-10-06 2008-11-12 Advanced Risc Mach Ltd Graphics processing systems
US8643650B1 (en) * 2009-08-13 2014-02-04 Adobe Systems Incorporated System and method for approximating parametric curves using optimal number of segments
US20110285736A1 (en) * 2010-05-21 2011-11-24 Kilgard Mark J Decomposing cubic bèzier segments for tessellation-free stencil filling

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04174494A (ja) * 1990-11-07 1992-06-22 Nec Off Syst Ltd 文字発生方式
JPH0785293A (ja) * 1993-06-26 1995-03-31 Just Syst Corp 情報処理装置

Also Published As

Publication number Publication date
US9092905B2 (en) 2015-07-28
JPWO2012140910A1 (ja) 2014-07-28
CN102918566A (zh) 2013-02-06
WO2012140910A9 (ja) 2013-10-10
US20130100138A1 (en) 2013-04-25
CN102918566B (zh) 2016-01-06

Similar Documents

Publication Publication Date Title
WO2012140910A1 (ja) 曲線描画装置、曲線描画方法、曲線描画プログラム及び集積回路
KR101337758B1 (ko) 3차원 그래픽 하드웨어를 이용한 2차원 그래픽 렌더링 동안의 버텍스 포인트 제거
CN110832501A (zh) 用于姿态不变面部对准的系统和方法
CN106251384B (zh) 使用三角形的递归再分的细分方法
US8659599B2 (en) System and method for generating a manifold surface for a 3D model of an object using 3D curves of the object
Sobiecki et al. Comparison of curve and surface skeletonization methods for voxel shapes
JP2011515765A (ja) グラフィックスレンダリングのための多段テッセレーション
EP3070677B1 (en) Method and apparatus for tile-based rendering
US20170109900A1 (en) Example-based Edge-aware Directional Texture Painting
US20110122139A1 (en) Two dimensional vector graphics triangulation system and method thereof
US20220058859A1 (en) Uv mapping on 3d objects with the use of artificial intelligence
US10885681B2 (en) Method and apparatus for performing path stroking
US20160125649A1 (en) Rendering apparatus and rendering method
US9928621B2 (en) Line stylization through graphics processor unit (GPU) textures
CN106251377A (zh) 使用位移因数的细分方法
JP2009301284A (ja) 描画装置および方法
CN111295695B (zh) 三维网格数据简化方法及装置
Bruckstein et al. On projective invariant smoothing and evolutions of planar curves and polygons
CN110176021A (zh) 结合亮度校正的显著性信息的水平集图像分割方法及系统
CN109635839B (zh) 一种基于机器学习的非平衡数据集的处理方法和装置
Zhang et al. Automatic registration of vestibular systems with exact landmark correspondence
US10593111B2 (en) Method and apparatus for performing high throughput tessellation
US20180012395A1 (en) Information processing apparatus, simulator result display method, and computer-readable recording medium
US20240054713A1 (en) Apparatus and method to generate an animated graphical object
KR101654865B1 (ko) 스트로크 기반의 이미지 렌더링 장치, 방법 및 컴퓨터 프로그램

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201280001516.7

Country of ref document: CN

ENP Entry into the national phase

Ref document number: 2013509802

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 13699157

Country of ref document: US

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

Ref document number: 12771643

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12771643

Country of ref document: EP

Kind code of ref document: A1