CN111063036A - Three-dimensional character arrangement method, medium, equipment and system based on path planning - Google Patents

Three-dimensional character arrangement method, medium, equipment and system based on path planning Download PDF

Info

Publication number
CN111063036A
CN111063036A CN201911189879.8A CN201911189879A CN111063036A CN 111063036 A CN111063036 A CN 111063036A CN 201911189879 A CN201911189879 A CN 201911189879A CN 111063036 A CN111063036 A CN 111063036A
Authority
CN
China
Prior art keywords
character
calculating
information
curve
characters
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
CN201911189879.8A
Other languages
Chinese (zh)
Other versions
CN111063036B (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.)
Gaoding Xiamen Technology Co Ltd
Original Assignee
Gaoding Xiamen Technology Co 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 Gaoding Xiamen Technology Co Ltd filed Critical Gaoding Xiamen Technology Co Ltd
Priority to CN201911189879.8A priority Critical patent/CN111063036B/en
Publication of CN111063036A publication Critical patent/CN111063036A/en
Application granted granted Critical
Publication of CN111063036B publication Critical patent/CN111063036B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts

Abstract

The invention discloses a three-dimensional character arrangement method, medium, equipment and system based on path planning, wherein the method comprises the following steps: acquiring character information to be made input by a user; calculating a first surrounding box corresponding to each character and a second surrounding box corresponding to each line of characters in the characters to be made according to the character content and the character typesetting information; calculating the relative position between a first bounding box and a corresponding second bounding box of the character, calculating a curve expression, and calculating a translation vector of the character according to the curve expression and the relative position; calculating a curve tangent vector of a first bounding box of the characters on a character path curve, calculating a rotation matrix of the characters according to the curve tangent vector, and moving the characters according to the rotation matrix and the translation vector to complete the arrangement of the three-dimensional characters; the three-dimensional character arranging device can realize rapid adjustment of arrangement of three-dimensional characters, improve the three-dimensional character arrangement efficiency and save manpower and material resources required in the three-dimensional character arrangement process.

Description

