WO2015173885A1 - 描画装置及び描画方法及び描画プログラム - Google Patents

描画装置及び描画方法及び描画プログラム Download PDF

Info

Publication number
WO2015173885A1
WO2015173885A1 PCT/JP2014/062689 JP2014062689W WO2015173885A1 WO 2015173885 A1 WO2015173885 A1 WO 2015173885A1 JP 2014062689 W JP2014062689 W JP 2014062689W WO 2015173885 A1 WO2015173885 A1 WO 2015173885A1
Authority
WO
WIPO (PCT)
Prior art keywords
polygon
rectangle
vertex
point
end points
Prior art date
Application number
PCT/JP2014/062689
Other languages
English (en)
French (fr)
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 JP2016519015A priority Critical patent/JP6058216B2/ja
Priority to PCT/JP2014/062689 priority patent/WO2015173885A1/ja
Publication of WO2015173885A1 publication Critical patent/WO2015173885A1/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture

Definitions

  • the present invention relates to a drawing apparatus, a drawing method, and a drawing program.
  • miter There are “miter”, “round”, “bevel”, and the like as a method for filling the gap generated at the connecting portion of the two thick lines (see, for example, Patent Documents 1 and 2).
  • the gap is filled with a quadrangle formed by extending the outer edges of two thick lines.
  • a gap is filled with a part of a circle centering on a connection point of two thick lines.
  • the gap is filled with a triangle formed by connecting the end points of the outer edges of two thick lines.
  • the object of the present invention is, for example, to fill a gap generated in a connecting portion of two thick lines with a polygon and arrange the connecting portion into a natural shape.
  • a drawing apparatus includes: A first rectangle having a first side and a second rectangle having a second side intersecting the first side, the intersection of the first side and the second side, and the first side A triangular gap between the one end point and the one end point of the second side is filled.
  • the drawing device includes: A storage unit for storing data defining the first rectangle and the second rectangle; The intersection of the first side and the second side is P, the end point that is one vertex of the triangle among the end points of the first side is S1, and the one vertex of the triangle is the end point of the second side An end point is S2, and an intersection of an extension line of a side perpendicular to the first side and having S1 as one end point and an extension line of a side perpendicular to the second side and having S2 as one end point is A, and the storage unit A 'which is one point other than P on the line segment having both ends of P and A as the vertexes of the polygon filling the gap based on the data stored in A calculation unit that calculates a vertex sequence including S1 ′ that is one point other than A and S2 ′ that is one point other than A on the line segment having S2 and A as both end points; A drawing unit that draws a polygon formed from the vertex rows calculated by the calculation unit.
  • connection portion between two thick lines (that is, two rectangles) with a polygon and arrange the connection portion in a natural shape.
  • FIG. 1 is a block diagram illustrating a configuration of a drawing apparatus according to Embodiment 1.
  • FIG. 5 is a flowchart illustrating an example of an operation of a calculation unit included in the drawing apparatus according to Embodiment 1.
  • FIG. 4 is a diagram illustrating an example of polygons generated by a calculation unit included in the drawing apparatus according to Embodiment 1;
  • FIG. 4 is a diagram illustrating an example of polygons generated by a calculation unit included in the drawing apparatus according to Embodiment 1;
  • FIG. 4 is a diagram illustrating an example of polygons generated by a calculation unit included in the drawing apparatus according to Embodiment 1;
  • FIG. 4 is a diagram illustrating an example of polygons generated by a calculation unit included in the drawing apparatus according to Embodiment 1;
  • FIG. 4 is a diagram illustrating an example of polygons generated by a calculation unit included in the drawing apparatus according to Embodiment 1;
  • FIG. 10 is a diagram illustrating an example of a polygon generated by a calculation unit included in the drawing apparatus according to Embodiment 2 and a texture set by a setting unit included in the drawing apparatus.
  • FIG. 10 is a diagram illustrating an example of a texture set by a setting unit included in the drawing apparatus according to the second embodiment. The figure which shows an example of the hardware constitutions of the drawing apparatus which concerns on embodiment of this invention.
  • Embodiment 1 FIG.
  • a road is drawn as a thick line
  • a moving route is drawn as a thick line on a map
  • VICS registered trademark
  • TMC Traffic Message Channel
  • FIG. 1 is a block diagram showing a configuration of a drawing apparatus 100 according to the present embodiment.
  • the drawing apparatus 100 includes a generation unit 101, a storage unit 102, a calculation unit 103, a setting unit 104, and a drawing unit 105.
  • the generation unit 101 generates drawing information necessary for drawing a polygon in accordance with a user input or the like.
  • the generation unit 101 refers to the position information of the user of the navigation device or the position information of a mobile body (for example, a vehicle) on which the navigation device is mounted in real time. Generate drawing information.
  • the storage unit 102 stores drawing parameters such as a drawing range, the width and color of a line to be drawn, and a threshold in a storage medium such as a disk or a flash memory.
  • drawing parameters such as a drawing range, the width and color of a line to be drawn, and a threshold in a storage medium such as a disk or a flash memory.
  • the storage unit 102 stores drawing parameters and map data for drawing a map including a road and drawing a moving route on the map.
  • the calculation unit 103 and the setting unit 104 constitute a drawing data construction unit 110 that constructs drawing data in a drawable format.
  • the drawing data construction unit 110 acquires drawing parameters necessary for drawing a polygon from the storage unit 102 based on the drawing information generated by the generation unit 101.
  • the calculation unit 103 calculates the vertex coordinates of the polygon based on the drawing information generated by the generation unit 101 and the drawing parameters acquired from the storage unit 102. That is, the calculation unit 103 generates a polygon.
  • the calculation unit 103 When the present embodiment is applied to a navigation device, the calculation unit 103 generates a road or a polygon that represents the movement route of the user or the moving body described above.
  • the setting unit 104 sets the texture and material of the polygon generated by the calculation unit 103.
  • the drawing unit 105 draws drawing data. Specifically, the drawing unit 105 draws the polygon generated by the calculation unit 103. Then, the drawing unit 105 pastes the texture set by the setting unit 104 on the drawn polygon. When a material is set by the setting unit 104, the drawing unit 105 adds the material to the drawn polygon. When the present embodiment is applied to a navigation device, the drawing unit 105 draws drawing data representing the road or the moving route of the user or moving body described above on the map.
  • a polygon is used to fill a gap generated at a connection portion between two thick lines (that is, two rectangles). That is, the drawing apparatus 100 uses a polygon to generate a rectangle having a first side and a rectangle having a second side that intersects the first side, and an intersection of the first side and the second side. , A gap between triangles having the vertex at one end point of the first side and the one end point of the second side is filled.
  • FIG. 2 is a flowchart showing an example of the operation of the calculation unit 103.
  • 3 to 6 are diagrams showing examples of polygons generated by the calculation unit 103.
  • FIG. 3 to 6 for convenience, different hatching is used for adjacent triangular polygons, but the difference in hatching does not represent the difference in texture. That is, in the examples of FIGS. 3 to 6, a common texture may be applied to some or all of the polygons. When this embodiment is applied to a navigation device, it is desirable to attach a common texture to a polygon representing a road or a travel route unless it is necessary to distinguish a specific location.
  • the calculation unit 103 uses a triangle strip as a primitive type when calculating the vertex coordinates of the polygon. Further, the calculation unit 103 applies back face culling and sets the polygons registered in the counterclockwise order to non-drawing. Note that the calculation unit 103 may use a triangle list or another primitive type instead of the triangle strip. Further, the calculation unit 103 may set non-drawing polygons registered in the clockwise order instead of the counterclockwise order.
  • first rectangle 201 having a certain thickness
  • second rectangle 202 having a constant thickness in which a line segment having both end points P (n) and P (n + 1) is widened with the same width on both sides.
  • the first rectangle 201 has four vertices of Q1 (n), R1 (n), S1 (n), and T1 (n).
  • the first rectangle 201 has sides having S1 (n) and T1 (n) as both end points as the first side.
  • the second rectangle 202 has four vertices Q2 (n), R2 (n), S2 (n), and T2 (n).
  • the second rectangle 202 has sides having S2 (n) and T2 (n) as both end points as second sides.
  • the second side intersects with the first side of the first rectangle 201 at P (n). That is, P (n) is an intersection of the first side of the first rectangle 201 and the second side of the second rectangle 202.
  • a triangular gap having apexes P (n), S1 (n), and S2 (n) is generated.
  • a (n) is an intersection of an extension line of the side having both end points R1 (n) and S1 (n) and an extension line of the side having both end points Q2 (n) and S2 (n).
  • the sides having R1 (n) and S1 (n) as both end points are perpendicular to the first side of the first rectangle 201.
  • the sides having both ends of Q2 (n) and S2 (n) are perpendicular to the second side of the second rectangle 202.
  • S ⁇ b> 1 (n) is one vertex of the triangle in the gap between the first rectangle 201 and the second rectangle 202 among the end points of the first side of the first rectangle 201.
  • S ⁇ b> 2 (n) is one vertex of the triangle of the gap between the first rectangle 201 and the second rectangle 202 among the end points of the second side of the second rectangle 202.
  • B (n) is a side having Q1 (n) and T1 (n) as both end points or an extension line of the side, and a side having R2 (n) and T2 (n) as both end points or an extension line of the side And an intersection of an extension line of a line having P (n) and A (n) as both end points.
  • the sides having both end points Q1 (n) and T1 (n) are perpendicular to the first side of the first rectangle 201.
  • the sides having R2 (n) and T2 (n) as both end points are perpendicular to the second side of the second rectangle 202.
  • the storage unit 102 stores data defining the first rectangle 201 and the second rectangle 202 as drawing parameters.
  • the calculation unit 103 executes the following processing based on the drawing parameters.
  • the calculation unit 103 determines that the angle formed by the line segment having both end points P (n ⁇ 1) and P (n) and the line segment having both end points P (n) and P (n + 1) is turned right. It is determined whether the turn is a left turn or a left turn. That is, the calculation unit 103 determines whether the line connecting P (n ⁇ 1), P (n), and P (n + 1) is turning right or left. For example, a right turn and a left turn can be determined by a sign of a vector outer product.
  • the calculation unit 103 includes a line segment having P (n ⁇ 1) and P (n) as both end points, and a line segment having P (n) and P (n + 1) as both end points.
  • the corner is defined as a right turn.
  • the order of apexes is P (n + 1), P (n), and P (n-1)
  • the turn is a left turn.
  • the order of apexes is determined by the traveling direction of a road or a travel route.
  • the calculation unit 103 executes normal polygon coordinate calculation processing.
  • the normal polygon coordinate calculation process is a process of setting one polygon vertex on each side for each of P (n ⁇ 1), P (n), and P (n + 1) and calculating the coordinates of each polygon vertex. That is.
  • the calculation unit 103 performs Q1 (n) and R1 (n) for P (n ⁇ 1), B (n) and A (n), and P (n + 1) for P (n).
  • R2 (n) and Q2 (n) are set as polygon vertices. Then, the calculation unit 103 calculates a vertex strip in a triangle strip format including Q1 (n), R1 (n), B (n), A (n), R2 (n), and Q2 (n) in order. From this vertex row, the following four triangular polygons are formed in the drawing order by the drawing unit 105.
  • First polygon Polygon having Q1 (n), R1 (n), and B (n) as vertices
  • Second polygon Polygon having R1 (n), B (n), and A (n) as vertices
  • Third polygon Polygon with B (n), A (n), R2 (n) as vertices
  • Fourth Polygon Polygon with A (n), R2 (n), Q2 (n) as vertices
  • the third to fourth polygons are polygons that fill the gap between the first rectangle 201 and the second rectangle 202.
  • polygon vertices are arranged on a bisector of an angle formed by three points P (n ⁇ 1), P (n), and P (n + 1).
  • the line segment having both end points B (n) and A (n) is a bisector.
  • the normal polygon coordinate calculation process can be replaced by another conventional polygon coordinate calculation method.
  • an unnatural polygon may be generated.
  • a polygon with a more natural shape can be generated by executing a corner polygon coordinate calculation process described later.
  • the calculation unit 103 determines whether correction of the coordinates calculated in S12 is necessary. Basically, the calculation unit 103 sets the vertices of the first rectangle 201 and the second rectangle 202 on the sides of the first rectangle 201 and the second rectangle 202 out of the polygon coordinates calculated by the normal polygon coordinate calculation process of S12. It is determined whether there is a coordinate other than. When the determination result in S11 is “right turn”, the calculation unit 103 selects the right side of the two contour lines parallel to the vector connecting P (n ⁇ 1), P (n), and P (n + 1) in order. It is determined whether or not the corresponding polygon coordinates exist on the line segment. On the other hand, when the determination result of S11 is “turn left”, the calculation unit 103 determines whether or not the corresponding polygon coordinates exist on the left line segment.
  • the calculation unit 103 selects Q1 (n on the right side of the two sides of the first rectangle 201 parallel to the line segment with P (n ⁇ 1) and P (n) as both end points. ) And T1 (n) are determined as to whether or not B (n) calculated in S12 exists on the sides. Also, the calculation unit 103 sets T2 (n) and R2 (n) on the right side of the two sides of the second rectangle 202 parallel to the line segment having P (n) and P (n + 1) as both ends. It is determined whether or not B (n) calculated in S12 exists on the side to be a point.
  • B (n) exists on both sides having both ends of Q1 (n) and T1 (n) and sides having both ends of T2 (n) and R2 (n). To do. Therefore, the calculation unit 103 determines that the correction of the coordinates calculated in S12 is not necessary.
  • B (n) is present on both of the sides having both ends of Q1 (n) and T1 (n) and the sides having both ends of T2 (n) and R2 (n). not exist. Therefore, the calculation unit 103 determines that correction of the coordinates calculated in S12 is necessary.
  • B (n) exists on the side having both ends of Q1 (n) and T1 (n). However, B (n) does not exist on the sides having T2 (n) and R2 (n) as both end points. Therefore, the calculation unit 103 determines that correction of the coordinates calculated in S12 is necessary.
  • the calculation unit 103 calculates the line segment connecting the left and right polygon vertices corresponding to P (n) and the left and right polygon vertices corresponding to P (n ⁇ 1) or P (n + 1) adjacent to P (n). It may be determined that correction is necessary when the line segment connecting the two intersects. Alternatively, the calculation unit 103 may determine that correction is necessary when the registration order of polygon vertices is not normal. Alternatively, the calculation unit 103 may determine that correction is necessary when the angle formed by the three points P (n ⁇ 1), P (n), and P (n + 1) is equal to or smaller than a threshold value.
  • the flow proceeds to S15. If the calculation unit 103 determines that correction is necessary, the flow proceeds to S14.
  • the corner polygon coordinate calculation process is a process for correcting the coordinates calculated in S12. Specifically, the corner polygon coordinate calculation processing is performed by using A ′ (n), S1 ′ (n), and S2 ′ as the vertices of the polygon that fills the gap between the first rectangle 201 and the second rectangle 202.
  • (N) is a process of calculating a vertex sequence including the above.
  • a '(n) is a point other than P (n) and A (n) on the line segment having both ends of P (n) and A (n).
  • S1 '(n) is one point other than A (n) on the line segment with S1 (n) and A (n) as both end points.
  • S2 '(n) is one point other than A (n) on the line segment having S2 (n) and A (n) as both end points.
  • the calculation unit 103 corrects A (n) and B (n) to A ′ (n) and B ′ (n), respectively, in the vertex row calculated in S12.
  • a ′ (n) is a line segment having P (n) and A (n) as both end points (that is, the left half of the above-mentioned bisector), and S1 (n) and P (n) This is the intersection with the circle passing through S2 (n).
  • B ′ (n) is an extension of a line segment having P (n) and A (n) as both end points (that is, the right half of the above-mentioned bisector) and the above centered on P (n) The intersection with the circle.
  • the calculation unit 103 further adds S1 (n) and S2 (n) to the vertex row as S1 ′ (n) and S2 ′ (n), respectively.
  • the calculation unit 103 also adds T1 (n) and T2 (n) to the vertex row.
  • the calculation unit 103 calculates Q1 (n), R1 (n), T1 (n), S1 (n), B ′ (n), A ′ (n), T2 (n), S2 (n), A triangle strip format vertex sequence including R2 (n) and Q2 (n) in order is calculated. From this vertex row, the following eight triangular polygons are formed.
  • First polygon Polygon having Q1 (n), R1 (n), and T1 (n) as vertices
  • Second polygon Polygon having R1 (n), T1 (n), and S1 (n) as vertices -Third polygon: Polygon with T1 (n), S1 (n), B '(n) as vertices-Fourth polygon: S1 (n), B' (n), A '(n) with vertices ⁇
  • Fifth polygon Polygon having B ′ (n), A ′ (n), T2 (n) as vertex ⁇
  • Sixth polygon A ′ (n), T2 (n), S2 (n )
  • the 8th polygon S2 (n), R2 (n), Q2 (n ) As a vertex
  • the fourth and sixth two polygons are polygons that fill the gap between the first rectangle 201 and the second rectangle 202.
  • the third polygon is counterclockwise the same as the second polygon, and therefore backface culling is applied and non-drawing is performed.
  • the fifth polygon is the same counterclockwise direction as the fourth polygon, backface culling is applied and non-drawing is performed. Therefore, in the drawing process by the drawing unit 105, the first, second, fourth, sixth, seventh and eighth polygons are drawn in order.
  • the calculation unit 103 corrects A (n) to A ′ (n) in the vertex sequence calculated in S ⁇ b> 12.
  • a ′ (n) is a line segment having P (n) and A (n) as both end points (that is, the left half of the above-mentioned bisector), and P (n) With the circle passing through S1 (n) and S2 (n).
  • B (n) does not need to be corrected because it exists on the sides having Q1 (n) and T1 (n) as both end points.
  • the calculation unit 103 further adds S1 (n) and S2 (n) to the vertex row as S1 ′ (n) and S2 ′ (n), respectively.
  • the calculation unit 103 calculates Q1 (n), R1 (n), B (n), S1 (n), B (n), A ′ (n), B (n), S2 (n), R2 A vertex strip in the triangle strip format including (n) and Q2 (n) in order is calculated. From this vertex row, the following eight triangular polygons are formed.
  • First polygon Polygon having Q1 (n), R1 (n), and B (n) as vertices
  • Second polygon Polygon having R1 (n), B (n), and S1 (n) as vertices
  • Third polygon Polygon with B (n), S1 (n), B (n) as vertices
  • Fourth Polygon S1 (n), B (n), A ′ (n) with vertices Polygon ⁇
  • the fourth and sixth two polygons are polygons that fill the gap between the first rectangle 201 and the second rectangle 202. Note that the third polygon is not drawn because the area is zero. Similarly, the fifth polygon is not drawn because the area is zero. Therefore, in the drawing process by the drawing unit 105, the first, second, fourth, sixth, seventh and eighth polygons are drawn in order.
  • the calculation unit 103 corrects A (n) to A ′ (n) in the vertex sequence calculated in S12.
  • a ′ (n) is a line segment having P (n) and A (n) as both end points (that is, the left half of the above-mentioned bisector), and P (n) With the circle passing through S1 (n) and S2 (n).
  • B (n) is corrected because it exists on both sides having both ends of Q1 (n) and T1 (n) and sides having both ends of T2 (n) and R2 (n). It is not necessary.
  • the calculation unit 103 further adds S1 (n) and S2 (n) to the vertex row as S1 '(n) and S2' (n), respectively.
  • the calculation unit 103 performs Q1 (n), R1 (n), B (n), S1 (n), B (n), A ′ (n), B (n ), S2 (n), R2 (n), and Q2 (n) in order, a triangle strip format vertex sequence is calculated. From the vertex row, the above-described eight triangular polygons are formed. In the drawing process by the drawing unit 105, the first, second, fourth, sixth, seventh and eighth polygons are drawn in order.
  • a ′ (n) can be shifted to an arbitrary position on a line segment having both ends of P (n) and A (n). If A ′ (n) is far from P (n), the gap between the first rectangle 201 and the second rectangle 202 can be partially filled. If A ′ (n) is far from A (n), an effect of suppressing the enlargement of the connection portion between the first rectangle 201 and the second rectangle 202 can be obtained. That is, the connection portion between the first rectangle 201 and the second rectangle 202 can be prevented from being sharply sharpened.
  • S1 '(n) can be shifted to an arbitrary position on a line segment having both ends of S1 (n) and A (n).
  • S2 '(n) can also be shifted to an arbitrary position on a line segment having S2 (n) and A (n) as both end points. If S1 ′ (n) or S2 ′ (n) is slightly distant from A (n), an effect of suppressing the enlargement of the connection portion between the first rectangle 201 and the second rectangle 202 can be obtained.
  • the connecting portion between the first rectangle 201 and the second rectangle 202 may be concave.
  • the connecting portion is more natural when it is convex. Therefore, the calculation unit 103 determines that A ′ is more than the intersection of the line segment having both end points P (n) and A (n) and the line segment having both end points S1 ′ (n) and S2 ′ (n). It is desirable to set A ′ (n), S1 ′ (n), and S2 ′ (n) so that (n) is close to A (n).
  • B ′ (n) is an arbitrary position on the extension line of the line segment having P (n) and A (n) as both end points (that is, the right half of the bisector described above). Can be shifted. If B ′ (n) overlaps at least one of the first rectangle 201 and the second rectangle 202, the polygon outside the first rectangle 201 and the second rectangle 202 (on the right in the case of “right turn”) Is never set.
  • B (n) is at least one of the sides having Q1 (n) and T1 (n) as both end points and the sides having T2 (n) and R2 (n) as both end points. Even when it exists on either one, the calculation unit 103 may calculate a polygon vertex row as in the example of FIG. That is, in the example of FIGS. 5 and 6, the calculation unit 103 may correct B (n) with the vertex sequence calculated in S12. Although not shown, in that case, the calculation unit 103, like the example of FIG. 4, performs Q1 (n), R1 (n), T1 (n), S1 (n), B ′ (n), A ′.
  • a triangle strip format vertex sequence including (n), T2 (n), S2 (n), R2 (n), and Q2 (n) in order is calculated.
  • the fourth and sixth two polygons are polygons that fill the gap between the first rectangle 201 and the second rectangle 202.
  • the third and fifth polygons are not drawn by applying back face culling.
  • the height of the polygon coordinate is the height of the surface of the first rectangle 201. It is corrected to.
  • the height of the polygon coordinate is corrected to the height of the surface of the second rectangle 202. For example, since the two-dimensional position of T1 (n) shown in FIG. 4 overlaps the second rectangle 202, when the height of T1 (n) is different from the height at the corresponding position of the surface of the second rectangle 202, T1 The height of (n) is corrected.
  • the calculation unit 103 sets the polygon coordinates calculated in the normal polygon coordinate calculation process in S12 or the corner polygon coordinate calculation process in S14 as a model.
  • the normal of the polygon is set so as to face directly above (a unit vector perpendicular to the polygon).
  • the corner polygon coordinate calculation process is executed after the normal polygon coordinate calculation process for P (n), and then the same process is executed for other points such as P (n + 1).
  • the normal polygon coordinate calculation process may be executed after the corner polygon coordinate calculation process.
  • the corner polygon coordinate calculation processing may be executed for each point simultaneously with the normal polygon coordinate calculation processing.
  • the corner polygon coordinate calculation process may be executed for each point. The order of each process can be changed as appropriate. S13 can be omitted. That is, the corner polygon coordinate calculation process may be executed for all points regardless of the result of the normal polygon coordinate calculation process.
  • the setting unit 104 may set the polygon texture and material generated by the normal polygon coordinate calculation processing and the polygon texture and material generated by the corner polygon coordinate calculation processing in the same method, or in different methods. It may be set.
  • the drawing unit 105 draws a polygon formed from the vertex sequence set by the calculation unit 103 in S15.
  • the drawing unit 105 draws a polygon representing a road or a moving route on a map.
  • the drawing unit 105 or a display unit (not shown) outside the drawing apparatus 100 displays this map on the screen of the navigation device.
  • the gap generated at the connection portion between the first rectangle 201 and the second rectangle 202 which is widened by extending the polyline by a predetermined distance from side to side, is filled with polygons.
  • the connecting portion into a natural shape.
  • a line segment having both end points P (n ⁇ 1) and P (n) and a line segment having both end points P (n) and P (n + 1) Even when the formed angle is small or at least one of the lengths of the first rectangle 201 and the second rectangle 202 is short, it is possible to arrange the connecting portion into a natural shape by correcting the vertex of the polygon. It becomes possible.
  • a thick polygon can be drawn with a small number of vertices.
  • the portion unnecessary for display can be rendered non-drawn and the portion necessary for display can be rendered by back face culling. Therefore, it is possible to draw a thick line at high speed.
  • the normal texture coordinate setting method can be used, and there is no need to provide an exception process. Therefore, it is possible to paste a texture at high speed.
  • Embodiment 2 FIG. In the present embodiment, differences from the first embodiment will be mainly described.
  • the connecting portion between the first rectangle 201 and the second rectangle 202 is adjusted to a natural shape by correcting the vertex coordinates of the polygon.
  • the connection portion between the first rectangle 201 and the second rectangle 202 is adjusted to a natural shape by using a partially transparent texture. In the present embodiment, it is not essential to correct the vertex coordinates of the polygon.
  • the configuration of the drawing apparatus 100 according to the present embodiment is the same as that of the first embodiment shown in FIG.
  • FIG. 7 is a diagram illustrating an example of a polygon generated by the calculation unit 103 and a texture set by the setting unit 104.
  • FIG. 8 is a diagram illustrating an example of a texture set by the setting unit 104.
  • different hatching is used for adjacent triangular polygons, but the difference in hatching does not represent the difference in texture. That is, in the example of FIG. 7, a common texture may be applied to some or all of the polygons.
  • a texture in which a transmissive portion 301 and a non-transmissive portion 302 are mixed is applied to a polygon that fills the gap between the first rectangle 201 and the second rectangle 202.
  • first rectangle 201 and the second rectangle 202 are the same rectangles as in the example of FIG. A (n) and B (n) are the same as in the example of FIG.
  • the processing from S11 to S15 is almost the same as in the first embodiment.
  • the processes of S13 and S14 can be omitted. That is, the corner polygon coordinate calculation process does not have to be executed for any point such as P (n). Even when the corner polygon coordinate calculation process is executed, A ′ (n) is one point other than P (n) on the line segment with P (n) and A (n) as both end points. I just need it. That is, A '(n) may be A (n).
  • the calculation unit 103 determines that correction of the coordinates calculated in S12 is necessary. However, when applying this embodiment, the calculation unit 103 may determine that correction is not necessary. In the example of FIG. 7, it is assumed that correction is necessary. However, unlike the example of FIG. 6, A (n) is not corrected. That is, A ′ (n) is the same as A (n).
  • the calculation unit 103 determines that Q1 (n), R1 (n), B (n), S1 (n), B (n), A (n), B (n), S2 (n), R2 ( n), a triangle strip type vertex sequence including Q2 (n) in order is calculated. From this vertex row, the following eight triangular polygons are formed.
  • First polygon Polygon having Q1 (n), R1 (n), and B (n) as vertices
  • Second polygon Polygon having R1 (n), B (n), and S1 (n) as vertices
  • Third polygon Polygon having B (n), S1 (n), and B (n) as vertices
  • Fourth Polygon Polygon having S1 (n), B (n), and A (n) as vertices -5th polygon: Polygon with B (n), A (n), B (n) as vertices-6th polygon: Polygon with A (n), B (n), S2 (n) as vertices 7th polygon: Polygon with B (n), S2 (n), R2 (n) as vertices 8th polygon: Polygon with S2 (n), R2 (n), Q2 (n) as vertices
  • the fourth and sixth two polygons are polygons that fill the gap between the first rectangle 201 and the second rectangle 202. Note that the third polygon is not drawn because the area is zero. Similarly, the fifth polygon is not drawn because the area is zero. Therefore, in the drawing process by the drawing unit 105, the first, second, fourth, sixth, seventh and eighth polygons are drawn in order.
  • the setting unit 104 sets the texture including the transmissive portion 301 for the two polygons that fill the gap between the first rectangle 201 and the second rectangle 202. Specifically, the setting unit 104 uses a boundary line from S1 ′ (n) to C (n) as a polygon texture having S1 (n), B (n), and A (n) as vertices. A texture divided into 301 and an opaque portion 302 is set. Similarly, the setting unit 104 uses a boundary line from S2 ′ (n) to C (n) as a polygon texture having A (n), B (n), and S2 (n) as vertices. A texture divided into an opaque portion 302 is set.
  • C (n) is an intersection of a line segment having both end points P (n) and A (n) and a circle passing through S1 (n) and S2 (n) with P (n) as the center.
  • C (n) is not a point set as a vertex of a polygon.
  • S1 '(n) and S2' (n) are S1 (n) and S2 (n), respectively.
  • the setting unit 104 is configured so that the boundary line between the transparent part 301 and the non-transparent part 302 of the texture created in advance matches the boundary line between the transparent part 301 and the non-transparent part 302 of the texture set for the polygon.
  • Set the texture for the polygon For example, as illustrated in FIG. 8, the setting unit 104 sets S1 (n), B (n), A (n), A (n), A (n), and A (n), as shown in FIG. Texture coordinates corresponding to the four polygon coordinates of C (n) are calculated.
  • the setting unit 104 further calculates texture coordinates corresponding to the polygon coordinates of S2 (n) for the polygons having A (n), B (n), and S2 (n) as vertices.
  • C (n) as one end point of the boundary line between the transmissive portion 301 and the non-transmissive portion 302 is arbitrary on a line segment having both end points P (n) and A (n). Can be shifted to the position. If C (n) is far from P (n), the gap between the first rectangle 201 and the second rectangle 202 can be partially filled. If C (n) is far from A (n), an effect of suppressing the enlargement of the connection portion between the first rectangle 201 and the second rectangle 202 can be obtained. That is, even if the distance between P (n) and A (n) is long, the connection portion between the first rectangle 201 and the second rectangle 202 can be prevented from being seen sharply.
  • S1 ′ (n) as the other end point of the boundary line between the transmissive part 301 and the non-transmissive part 302 is arbitrary on the line segment having both end points S1 (n) and A (n). Can be shifted to position.
  • S2 ′ (n) as the other end point of the boundary line between the transmissive portion 301 and the non-transmissive portion 302 can also be shifted to an arbitrary position on the line segment having S2 (n) and A (n) as both end points. . If S1 ′ (n) or S2 ′ (n) is slightly distant from A (n), an effect of suppressing the enlargement of the connection portion between the first rectangle 201 and the second rectangle 202 can be obtained.
  • the drawing unit 105 draws a polygon formed from the vertex sequence set by the calculation unit 103 in S15. Then, the drawing unit 105 pastes the texture set by the setting unit 104 on the drawn polygon.
  • the drawing unit 105 draws a polygon representing a road or draws a polygon representing a movement route on a map and pastes a texture on each polygon.
  • the drawing unit 105 or a display unit (not shown) outside the drawing apparatus 100 displays this map on the screen of the navigation device.
  • the gap generated in the connection portion between the first rectangle 201 and the second rectangle 202 which is widened by extending the polyline to the left and right in parallel by a predetermined interval, is filled with polygons.
  • the texture including the transmissive part 301 it is possible to arrange the connected part into a natural shape.
  • FIG. 9 is a diagram illustrating an example of a hardware configuration of the drawing apparatus 100 according to the embodiment of the present invention.
  • the drawing apparatus 100 is a computer, and includes hardware such as an output device 910, an input device 920, a storage device 930 (that is, a storage medium), and a processing device 940.
  • the hardware is used by each unit of the drawing apparatus 100 (what will be described as “unit” in the description of the embodiment of the present invention).
  • the output device 910 is, for example, a display device such as an LCD (Liquid / Crystal / Display), a printer, or a communication module (communication circuit or the like).
  • the output device 910 is used for outputting (transmitting) data, information, and signals by what is described as “unit” in the description of the embodiment of the present invention.
  • the input device 920 is, for example, a keyboard, a mouse, a touch panel, a communication module (communication circuit or the like).
  • the input device 920 is used for inputting (receiving) data, information, and signals by what is described as a “unit” in the description of the embodiment of the present invention.
  • the storage device 930 is, for example, a ROM (Read / Only / Memory), a RAM (Random / Access / Memory), a HDD (Hard / Disk / Drive), or an SSD (Solid / State / Drive).
  • the storage device 930 stores a program 931 and a file 932.
  • the program 931 includes a program for executing processing (function) described as “unit” in the description of the embodiment of the present invention.
  • the file 932 includes data, information, signals (values), and the like that are calculated, processed, read, written, used, input, output, etc. by what is described as “parts” in the description of the embodiment of the present invention. It is.
  • the processing device 940 is, for example, a CPU (Central Processing Unit).
  • the processing device 940 is connected to other hardware devices via a bus or the like, and controls those hardware devices.
  • the processing device 940 reads the program 931 from the storage device 930 and executes the program 931.
  • the processing device 940 is used for performing calculation, processing, reading, writing, use, input, output, and the like by what is described as “unit” in the description of the embodiment of the present invention.
  • 100 drawing device 101 generating unit, 102 storing unit, 103 calculating unit, 104 setting unit, 105 drawing unit, 110 drawing data building unit, 201 first rectangle, 202 second rectangle, 301 transparent portion, 302 opaque portion, 910 Output device, 920 input device, 930 storage device, 931 program, 932 file, 940 processing device.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

 描画装置(100)は、ポリゴンを使用して、二本の太線の接続部分に生じる隙間を埋める。この描画装置(100)において、生成部(101)は、二本の太線を描画するための描画情報を生成する。格納部(102)は、二本の太線を描画するための描画パラメータを格納する。算出部(103)は、二本の太線のポリゴンの頂点座標を算出した後、二本の太線の接続部分が大きく尖って不自然な形状にならないように、ポリゴンの頂点座標を補正する。設定部(104)は、ポリゴンのテクスチャを設定する。描画部(105)は、ポリゴンを描画し、テクスチャを貼り付ける。

