CN102194247A - Method for judging graphic element information in modeling process of vector word triangular plate - Google Patents

Method for judging graphic element information in modeling process of vector word triangular plate Download PDF

Info

Publication number
CN102194247A
CN102194247A CN2010101242438A CN201010124243A CN102194247A CN 102194247 A CN102194247 A CN 102194247A CN 2010101242438 A CN2010101242438 A CN 2010101242438A CN 201010124243 A CN201010124243 A CN 201010124243A CN 102194247 A CN102194247 A CN 102194247A
Authority
CN
China
Prior art keywords
sequence number
vector
point
polygon
ranking results
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2010101242438A
Other languages
Chinese (zh)
Other versions
CN102194247B (en
Inventor
刘鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Mei She network technology Co., Ltd
Original Assignee
China Digital Video Beijing Ltd
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 China Digital Video Beijing Ltd filed Critical China Digital Video Beijing Ltd
Priority to CN201010124243.8A priority Critical patent/CN102194247B/en
Publication of CN102194247A publication Critical patent/CN102194247A/en
Application granted granted Critical
Publication of CN102194247B publication Critical patent/CN102194247B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Controls And Circuits For Display Device (AREA)

Abstract

The invention provides a method for judging graphic element information in the modeling process of a vector word triangular plate, which comprises an input step, a Y-direction sorting step, an X-direction sorting step and a judgment step, wherein in the input step, vector word data are input, an outline line segment of a vector word is approximate to a rear vector polygon and vector word data comprise a plurality of vector point data; in the Y-direction sorting step, the vector word data are sorted to obtain the sorting result in the Y direction of coordinates; in the X-direction sorting step, the vector word data are sorted to obtain the sorting result in the X direction of the coordinates; and in the judgment step, the graphic element information in the modeling process of the triangular plate is judged according to the vector word data, the sorting result in the Y direction and the sorting result in the X direction. By using the method, the modeling speed of the vector word triangular plate is improved.

Description

The determination methods of graphic element information in a kind of vector font triangular plate modeling process
Technical field
The present invention relates to vector font triangular plate modeling technique field, particularly relate to the determination methods of graphic element information in a kind of vector font triangular plate modeling process.
Background technology
The modeling of vector font triangular plate, be meant the vector descriptor of from the vector font library of appointment, extracting the literal of appointment, change these Vector Messages into a series of polygon then, try to achieve the leg-of-mutton set of a pile at last, the result who makes these triangles piece together forms literal, carries out three-dimensional rendering with convenient Direct3D or the OPenGL (OPen GraPhics Library) of using.
The algorithm of vector font triangular plate modeling at present is various, but carries out certain point mostly inevitably whether in specifying triangle, perhaps, a certain line segment whether with the judgement of another line segment intersection.
With a certain line segment whether with the example that is judged as of another line segment intersection, common way is at first to get rid of the line segment that obviously can not intersect, and in vector font library, line segment is to represent with the coordinate of two end points, and like this, described method for removing is exactly the end points coordinate of comparison two line segments.
The end points coordinate of supposing line segment 1 is: (x1, y1), (x2, y2), the end points coordinate of line segment 2 be (X1, Y1), (X2, Y2), so, described method for removing can for:
If X1, the minimum value among the X2 is greater than x1, the maximal value among the x2,
Perhaps X1, the maximal value among the X2 is less than x1, the minimum value among the x2,
Perhaps Y1, the minimum value among the Y2 is greater than y1, the maximal value among the y2,
Perhaps Y1, the maximal value among the Y2 is less than y1, the minimum value among the y2,
Then two line segments can not intersect,
When carrying out above-mentioned exclusion process, the coordinate that need use directions X relatively, as the comparison of X1, X2, the comparison of x1, x2, and, the obtaining of these directions X coordinate maximins; Sometimes, also need to use the coordinate comparison of Y direction and obtaining of maximin.
The modeling of vector font triangular plate is that a requirement is finished the not application of playing up of the literal of determined number in the short as far as possible time, also just becomes extremely important so improve the speed of vector font triangular plate modeling here; And in specific implementation, the coordinate figure of described end points all uses floating number to represent, also, above-mentioned algorithm mostly is the comparison operation (as subtraction) of floating number greatly; Because floating number, the N that its institute of computing in computing machine time-consuming is the integer computing times, wherein, N is the integer greater than 1.
In a word, need the urgent technical matters that solves of those skilled in the art to be exactly: the speed that how to improve the modeling of vector font triangular plate.
Summary of the invention
Technical matters to be solved by this invention is the determination methods of graphic element information in a kind of vector font triangular plate modeling process, in order to improve the speed of vector font triangular plate modeling.
In order to address the above problem, the invention discloses the determination methods of graphic element information in a kind of vector font triangular plate modeling process, comprising:
Input step: the input vector digital data, wherein, described vector font approaches the back vector polygon for the outline line segment, and described vector font data comprise the data of a plurality of vector points;
Y direction ordered steps: the vector font data are sorted, obtain the ranking results of coordinate Y direction;
Directions X ordered steps: the vector font data are sorted, obtain the ranking results of coordinate directions X;
Determining step: according to the vector font data, and the ranking results of coordinate Y direction and coordinate directions X, the graphic element information in the triangular plate modeling process is judged.
Preferably, described graphic element information is the crossing information of two line segments, and wherein, the end points of described line segment is the vector point;
Described determining step comprises:
Obtain the ranking results of the two-end-point of first line segment: the first starting point Y sequence number, the first terminal point Y sequence number, the first starting point X sequence number, the first terminal point X sequence number at Y direction and directions X;
Obtain the ranking results of the two-end-point of second line segment: the second starting point Y sequence number, the second terminal point Y sequence number, the second starting point X sequence number, the second terminal point X sequence number at Y direction and directions X;
According to the ranking results of first judgment rule and these two line segments, obtain the crossing information of these two line segments, wherein, described first judgment rule is:
If the minimum value in the first starting point X sequence number, the first terminal point X sequence number is greater than the maximal value in the second starting point X sequence number, the second terminal point X sequence number,
Perhaps, the maximal value in the first starting point X sequence number, the first terminal point X sequence number is less than the minimum value in the second starting point X sequence number, the second terminal point X sequence number,
Perhaps, the minimum value in the first starting point Y sequence number, the first terminal point Y sequence number is greater than the maximal value in the second starting point Y sequence number, the second terminal point Y sequence number,
Perhaps the maximal value in the first starting point Y sequence number, the first terminal point Y sequence number is less than the minimum value in the second starting point Y sequence number, the second terminal point Y sequence number,
Then described two line segments are non-intersect.
Preferably, described graphic element information is for treating judging point and leg-of-mutton position relation information, wherein, describedly treats that judging point and 3 summits of triangle are the vector point;
Described determining step comprises:
Obtain the described ranking results for the treatment of judging point at Y direction and directions X: Y sequence number and X sequence number;
According to the Y direction ranking results on 3 summits of triangle, obtain maximum Y sequence number and minimum Y sequence number;
According to the directions X ranking results on 3 summits of triangle, obtain maximum X sequence number and minimum X sequence number;
According to second judgment rule, and Y sequence number, X sequence number, maximum Y sequence number, minimum Y sequence number, maximum X sequence number and minimum X sequence number are obtained and are treated judging point and leg-of-mutton position relation information, and wherein, described second judgment rule is:
If the X sequence number is greater than maximum X sequence number,
Perhaps, the X sequence number is less than minimum X sequence number,
Perhaps, the Y sequence number is greater than maximum Y sequence number,
Perhaps, the Y sequence number is less than minimum Y sequence number,
Then this treats that judging point is not in triangle.
Preferably, described graphic element information is the salient angle vertex information;
Described determining step comprises:
According to the ranking results of coordinate Y direction, find out the vector point of Y maximum, as the salient angle summit.
Preferably, described method also comprises:
Preserve step: the data of described a plurality of vector points are remained to data array.
Preferably, described modeling process is:
Seek operation: in current vector polygon, find a salient angle summit PC, and this salient angle summit PC and preceding some PP thereof put triangle { PP, PC, the PN} that PN forms with the back;
First decision operation: at the arbitrary vector point PI except that PP, PC, PN in the current vector polygon, judge whether it satisfies the condition of cutting apart, if then carry out and cut apart the polygon operation, otherwise, carry out the operation of output triangle, wherein, the described condition of cutting apart is, PI is at triangle { PP, PC, in the PN}, and the line PIPC of PI and PC not be not the line segment intersection of end points in the vector polygon with PI or PC;
Cut apart the polygon operation: use PIPC that current vector polygon is divided into two, and return and seek operation, respectively described two vector polygons are handled;
The operation of output triangle: { PP, PC, PN} are a triangular plate, and the PC point is removed from the data array of current vector polygon in output;
Second decision operation: whether the number of judging vector point in the data array of current vector polygon less than 3, if, then carry out and remove the polygon operation, otherwise, return and seek operation;
Removal polygon operation: the data array of removing current vector polygon;
The 3rd decision operation: judge whether to exist vector polygon, if, then return and seek operation, otherwise, end operation carried out;
End operation: the triangular plate modeling finishes.
Preferably, described Y direction ordered steps comprises:
,, then sort to described vector font data sorting according to Y coordinate size according to X coordinate size if the Y coordinate is equal.
Preferably, described directions X ordered steps comprises:
,, then sort to described vector font data sorting according to X coordinate size according to Y coordinate size if the X coordinate is equal.
Compared with prior art, the present invention has the following advantages:
The present invention at first sorts to known floating point values in vector font triangular plate modeling process, like this, when the judgement that needs certain floating point values to participate in, can use the sequence number of this floating point values at ranking results; Because using the ordering sequence number of floating point values judges, in fact floating-point operation has been transformed into the integer computing, and the floating point values number of comparisons that the number of times of the floating point values comparison that ordering the time need be used carries out when being far smaller than the triangular plate modeling, thereby can improve arithmetic speed, and then improve the speed of triangular plate modeling.
Description of drawings
Fig. 1 is the process flow diagram of the determination methods embodiment of graphic element information in a kind of vector font triangular plate of the present invention modeling process;
Fig. 2 is the synoptic diagram of a kind of vector polygon of the present invention;
Fig. 3 is the synoptic diagram of a kind of XY coordinate system of the present invention;
Fig. 4 is the vector type matrix synoptic diagram of a kind of English alphabet L of the present invention;
Fig. 5 is the leg-of-mutton example 1 that a kind of salient angle of the present invention summit is formed;
Fig. 6 is a kind of signal 1 of exporting triangular plate of the present invention;
Fig. 7 is the signal that condition is cut apart in a kind of judgement of the present invention;
Fig. 8 is a kind of signal 2 of exporting triangular plate of the present invention;
Fig. 9 is the present invention a kind of searching salient angle summit and leg-of-mutton signal;
Figure 10 is a kind of signal 3 of exporting triangular plate of the present invention;
Figure 11 is a kind of signal 4 of exporting triangular plate of the present invention;
Figure 12 is the output example of a kind of modeling result of the present invention.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
Carry out at the practical application floating point values whether certain point is specifying in the triangle, whether a certain line segment during with the judgement of information such as another line segment intersection, participates in the floating point values judged, it extracts vector font information really and obtains just having determined behind a series of polygons.
One of core idea of the present invention is, behind the floating point values of determining vector font, all floating point values is sorted, and like this, when the judgement that needs certain floating point values to participate in, can use the sequence number of this floating point values at ranking results; Because using the ordering sequence number of floating point values judges, in fact floating-point operation has been transformed into the integer computing, and the floating point values number of comparisons that the number of times of the floating point values comparison that ordering the time need be used carries out when being far smaller than the triangular plate modeling, thereby can improve the speed of triangular plate modeling.
With reference to Fig. 1, show the process flow diagram of the determination methods embodiment of graphic element information in a kind of vector font triangular plate of the present invention modeling process, specifically can comprise:
Input step 11, input vector digital data, wherein, described vector font approaches the back vector polygon for the outline line segment, and described vector font data can comprise the data of a plurality of vector points;
In practice, described graphic element information can comprise the crossing information of two line segments, treat information such as judging point and leg-of-mutton position relation information, salient angle summit, wherein, describedly wait to judge that object is all relevant with described vector point, for example, the end points of described line segment is the vector point, the described judging point for the treatment of is the vector point, and 3 summits of described triangle are vector point etc.
In specific implementation, the first step of modeling should be the extraction of vector font data; With English alphabet L is example, after can approaching the outline line segment of this English alphabet L, obtains vector polygon shown in Figure 2, this vector polygon can comprise a plurality of vector points, and at this moment, the coordinate data array of described a plurality of vector points promptly can be as the input data in the modeling process: (x1, y1), (x2, y2), (x3, y3), (x4, y4), (x5, y5), (x6, y6).
For convenient described vector font data are managed, in a preferred embodiment of the present invention, determination methods of the present invention can also comprise:
Preserve step, the data of described a plurality of vector points are remained to data array.
Data array has been arranged, after cutting apart a triangle (be unified term, all adopt triangle to describe triangular plate in the modeling process), can should from data array, remove on leg-of-mutton salient angle summit; Like this, can change the wherein number of vector point, cut apart with convenient ensuing triangle by upgrading data array.
Y direction ordered steps 12, the vector font data are sorted, obtain the ranking results of coordinate Y direction;
The implementation procedure of this step can for: according to Y coordinate size to described vector font data sorting, if the Y coordinate equate, then sort according to X coordinate size; If the XY coordinate system according to shown in Figure 3 sorts in the Y direction from big to small to vector polygon shown in Figure 2, then the ranking results of its coordinate Y direction is: P5, P6, P4, P3, P2, P1.
Directions X ordered steps 13, the vector font data are sorted, obtain the ranking results of coordinate directions X;
In practice, the implementation of this step can for: according to X coordinate size described point data is sorted, if the X coordinate equate, then sort according to Y coordinate size; XY coordinate system according to shown in Figure 3 sorts in the Y direction from big to small to vector polygon shown in Figure 2, and then the ranking results of its coordinate Y direction is: P5, P4, P3, P2, P6, P1.
Determining step 14, according to the vector font data, and the ranking results of coordinate Y direction and coordinate directions X is judged the graphic element information in the triangular plate modeling process.
The algorithm of vector font triangular plate modeling at present is a lot, and very ripe, in a kind of preferred embodiment of the present invention, adopts fast algorithm as prototype, and at this moment, the flow process of described triangular plate modeling can comprise the steps:
Seek operation S1, in current vector polygon, find a salient angle summit PC, and this salient angle summit PC and preceding some PP thereof put triangle { PP, PC, the PN} that PN forms with the back;
This action need is used the judgement of salient angle vertex information.
A method of proof of polygon salient angle is: exist the straight line of this angular vertex of mistake to make except this summit, other point of polygon is all on same one side of this straight line; Can find out that by geometrical principle that vector point of the Y maximum in the ranking results of coordinate Y direction must satisfy top method of proof, for example, the P6 among Fig. 2 is the salient angle summit.
Because this operation only need be found a salient angle summit PN, so, when described graphic element information is the salient angle vertex information; The implementation of described determining step 14 can for: according to the ranking results of coordinate Y direction, find out the vector point of Y maximum, as the salient angle summit.
Therefore, with respect to the angle of prior art repeated calculation angle point, the present invention only need find that vector point of Y maximum, thereby can save computing velocity greatly.
The first decision operation S2, at the arbitrary vector point PI except that PP, PC, PN in the current vector polygon, judge whether it satisfies the condition of cutting apart, if then carry out and cut apart polygon operation S3, otherwise, carry out output triangle operation S4, wherein, the described condition of cutting apart is, PI is at triangle { PP, PC, in the PN}, and the line PIPC of PI and PC not be not the line segment intersection of end points in the vector polygon with PI or PC;
This action need is used the judgement for the treatment of judging point and leg-of-mutton position relation information, and wherein, described judging point and 3 summits of triangle for the treatment of are the vector point of vector polygon;
At this moment, described determining step 14 can comprise following substep:
Substep A1, obtain the described ranking results for the treatment of judging point at Y direction and directions X: Y sequence number and X sequence number;
Substep A2, according to the Y direction ranking results on 3 summits of triangle, obtain maximum Y sequence number and minimum Y sequence number;
Substep A3, according to the directions X ranking results on 3 summits of triangle, obtain maximum X sequence number and minimum X sequence number;
Substep A4, according to second judgment rule, and Y sequence number, X sequence number, maximum Y sequence number, minimum Y sequence number, maximum X sequence number and minimum X sequence number are obtained and are treated judging point and leg-of-mutton position relation information, wherein, described second judgment rule can for:
If the X sequence number is greater than maximum X sequence number,
Perhaps, the X sequence number is less than minimum X sequence number,
Perhaps, the Y sequence number is greater than maximum Y sequence number,
Perhaps, the Y sequence number is less than minimum Y sequence number,
Then this treats that judging point is not in triangle.
The structure principle of above-mentioned second judgment rule is, has not in the rectangular area that triangle covers by other point relatively, filters a large amount of irrelevant points, and therefore, the present invention has and filters irrelevant point, thereby reduces the advantage of floating point values operand; For the vector point that does not meet second judgment rule, also need to use floating point values to judge that further it is whether in the triangle of appointment.
Be appreciated that the present invention is not limited to described second judgment rule, those skilled in the art can make up other second judgment rule as required, and the present invention is not limited this.
This operation also needs to use the judgement of the crossing information of two line segments, and wherein, the end points of described line segment is the vector point;
At this moment, described determining step 14 can comprise following substep:
Substep B1, obtain the ranking results of the two-end-point of first line segment: the first starting point Y sequence number, the first terminal point Y sequence number, the first starting point X sequence number, the first terminal point X sequence number at Y direction and directions X;
Substep B2, obtain the ranking results of the two-end-point of second line segment: the second starting point Y sequence number, the second terminal point Y sequence number, the second starting point X sequence number, the second terminal point X sequence number at Y direction and directions X;
Substep B3, according to the ranking results of first judgment rule and these two line segments, obtain the crossing information of these two line segments, wherein, described first judgment rule can for:
If the minimum value in the first starting point X sequence number, the first terminal point X sequence number is greater than the maximal value in the second starting point X sequence number, the second terminal point X sequence number,
Perhaps, the maximal value in the first starting point X sequence number, the first terminal point X sequence number is less than the minimum value in the second starting point X sequence number, the second terminal point X sequence number,
Perhaps, the minimum value in the first starting point Y sequence number, the first terminal point Y sequence number is greater than the maximal value in the second starting point Y sequence number, the second terminal point Y sequence number,
Perhaps the maximal value in the first starting point Y sequence number, the first terminal point Y sequence number is less than the minimum value in the second starting point Y sequence number, the second terminal point Y sequence number,
Then described two line segments are non-intersect.
Cut apart polygon operation S3, use PIPC that current vector polygon is divided into two, and return and seek operation S1, respectively described two vector polygons are handled;
The output triangle is operated S4, { PP, PC, PN} are a triangular plate, and the PC point is removed from the data array of current vector polygon in output;
Especially, cut apart the existence that polygon operation S3 tends to cause a plurality of vector polygons; After the data that removal PC is ordered from the data array of current vector polygon, should judge also whether the PC point is present in other arbitrary vector polygon, if not, then this PC point is removed from ranking results.
The second decision operation S5, judge vector point in the data array of current vector polygon number whether less than 3, if, then carry out and remove polygon operation S6, otherwise, return and seek operation S1;
Remove the data array of polygon operation S6, the current vector polygon of removal;
Especially, for 2 points of other except that the PC point in the current vector polygon,, then it is removed from ranking results if it is not present in other arbitrary vector polygon.
The 3rd decision operation S7, judge whether to exist vector polygon, if, then return and seek operation S1, otherwise, end operation S8 carried out;
End operation S8; The triangular plate modeling finishes.
As seen, in the process of above-mentioned triangular plate modeling, operation S1 need calculate the angle of angle point; The vector point that operation S2 need judge appointment whether in the appointment triangle, and, the crossing information of two line segment intersections.
Prior art is when carrying out aforesaid operations, need to adopt floating point values to calculate, these calculate when handling the simplification polygon of these 6 points also unimportant, increase along with point, the time of its consumption becomes geometric series to rise, and general vector font all is made up of hundreds of even thousands of points; And determination methods of the present invention can find the salient angle summit easily, perhaps, filters a large amount of irrelevant points, so can improve arithmetic speed.
For making those skilled in the art understand the present invention better, below by example explanation, the implementation procedure that the graphic element information in the vector font triangular plate modeling process is judged.
Described example relates to, and English alphabet L vector polygon shown in Figure 2 is carried out the triangular plate modeling, obtains the vector type matrix of English alphabet L shown in Figure 4, and output in the direction of the clock; Wherein, the output data of 4 triangular plates among Fig. 2,3 vertex representations of available triangular plate: { P5, P6, P4}, { P6, P3, P4}, { P6, P1, P3}, { P3, P1, P2}; Original vector polygon is P1 at Y direction ranking results from small to large, P2, and P3, P4, P6, P5 is P1 at directions X ranking results from small to large, P6, P2, P3, P4, P5; The flow process of described triangular plate modeling specifically can comprise the steps:
Step T1, according to Y direction ranking results, in current vector polygon, find a salient angle summit P5, and, with reference to Fig. 5, triangle { P5, P6, P4} that this salient angle summit P5 and preceding some P4 thereof and back point P6 form;
Step T2, learn that through judgement other vector point P1, P2, the P3 of current vector polygon all do not satisfy dividing strip spare;
For example, when judging vector point P1 and leg-of-mutton position relation information, because the ranking results of P1 is respectively { X=1, Y=1}, triangle { P5, P6, { Xmin=2, Xmax=6, the Ymin=4 of P4}, Ymax=6}, and, X<Xmin, so can learn that P1 is not at triangle { P5, P6 according to second judgment principle, in the P4}, thereby P1 does not satisfy dividing strip spare.
For P2{X=3, Y=2}, P3{X=4, Y=3} is because its deterministic process and P1's is similar, so do not give unnecessary details at this.
Step T3, with reference to Fig. 6, the output triangular plate P4} removes the P5 point from current vector polygon for P5, P6, and, because P5 point does not have the vector polygon of correspondence, so, it is removed from ranking results;
Data after the renewal:
Vector polygon: { P1, P2, P3, P4, P6};
Y direction ranking results from small to large: P1, P2, P3, P4, P6;
Directions X ranking results from small to large: P1, P6, P2, P3, P4;
Triangular plate output result: { P5, P6, P4}.
The number 5>3 of vector point in the vector polygon after step T4, the renewal is so carry out the searching operation on salient angle summit;
Step T5, according to the Y direction ranking results after upgrading, in current vector polygon, find a salient angle summit P6, and, with reference to Fig. 7, triangle { P1, P6, P4} that this salient angle summit P6 and preceding some P4 thereof and back point P1 form;
Step T6, learn that the vector point P3 of current vector polygon satisfies the condition of cutting apart through judgement;
With reference to Fig. 7, { in the P4}, and line segment P3P6 does not intersect with line segment P1P2, P1P4, P2P4 P3 for P1, P6 at triangle.
Step T7, with reference to Fig. 8, use line segment P3P6, current vector polygon is divided into following two:
Vector polygon 1{P1, P2, P3, P6}
Vector polygon 2{P3, P4, P6}
Step T8, for vector polygon 2{P3, P4, P6}, the Y direction ranking results according to after upgrading finds a salient angle summit P6, and, with reference to Fig. 7, triangle { P3, P6, P4} that this salient angle summit P6 and preceding some P4 thereof and back point P3 form;
Step T9, because vector polygon 2{P3, P4, P6} outside the some P4 of back, do not have other to put except a P6 and its preceding some P3 again, obviously do not satisfy dividing strip spare;
Step T10, with reference to Fig. 8, the output triangular plate P4} removes the P6 point from vector polygon 2 for P3, P6, at this moment because the P6 point is also at vector polygon 1{P1, P2, P3 is among the P6}, so do not remove from ranking results.Data after obtaining upgrading:
Vector polygon 1:{P1, P2, P3, P6};
Y direction ranking results from small to large: P1, P2, P3, P6;
Directions X ranking results from small to large: P1, P6, P2, P3;
Triangular plate output result: { P5, P6, P4}, { P3, P6, P4}.
Step T11, owing to also have vector polygon 1{P1, P2, P3, P6} operates so carry out the searching on salient angle summit;
Step T12, according to the Y direction ranking results after upgrading, in vector polygon 1, find a salient angle summit P6, and, with reference to Fig. 9, triangle { P1, P6, P3} that this salient angle summit P6 and preceding some P3 thereof and back point P1 form;
Step T13, learn that through judgement the vector point P2 of current vector polygon does not satisfy dividing strip spare;
Step T14, with reference to Figure 10, the output triangular plate P3} removes the P6 point from vector polygon 1 for P1, P6, and, because P6 point does not have the vector polygon of correspondence, so, it is removed from ranking results;
Data after the renewal:
Vector polygon 1{P1, P2, P3};
Y direction ranking results from small to large: P1, P2, P3;
Directions X ranking results from small to large: P1, P2, P3;
Output result: { P5, P6, P4}, { P3, P6, P4}, { P1, P6, P3}.
The number of vector point is 3 in the vector polygon 1 after step T15, the renewal, so carry out the searching operation on salient angle summit;
Step T16, according to the Y direction ranking results after upgrading, in vector polygon 1, find a salient angle summit P3, and, triangle { P3, P1, P2} that this salient angle summit P3 and preceding some P2 thereof and back point P1 form;
Step T17, because vector polygon 1{P1, P2, P3} outside the some P1 of back, do not have other to put except a P3 and its preceding some P2 again, obviously do not satisfy dividing strip spare;
Step T18, with reference to Figure 11, the output triangular plate P3} removes the P3 point from vector polygon 1 for P1, P2, at this moment because there is not the vector polygon of correspondence in P3 point, so from ranking results, remove.Data after obtaining upgrading:
Vector polygon 1:{P1, P2};
Y direction ranking results from small to large: P1, P2;
Directions X ranking results from small to large: P1, P2;
Triangular plate output result: { P5, P6, P4}, { P3, P6, P4}, { P1, P6, P3}, { P1, P2, P3}.
Vector polygon 1{P1 after step T19, the renewal, the number of vector point is 2<3 among the P2}, the vector polygon 1 of dieing is not because P1, P2 be in other vector polygon, so remove from ranking results;
Step T20, currently do not have vector polygon, thus modeling finish, with reference to Figure 12, in a kind of application example of the present invention, the modeling result of output can for:
Vector polygon: sky
Y direction ranking results from small to large: sky
Directions X ranking results from small to large: sky
Triangular plate output result: { P5, P6, P4}, { P3, P6, P4}, { P1, P6, P3}, { P1, P2, P3}.
More than to the determination methods of graphic element information in a kind of vector font triangular plate modeling process provided by the present invention, be described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (8)