Three-dimensional character arrangement method, medium, equipment and system based on path planning
Technical Field
The invention relates to the technical field of three-dimensional images, in particular to a three-dimensional character arrangement method based on path planning, a computer readable storage medium, computer equipment and a three-dimensional character arrangement system based on path planning.
Background
Three-dimensional characters are a three-dimensional display mode of characters. In the process of processing the three-dimensional characters, in order to improve the display effect of the three-dimensional characters, the three-dimensional characters often need to be translated and rotated so as to be reasonably arranged.
In the related art, when the arrangement of three-dimensional characters needs to be adjusted, the three-dimensional characters often need to be adjusted one by one to determine the translation and rotation of each character; the process is tedious and inefficient, and the process wastes much time for users.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the art described above. Therefore, one object of the present invention is to provide a three-dimensional text arrangement method based on path planning, which can realize fast adjustment of arrangement of three-dimensional text, improve the three-dimensional text arrangement efficiency, and save manpower and material resources required in the three-dimensional text arrangement process.
A second object of the invention is to propose a computer-readable storage medium.
A third object of the invention is to propose a computer device.
The fourth purpose of the invention is to provide a three-dimensional character arrangement system based on path planning.
In order to achieve the above object, an embodiment of a first aspect of the present invention provides a three-dimensional text arrangement method based on path planning, including the following steps: acquiring character information to be made input by a user, wherein the character information to be made comprises character content, character typesetting information and character path curve information; calculating a first surrounding box corresponding to each character and a second surrounding box corresponding to each line of characters in the characters to be made according to the character content and the character typesetting information; calculating the relative position between a first bounding box and a corresponding second bounding box of the character, calculating a curve expression corresponding to the curve information of the character path, and calculating a translation vector of the character according to the curve expression and the relative position; and calculating a curve tangent vector of the first bounding box of the characters on a character path curve, calculating a rotation matrix of the characters according to the curve tangent vector, and moving the characters according to the rotation matrix and the translation vector to complete the arrangement of the three-dimensional characters.
According to the three-dimensional character arrangement method based on the path planning, firstly, character information to be made input by a user is obtained, wherein the character information to be made comprises character content, character typesetting information and character path curve information; then, calculating a first enclosing box corresponding to each character and a second enclosing box corresponding to each line of characters in the characters to be made according to the character content and the character typesetting information; then, calculating the relative position between the first bounding box and the corresponding second bounding box of the character, calculating a curve expression corresponding to the curve information of the character path, and calculating a translation vector of the character according to the curve expression and the relative position; secondly, calculating a curve tangent vector of a first bounding box of the characters on a character path curve, calculating a rotation matrix of the characters according to the curve tangent vector, and moving the characters according to the rotation matrix and the translation vector to complete the arrangement of the three-dimensional characters; therefore, the arrangement of the three-dimensional characters is quickly adjusted, the arrangement efficiency of the three-dimensional characters is improved, and manpower and material resources required in the arrangement process of the three-dimensional characters are saved.
In addition, the three-dimensional character arrangement method based on path planning proposed by the above embodiment of the present invention may further have the following additional technical features:
optionally, calculating the relative position between the first bounding box of the text and the corresponding second bounding box comprises: acquiring center point information of the first enclosure boxes and reference surface information on the second enclosure boxes, and calculating the transverse relative position between each first enclosure box and the corresponding second enclosure box according to the center point information and the reference surface information; and acquiring longitudinal center line information of the second enclosure boxes, and calculating a longitudinal offset vector between each first enclosure box and the corresponding second enclosure box according to the center point information and the longitudinal center line information.
Optionally, calculating a curve tangent vector of the first bounding box of the text on the text path curve includes: acquiring position information of an initial position of the first bounding box on a text path curve; and moving the first bounding box at the initial position along the character path curve, calculating the position information of the first bounding box after moving, and calculating the curve tangent vector of the first bounding box on the character path curve according to the position information of the initial position and the position information after moving.
Optionally, calculating a rotation matrix of the text according to the tangent vector of the curve includes: taking the curve tangent vector as a local X-axis vector of the character, acquiring a local Z-axis vector of the character, and calculating a local Y-axis vector of the character according to the local X-axis vector and the local Z-axis vector; and calculating a rotation matrix of the character according to the local X-axis vector, the local Y-axis vector and the local Z-axis vector.
Optionally, the text composition information includes: the number of lines of characters, the character content corresponding to each line of characters, the character alignment mode and the character size.
In order to achieve the above object, a second embodiment of the present invention provides a computer-readable storage medium, on which a three-dimensional text arrangement program based on path planning is stored, and when executed by a processor, the three-dimensional text arrangement program based on path planning implements the three-dimensional text arrangement method based on path planning as described above.
According to the computer-readable storage medium of the embodiment of the invention, the path-planning-based three-dimensional character arrangement program is stored, so that the processor can realize the path-planning-based three-dimensional character arrangement method when executing the path-planning-based three-dimensional character arrangement program, thereby realizing the rapid adjustment of the arrangement of the three-dimensional characters, improving the three-dimensional character arrangement efficiency and saving manpower and material resources required in the three-dimensional character arrangement process.
In order to achieve the above object, a third embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the three-dimensional text arrangement method based on path planning as described above.
According to the computer equipment provided by the embodiment of the invention, the three-dimensional character arrangement program based on the path planning is stored through the memory, so that the processor can realize the three-dimensional character arrangement method based on the path planning when executing the three-dimensional character arrangement program based on the path planning stored in the memory, thereby realizing the rapid adjustment of the arrangement of the three-dimensional characters, improving the three-dimensional character arrangement efficiency and saving the manpower and material resources required in the three-dimensional character arrangement process.
In order to achieve the above object, a fourth aspect of the present invention provides a three-dimensional text arrangement system based on path planning, including: the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring character information to be made input by a user, and the character information to be made comprises character content, character typesetting information and character path curve information; the calculation module is used for calculating a first surrounding box corresponding to each character and a second surrounding box corresponding to each line of characters in the characters to be made according to the character content and the character typesetting information; the translation module is used for calculating the relative position between the first bounding box and the corresponding second bounding box of the character, calculating a curve expression corresponding to the curve information of the character path, and calculating a translation vector of the character according to the curve expression and the relative position; the rotation module is used for calculating a curve tangent vector of the first bounding box of the character on the character path curve and calculating a rotation matrix of the character according to the curve tangent vector; and the arrangement module is used for moving the characters according to the rotation matrix and the translation vector so as to complete the arrangement of the three-dimensional characters.
According to the three-dimensional character arrangement system based on the path planning, the acquisition module is arranged to acquire character information to be made input by a user, wherein the character information to be made comprises character content, character typesetting information and character path curve information; the bounding box calculation module is used for calculating a first bounding box corresponding to each character and a second bounding box corresponding to each line of characters in the characters to be made according to the character content and the character typesetting information; the translation module is used for calculating the relative position between a first bounding box and a corresponding second bounding box of the character, calculating a curve expression corresponding to the curve information of the character path, and calculating a translation vector of the character according to the curve expression and the relative position; the rotation module is used for calculating a curve tangent vector of a first bounding box of the character on a character path curve and calculating a rotation matrix of the character according to the curve tangent vector; the arrangement module is used for moving the characters according to the rotation matrix and the translation vector so as to complete the arrangement of the three-dimensional characters; therefore, the arrangement of the three-dimensional characters is quickly adjusted, the arrangement efficiency of the three-dimensional characters is improved, and manpower and material resources required in the arrangement process of the three-dimensional characters are saved.
In addition, the three-dimensional character arrangement system based on path planning proposed by the above embodiment of the present invention may further have the following additional technical features:
optionally, calculating the relative position between the first bounding box of the text and the corresponding second bounding box comprises: acquiring center point information of the first enclosure boxes and reference surface information on the second enclosure boxes, and calculating the transverse relative position between each first enclosure box and the corresponding second enclosure box according to the center point information and the reference surface information; and acquiring longitudinal center line information of the second enclosure boxes, and calculating a longitudinal offset vector between each first enclosure box and the corresponding second enclosure box according to the center point information and the longitudinal center line information.
Optionally, calculating a curve tangent vector of the first bounding box of the text on the text path curve includes: acquiring position information of an initial position of the first bounding box on a text path curve; and moving the first bounding box at the initial position along the character path curve, calculating the position information of the first bounding box after moving, and calculating the curve tangent vector of the first bounding box on the character path curve according to the position information of the initial position and the position information after moving.
Drawings
Fig. 1 is a schematic flow chart of a three-dimensional text arrangement method based on path planning according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a rotation matrix calculation according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating an effect of three-dimensional text arrangement according to an embodiment of the present invention;
fig. 4 is a block diagram of a three-dimensional text layout system based on path planning according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
In the related technology, when the three-dimensional characters are arranged, the process is complicated, the efficiency is low, and the time is extremely wasted; according to the three-dimensional character arrangement method based on the path planning, firstly, character information to be made input by a user is obtained, wherein the character information to be made comprises character content, character typesetting information and character path curve information; then, calculating a first enclosing box corresponding to each character and a second enclosing box corresponding to each line of characters in the characters to be made according to the character content and the character typesetting information; then, calculating the relative position between the first bounding box and the corresponding second bounding box of the character, calculating a curve expression corresponding to the curve information of the character path, and calculating a translation vector of the character according to the curve expression and the relative position; secondly, calculating a curve tangent vector of a first bounding box of the characters on a character path curve, calculating a rotation matrix of the characters according to the curve tangent vector, and moving the characters according to the rotation matrix and the translation vector to complete the arrangement of the three-dimensional characters; therefore, the arrangement of the three-dimensional characters is quickly adjusted, the arrangement efficiency of the three-dimensional characters is improved, and manpower and material resources required in the arrangement process of the three-dimensional characters are saved.
In order to better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Referring to fig. 1, fig. 1 is a schematic flow chart of a three-dimensional text layout method based on path planning according to an embodiment of the present invention, as shown in fig. 1, the three-dimensional text layout method based on path planning includes the following steps:
s101, acquiring character information to be produced input by a user.
The character information to be made comprises character content, character typesetting information and character path curve information.
That is, the text information input by the user and required to make three-dimensional text is obtained, and the text information includes text content (i.e. which texts are included in the three-dimensional text to be made), text composition information, and text path curve information (i.e. information of curves referred to in the text arrangement process).
The text typesetting information can contain various data.
As an example, the text layout information includes the number of lines of text, and the text content corresponding to each line of text, so that multiple lines of text can be generated according to the text layout information, and the multiple lines of text can be uniformly arranged in the following, thereby improving the arrangement efficiency of three-dimensional text.
As another example, the text typesetting information includes the number of lines of text, the text content corresponding to each line of text, the text alignment mode, and the text size; therefore, the alignment mode (for example, left alignment, right alignment, middle alignment, etc.) of the characters and the size of the font size of the characters can be determined subsequently according to the character layout information.
For example, after a user presses a left mouse button, the text path curve information of a curve set by the user is obtained through the dragging operation of the mouse; or, acquiring the selection of the user on the preset curve, and then acquiring the character path curve information by adjusting the key node on the preset curve by the user; or acquiring a curve equation corresponding to the text path curve input by the user, so as to acquire text path curve information according to the curve equation.
S102, calculating a first surrounding box corresponding to each character and a second surrounding box corresponding to each line of characters in the characters to be made according to the character content and the character typesetting information.
It should be noted that the bounding box is an algorithm for solving the optimal bounding space of the discrete point set, and the calculation method of the bounding box has been described in detail in the prior art, and is not described herein again.
S103, calculating the relative position between the first bounding box and the corresponding second bounding box of the character, calculating a curve expression corresponding to the curve information of the character path, and calculating the translation vector of the character according to the curve expression and the relative position.
That is, the relative position between the first bounding box of each text and the corresponding second bounding box (i.e. the line in which the text is located) is calculated, and the curve expression corresponding to the text path curve information is calculated, so as to calculate the translation vector required for translation when the text is arranged according to the curve expression and the relative position between the first bounding box of the text and the second bounding box of the line in which the text is located.
There are various ways to calculate the relative position between the first bounding box and the corresponding second bounding box of the text.
As an example, calculating a relative position between a first bounding box of a word and a corresponding second bounding box comprises:
acquiring center point information of the first enclosure boxes and reference surface information on the second enclosure boxes, and calculating the transverse relative position between each first enclosure box and the corresponding second enclosure box according to the center point information and the reference surface information; then, the vertical distance from the center point of the first bounding box to the left side of the second bounding box is calculated and taken as the transverse relative position between the first bounding box and the second bounding box.
And acquiring longitudinal center line information of the second enclosure boxes, and calculating a longitudinal offset vector between each first enclosure box and the corresponding second enclosure box according to the center point information and the longitudinal center line information.
In some embodiments, after the curve expression corresponding to the text path curve information is obtained through calculation, the lateral relative position is substituted into the curve expression to obtain a position coordinate, a lateral offset vector can be obtained according to the newly obtained position coordinate and the center point information of the first bounding box, and further, a translation vector corresponding to each text can be calculated according to the lateral offset vector and the longitudinal offset vector.
And S104, calculating a curve tangent vector of the first bounding box of the characters on the character path curve, calculating a rotation matrix of the characters according to the curve tangent vector, and moving the characters according to the rotation matrix and the translation vector to complete the arrangement of the three-dimensional characters.
There are various ways to calculate the tangent vector of the first bounding box of the text on the text path curve.
As an example, a tangent calculation method corresponding to the text path curve is obtained, and a curve tangent vector of the first bounding box on the text path curve is calculated according to the tangent calculation method, that is, the curve tangent vector is calculated in an analytic solution manner.
As another example, first, position information of an initial position of the first bounding box on the text path curve is acquired; and then, moving the first bounding box at the initial position along the character path curve, calculating the position information of the first bounding box after moving, and calculating a curve tangent vector of the first bounding box on the character path curve according to the position information of the initial position and the position information after moving.
Specifically, first, after a position T of the first bounding box relative to the second bounding box when the first bounding box is at the initial position is obtained, a position coordinate B (T) of a center point of the first bounding box at the position T may be obtained, then, the first bounding box is moved by one point position in a positive direction along the text path curve, and a moved position coordinate B (T +0.001) may be obtained, and assuming that the text path curve is a bezier curve, the tangent vector may be calculated by two position coordinates.
In some embodiments, as shown in fig. 2, the rotation matrix of the text is calculated according to the tangent vector of the curve, including:
s201, taking the tangent vector of the curve as a local X-axis vector of the character, acquiring a local Z-axis vector of the character, and calculating a local Y-axis vector of the character according to the local X-axis vector and the local Z-axis vector.
S202, calculating a rotation matrix of the character according to the local X-axis vector, the local Y-axis vector and the local Z-axis vector.
That is, a curve tangent vector of a first bounding box of a character on a character path curve is used as an X-axis vector of a local coordinate system corresponding to the character, and further, a Z-axis vector of the local coordinate system of the character is obtained; the local coordinate system Z axis vector may be acquired in a plurality of ways, for example, in a preset way, the local coordinate system Z axis vector is preset to be perpendicular to the screen display position; or acquiring a Z-axis vector of a local coordinate system input by a user; then, cross-multiplying the X-axis vector of the local coordinate system and the Z-axis vector of the local coordinate system to obtain a Y-axis vector of the local coordinate system; then, calculation can be performed according to the local coordinate system X-axis vector, the local coordinate system Y-axis vector and the local coordinate system Z-axis vector to obtain a rotation matrix.
In addition, in order to better show the arrangement effect of the three-dimensional character arrangement method based on path planning provided by the embodiment of the invention, fig. 3 is taken as an example, and fig. 3 is a final effect diagram of three-dimensional characters arranged according to the three-dimensional character arrangement method based on path planning provided by the embodiment of the invention; as can be seen from fig. 3, the method provided by the present invention can perform a plurality of ways of three-dimensional character arrangement according to the information provided by the user under the condition that the user only provides the character path curve information, the character content and the character typesetting information, thereby greatly saving the arrangement time of the user and improving the three-dimensional character arrangement efficiency and the arrangement effect.
In summary, according to the three-dimensional text arrangement method based on path planning in the embodiment of the present invention, first, text information to be produced input by a user is obtained, where the text information to be produced includes text content, text typesetting information, and text path curve information; then, calculating a first enclosing box corresponding to each character and a second enclosing box corresponding to each line of characters in the characters to be made according to the character content and the character typesetting information; then, calculating the relative position between the first bounding box and the corresponding second bounding box of the character, calculating a curve expression corresponding to the curve information of the character path, and calculating a translation vector of the character according to the curve expression and the relative position; secondly, calculating a curve tangent vector of a first bounding box of the characters on a character path curve, calculating a rotation matrix of the characters according to the curve tangent vector, and moving the characters according to the rotation matrix and the translation vector to complete the arrangement of the three-dimensional characters; therefore, the arrangement of the three-dimensional characters is quickly adjusted, the arrangement efficiency of the three-dimensional characters is improved, and manpower and material resources required in the arrangement process of the three-dimensional characters are saved.
In order to implement the foregoing embodiment, an embodiment of the present invention provides a computer-readable storage medium, on which a three-dimensional text arrangement program based on path planning is stored, and when executed by a processor, the three-dimensional text arrangement program based on path planning implements the three-dimensional text arrangement method based on path planning as described above.
According to the computer-readable storage medium of the embodiment of the invention, the path-planning-based three-dimensional character arrangement program is stored, so that the processor can realize the path-planning-based three-dimensional character arrangement method when executing the path-planning-based three-dimensional character arrangement program, thereby realizing the rapid adjustment of the arrangement of the three-dimensional characters, improving the three-dimensional character arrangement efficiency and saving manpower and material resources required in the three-dimensional character arrangement process.
In order to implement the foregoing embodiments, an embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program that is stored in the memory and is executable on the processor, where when the processor executes the computer program, the three-dimensional character arrangement method based on path planning as described above is implemented.
According to the computer equipment provided by the embodiment of the invention, the three-dimensional character arrangement program based on the path planning is stored through the memory, so that the processor can realize the three-dimensional character arrangement method based on the path planning when executing the three-dimensional character arrangement program based on the path planning stored in the memory, thereby realizing the rapid adjustment of the arrangement of the three-dimensional characters, improving the three-dimensional character arrangement efficiency and saving the manpower and material resources required in the three-dimensional character arrangement process.
In order to implement the foregoing embodiment, an embodiment of the present invention provides a three-dimensional text layout system based on path planning, and as shown in fig. 4, the three-dimensional text layout system based on path planning includes: an acquisition module 10, a bounding box calculation module 20, a translation module 30, a rotation module 40, and an arrangement module 50.
The acquiring module 10 is configured to acquire text information to be produced, which is input by a user, where the text information to be produced includes text content, text typesetting information, and text path curve information;
the bounding box calculating module 20 is used for calculating a first bounding box corresponding to each character and a second bounding box corresponding to each line of characters in the characters to be made according to the character content and the character typesetting information;
the translation module 30 is configured to calculate a relative position between a first bounding box and a corresponding second bounding box of the text, calculate a curve expression corresponding to the text path curve information, and calculate a translation vector of the text according to the curve expression and the relative position;
the rotation module 40 is configured to calculate a curve tangent vector of the first bounding box of the text on the text path curve, and calculate a rotation matrix of the text according to the curve tangent vector;
the arrangement module 50 is configured to move the text according to the rotation matrix and the translation vector to complete the arrangement of the three-dimensional text.
In some embodiments, calculating the relative position between a first bounding box of a word and a corresponding second bounding box comprises: acquiring center point information of the first enclosure boxes and reference surface information on the second enclosure boxes, and calculating the transverse relative position between each first enclosure box and the corresponding second enclosure box according to the center point information and the reference surface information; and acquiring longitudinal center line information of the second enclosure boxes, and calculating a longitudinal offset vector between each first enclosure box and the corresponding second enclosure box according to the center point information and the longitudinal center line information.
In some embodiments, calculating a vector of a curve tangent to a first bounding box of the text on the text path curve comprises: acquiring position information of an initial position of the first enclosure box on the text path curve; and moving the first bounding box at the initial position along the character path curve, calculating the position information of the first bounding box after moving, and calculating the curve tangent vector of the first bounding box on the character path curve according to the position information of the initial position and the position information after moving.
It should be noted that the above description about the three-dimensional text arrangement method based on path planning in fig. 1 is also applicable to the three-dimensional text arrangement system based on path planning, and is not repeated herein.
In summary, according to the three-dimensional text arrangement system based on path planning in the embodiment of the present invention, the obtaining module is configured to obtain the text information to be produced, which is input by the user, where the text information to be produced includes text content, text typesetting information, and text path curve information; the bounding box calculation module is used for calculating a first bounding box corresponding to each character and a second bounding box corresponding to each line of characters in the characters to be made according to the character content and the character typesetting information; the translation module is used for calculating the relative position between a first bounding box and a corresponding second bounding box of the character, calculating a curve expression corresponding to the curve information of the character path, and calculating a translation vector of the character according to the curve expression and the relative position; the rotation module is used for calculating a curve tangent vector of a first bounding box of the character on a character path curve and calculating a rotation matrix of the character according to the curve tangent vector; the arrangement module is used for moving the characters according to the rotation matrix and the translation vector so as to complete the arrangement of the three-dimensional characters; therefore, the arrangement of the three-dimensional characters is quickly adjusted, the arrangement efficiency of the three-dimensional characters is improved, and manpower and material resources required in the arrangement process of the three-dimensional characters are saved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, the first feature "on" or "under" the second feature may be directly contacting the first and second features or indirectly contacting the first and second features through an intermediate. Also, a first feature "on," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above should not be understood to necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. A three-dimensional character arrangement method based on path planning is characterized by comprising the following steps:
acquiring character information to be made input by a user, wherein the character information to be made comprises character content, character typesetting information and character path curve information;
calculating a first surrounding box corresponding to each character and a second surrounding box corresponding to each line of characters in the characters to be made according to the character content and the character typesetting information;
calculating the relative position between a first bounding box and a corresponding second bounding box of the character, calculating a curve expression corresponding to the curve information of the character path, and calculating a translation vector of the character according to the curve expression and the relative position;
and calculating a curve tangent vector of the first bounding box of the characters on a character path curve, calculating a rotation matrix of the characters according to the curve tangent vector, and moving the characters according to the rotation matrix and the translation vector to complete the arrangement of the three-dimensional characters.
2. The method for arranging three-dimensional characters based on path planning as claimed in claim 1, wherein calculating the relative position between the first bounding box and the corresponding second bounding box of the characters comprises:
acquiring center point information of the first enclosure boxes and reference surface information on the second enclosure boxes, and calculating the transverse relative position between each first enclosure box and the corresponding second enclosure box according to the center point information and the reference surface information;
and acquiring longitudinal center line information of the second enclosure boxes, and calculating a longitudinal offset vector between each first enclosure box and the corresponding second enclosure box according to the center point information and the longitudinal center line information.
3. The method for arranging three-dimensional characters based on path planning as claimed in claim 1, wherein calculating the curve tangent vector of the first bounding box of the characters on the character path curve comprises:
acquiring position information of an initial position of the first bounding box on a text path curve;
and moving the first bounding box at the initial position along the character path curve, calculating the position information of the first bounding box after moving, and calculating the curve tangent vector of the first bounding box on the character path curve according to the position information of the initial position and the position information after moving.
4. The method for arranging three-dimensional characters based on path planning as claimed in any one of claims 1-3, wherein calculating the rotation matrix of the characters according to the tangent vector of the curve comprises:
taking the curve tangent vector as a local X-axis vector of the character, acquiring a local Z-axis vector of the character, and calculating a local Y-axis vector of the character according to the local X-axis vector and the local Z-axis vector;
and calculating a rotation matrix of the character according to the local X-axis vector, the local Y-axis vector and the local Z-axis vector.
5. The path-planning-based three-dimensional text arrangement method according to any one of claims 1 to 3, wherein the text layout information includes: the number of lines of characters, the character content corresponding to each line of characters, the character alignment mode and the character size.
6. A computer-readable storage medium, on which a path-planning-based three-dimensional character arrangement program is stored, which, when executed by a processor, implements the path-planning-based three-dimensional character arrangement method according to any one of claims 1 to 5.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method for three-dimensional text layout based on path planning as claimed in any one of claims 1 to 5 when executing the program.
8. A three-dimensional character arrangement system based on path planning is characterized by comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring character information to be made input by a user, and the character information to be made comprises character content, character typesetting information and character path curve information;
the bounding box calculation module is used for calculating a first bounding box corresponding to each character and a second bounding box corresponding to each line of characters in the characters to be made according to the character content and the character typesetting information;
the translation module is used for calculating the relative position between a first bounding box and a corresponding second bounding box of the character, calculating a curve expression corresponding to the curve information of the character path, and calculating a translation vector of the character according to the curve expression and the relative position;
the rotation module is used for calculating a curve tangent vector of a first bounding box of the character on a character path curve and calculating a rotation matrix of the character according to the curve tangent vector;
and the arrangement module is used for moving the characters according to the rotation matrix and the translation vector so as to complete the arrangement of the three-dimensional characters.
9. The path-planning-based three-dimensional letter arrangement system according to claim 8, wherein calculating the relative position between a first bounding box of a letter and a corresponding second bounding box comprises:
acquiring center point information of the first enclosure boxes and reference surface information on the second enclosure boxes, and calculating the transverse relative position between each first enclosure box and the corresponding second enclosure box according to the center point information and the reference surface information;
and acquiring longitudinal center line information of the second enclosure boxes, and calculating a longitudinal offset vector between each first enclosure box and the corresponding second enclosure box according to the center point information and the longitudinal center line information.
10. The path-planning based three-dimensional letter layout system according to claim 8, wherein calculating the curve tangent vector of the first bounding box of the letter on the letter path curve includes:
acquiring position information of an initial position of the first bounding box on a text path curve;
and moving the first bounding box at the initial position along the character path curve, calculating the position information of the first bounding box after moving, and calculating the curve tangent vector of the first bounding box on the character path curve according to the position information of the initial position and the position information after moving.
CN201911189879.8A 2019-11-28 2019-11-28 Three-dimensional character arrangement method, medium, equipment and system based on path planning Active CN111063036B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911189879.8A CN111063036B (en) 2019-11-28 2019-11-28 Three-dimensional character arrangement method, medium, equipment and system based on path planning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911189879.8A CN111063036B (en) 2019-11-28 2019-11-28 Three-dimensional character arrangement method, medium, equipment and system based on path planning