Description

描画装置及び描画方法及び描画プログラム
 本発明は、描画装置及び描画方法及び描画プログラムに関するものである。
 二本の太線の接続部分に生じる隙間を埋める方法として、“miter”、“round”、“bevel”等がある(例えば、特許文献1及び2参照)。“miter”では、二本の太線の外縁を延長してできる四角形で隙間を埋める。“round”では、二本の太線の接続点を中心とした円の一部で隙間を埋める。“bevel”では、二本の太線の外縁の端点をつないでできる三角形で隙間を埋める。
 三次元モデルで太線をポリゴンとして描画し、ポリゴンにテクスチャを貼り付ける方法がある(例えば、特許文献3参照)。この方法では、二点を結ぶ線であるリンクに対し、左右に所定間隔だけ離れた平行線を引くことで太線のポリゴンの頂点を算出する。二本の太線を接続する場合は、左右それぞれの二本の平行線を伸縮して接続することで折線のポリゴンの頂点を算出する。
特開平8-305864号公報 特開平6-168339号公報 特開2007-86156号公報
 特許文献1及び2の方法では、ポリゴンを使用せず、ポリラインで太線を描画するため、複雑な模様の太線を表現することができない。
 特許文献3の方法では、二本の太線の接続部分に隙間は生じないが、二本の太線のリンクのなす角度が小さいと、その接続部分が大きく尖って(即ち、肥大化して)不自然な形状になってしまう。
 本発明は、例えば、二本の太線の接続部分に生じる隙間をポリゴンで埋めて、その接続部分を自然な形状に整えることを目的とする。
 本発明の一の態様に係る描画装置は、
 第1辺を有する第1矩形と、前記第1辺と交差する第2辺を有する第2矩形との間に生じ、前記第1辺と前記第2辺との交点と、前記第1辺の一端点と、前記第2辺の一端点とを頂点とする三角形の隙間を埋める。
 前記描画装置は、
 前記第1矩形と前記第2矩形とを定義するデータを格納する格納部と、
 前記第1辺と前記第2辺との交点をP、前記第1辺の両端点のうち前記三角形の一頂点である端点をS1、前記第2辺の両端点のうち前記三角形の一頂点である端点をS2、前記第1辺に垂直でS1を一端点とする辺の延長線と前記第2辺に垂直でS2を一端点とする辺の延長線との交点をAとし、前記格納部に格納されたデータに基づき、前記隙間を埋めるポリゴンの頂点として、P及びAを両端点とする線分上のP以外の一点であるA’と、S1及びAを両端点とする線分上のA以外の一点であるS1’と、S2及びAを両端点とする線分上のA以外の一点であるS2’とを含む頂点列を算出する算出部と、
 前記算出部により算出された頂点列から形成されるポリゴンを描画する描画部とを備える。
 本発明によれば、二本の太線(即ち、二つの矩形)の接続部分に生じる隙間をポリゴンで埋めて、その接続部分を自然な形状に整えることが可能となる。