1. the determination methods of graphic element information in the vector font triangular plate modeling process is characterized in that, comprising:
Input step: the input vector digital data, wherein, described vector font approaches the back vector polygon for the outline line segment, and described vector font data comprise the data of a plurality of vector points;
Y direction ordered steps: the vector font data are sorted, obtain the ranking results of coordinate Y direction;
Directions X ordered steps: the vector font data are sorted, obtain the ranking results of coordinate directions X;
Determining step: according to the vector font data, and the ranking results of coordinate Y direction and coordinate directions X, the graphic element information in the triangular plate modeling process is judged.
2. the method for claim 1 is characterized in that, described graphic element information is the crossing information of two line segments, and wherein, the end points of described line segment is the vector point;
Described determining step comprises:
Obtain the ranking results of the two-end-point of first line segment: the first starting point Y sequence number, the first terminal point Y sequence number, the first starting point X sequence number, the first terminal point X sequence number at Y direction and directions X;
Obtain the ranking results of the two-end-point of second line segment: the second starting point Y sequence number, the second terminal point Y sequence number, the second starting point X sequence number, the second terminal point X sequence number at Y direction and directions X;
According to the ranking results of first judgment rule and these two line segments, obtain the crossing information of these two line segments, wherein, described first judgment rule is:
If the minimum value in the first starting point X sequence number, the first terminal point X sequence number is greater than the maximal value in the second starting point X sequence number, the second terminal point X sequence number,
Perhaps, the maximal value in the first starting point X sequence number, the first terminal point X sequence number is less than the minimum value in the second starting point X sequence number, the second terminal point X sequence number,
Perhaps, the minimum value in the first starting point Y sequence number, the first terminal point Y sequence number is greater than the maximal value in the second starting point Y sequence number, the second terminal point Y sequence number,
Perhaps the maximal value in the first starting point Y sequence number, the first terminal point Y sequence number is less than the minimum value in the second starting point Y sequence number, the second terminal point Y sequence number,
Then described two line segments are non-intersect.
3. the method for claim 1 is characterized in that, described graphic element information is for treating judging point and leg-of-mutton position relation information, wherein, describedly treats that judging point and 3 summits of triangle are the vector point;
Described determining step comprises:
Obtain the described ranking results for the treatment of judging point at Y direction and directions X: Y sequence number and X sequence number;
According to the Y direction ranking results on 3 summits of triangle, obtain maximum Y sequence number and minimum Y sequence number;
According to the directions X ranking results on 3 summits of triangle, obtain maximum X sequence number and minimum X sequence number;
According to second judgment rule, and Y sequence number, X sequence number, maximum Y sequence number, minimum Y sequence number, maximum X sequence number and minimum X sequence number are obtained and are treated judging point and leg-of-mutton position relation information, and wherein, described second judgment rule is:
If the X sequence number is greater than maximum X sequence number,
Perhaps, the X sequence number is less than minimum X sequence number,
Perhaps, the Y sequence number is greater than maximum Y sequence number,
Perhaps, the Y sequence number is less than minimum Y sequence number,
Then this treats that judging point is not in triangle.
4. the method for claim 1 is characterized in that, described graphic element information is the salient angle vertex information;
Described determining step comprises:
According to the ranking results of coordinate Y direction, find out the vector point of Y maximum, as the salient angle summit.
5. the method for claim 1 is characterized in that, also comprises:
Preserve step: the data of described a plurality of vector points are remained to data array.
6. method as claimed in claim 5 is characterized in that, described modeling process is:
Seek operation: in current vector polygon, find a salient angle summit PC, and this salient angle summit PC and preceding some PP thereof put triangle { PP, PC, the PN} that PN forms with the back;
First decision operation: at the arbitrary vector point PI except that PP, PC, PN in the current vector polygon, judge whether it satisfies the condition of cutting apart, if then carry out and cut apart the polygon operation, otherwise, carry out the operation of output triangle, wherein, the described condition of cutting apart is, PI is at triangle { PP, PC, in the PN}, and the line PIPC of PI and PC not be not the line segment intersection of end points in the vector polygon with PI or PC;
Cut apart the polygon operation: use PIPC that current vector polygon is divided into two, and return and seek operation, respectively described two vector polygons are handled;
The operation of output triangle: { PP, PC, PN} are a triangular plate, and the PC point is removed from the data array of current vector polygon in output;
Second decision operation: whether the number of judging vector point in the data array of current vector polygon less than 3, if, then carry out and remove the polygon operation, otherwise, return and seek operation;
Removal polygon operation: the data array of removing current vector polygon;
The 3rd decision operation: judge whether to exist vector polygon, if, then return and seek operation, otherwise, end operation carried out;
End operation: the triangular plate modeling finishes.
7. the method for claim 1 is characterized in that, described Y direction ordered steps comprises:
,, then sort to described vector font data sorting according to Y coordinate size according to X coordinate size if the Y coordinate is equal.
8. the method for claim 1 is characterized in that, described directions X ordered steps comprises:
,, then sort to described vector font data sorting according to X coordinate size according to Y coordinate size if the X coordinate is equal.
CN201010124243.8A 2010-03-11 2010-03-11 Method for judging graphic element information in modeling process of vector word triangular plate Expired - Fee Related CN102194247B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010124243.8A CN102194247B (en) 2010-03-11 2010-03-11 Method for judging graphic element information in modeling process of vector word triangular plate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010124243.8A CN102194247B (en) 2010-03-11 2010-03-11 Method for judging graphic element information in modeling process of vector word triangular plate