Publications (2)

Publication Number Publication Date
CN111063036A true CN111063036A (en) 2020-04-24
CN111063036B CN111063036B (en) 2022-08-05

Family

ID=70299056

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911189879.8A Active CN111063036B (en) 2019-11-28 2019-11-28 Three-dimensional character arrangement method, medium, equipment and system based on path planning

Country Status (1)

Country Link
CN (1) CN111063036B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5675665A (en) * 1994-09-30 1997-10-07 Apple Computer, Inc. System and method for word recognition using size and placement models
US5805783A (en) * 1992-05-15 1998-09-08 Eastman Kodak Company Method and apparatus for creating storing and producing three-dimensional font characters and performing three-dimensional typesetting
WO2005034024A1 (en) * 2003-09-26 2005-04-14 Ostecs, Inc. Spatial character recognition technique and chirographic text character reader
US20120198545A1 (en) * 2011-01-28 2012-08-02 Provo Craft And Novelty, Inc. System and Method for Providing Digital Content
US20150042791A1 (en) * 2013-08-09 2015-02-12 Postea, Inc. Apparatus, systems and methods for enrollment of irregular shaped objects
CN108304835A (en) * 2018-01-30 2018-07-20 百度在线网络技术(北京)有限公司 character detecting method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5805783A (en) * 1992-05-15 1998-09-08 Eastman Kodak Company Method and apparatus for creating storing and producing three-dimensional font characters and performing three-dimensional typesetting
US5675665A (en) * 1994-09-30 1997-10-07 Apple Computer, Inc. System and method for word recognition using size and placement models
WO2005034024A1 (en) * 2003-09-26 2005-04-14 Ostecs, Inc. Spatial character recognition technique and chirographic text character reader
US20120198545A1 (en) * 2011-01-28 2012-08-02 Provo Craft And Novelty, Inc. System and Method for Providing Digital Content
US20150042791A1 (en) * 2013-08-09 2015-02-12 Postea, Inc. Apparatus, systems and methods for enrollment of irregular shaped objects
CN108304835A (en) * 2018-01-30 2018-07-20 百度在线网络技术(北京)有限公司 character detecting method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杨志凌 等: "基于样条曲线的三维字造型系统的研究与实现", 《燕山大学学报》 *
贾积有 等: "《大学计算机应用基础》", 30 April 2007 *