実施の形態1に係る描画装置の構成を示すブロック図。 実施の形態1に係る描画装置が備える算出部の動作の一例を示すフローチャート。 実施の形態1に係る描画装置が備える算出部により生成されるポリゴンの例を示す図。 実施の形態1に係る描画装置が備える算出部により生成されるポリゴンの例を示す図。 実施の形態1に係る描画装置が備える算出部により生成されるポリゴンの例を示す図。 実施の形態1に係る描画装置が備える算出部により生成されるポリゴンの例を示す図。 実施の形態2に係る描画装置が備える算出部により生成されるポリゴンと描画装置が備える設定部により設定されるテクスチャとの例を示す図。 実施の形態2に係る描画装置が備える設定部により設定されるテクスチャの例を示す図。 本発明の実施の形態に係る描画装置のハードウェア構成の一例を示す図。
 以下、本発明の実施の形態について、図を用いて説明する。
 実施の形態1.
 本実施の形態は、道路を太線として描画したり、移動経路を太線として地図上に描画したり、VICS(登録商標)(Vehicle・Information・and・Communication・System)又はTMC(Traffic・Message・Channel)により得られる情報に基づいて渋滞線(渋滞が発生している道路を示す線)又は順調線(順調に流れている道路を示す線)を太線として地図上に描画したりするナビゲーション機器等、太線を描画する様々な機器に適用することができる。
 図1は、本実施の形態に係る描画装置100の構成を示すブロック図である。
 図1において、描画装置100は、生成部101、格納部102、算出部103、設定部104、描画部105を備える。
 生成部101は、ユーザの入力等に従って、ポリゴンを描画するために必要な描画情報を生成する。本実施の形態をナビゲーション機器に適用する場合、生成部101は、ナビゲーション機器のユーザの位置情報、或いは、ナビゲーション機器が搭載された移動体(例えば、車両)の位置情報も参照して、リアルタイムに描画情報を生成する。
 格納部102は、描画範囲、描画する線の幅及び色、閾値といった描画パラメータをディスク或いはフラッシュメモリ等の記憶媒体に格納する。本実施の形態をナビゲーション機器に適用する場合、格納部102は、道路を含む地図を描画したり、移動経路を地図上に描画したりするための描画パラメータ及び地図データを格納する。
 算出部103及び設定部104は、描画可能な形式で描画データを構築する描画データ構築部110を構成する。描画データ構築部110は、生成部101により生成された描画情報に基づいて、格納部102からポリゴンを描画するために必要な描画パラメータを取得する。
 算出部103は、生成部101により生成された描画情報と、格納部102から取得した描画パラメータとに基づいて、ポリゴンの頂点座標を算出する。即ち、算出部103は、ポリゴンを生成する。本実施の形態をナビゲーション機器に適用する場合、算出部103は、道路、又は、前述したユーザ或いは移動体の移動経路を表すポリゴンを生成する。
 設定部104は、算出部103により生成されたポリゴンのテクスチャ及びマテリアルを設定する。
 描画部105は、描画データを描画する。具体的には、描画部105は、算出部103により生成されたポリゴンを描画する。そして、描画部105は、描画したポリゴンに、設定部104により設定されたテクスチャを貼り付ける。設定部104によりマテリアルが設定されている場合、描画部105は、描画したポリゴンに、そのマテリアルを付加する。本実施の形態をナビゲーション機器に適用する場合、描画部105は、道路、又は、前述したユーザ或いは移動体の移動経路を表す描画データを地図上に描画する。
 本実施の形態では、描画装置100が、太線を描画するときに、ポリゴンを使用して、二本の太線(即ち、二つの矩形)の接続部分に生じる隙間を埋める。即ち、描画装置100は、ポリゴンを使用して、第1辺を有する矩形と、第1辺と交差する第2辺を有する矩形との間に生じ、第1辺と第2辺との交点と、第1辺の一端点と、第2辺の一端点とを頂点とする三角形の隙間を埋める。
 以下では、算出部103が上記隙間を埋めるポリゴンを生成する動作について詳細に説明する。
 図2は、算出部103の動作の一例を示すフローチャートである。図3~6までは、算出部103により生成されるポリゴンの例を示す図である。なお、図3~6では、便宜上、隣接する三角形のポリゴンに異なるハッチングを用いているが、ハッチングの違いはテクスチャの違いを表すものではない。即ち、図3~6の例では、いくつか又は全てのポリゴンに共通のテクスチャを適用してもよい。本実施の形態をナビゲーション機器に適用する場合、道路又は移動経路を表すポリゴンには、特定箇所を区別する必要のない限り、共通のテクスチャを貼り付けることが望ましい。
 本例において、算出部103は、ポリゴンの頂点座標を算出する際に、プリミティブタイプとしてトライアングルストリップを使用する。また、算出部103は、バックフェイスカリングを適用して、反時計回り順に登録されたポリゴンを非描画に設定する。なお、算出部103は、トライアングルストリップの代わりに、トライアングルリスト又はその他のプリミティブタイプを使用してもよい。また、算出部103は、反時計回り順ではなく、時計回り順に登録されたポリゴンを非描画に設定してもよい。
 図3~6に示すように、P(n-1)及びP(n)を両端点とする線分を両側に同じ幅で広げた、一定の太さをもつ第1矩形201があると仮定する。また、P(n)及びP(n+1)を両端点とする線分を両側に同じ幅で広げた、一定の太さをもつ第2矩形202があると仮定する。
 第1矩形201は、Q1(n)、R1(n)、S1(n)、T1(n)の四頂点を有する。第1矩形201は、第1辺として、S1(n)及びT1(n)を両端点とする辺を有する。
 第2矩形202は、Q2(n)、R2(n)、S2(n)、T2(n)の四頂点を有する。第2矩形202は、第2辺として、S2(n)及びT2(n)を両端点とする辺を有する。第2辺は、第1矩形201の第1辺とP(n)で交差する。即ち、P(n)は、第1矩形201の第1辺と第2矩形202の第2辺との交点である。
 第1矩形201と第2矩形202との間には、P(n)、S1(n)、S2(n)を頂点とする三角形の隙間が生じている。
 A(n)は、R1(n)及びS1(n)を両端点とする辺の延長線と、Q2(n)及びS2(n)を両端点とする辺の延長線との交点である。R1(n)及びS1(n)を両端点とする辺は、第1矩形201の第1辺に垂直になっている。Q2(n)及びS2(n)を両端点とする辺は、第2矩形202の第2辺に垂直になっている。前述したように、S1(n)は、第1矩形201の第1辺の両端点のうち、第1矩形201と第2矩形202との間の隙間の三角形の一頂点である。S2(n)は、第2矩形202の第2辺の両端点のうち、第1矩形201と第2矩形202との間の隙間の三角形の一頂点である。
 B(n)は、Q1(n)及びT1(n)を両端点とする辺又はその辺の延長線と、R2(n)及びT2(n)を両端点とする辺又はその辺の延長線と、P(n)及びA(n)を両端点とする線分の延長線との交点である。Q1(n)及びT1(n)を両端点とする辺は、第1矩形201の第1辺に垂直になっている。R2(n)及びT2(n)を両端点とする辺は、第2矩形202の第2辺に垂直になっている。
 格納部102には、第1矩形201と第2矩形202を定義するデータが描画パラメータとして格納される。算出部103は、この描画パラメータに基づき、以下の処理を実行する。
 S11において、算出部103は、P(n-1)及びP(n)を両端点とする線分と、P(n)及びP(n+1)を両端点とする線分とのなす角が右折の曲がり角なのか、左折の曲がり角なのかを判定する。即ち、算出部103は、P(n-1)、P(n)、P(n+1)をつないだ線が右折しているのか、それとも左折しているのかを判定する。例えば、ベクトルの外積の符号によって右折及び左折を判定することができる。
 図3~6の例では、算出部103は、P(n-1)及びP(n)を両端点とする線分と、P(n)及びP(n+1)を両端点とする線分とのなす角を右折の曲がり角と判定する。ただし、頂点の並び順がP(n+1)、P(n)、P(n-1)のときは、左折の曲がり角と判定される。本実施の形態をナビゲーション機器に適用する場合、頂点の並び順は道路又は移動経路の進行方向によって決まる。
 S12において、算出部103は、通常ポリゴン座標算出処理を実行する。通常ポリゴン座標算出処理とは、P(n-1)、P(n)、P(n+1)のそれぞれに対し、両側に一つずつポリゴン頂点を設定し、各ポリゴン頂点の座標を算出する処理のことである。
 図3の例では、算出部103は、P(n-1)に対してQ1(n)及びR1(n)、P(n)に対してB(n)及びA(n)、P(n+1)に対してR2(n)及びQ2(n)をポリゴン頂点として設定する。そして、算出部103は、Q1(n)、R1(n)、B(n)、A(n)、R2(n)、Q2(n)を順番に含むトライアングルストリップ形式の頂点列を算出する。この頂点列からは、描画部105による描画の順番に、以下の四つの三角形ポリゴンが形成される。
・1番目のポリゴン:Q1(n)、R1(n)、B(n)を頂点とするポリゴン
・2番目のポリゴン:R1(n)、B(n)、A(n)を頂点とするポリゴン
・3番目のポリゴン:B(n)、A(n)、R2(n)を頂点とするポリゴン
・4番目のポリゴン:A(n)、R2(n)、Q2(n)を頂点とするポリゴン
 上記四つのうち、2~4番目の三つのポリゴンが、第1矩形201と第2矩形202との間の隙間を埋めるポリゴンである。
 通常ポリゴン座標算出処理では、P(n-1)、P(n)、P(n+1)の三点がなす角の二等分線上にポリゴン頂点が配置される。図3の例では、B(n)及びA(n)を両端点とする線分が二等分線である。なお、本実施の形態において、通常ポリゴン座標算出処理は、他の従来のポリゴン座標算出手法で代替することも可能である。
 通常ポリゴン座標算出処理では、第1矩形201と第2矩形202との接続部分に隙間は生じないが、P(n-1)、P(n)、P(n+1)の三点のなす角度が小さいほど、P(n)及びA(n)間の距離が長くなる。P(n-1)、P(n)、P(n+1)の三点のなす角度とは、P(n-1)及びP(n)を両端点とする線分と、P(n)及びP(n+1)を両端点とする線分との間の180度以下の角度のことである。P(n)及びA(n)間の距離があまりに長いと、第1矩形201と第2矩形202との接続部分が大きく尖って不自然な形状になってしまう。また、詳細な説明は省くが、通常ポリゴン座標算出処理では、P(n-1)、P(n)、P(n+1)の三点間の距離が短いと、ポリゴン間に不自然な隙間が空いてしまう。
 このように、通常ポリゴン座標算出処理では、不自然な形状のポリゴンが生成されてしまうことがある。本実施の形態では、後述する曲がり角ポリゴン座標算出処理を実行することで、より自然な形状のポリゴンを生成することができる。
 S13において、算出部103は、S12で算出した座標の補正が必要か否かを判定する。基本的には、算出部103は、第1矩形201及び第2矩形202の辺上に、S12の通常ポリゴン座標算出処理で算出したポリゴン座標のうち、第1矩形201及び第2矩形202の頂点以外の座標が存在するか否かを判定する。S11の判定結果が「右折」の場合、算出部103は、P(n-1)、P(n)、P(n+1)を順番に結んだベクトルに平行な二本の輪郭線のうち、右側の線分上に該当するポリゴン座標が存在するか否かを判定する。一方、S11の判定結果が「左折」の場合、算出部103は、左側の線分上に該当するポリゴン座標が存在するか否かを判定する。
 図3~6の例では、算出部103は、P(n-1)及びP(n)を両端点とする線分に平行な第1矩形201の二辺のうち、右側にあるQ1(n)及びT1(n)を両端点とする辺の上に、S12で算出したB(n)が存在するか否かを判定する。また、算出部103は、P(n)及びP(n+1)を両端点とする線分に平行な第2矩形202の二辺のうち、右側にあるT2(n)及びR2(n)を両端点とする辺の上に、S12で算出したB(n)が存在するか否かを判定する。
 図3の例では、Q1(n)及びT1(n)を両端点とする辺と、T2(n)及びR2(n)を両端点とする辺との両方の上にB(n)が存在する。よって、算出部103は、S12で算出した座標の補正が必要ないと判定する。
 図4の例では、Q1(n)及びT1(n)を両端点とする辺と、T2(n)及びR2(n)を両端点とする辺とのいずれの上にもB(n)が存在しない。よって、算出部103は、S12で算出した座標の補正が必要であると判定する。
 図5の例では、Q1(n)及びT1(n)を両端点とする辺の上にはB(n)が存在する。しかし、T2(n)及びR2(n)を両端点とする辺の上にはB(n)が存在しない。よって、算出部103は、S12で算出した座標の補正が必要であると判定する。
 図6の例では、Q1(n)及びT1(n)を両端点とする辺と、T2(n)及びR2(n)を両端点とする辺との両方の上にB(n)が存在する。しかし、この例では、P(n)及びA(n)間の距離が長くなっている。よって、算出部103は、S12で算出した座標の補正が必要であると判定する。算出部103は、P(n)及びA(n)間の距離を閾値と比較することで、P(n)及びA(n)間の距離が長すぎるか否か判定することができる。例えば、閾値は、P(n)を中心としてS1(n)及びS2(n)を通過する円の半径のx倍(例えば、x=1.2)に設定される。この閾値を使用すれば、P(n)及びA(n)間の距離が長くなりすぎないように制御することができる。
 なお、本実施の形態において、上記とは異なる基準で補正が必要か否かを判定してもよい。例えば、算出部103は、P(n)に対応する左右のポリゴン頂点を結んだ線分と、P(n)に隣接するP(n-1)又はP(n+1)に対応する左右のポリゴン頂点を結んだ線分とが交差するときに、補正が必要であると判定してもよい。或いは、算出部103は、ポリゴン頂点の登録順序が正常ではない場合に、補正が必要であると判定してもよい。或いは、算出部103は、P(n-1)、P(n)、P(n+1)の三点のなす角度が閾値以下のときに、補正が必要であると判定してもよい。
 算出部103により補正が必要ないと判定された場合、フローはS15に進む。算出部103により補正が必要であると判定された場合、フローはS14に進む。
 S14において、算出部103は、曲がり角ポリゴン座標算出処理を実行する。曲がり角ポリゴン座標算出処理とは、S12で算出した座標を補正する処理のことである。具体的には、曲がり角ポリゴン座標算出処理とは、第1矩形201と第2矩形202との間の隙間を埋めるポリゴンの頂点として、A’(n)と、S1’(n)と、S2’(n)とを含む頂点列を算出する処理のことである。A’(n)は、P(n)及びA(n)を両端点とする線分上のP(n)及びA(n)以外の一点である。S1’(n)は、S1(n)及びA(n)を両端点とする線分上のA(n)以外の一点である。S2’(n)は、S2(n)及びA(n)を両端点とする線分上のA(n)以外の一点である。
 図4~6の例でも、S12の結果は図3の例と同様である。よって、S14の実行前には、Q1(n)、R1(n)、B(n)、A(n)、R2(n)、Q2(n)を順番に含むトライアングルストリップ形式の頂点列が生成されている。曲がり角ポリゴン座標算出処理では、この頂点列が変更される。
 図4の例では、算出部103は、S12で算出された頂点列にてA(n)及びB(n)を、それぞれA’(n)及びB’(n)に補正する。A’(n)は、P(n)及びA(n)を両端点とする線分(即ち、前述した二等分線の左半分)と、P(n)を中心としてS1(n)及びS2(n)を通過する円との交点である。B’(n)は、P(n)及びA(n)を両端点とする線分の延長線(即ち、前述した二等分線の右半分)と、P(n)を中心とする上記円との交点である。算出部103は、さらに、頂点列にS1(n)及びS2(n)を、それぞれS1’(n)及びS2’(n)として追加する。算出部103は、頂点列にT1(n)及びT2(n)も追加する。結果として、算出部103は、Q1(n)、R1(n)、T1(n)、S1(n)、B’(n)、A’(n)、T2(n)、S2(n)、R2(n)、Q2(n)を順番に含むトライアングルストリップ形式の頂点列を算出する。この頂点列からは、以下の八つの三角形ポリゴンが形成される。
・1番目のポリゴン:Q1(n)、R1(n)、T1(n)を頂点とするポリゴン
・2番目のポリゴン:R1(n)、T1(n)、S1(n)を頂点とするポリゴン
・3番目のポリゴン:T1(n)、S1(n)、B’(n)を頂点とするポリゴン
・4番目のポリゴン:S1(n)、B’(n)、A’(n)を頂点とするポリゴン
・5番目のポリゴン:B’(n)、A’(n)、T2(n)を頂点とするポリゴン
・6番目のポリゴン:A’(n)、T2(n)、S2(n)を頂点とするポリゴン
・7番目のポリゴン:T2(n)、S2(n)、R2(n)を頂点とするポリゴン
・8番目のポリゴン:S2(n)、R2(n)、Q2(n)を頂点とするポリゴン
 上記八つのうち、4及び6番目の二つのポリゴンが、第1矩形201と第2矩形202との間の隙間を埋めるポリゴンである。なお、3番目のポリゴンは、2番目のポリゴンと同じ反時計回りであるため、バックフェイスカリングが適用されて非描画となる。同様に、5番目のポリゴンは、4番目のポリゴンと同じ反時計回りであるため、バックフェイスカリングが適用されて非描画となる。よって、描画部105による描画処理では、1,2,4,6,7,8番目のポリゴンが順番に描画されることになる。
 図5の例では、算出部103は、S12で算出された頂点列にてA(n)をA’(n)に補正する。A’(n)は、図4の例と同様に、P(n)及びA(n)を両端点とする線分(即ち、前述した二等分線の左半分)と、P(n)を中心としてS1(n)及びS2(n)を通過する円との交点である。B(n)は、Q1(n)及びT1(n)を両端点とする辺の上に存在するため、補正しなくてよい。算出部103は、さらに、頂点列にS1(n)及びS2(n)を、それぞれS1’(n)及びS2’(n)として追加する。結果として、算出部103は、Q1(n)、R1(n)、B(n)、S1(n)、B(n)、A’(n)、B(n)、S2(n)、R2(n)、Q2(n)を順番に含むトライアングルストリップ形式の頂点列を算出する。この頂点列からは、以下の八つの三角形ポリゴンが形成される。
・1番目のポリゴン:Q1(n)、R1(n)、B(n)を頂点とするポリゴン
・2番目のポリゴン:R1(n)、B(n)、S1(n)を頂点とするポリゴン
・3番目のポリゴン:B(n)、S1(n)、B(n)を頂点とするポリゴン
・4番目のポリゴン:S1(n)、B(n)、A’(n)を頂点とするポリゴン
・5番目のポリゴン:B(n)、A’(n)、B(n)を頂点とするポリゴン
・6番目のポリゴン:A’(n)、B(n)、S2(n)を頂点とするポリゴン
・7番目のポリゴン:B(n)、S2(n)、R2(n)を頂点とするポリゴン
・8番目のポリゴン:S2(n)、R2(n)、Q2(n)を頂点とするポリゴン
 上記八つのうち、4及び6番目の二つのポリゴンが、第1矩形201と第2矩形202との間の隙間を埋めるポリゴンである。なお、3番目のポリゴンは、面積が0であるため、非描画となる。同様に、5番目のポリゴンは、面積が0であるため、非描画となる。よって、描画部105による描画処理では、1,2,4,6,7,8番目のポリゴンが順番に描画されることになる。
 図6の例では、算出部103は、S12で算出された頂点列にてA(n)をA’(n)に補正する。A’(n)は、図4の例と同様に、P(n)及びA(n)を両端点とする線分(即ち、前述した二等分線の左半分)と、P(n)を中心としてS1(n)及びS2(n)を通過する円との交点である。B(n)は、Q1(n)及びT1(n)を両端点とする辺と、T2(n)及びR2(n)を両端点とする辺との両方の上に存在するため、補正しなくてよい。算出部103は、さらに、頂点列にS1(n)及びS2(n)を、それぞれS1’(n)及びS2’(n)として追加する。結果として、算出部103は、図5の例と同様に、Q1(n)、R1(n)、B(n)、S1(n)、B(n)、A’(n)、B(n)、S2(n)、R2(n)、Q2(n)を順番に含むトライアングルストリップ形式の頂点列を算出する。この頂点列からは、前述した八つの三角形ポリゴンが形成される。描画部105による描画処理では、1,2,4,6,7,8番目のポリゴンが順番に描画されることになる。
 なお、図4~6の例において、A’(n)は、P(n)及びA(n)を両端点とする線分上で任意の位置にずらすことができる。A’(n)がP(n)から少しでも離れていれば、第1矩形201と第2矩形202との間の隙間を一部でも埋めることができる。A’(n)がA(n)から少しでも離れていれば、第1矩形201と第2矩形202との接続部分の肥大化を抑制する効果が得られる。即ち、第1矩形201と第2矩形202との接続部分が大きく尖らないようにすることができる。
 図4~6の例において、S1’(n)は、S1(n)及びA(n)を両端点とする線分上で任意の位置にずらすことができる。S2’(n)も、S2(n)及びA(n)を両端点とする線分上で任意の位置にずらすことができる。S1’(n)又はS2’(n)がA(n)から少しでも離れていれば、第1矩形201と第2矩形202との接続部分の肥大化を抑制する効果が得られる。
 A’(n)、S1’(n)、S2’(n)の設定のしかたによっては、第1矩形201と第2矩形202との接続部分が凹状になる場合がある。しかし、接続部分は、凸状のほうが、より自然である。したがって、算出部103は、P(n)及びA(n)を両端点とする線分と、S1’(n)及びS2’(n)を両端点とする線分との交点よりもA’(n)がA(n)に近くなるように、A’(n)、S1’(n)、S2’(n)を設定することが望ましい。
 図4の例において、B’(n)は、P(n)及びA(n)を両端点とする線分の延長線(即ち、前述した二等分線の右半分)上で任意の位置にずらすことができる。B’(n)が第1矩形201と第2矩形202とのうち少なくともいずれか一方に重なっていれば、第1矩形201及び第2矩形202の外側(「右折」の場合は右側)にポリゴンが設定されることはない。
 図5及び6の例のように、B(n)がQ1(n)及びT1(n)を両端点とする辺とT2(n)及びR2(n)を両端点とする辺とのうち少なくともいずれか一方の上に存在する場合でも、算出部103は、図4の例のようなポリゴンの頂点列を算出してもよい。即ち、図5,6の例において、算出部103は、S12で算出された頂点列にてB(n)を補正してもよい。図示していないが、その場合、算出部103は、図4の例と同様に、Q1(n)、R1(n)、T1(n)、S1(n)、B’(n)、A’(n)、T2(n)、S2(n)、R2(n)、Q2(n)を順番に含むトライアングルストリップ形式の頂点列を算出する。この頂点列から形成される八つの三角形ポリゴンのうち、4及び6番目の二つのポリゴンが、第1矩形201と第2矩形202との間の隙間を埋めるポリゴンである。3及び5番目のポリゴンは、バックフェイスカリングが適用されて非描画となる。
 図4~6の例において、高さの異なるポリゴン座標が存在する場合がある。その場合に、二次元位置(即ち、高さを無視した位置)が第1矩形201と重なるポリゴン座標が存在するのであれば、そのポリゴン座標の高さは、第1矩形201の面の高さに補正される。同様に、二次元位置が第2矩形202と重なるポリゴン座標が存在するのであれば、そのポリゴン座標の高さは、第2矩形202の面の高さに補正される。例えば、図4に示したT1(n)の二次元位置は第2矩形202と重なっているため、T1(n)の高さが第2矩形202の面の当該位置における高さと異なる場合、T1(n)の高さが補正される。
 S15において、算出部103は、S12の通常ポリゴン座標算出処理、或いは、S14の曲がり角ポリゴン座標算出処理で算出したポリゴン座標をモデルに設定する。ポリゴンの法線は、真上(ポリゴンに対して垂直な単位ベクトル)を向くように設定される。
 本例では、P(n)について、通常ポリゴン座標算出処理の後に曲がり角ポリゴン座標算出処理が実行され、その後、P(n+1)等の他の点についても、同様の処理が実行される。しかし、各点について、曲がり角ポリゴン座標算出処理の後に通常ポリゴン座標算出処理が実行されてもよい。或いは、各点について、通常ポリゴン座標算出処理と同時に曲がり角ポリゴン座標算出処理が実行されてもよい。或いは、全ての点について、通常ポリゴン座標算出処理が実行された後に、各点について、曲がり角ポリゴン座標算出処理が実行されてもよい。各処理の順序は適宜変更することができる。S13は省略可能である。つまり、全ての点について、通常ポリゴン座標算出処理の結果に関わらず、曲がり角ポリゴン座標算出処理が実行されてもよい。
 設定部104は、通常ポリゴン座標算出処理により生成されたポリゴンのテクスチャ及びマテリアルと、曲がり角ポリゴン座標算出処理により生成されたポリゴンのテクスチャ及びマテリアルとを同じ方法で設定してもよいし、異なる方法で設定してもよい。
 描画部105は、S15で算出部103により設定された頂点列から形成されるポリゴンを描画する。本実施の形態をナビゲーション機器に適用する場合、描画部105は、道路又は移動経路を表すポリゴンを地図上に描画する。描画部105、或いは、描画装置100の外部の表示部(図示していない)は、この地図をナビゲーション機器の画面に表示する。
 本実施の形態では、図3~6の例のように、ポリラインを左右に所定間隔だけ平行に広げて幅付けした第1矩形201と第2矩形202との接続部分に生じる隙間をポリゴンで埋めて、その接続部分を自然な形状に整えることが可能となる。特に、図4~6の例のように、P(n-1)及びP(n)を両端点とする線分と、P(n)及びP(n+1)を両端点とする線分とのなす角度が小さいとき、或いは、第1矩形201と第2矩形202との少なくともいずれかの長さが短いときでも、ポリゴンの頂点を補正することで、上記接続部分を自然な形状に整えることが可能となる。
 また、本実施の形態では、第1矩形201と第2矩形202との曲がり角周辺箇所に対し、表示したい目的の形状のポリゴンではなく、バックフェイスカリングを利用して非描画とすることを考慮したポリゴンの頂点座標を設定することで、少ない頂点数で太線のポリゴンを描画することができる。即ち、本実施の形態では、バックフェイスカリングにより、表示に不要な箇所は非描画、表示に必要な箇所は描画とすることができる。そのため、高速に太線を描画することが可能となる。
 曲がり角ポリゴン座標算出処理で算出されるポリゴンには、通常のテクスチャ座標の設定方法を利用でき、例外処理を設ける必要がない。そのため、高速にテクスチャを貼り付けることが可能である。
 実施の形態2.
 本実施の形態について、主に実施の形態1との差異を説明する。
 実施の形態1では、ポリゴンの頂点座標を補正することで、第1矩形201と第2矩形202との接続部分を自然な形状に整えている。一方、本実施の形態では、一部が透過なテクスチャを使用することで、第1矩形201と第2矩形202との接続部分を自然な形状に整える。本実施の形態では、ポリゴンの頂点座標を補正することは必須ではない。
 本実施の形態に係る描画装置100の構成は、図1に示した実施の形態1のものと同じである。
 以下では、算出部103がポリゴンを生成し、設定部104がポリゴンのテクスチャを設定する動作について、図2を参照しながら説明する。
 図7は、算出部103により生成されるポリゴンと設定部104により設定されるテクスチャとの例を示す図である。図8は、設定部104により設定されるテクスチャの例を示す図である。なお、図7では、便宜上、隣接する三角形のポリゴンに異なるハッチングを用いているが、ハッチングの違いはテクスチャの違いを表すものではない。即ち、図7の例では、いくつか又は全てのポリゴンに共通のテクスチャを適用してもよい。ただし、第1矩形201と第2矩形202との間の隙間を埋めるポリゴンには、透過部分301と不透過部分302とが混在するテクスチャを適用する。
 図7の例において、第1矩形201及び第2矩形202は、図6の例と同じ矩形である。A(n)及びB(n)も、図6の例と同じ点である。
 S11~S15の処理については、実施の形態1とほとんど同じである。ただし、本実施の形態では、S13及びS14の処理は省略可能である。即ち、P(n)等のいずれの点についても、曲がり角ポリゴン座標算出処理が実行されなくてよい。また、曲がり角ポリゴン座標算出処理が実行される場合であっても、A’(n)は、P(n)及びA(n)を両端点とする線分上のP(n)以外の一点であればよい。即ち、A’(n)は、A(n)であってもよい。
 図7の例では、図6の例と同様に、P(n)及びA(n)間の距離が長くなっている。そのため、実施の形態1を適用する場合には、S13において、算出部103は、S12で算出した座標の補正が必要であると判定する。しかし、本実施の形態を適用する場合には、算出部103は、補正が必要ないと判定してもよい。図7の例では、補正が必要であると判定されたものとする。ただし、図6の例と異なり、A(n)は補正されていない。即ち、A’(n)は、A(n)と同じである。S14において、算出部103は、Q1(n)、R1(n)、B(n)、S1(n)、B(n)、A(n)、B(n)、S2(n)、R2(n)、Q2(n)を順番に含むトライアングルストリップ形式の頂点列を算出する。この頂点列からは、以下の八つの三角形ポリゴンが形成される。
・1番目のポリゴン:Q1(n)、R1(n)、B(n)を頂点とするポリゴン
・2番目のポリゴン:R1(n)、B(n)、S1(n)を頂点とするポリゴン
・3番目のポリゴン:B(n)、S1(n)、B(n)を頂点とするポリゴン
・4番目のポリゴン:S1(n)、B(n)、A(n)を頂点とするポリゴン
・5番目のポリゴン:B(n)、A(n)、B(n)を頂点とするポリゴン
・6番目のポリゴン:A(n)、B(n)、S2(n)を頂点とするポリゴン
・7番目のポリゴン:B(n)、S2(n)、R2(n)を頂点とするポリゴン
・8番目のポリゴン:S2(n)、R2(n)、Q2(n)を頂点とするポリゴン
 上記八つのうち、4及び6番目の二つのポリゴンが、第1矩形201と第2矩形202との間の隙間を埋めるポリゴンである。なお、3番目のポリゴンは、面積が0であるため、非描画となる。同様に、5番目のポリゴンは、面積が0であるため、非描画となる。よって、描画部105による描画処理では、1,2,4,6,7,8番目のポリゴンが順番に描画されることになる。
 設定部104は、第1矩形201と第2矩形202との間の隙間を埋める二つのポリゴンに対しては、他のポリゴンと異なり、透過部分301を含むテクスチャを設定する。具体的には、設定部104は、S1(n)、B(n)、A(n)を頂点とするポリゴンのテクスチャとして、S1’(n)からC(n)までの境界線により透過部分301と不透過部分302とに分割されたテクスチャを設定する。同様に、設定部104は、A(n)、B(n)、S2(n)を頂点とするポリゴンのテクスチャとして、S2’(n)からC(n)までの境界線により透過部分301と不透過部分302とに分割されたテクスチャを設定する。C(n)は、P(n)及びA(n)を両端点とする線分と、P(n)を中心としてS1(n)及びS2(n)を通過する円との交点である。C(n)は、ポリゴンの頂点として設定された点ではない。S1’(n)及びS2’(n)は、それぞれS1(n)及びS2(n)である。
 設定部104は、予め作成されたテクスチャの透過部分301と不透過部分302との境界線と、ポリゴンに設定するテクスチャの透過部分301と不透過部分302との境界線とが一致するように、ポリゴンに対してテクスチャを設定する。例えば、設定部104は、S1(n)、B(n)、A(n)を頂点とするポリゴンについて、図8に示すように、S1(n)、B(n)、A(n)、C(n)の四つのポリゴン座標に対応するテクスチャ座標を算出する。設定部104は、A(n)、B(n)、S2(n)を頂点とするポリゴンについて、さらに、S2(n)のポリゴン座標に対応するテクスチャ座標を算出する。
 なお、図7の例において、透過部分301と不透過部分302との境界線の一端点としてのC(n)は、P(n)及びA(n)を両端点とする線分上で任意の位置にずらすことができる。C(n)がP(n)から少しでも離れていれば、第1矩形201と第2矩形202との間の隙間を一部でも埋めることができる。C(n)がA(n)から少しでも離れていれば、第1矩形201と第2矩形202との接続部分の肥大化を抑制する効果が得られる。即ち、P(n)及びA(n)間の距離が長くても、第1矩形201と第2矩形202との接続部分が大きく尖って見えないようにすることができる。
 図7の例において、透過部分301と不透過部分302との境界線の他端点としてのS1’(n)は、S1(n)及びA(n)を両端点とする線分上で任意の位置にずらすことができる。透過部分301と不透過部分302との境界線の他端点としてのS2’(n)も、S2(n)及びA(n)を両端点とする線分上で任意の位置にずらすことができる。S1’(n)又はS2’(n)がA(n)から少しでも離れていれば、第1矩形201と第2矩形202との接続部分の肥大化を抑制する効果が得られる。
 透過部分301と不透過部分302との境界位置を決めるC(n)、S1’(n)、S2’(n)の設定のしかたによっては、第1矩形201と第2矩形202との接続部分が凹状に見える場合がある。しかし、接続部分は、凸状のほうが、より自然である。したがって、設定部104は、P(n)及びA(n)を両端点とする線分と、S1’(n)及びS2’(n)を両端点とする線分との交点よりもC(n)がA(n)に近くなるように、C(n)、S1’(n)、S2’(n)を設定することが望ましい。
 描画部105は、S15で算出部103により設定された頂点列から形成されるポリゴンを描画する。そして、描画部105は、描画したポリゴンに、設定部104により設定されたテクスチャを貼り付ける。本実施の形態をナビゲーション機器に適用する場合、描画部105は、道路を表すポリゴンを描画するか、又は、移動経路を表すポリゴンを地図上に描画し、各ポリゴンにテクスチャを貼り付ける。描画部105、或いは、描画装置100の外部の表示部(図示していない)は、この地図をナビゲーション機器の画面に表示する。
 本実施の形態では、図7の例のように、ポリラインを左右に所定間隔だけ平行に広げて幅付けした第1矩形201と第2矩形202との接続部分に生じる隙間をポリゴンで埋めて、透過部分301を含むテクスチャを貼り付けることにより、その接続部分を自然な形状に整えることが可能となる。
 本実施の形態では、第1矩形201と第2矩形202との曲がり角周辺箇所に対し、一部が非表示となるテクスチャを貼り付けるだけで、曲がり角周辺の見た目を改善することができる。ポリゴン頂点座標を補正する処理を省くことで、より高速に太線を描画することも可能となる。
 図9は、本発明の実施の形態に係る描画装置100のハードウェア構成の一例を示す図である。
 図9において、描画装置100は、コンピュータであり、出力装置910、入力装置920、記憶装置930(即ち、記憶媒体)、処理装置940といったハードウェアを備える。ハードウェアは、描画装置100の各部(本発明の実施の形態の説明において「部」として説明するもの)によって利用される。
 出力装置910は、例えば、LCD(Liquid・Crystal・Display)等の表示装置、プリンタ、通信モジュール(通信回路等)である。出力装置910は、本発明の実施の形態の説明において「部」として説明するものによってデータ、情報、信号の出力(送信)のために利用される。
 入力装置920は、例えば、キーボード、マウス、タッチパネル、通信モジュール(通信回路等)である。入力装置920は、本発明の実施の形態の説明において「部」として説明するものによってデータ、情報、信号の入力(受信)のために利用される。
 記憶装置930は、例えば、ROM(Read・Only・Memory)、RAM(Random・Access・Memory)、HDD(Hard・Disk・Drive)、SSD(Solid・State・Drive)である。記憶装置930には、プログラム931、ファイル932が記憶される。プログラム931には、本発明の実施の形態の説明において「部」として説明するものの処理(機能)を実行するプログラムが含まれる。ファイル932には、本発明の実施の形態の説明において「部」として説明するものによって演算、加工、読み取り、書き込み、利用、入力、出力等が行われるデータ、情報、信号(値)等が含まれる。
 処理装置940は、例えば、CPU(Central・Processing・Unit)である。処理装置940は、バス等を介して他のハードウェアデバイスと接続され、それらのハードウェアデバイスを制御する。処理装置940は、記憶装置930からプログラム931を読み出し、プログラム931を実行する。処理装置940は、本発明の実施の形態の説明において「部」として説明するものによって演算、加工、読み取り、書き込み、利用、入力、出力等を行うために利用される。
 本発明の実施の形態の説明において「部」として説明するものは、「部」を「回路」、「装置」、「機器」に読み替えたものであってもよい。また、本発明の実施の形態の説明において「部」として説明するものは、「部」を「工程」、「手順」、「処理」に読み替えたものであってもよい。即ち、本発明の実施の形態の説明において「部」として説明するものは、ソフトウェアのみ、ハードウェアのみ、或いは、ソフトウェアとハードウェアとの組み合わせで実現される。ソフトウェアは、プログラム931として、記憶装置930に記憶される。プログラム931は、本発明の実施の形態の説明において「部」として説明するものとしてコンピュータを機能させるものである。或いは、プログラム931は、本発明の実施の形態の説明において「部」として説明するものの処理をコンピュータに実行させるものである。
 以上、本発明の実施の形態について説明したが、これらの実施の形態のうち、いくつかを組み合わせて実施しても構わない。或いは、これらの実施の形態のうち、いずれか一つ又はいくつかを部分的に実施しても構わない。例えば、これらの実施の形態の説明において「部」として説明するもののうち、いずれか一つのみを採用してもよいし、いくつかの任意の組み合わせを採用してもよい。なお、本発明は、これらの実施の形態に限定されるものではなく、必要に応じて種々の変更が可能である。
 100 描画装置、101 生成部、102 格納部、103 算出部、104 設定部、105 描画部、110 描画データ構築部、201 第1矩形、202 第2矩形、301 透過部分、302 不透過部分、910 出力装置、920 入力装置、930 記憶装置、931 プログラム、932 ファイル、940 処理装置。

Claims (14)

  1.  第1辺を有する第1矩形と、前記第1辺と交差する第2辺を有する第2矩形との間に生じ、前記第1辺と前記第2辺との交点と、前記第1辺の一端点と、前記第2辺の一端点とを頂点とする三角形の隙間を埋める描画装置であって、
     前記第1矩形と前記第2矩形とを定義するデータを格納する格納部と、
     前記第1辺と前記第2辺との交点をP、前記第1辺の両端点のうち前記三角形の一頂点である端点をS1、前記第2辺の両端点のうち前記三角形の一頂点である端点をS2、前記第1辺に垂直でS1を一端点とする辺の延長線と前記第2辺に垂直でS2を一端点とする辺の延長線との交点をAとし、前記格納部に格納されたデータに基づき、前記隙間を埋めるポリゴンの頂点として、P及びAを両端点とする線分上のP以外の一点であるA’と、S1及びAを両端点とする線分上のA以外の一点であるS1’と、S2及びAを両端点とする線分上のA以外の一点であるS2’とを含む頂点列を算出する算出部と、
     前記算出部により算出された頂点列から形成されるポリゴンを描画する描画部と
    を備えることを特徴とする描画装置。
  2.  前記算出部は、A以外の点をA’として設定することを特徴とする請求項1の描画装置。
  3.  前記算出部は、P及びAを両端点とする線分と、S1’及びS2’を両端点とする線分との交点よりもAに近い点をA’として設定することを特徴とする請求項2の描画装置。
  4.  前記算出部は、P及びAを両端点とする線分とPを中心としてS1及びS2を通過する円との交点をA’として設定することを特徴とする請求項1の描画装置。
  5.  前記算出部は、S1をS1’として設定し、S2をS2’として設定することを特徴とする請求項4の描画装置。
  6.  前記算出部は、前記第1辺の両端点のうちS1と逆側にある端点をT1、前記第2辺の両端点のうちS2と逆側にある端点をT2とし、前記第1辺に垂直でT1を一端点とする辺と前記第2辺に垂直でT2を一端点とする辺とのうち少なくともいずれか一方と、P及びAを両端点とする線分の延長線との交点であるBが存在する場合、Bを前記頂点列に含めることを特徴とする請求項1の描画装置。
  7.  前記算出部は、前記頂点列として、B、S1’、B、A’、B、S2’を順番に含むトライアングルストリップ形式の頂点列を算出することを特徴とする請求項6の描画装置。
  8.  前記算出部は、前記第1辺の両端点のうちS1と逆側にある端点をT1、前記第2辺の両端点のうちS2と逆側にある端点をT2とし、前記第1辺に垂直でT1を一端点とする辺と前記第2辺に垂直でT2を一端点とする辺とのうち少なくともいずれか一方と、P及びAを両端点とする線分の延長線との交点であるBが存在しない場合、P及びAを両端点とする線分の延長線上で前記第1矩形と前記第2矩形とのうち少なくともいずれか一方に重なる点であるB’を前記頂点列に含めることを特徴とする請求項1の描画装置。
  9.  前記算出部は、前記頂点列として、T1、S1’、B’、A’、T2、S2’を順番に含むトライアングルストリップ形式の頂点列を算出することを特徴とする請求項8の描画装置。
  10.  前記算出部により算出された頂点列に含まれるA’及びS1’をそれぞれ一頂点とするポリゴンのテクスチャとして、S1’から、P及びAを両端点とする線分上のP及びA’間の一点までの境界線により透過部分と不透過部分とに分割されたテクスチャを設定する設定部
    をさらに備え、
     前記描画部は、描画したポリゴンに、前記設定部により設定されたテクスチャを貼り付けることを特徴とする請求項1の描画装置。
  11.  前記設定部は、前記算出部により算出された頂点列に含まれるA’及びS2’をそれぞれ一頂点とするポリゴンのテクスチャとして、S2’の位置から、P及びAを両端点とする線分上のP及びA’間の位置までの境界線により透過部分と不透過部分とに分割されたテクスチャを設定することを特徴とする請求項10の描画装置。
  12.  前記描画部は、前記ポリゴンとして、移動経路を表すポリゴンを地図上に描画することを特徴とする請求項1から11のいずれかの描画装置。
  13.  第1辺を有する第1矩形と、前記第1辺と交差する第2辺を有する第2矩形との間に生じ、前記第1辺と前記第2辺との交点と、前記第1辺の一端点と、前記第2辺の一端点とを頂点とする三角形の隙間を埋める描画方法であって、
     前記第1矩形と前記第2矩形とを定義するデータを記憶媒体に格納するコンピュータが、前記第1辺と前記第2辺との交点をP、前記第1辺の両端点のうち前記三角形の一頂点である端点をS1、前記第2辺の両端点のうち前記三角形の一頂点である端点をS2、前記第1辺に垂直でS1を一端点とする辺の延長線と前記第2辺に垂直でS2を一端点とする辺の延長線との交点をAとし、前記データに基づき、前記隙間を埋めるポリゴンの頂点として、P及びAを両端点とする線分上のP以外の一点であるA’と、S1及びAを両端点とする線分上のA以外の一点であるS1’と、S2及びAを両端点とする線分上のA以外の一点であるS2’とを含む頂点列を算出し、
     前記コンピュータが、前記頂点列から形成されるポリゴンを描画することを特徴とする描画方法。
  14.  第1辺を有する第1矩形と、前記第1辺と交差する第2辺を有する第2矩形との間に生じ、前記第1辺と前記第2辺との交点と、前記第1辺の一端点と、前記第2辺の一端点とを頂点とする三角形の隙間を埋める描画プログラムであって、
     前記第1矩形と前記第2矩形とを定義するデータを記憶媒体に格納するコンピュータに、
     前記第1辺と前記第2辺との交点をP、前記第1辺の両端点のうち前記三角形の一頂点である端点をS1、前記第2辺の両端点のうち前記三角形の一頂点である端点をS2、前記第1辺に垂直でS1を一端点とする辺の延長線と前記第2辺に垂直でS2を一端点とする辺の延長線との交点をAとし、前記データに基づき、前記隙間を埋めるポリゴンの頂点として、P及びAを両端点とする線分上のP以外の一点であるA’と、S1及びAを両端点とする線分上のA以外の一点であるS1’と、S2及びAを両端点とする線分上のA以外の一点であるS2’とを含む頂点列を算出する算出処理と、
     前記算出処理により算出された頂点列から形成されるポリゴンを描画する描画処理と
    を実行させることを特徴とする描画プログラム。
PCT/JP2014/062689 2014-05-13 2014-05-13 描画装置及び描画方法及び描画プログラム WO2015173885A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2016519015A JP6058216B2 (ja) 2014-05-13 2014-05-13 描画装置及び描画方法及び描画プログラム
PCT/JP2014/062689 WO2015173885A1 (ja) 2014-05-13 2014-05-13 描画装置及び描画方法及び描画プログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/062689 WO2015173885A1 (ja) 2014-05-13 2014-05-13 描画装置及び描画方法及び描画プログラム

Publications (1)

Publication Number Publication Date
WO2015173885A1 true WO2015173885A1 (ja) 2015-11-19

Family

ID=54479457

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/062689 WO2015173885A1 (ja) 2014-05-13 2014-05-13 描画装置及び描画方法及び描画プログラム

Country Status (2)

Country Link
JP (1) JP6058216B2 (ja)
WO (1) WO2015173885A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018020526A (ja) * 2016-08-05 2018-02-08 有限会社ホワイトラビット 立体物造形用データ作成方法
CN115723570A (zh) * 2022-12-27 2023-03-03 无锡车联天下信息技术有限公司 一种汽车智能座舱显示屏中的油耗量展示方法及装置

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10232996A (ja) * 1997-02-20 1998-09-02 Matsushita Electric Ind Co Ltd 交通情報表示装置
JP2005031951A (ja) * 2003-07-11 2005-02-03 Oki Data Corp 図形処理装置

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10232996A (ja) * 1997-02-20 1998-09-02 Matsushita Electric Ind Co Ltd 交通情報表示装置
JP2005031951A (ja) * 2003-07-11 2005-02-03 Oki Data Corp 図形処理装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018020526A (ja) * 2016-08-05 2018-02-08 有限会社ホワイトラビット 立体物造形用データ作成方法
CN115723570A (zh) * 2022-12-27 2023-03-03 无锡车联天下信息技术有限公司 一种汽车智能座舱显示屏中的油耗量展示方法及装置
CN115723570B (zh) * 2022-12-27 2024-01-26 无锡车联天下信息技术有限公司 一种汽车智能座舱显示屏中的油耗量展示方法及装置

Also Published As

Publication number Publication date
JPWO2015173885A1 (ja) 2017-04-20
JP6058216B2 (ja) 2017-01-11

Similar Documents

Publication Publication Date Title
CN103310474B (zh) 一种手写原笔迹的实现方法及系统
CN104268911B (zh) 绘制地图中路线的方法和装置
JP4621617B2 (ja) 図形描画装置、図形描画方法、及びプログラム
US20110158555A1 (en) Curved surface area calculation device and method
CN112100795B (zh) 一种计算机辅助设计图纸的对比方法及装置
KR102443697B1 (ko) 경로 스트로크를 수행하는 방법 및 장치
JP6058216B2 (ja) 描画装置及び描画方法及び描画プログラム
US9251607B1 (en) Anti-aliasing techniques
US9202148B2 (en) Image processing apparatus and method for generating stencil data of a stroke based on shape information, connection-point information, and end-point information
CN103392190A (zh) 纹理映射装置
JP5889401B2 (ja) 文字描画装置および文字描画方法
US10621889B2 (en) Map display system and map display program
JPWO2016092588A1 (ja) 描画装置、および描画方法
JP2006318336A (ja) 図形描画装置
JP4691494B2 (ja) 画像描画装置、頂点選出方法、頂点選出プログラム及び集積回路
JP5738442B2 (ja) 地図描画装置、ナビゲーション装置および地図描画方法
JP2010039680A (ja) 画像処理装置、画像処理プログラムおよび画像処理方法
JP5777736B2 (ja) 地図データ作成装置、地図データ作成方法および記憶媒体
US12026809B2 (en) Systems for generating anti-aliased vector objects
US20220366621A1 (en) Systems for Generating Anti-Aliased Vector Objects
JP5875327B2 (ja) 画像表示装置
EP3422326A1 (en) Map display system and map display program
Demas et al. Star Unfolding of Boxes (Multimedia Exposition)
Figueiredo et al. Digitization of Bézier curves and patches using discrete geometry
KR20160086622A (ko) 스트로크 기반의 이미지 렌더링 장치, 방법 및 컴퓨터 프로그램

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: 14892215

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2016519015

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14892215

Country of ref document: EP

Kind code of ref document: A1