Publications (2)

Publication Number Publication Date
CN102194247A true CN102194247A (en) 2011-09-21
CN102194247B CN102194247B (en) 2015-07-15

Family

ID=44602258

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010124243.8A Expired - Fee Related CN102194247B (en) 2010-03-11 2010-03-11 Method for judging graphic element information in modeling process of vector word triangular plate

Country Status (1)

Country Link
CN (1) CN102194247B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105427330A (en) * 2015-12-21 2016-03-23 中科宇图科技股份有限公司 Random multi-proportion partition method of vector polygon
CN105808511A (en) * 2016-03-02 2016-07-27 中国科学院地理科学与资源研究所 Spatial position-based method for reconstructing text information in CAD electronic data
CN108665514A (en) * 2017-03-29 2018-10-16 北大方正集团有限公司 Font subdivision method and font splitting device
CN109308734A (en) * 2017-07-27 2019-02-05 腾讯科技(深圳)有限公司 The generation method and its device of 3D text, equipment, storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040128607A1 (en) * 2002-12-31 2004-07-01 Ilan Sutskover Method and apparatus to encode linear block codes
CN101071508A (en) * 2006-05-11 2007-11-14 株式会社东芝 Image processing apparatus, image processing method, and image processing program
CN101295407A (en) * 2007-04-27 2008-10-29 新奥特硅谷视频技术有限责任公司 Videotext system and rendering method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040128607A1 (en) * 2002-12-31 2004-07-01 Ilan Sutskover Method and apparatus to encode linear block codes
CN101071508A (en) * 2006-05-11 2007-11-14 株式会社东芝 Image processing apparatus, image processing method, and image processing program
CN101295407A (en) * 2007-04-27 2008-10-29 新奥特硅谷视频技术有限责任公司 Videotext system and rendering method thereof

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105427330A (en) * 2015-12-21 2016-03-23 中科宇图科技股份有限公司 Random multi-proportion partition method of vector polygon
CN105808511A (en) * 2016-03-02 2016-07-27 中国科学院地理科学与资源研究所 Spatial position-based method for reconstructing text information in CAD electronic data
CN108665514A (en) * 2017-03-29 2018-10-16 北大方正集团有限公司 Font subdivision method and font splitting device
CN108665514B (en) * 2017-03-29 2021-02-09 北大方正集团有限公司 Font dividing method and font dividing device
CN109308734A (en) * 2017-07-27 2019-02-05 腾讯科技(深圳)有限公司 The generation method and its device of 3D text, equipment, storage medium

Also Published As

Publication number Publication date
CN102194247B (en) 2015-07-15

Similar Documents

Publication Publication Date Title
CN107562980B (en) Geometric information extraction method based on BIM model
Wiseman et al. When an inescapable accident of autonomous vehicles is looming
CN102521854B (en) Parallel flow line placing method applicable to two-dimensional flow field
US9305396B2 (en) Identifying features in polygonal meshes
CN102194247B (en) Method for judging graphic element information in modeling process of vector word triangular plate
CN105389850A (en) Novel visibility generation method for large-scale three-dimensional scene
CN105210115A (en) Performing hand gesture recognition using 2D image data
CN112288807A (en) Method and device for generating intersection data in high-precision map
CN114972947A (en) Depth scene text detection method and device based on fuzzy semantic modeling
Wang et al. Pctn: Point cloud data transformation network
Song et al. The reconnection of contour lines from scanned color images of topographical maps based on GPU implementation
CN112269848A (en) Crowdsourcing trajectory data fusion method and device
CN105808791A (en) An acceleration method for resistance calculation mesh division
CN108053751B (en) Method and device for drawing direction arrow on electronic map navigation route
de Magalhaes et al. Exact intersection of 3D geometric models
Kim et al. An extension of polygon clipping to resolve degenerate cases
CN113868518A (en) Thermodynamic diagram generation method and device, electronic equipment and storage medium
CN103020356A (en) Triangulation algorithm for non-closed graph
Huang et al. A matching algorithm between precursory 3D process model and 2D working procedure drawing based on subgraph isomorphism
JP2011203785A (en) Polygon division device and polygon division method
CN102968778A (en) Three-dimensional geometric model component splicing method based on global optimization
CN101526970A (en) General simulation modeling description tool of container terminal logistics operation system
Li et al. Fpga-based object detection acceleration architecture design
CN116383451B (en) Map segmentation method and device, electronic equipment and storage medium
CN112613251B (en) Medium type step-by-step marking method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: BEIJING MEISHE NETWORK TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: XIN'AOTE(BEIJING) VIDEO TECHNOLOGY CO., LTD.

Effective date: 20150714

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20150714

Address after: 100080 Beijing city Haidian District xicaochang 1 No. 6 room 6005

Patentee after: Beijing Mei She network technology Co., Ltd

Address before: 100080 Beijing city Haidian District xicaochang No. 1 Silicon Valley computer city 15 1501-1506 room

Patentee before: China Digital Video (Beijing) Limited

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150715

Termination date: 20170311

CF01 Termination of patent right due to non-payment of annual fee