Also Published As

Publication number Publication date
CN111063036B (en) 2022-08-05

Similar Documents

Publication Publication Date Title
US9865085B1 (en) Systems and methods for 3D modeling using skipping heuristics and fusing
CN109816762B (en) Image rendering method and device, electronic equipment and storage medium
RU2386171C2 (en) Levelling in lists generated according to template
CN109583509B (en) Data generation method and device and electronic equipment
CN111428457B (en) Automatic formatting of data tables
US20150206028A1 (en) Point cloud reduction apparatus, system, and method
JP6612487B1 (en) Learning device, classification device, learning method, classification method, learning program, and classification program
Tasse et al. Enhanced texture‐based terrain synthesis on graphics hardware
US20140082539A1 (en) Computer-implemented methods and systems for multi-touch duplication and swapping interactions
CN111159800B (en) Method and device for automatically generating 3D model based on CAD file
CN108762740B (en) Page data generation method and device and electronic equipment
CN111723555B (en) Plane typesetting method and system
CN108460003B (en) Text data processing method and device
CN102378990B (en) System and method for interactive live-mesh segmentation
CN110363837B (en) Method and device for processing texture image in game, electronic equipment and storage medium
CN110782534B (en) 3D character color gradient method, medium, equipment and device
US8149239B2 (en) Image processing apparatus, image processing method, and storage medium storing a program for causing an image processing apparatus to execute an image processing method
CN108280135B (en) Method and device for realizing visualization of data structure and electronic equipment
CN111063036B (en) Three-dimensional character arrangement method, medium, equipment and system based on path planning
CN106558019B (en) Picture arrangement method and device
CN111462278A (en) Depth-based material sorting rendering method, medium, equipment and device
CN106569816B (en) Rendering method and device
Kang et al. A parallel framework for fast photomosaics
CN114797109A (en) Object editing method and device, electronic equipment and storage medium
US8488183B2 (en) Moving labels in graphical output to avoid overprinting

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant