Method, system and computer-readable storage medium for generating flowblock animation

By creating a two-dimensional image infrastructure for flowblock animations on HMI panels, the method addresses CPU load issues through efficient matrix transformations, resulting in improved animation performance.

WO2025199890A1PCT designated stage Publication Date: 2025-10-02SIEMENS AG +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/084551
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2025-10-02

AI Technical Summary

Technical Problem

Current methods for generating flowblock animations on HMI panels impose a heavy CPU load due to polygon clipping algorithms, which can hinder normal operation, especially on panels with limited resources.

Method used

A method involving the creation of a two-dimensional image infrastructure to calculate and process point, line, and matrix data, and perform matrix transformations on blocks to determine and apply deformation based on path segments, reducing the need for polygon clipping.

Benefits of technology

This approach reduces performance consumption and enhances the animation effect on HMI panels by efficiently handling block deformations without overburdening the CPU.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024084551_02102025_PF_FP_ABST
    Figure CN2024084551_02102025_PF_FP_ABST
Patent Text Reader

Abstract

A method for generating a flowblock animation includes: S100, creating a plurality of tool classes to constitute a two-dimensional image infrastructure, wherein the two-dimensional image infrastructure is configured to calculate point data, line data, vector data, and matrix data in a two-dimensional space in subsequent steps; S200, acquiring intermediate data of path segments constituting a polyline path based on setting data of the flowblock animation, and drawing the polyline path in the case that the polyline path is set to be displayed; S300, with respect to a block to be processed, acquiring original data of the block from the setting data, and determining, based on the original data and data of the polyline path, whether a deformation is needed; in response to determining that no deformation is needed, proceeding to S400: performing matrix transformation for edge vertices of the block based on the original data and the intermediate data of the path segment where the block is located to obtain block edge transformation points of the block, wherein the block edge transformation points are vertices enclosing the transformed block, determining whether an unprocessed block exists, and returning to S300 in response to determining that no unprocessed block exists; in response to determining that a deformation is needed, proceeding to S500: performing matrix deformation and matrix transformation for edge vertices of the block based on the original data and the intermediate data of the path segment which the block traverses to obtain block edge transformation points of the block, determining whether an unprocessed block exists, and returning to S300 in response to determining that an unprocessed block exists; and S600, drawing the block based on the block edge transformation points of the block. The method for generating the flowblock animation according to the present disclosure reduces performance consumption of the flowblock animation on an HMI panel, and achieves a better animation effect for the flowblock amination. The present disclosure also provides a system and a computer-readable storage medium for generating a flowblock animation.
Need to check novelty before this filing date? Find Prior Art

Description

METHOD, SYSTEM AND COMPUTER-READABLE STORAGE MEDIUM FOR GENERATING FLOWBLOCK ANIMATIONTECHNICAL FIELD

[0001] The present disclosure relates to the technical field of human-machine interactions, and in particular, relates to a method, a system and a computer-readable storage medium for generating a flowblock animation on a human-machine interface (HMI) panel.BACKGROUND

[0002] To enhance a visual representation on HMI panels, users may incorporate flowblock animations to depict the movements of fluids, conveyors or the like. These animations typically contain polyline paths composed of a plurality of path segments and blocks moving along these polyline paths. Users can configure the styles of the polyline paths and blocks, as well as the direction and speed of the movements of the blocks, using configuration software such as WinCC Flexible.

[0003] When blocks traverse through the start, bends, and end of the polyline paths, it is necessary to clip and deform the patterns accordingly. Currently, computer-generated graphics rendering can generate patterns, but utilizing polygon clipping algorithms imposes a heavy CPU load, which may be detrimental to the normal operation of other functions, especially on HMI panels with limited resources.SUMMARY

[0004] An object of the present disclosure is to provide a method, a system and a computer-readable storage medium for generating a flowblock animation to reduce performance consumption of the flowblock animation on an HMI panel and achieve a better animation effect for the flowblock amination.

[0005] The present disclosure provides a method for generating a flowblock animation. The method includes:

[0006] S100, creating a plurality of tool classes to constitute a two-dimensional image infrastructure, wherein the two-dimensional image infrastructure is configured to calculate point data, line data, vector data, and matrix data in a two-dimensional space in subsequent steps;

[0007] S200, acquiring intermediate data of path segments constituting a polyline path based on setting data of the flowblock animation, and drawing the polyline path in the case that the polyline path is set to be displayed;

[0008] S300, with respect to a block to be processed, acquiring original data of the block from the setting data, and determining, based on the original data and data of the polyline path, whether the block needs to be deformed by adjusting the original data of the block;

[0009] in response to determining that the block needs to be deformed, proceeding to S400: performing matrix transformation for edge vertices of the block based on the original data and the intermediate data of the path segment which the block traverses to obtain block edge transformation points of the block, determining whether an unprocessed block exists, and returning to S300 in response to determining that an unprocessed block exists; and

[0010] in response to determining that the block needs to be deformed, proceeding to S500: performing matrix transformation for edge vertices of the block based on the original data and the intermediate data of the path segment which the block traverses to obtain block edge transformation points of the block, determining whether an unprocessed block exists, and returning to S300 in response to determining that an unprocessed block exists; and

[0011] S600, drawing the block based on the block edge transformation points of the block.

[0012] In the method for generating the flowblock animation according to the present disclosure, a two-dimensional image infrastructure for image processing is created, determinations are made to blocks using the two-dimensional image infrastructure, and the blocks are deformed and drawn based on determination results. In this way, performance consumption of the flowblock animation on an HMI panel is reduced, and a better animation effect for the flowblock animation is achieved.

[0013] In some exemplary embodiments, step S300 specifically includes:

[0014] S320, calculating a path segment where a center point of the block is located and a position of the center point on the path segment based on the setting data;

[0015] S330, performing matrix transformation for the original data to generate block transformation data based on the intermediate data of the path segment where the center point of the block is located; and

[0016] S340, determining, based on the block transformation data, whether an end point of the path segment where the center point of the block is located is traversed to determine whether the block needs to be deformed.

[0017] In some exemplary embodiments, step S340 specifically includes:

[0018] S341, determining, based on the setting data, whether a width of the polyline path is 0;

[0019] in response to determining that the width of the polyline path is 0, proceeding to S342: determining, based on the block transformation data, whether the block traverses a bending point of the polyline path, determining that the block needs to be deformed in response to determining that the block traverses a bending point, and determining that the block does not need to be deformed in response to determining that the block does not traverse a bending point;

[0020] in response to determining that the width of the polyline path is not 0, proceeding to S343: calculating a rotation boundary of the block and a minimum boundary of bend points of the polyline path based on the original data; and

[0021] S344, performing a collision test using the rotation boundary of the block and the minimum boundary of the bend points of the polyline path, determining whether the collision test is passed, determining that the block does not need to be deformed in response to determining that the collision test is passed, and determining that the block needs to be deformed in response to determining that the collision test is not passed.

[0022] In some exemplary embodiments, step S500 specifically includes:

[0023] S510, clockwise or counterclockwise traversing each of edge segments of the block to determine whether the edge segments exceed the path segments, wherein the edge segments are segments enclosing the block, and the block edge transformation points of the block are end points of the edge lines;

[0024] in response to determining that the edge segments do not exceed the path segments, proceeding to S520: acquiring the block edge transformation points of the edge segments; and

[0025] in response to determining that the edge segments exceed the path segments, proceeding to S530: performing iterative calculations for the edge segments to obtain the block edge  transformation points of the deformed block.

[0026] In some exemplary embodiments, step S510 specifically includes:

[0027] S511, successively selecting one of the edge segments with the block edge transformation points to be acquired to acquire a perpendicular line, at a tail end, of the path segment where the acquired edge segment is located; and

[0028] S512, determining whether the perpendicular line of the path segment at the tail end is intersected with the edge segment, determining that the edge segment exceeds the path segment in response to determining that the perpendicular line is intersected with the edge segment, and determining that the edge segment does not exceed the path segment in response to determining that the perpendicular line is not intersected with the edge segment.

[0029] In some exemplary embodiments, step S530 specifically includes: performing iterative calculations for the edge segments multiple times, and acquiring the block edge transformation points a portion of the edge segments not exceeding the current path segments and remaining edge segments exceeding the current path segments in a first iterative calculation, acquiring the block edge transformation points of a portion of the remaining edge segments acquired in the last iterative calculation not exceeding the current path segments in each of the iterative calculations from a second iterative calculation and the remaining edge segments exceeding the current path segments, and performing an interpolation process based on the setting data and performing the iterative calculations until no edge segment remains.

[0030] In some exemplary embodiments, performing the interpolation process based on the setting data in step S530 specifically includes: in the case that the remaining edge segment is located outside the bend point of two of the path segments, and the deformed block in the setting data has a round corner at the bend, adding a plurality of the block edge transformation points, wherein the added plurality of the block edge transformation points are evenly distributed around the bend point of the two path segments as a center of circle; or in the case that the remaining edge segments are located inside the bend points of two of the path segments, or the deformed block in the setting data has a right angle at the bend, not adding the block edge transformation points.

[0031] In some exemplary embodiments, step S300 specifically includes:

[0032] S310, determining, based on the original data, whether a ratio of a length of the block along an extension direction to a length of the block along a direction perpendicular to the extension  direction is less than a predetermined threshold, and determining that the block does not need to be deformed by adjusting the original data of the block in response to determining that the ratio is less than the predetermined threshold;

[0033] in response to determining that the ratio is not less than the predetermined threshold, proceeding to S320: calculating a path segment where a center point of the block is located and a position of the center point on the path segment based on the setting data;

[0034] S330, performing matrix transformation for the original data to generate block transformation data based on the intermediate data of the path segment where the center point of the block is located; and

[0035] S340, determining, based on the block transformation data, whether an end point of the path segment where the center point of the block is located is traversed to determine whether the block needs to be deformed.

[0036] In some exemplary embodiments, step S200 specifically includes:

[0037] S210, acquiring the intermediate data of the path segments constituting the polyline path based on the setting data;

[0038] S220, determining, based on the setting data, whether a width of each of the path segments is 0;

[0039] in response to determining that the width is not 0, proceeding to S230: determining two of the path segments connected by bending exist;

[0040] in response to determining that the two path segments connected by bending exist, proceeding to S240: in the case that the polyline path in the setting data is a round corner at the bend, adding a plurality of path interpolation points, wherein the plurality of path interpolation points are evenly distributed around the bend point of the two path segments as a center of circle, connecting end points of side segments enclosing a pattern of the polyline path and the path interpolation points to form a closed pattern to draw the polyline path; or in the case that the polyline path in the setting data has a right angle at the bend, connecting end points of side segments to form a closed pattern to draw the polyline path; and

[0041] in response to determining that the two path segments connected by bending do not exist, proceeding to S250: connecting the end points of the side segments to form the closed pattern to draw the polyline path.

[0042] In some exemplary embodiments, step S100 specifically includes:

[0043] S110, creating a two-dimensional point tool class, wherein the two-dimensional point tool class is configured to perform a calculation related to point data;

[0044] S120, creating a two-dimensional vector tool class, wherein the two-dimensional vector tool class is dependent on the two-dimensional point tool class and configured to perform a calculation related to vector data;

[0045] S130, creating a two-dimensional line tool class, wherein the two-dimensional line tool class is dependent on the two-dimensional point tool class and the two-dimensional vector tool class and configured to perform a calculation related to line data; and

[0046] S140, creating a two-dimensional matrix tool class, wherein the two-dimensional vector tool class is dependent on the two-dimensional point tool class and configured to perform a calculation related to matrix data.

[0047] The present disclosure provides a system for generating a flowblock animation. comprising a memory and a processor. The memory is configured to store a computer program. The processor is configured to call the computer program stored in the memory to perform the method for generating a flowblock animation.

[0048] The present disclosure provides a computer-readable storage medium, storing a computer program. The computer program is executable by a processor to implement the method for generating a flowblock animation.BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings are merely for schematic and illustrative description and demonstration of the present disclosure, instead of limiting the scope of the present disclosure.

[0050] FIG. 1 is a flowchart of a method for generating a flowblock animation according to an exemplary embodiment of the present disclosure;

[0051] FIG. 2 is a flowchart of some steps of the method for generating the flowblock animation;

[0052] FIG. 3 is a flowchart of some steps of the method for generating the flowblock animation;

[0053] FIG. 4 is a flowchart of an implementation of the method for generating the flowblock  animation;

[0054] FIG. 5 is a flowchart of an implementation of the method for generating the flowblock animation;

[0055] FIG. 6 is a flowchart of some steps of the method for generating the flowblock animation;

[0056] FIG. 7 is a flowchart of an implementation of the method for generating the flowblock animation;

[0057] FIG. 8 is a flowchart of an implementation of the method for generating the flowblock animation;

[0058] FIG. 9 is a flowchart of some steps of the method for generating the flowblock animation;

[0059] FIG. 10 is a flowchart of an implementation of the method for generating the flowblock animation;

[0060] FIG. 11 is a flowchart of some steps of the method for generating the flowblock animation;

[0061] FIG. 12 is a flowchart of some steps of the method for generating the flowblock animation;

[0062] FIG. 13 is a flowchart of an implementation of the method for generating the flowblock animation;

[0063] FIG. 14 is a flowchart of an implementation of the method for generating the flowblock animation;

[0064] FIG. 15 is a flowchart of an implementation of the method for generating the flowblock animation; and

[0065] FIG. 16 is a flowchart of a method for generating a flowblock animation according to an exemplary embodiment of the present disclosure.

[0066] Reference numerals and denotations thereof:

[0067] 10-path segment

[0068] 11-side segment

[0069] 20-block

[0070] 21-edge segment

[0071] P11-end point of side segment

[0072] P12-path interpolation point

[0073] P21-block edge transformation point

[0074] P22-block edge transformation point

[0075] O1-bend point of path segment

[0076] O1-center point of block

[0077] L1-perpendicular line of path segment at tail end

[0078] L2-rotation boundary of block

[0079] L3-minimum boundary of bend point of polyline pathDETAILED DESCRIPTION

[0080] For clearer descriptions of the technical features, objects, and the technical effects of the present disclosure, the specific embodiments of the present disclosure are hereinafter described with reference to the accompanying drawings. In the drawings, like reference numerals denote elements having the same structure or having the similar structure but the same function.

[0081] In this text, the term "exemplary" or "schematic" is used herein to mean "serving as an example, instance, or illustration, " and any illustration or embodiment described herein as "exemplary" shall not be necessarily construed as preferred or advantageous over other illustrations or embodiments.

[0082] In this text, the terms "first, " "second, " and the like do not represent degrees of importance or a sequence, but only for differentiation, and for ease of description.

[0083] For brevity, parts relevant to the present disclosure are merely illustrated in the drawings, and these parts do not denote the actual structure of the product.

[0084] FIG. 1 is a flowchart of a method for generating a flowblock animation according to an exemplary embodiment of the present disclosure. Referring to FIG. 1, the method for generating the flowblock animation includes steps S100 to S600.

[0085] In S100, a plurality of tool classes are created to constitute a two-dimensional image infrastructure, wherein the two-dimensional image infrastructure is configured to calculate point data, line data, vector data, and matrix data in a two-dimensional space in subsequent steps. FIG. 2 is a flowchart of some steps of the method for generating the flowblock animation. Referring to FIG.  2, step S100 specifically includes the following steps.

[0086] In S110, a two-dimensional point tool class is created, wherein the two-dimensional point tool class is configured to perform a calculation related to point data.

[0087] In S120, a two-dimensional vector tool class is created, wherein the two-dimensional vector tool class is dependent on the two-dimensional point tool class and configured to perform a calculation related to vector data.

[0088] S130, a two-dimensional line tool class is created, wherein the two-dimensional line tool class is dependent on the two-dimensional point tool class and the two-dimensional vector tool class and configured to perform a calculation related to line data.

[0089] In S140, a two-dimensional matrix tool class is created, wherein the two-dimensional vector tool class is dependent on the two-dimensional point tool class and configured to perform a calculation related to matrix data.

[0090] In S200, intermediate data of path segments 10 constituting a polyline path is acquired based on setting data of the flowblock animation, and the polyline path is drawn in the case that the polyline path is set to be displayed. The intermediate data of the path segments 10 includes coordinates of start points, corresponding length vectors, and stroke volumes of the path segments 10 in the entire polyline path. FIG. 3 is a flowchart of some steps of the method for generating the flowblock animation. FIG. 4 and FIG. 5 are flowcharts of implementations of the method for generating the flowblock animation. Referring to FIG. 3 to FIG. 5, step S200 specifically includes the following steps.

[0091] In S210, the intermediate data of the path segments 10 constituting the polyline path is acquired based on the setting data of the flowblock animation. The setting data indicates settings that are made by a user to fill styles, colors, widths, or corner styles or the like in, for example, the WinCC Flexible or the like software according to actual needs.

[0092] In S220, whether a width of each of the path segments is 0 is determined based on the setting data.

[0093] In response to determining that the width is not 0, the user needs to display the polyline path, and the process proceeds to S230: determining two of the path segments 10 connected by bending exist.

[0094] In response to determining that the two path segments connected by bending exist, the  process proceeds to S240: in the case that the polyline path in the setting data is a round corner at the bend, as illustrated in FIG. 5, adding a plurality of path interpolation points 12 (only one of the path interpolation point is illustrated in the drawings) , wherein the plurality of path interpolation points P12 are evenly distributed around a bend point O1 of the two path segments 10 as a center of circle, connecting end points P11 of side segments 11 enclosing a pattern of the polyline path and the path interpolation points P12 to form a closed pattern to draw the polyline path. As illustrated in FIG. 4, the polyline path in the setting data has a right angle at the bend, connecting the end points P11 of the side segments 11 to form a closed pattern to draw the polyline path.

[0095] In response to determining that the two path segments connected by bending do not exist, the polyline path has no bend, and then the process proceeds to S250: connecting the end points P11 of the side segments 11 to form the closed pattern to draw the polyline path.

[0096] In S300, with respect to a block 20 to be processed, original data of the block 20 is acquired from the setting data, and whether the block 20 needs to be deformed is determined based on the original data and data of the polyline path. FIG. 6 is a flowchart of some steps of the method for generating the flowblock animation. FIG. 7 and FIG. 8 are flowcharts of implementations of the method for generating the flowblock animation. Referring to FIG. 6 to FIG. 8, step S300 specifically includes the following steps.

[0097] In S320, calculating a path segment 10 where a center point of the block 20 is located and a position of the center point on the path segment 10 based on the setting data.

[0098] In S330, performing matrix transformation for the original data to generate block transformation data based on the intermediate data of the path segment 10 where the center point of the block 20 is located.

[0099] In S340, determining, based on the block transformation data, whether an end point of the path segment 10 where the center point of the block is located is traversed to determine whether the block 20 needs to be deformed. FIG. 9 is a flowchart of some steps of the method for generating the flowblock animation. Referring to FIG. 7 to FIG. 9, step S340 specifically includes the following steps.

[0100] In S341, whether a width of the polyline path is 0 is determined based on the setting data. By determining whether the width of the polyline path is 0, it is thus determined that the user needs to hide or display the polyline path.

[0101] In response to determining that the width of the polyline path is 0, the process proceeds to S342: determining, based on the block transformation data, whether the block 20 traverses a bending point of the polyline path, determining that the block 20 needs to be deformed in response to determining that the block traverses a bending point, and determining that the block 20 does not need to be deformed in response to determining that the block 20 does not traverse a bending point;

[0102] In response to determining that the width of the polyline path is not 0, the process proceeds to S343: calculating a rotation boundary L2 of the block and a minimum boundary L3 of bend points of the polyline path based on the original data. FIG. 10 is a flowchart of an implementation of the method for generating the flowblock animation. Referring to FIG. 10, the width of the polyline path is not 0. The rotary boundary L2 of the block 20 is a circle that is formed with the center point O2 of the block 20 as a center of circle and capable of covering the entire profile of the block 20. The minimum boundary L3 of the bend points of the polyline path is a minimum width of the polyline path at the bend points.

[0103] In S344, a collision test is performed using the rotation boundary L2 of the block 20 and the minimum boundary L3 of the bend points of the polyline path, whether the collision test is passed is determined, it is determined that the block 20 does not need to be deformed in response to determining that the collision test is passed, and it is determined that the block 20 needs to be deformed in response to determining that the collision test is not passed. This step may be completed in advance in the initial state, such that performance consumption of real-time calculation is reduced.

[0104] In response to determining that the block 20 does not need to be deformed, the process proceeds to S400: performing matrix transformation for edge vertices of the block 20 based on the original data and the intermediate data of the path segment 10 which the block 20 traverses to obtain block edge transformation points of the block, determining whether an unprocessed block 20 exists, and returning to S300 in response to determining that an unprocessed block 20 exists. In the case that the block 20 does not need to be deformed, after the block 20 is transformed based on the intermediate data of the path segments 10, the vertices enclosing the block 20 only need to be calculated, that is, the block edge transformation points.

[0105] In response to determining that the block needs to be deformed, the process proceeds to S500: performing matrix transformation for edge vertices of the block 20 based on the original data  and the intermediate data of the path segment 10 which the block 20 traverses to obtain block edge transformation points of the block 20, determining whether an unprocessed block 20 exists, and returning to S300 in response to determining that an unprocessed block 20 exists; and FIG. 11 is a flowchart of some steps of the method for generating the flowblock animation. Referring to FIG. 11, step S500 specifically includes the following step.

[0106] In S510, each of edge segments of the block 20 is clockwise or counterclockwise traversed to determine whether the edge segments 21 exceed the path segments 10, wherein the edge segments 21 are segments enclosing the block 20, and the block edge transformation points of the block 20 are end points of the edge lines 21. FIG. 12 is a flowchart of some steps of the method for generating the flowblock animation. Referring to FIG. 7, FIG. 8, and FIG. 13, step S510 specifically includes the following steps.

[0107] In S511, one of the edge segments 21 with the block edge transformation points to be acquired is successively selected to acquire a perpendicular line L1, at a tail end, of the path segment 10 where the acquired edge segment 21 is located.

[0108] In S512, whether the perpendicular line L1 of the path segment 10 at the tail end is intersected with the edge segment 21 is determined. As illustrated in FIG. 8, the perpendicular line L1 of the path segment 10 at the tail end may be transformed and put into an object coordinate system of the block 20 for comparison. The length along a Y direction only needs to be compared, such that the calculation workload is reduced. It is determined that the edge segment 21 exceeds the path segment 10 in response to determining that the perpendicular line L1 is intersected with the edge segment 21, and it is determined that the edge segment 21 does not exceed the path segment 10 in response to determining that the perpendicular line L1 is not intersected with the edge segment 21.

[0109] In response to determining that the edge segments 21 do not exceed the path segments 10, the process proceeds to S520: acquiring the block edge transformation points of the edge segments 21, that is, the vertices enclosing the block 20.

[0110] In response to determining that the edge segments 21 exceed the path segments 10, the process proceeds to S530: performing iterative calculations for the edge segments 21 to obtain the block edge transformation points of the deformed block 20. FIG. 13 to FIG. 15 are flowcharts of implementations of the method for generating the flowblock animation. Referring to FIG 13 to FIG.  15, step S530 specifically includes: performing iterative calculations for the edge segments 21 multiple times, and acquiring the block edge transformation points a portion of the edge segments not exceeding the current path segments 11 and remaining edge segments exceeding the current path segments 11 in a first iterative calculation, acquiring the block edge transformation points of a portion of the remaining edge segments acquired in the last iterative calculation not exceeding the current path segments 11 in each of the iterative calculations from a second iterative calculation and the remaining edge segments exceeding the current path segments 11, and performing an interpolation process based on the setting data and performing the iterative calculation until no edge segment remains.

[0111] Referring to FIG. 13 and FIG. 14, in the case that the edge segment traverses the bend point O1 of two path segments 10, a portion 22, not exceeding the current path segment 10, of the edge segment 21 and a portion, exceeding the current path segment 10, of the edge segment 21 based on the perpendicular L1 of the path segment 10 at the tail end are calculated. The portion 22, not exceeding the current path segment 10, of the edge segment 21 is taken as an edge transformation point P21 for the block, while the portion 23, exceeding the current path segment 10, of the edge segment 21 is output as a remaining segment.

[0112] Referring to FIG. 14 and FIG. 15, performing the interpolation process based on the setting data in step S530 specifically includes: in the case that the remaining edge segment 10 is located outside the bend point O1 of the two path segments 10, and the deformed block in the setting data has a round corner at the bend, adding a plurality of the block edge transformation points P22 (only one block edge transformation points is illustrated in the drawings) , wherein the added plurality of the block edge transformation points P22 are evenly distributed around the bend point of the two path segments as a center 01 of circle, and an arc is formed by connecting the plurality of block edge transformation points P22, such that the block 20 is exhibited as a round corner at the bend. In the case that the remaining segment is located inside of the bend point O1 of the two path segments 10, or in the case that the pattern after deformation in the setting data has a right angle at the bend, then no block edge transformation points are added.

[0113] In S600, the block is drawn based on the block edge transformation points of the block. Specifically, the block edge transformation points are connected in a WINDING fill pattern to form a closed and complete pattern.

[0114] In the method for generating the flowblock animation according to the present disclosure, a two-dimensional image infrastructure for image processing is created, determinations are made to blocks 20 using the two-dimensional image infrastructure, and the blocks 20 are deformed and drawn based on determination results. In this way, performance consumption of the flowblock animation on an HMI panel is reduced, and a better animation effect for the flowblock animation is achieved.

[0115] FIG. 16 is a flowchart of a method for generating a flowblock animation according to an exemplary embodiment of the present disclosure. Referring to FIG. 16, parts identical or similar to the parts in the exemplary embodiment as illustrated in FIG. 6 are not described any further. The difference lies in that step S300 specifically includes the following steps.

[0116] In S310, whether a ratio of a length of the block along an extension direction to a length of the block 20 along a direction perpendicular to the extension direction is less than a predetermined threshold is determined based on the original data, and it is determined that the block 20 does not need to be deformed by adjusting the original data of the block 20 in response to determining that the ratio is less than the predetermined threshold. In the case that the ratio of the length of the block 20 along the extension direction to the length of the block 20 along the direction perpendicular to the extension direction is less than the predetermined threshold, for example, for patterns such as squares, circles, or stars that do not run outside the polyline path when passing through the bend point of the polyline track, subsequent determinations may be omitted to reduce performance consumption.

[0117] In response to determining that the ratio is not less than the predetermined threshold, the process proceeds to S320: calculating a path segment 10 where a center point of the block 20 is located and a position of the center point on the path segment 10 based on the setting data.

[0118] In S330, performing matrix transformation for the original data to generate block transformation data based on the intermediate data of the path segment 10 where the center point of the block 20 is located.

[0119] In S340, determining, based on the block transformation data, whether an end point of the path segment 10 where the center point of the block is located is traversed to determine whether the block 20 needs to be deformed.

[0120] The present disclosure provides a system for generating a flowblock animation.  comprising a memory and a processor. The memory is configured to store a computer program. The processor is configured to call the computer program stored in the memory to perform the method for generating a flowblock animation.

[0121] The present disclosure provides a computer-readable storage medium, storing a computer program. The computer program is executable by a processor to implement the method for generating a flowblock animation.

[0122] It should be understood that, although this specification is described based on the embodiments, not each of the embodiments discloses an independent technical solution. Such description manner of the specification is only for clarity. A person skilled in the art should consider the specification as an entirety. The technical solutions according to the embodiments may also be suitably combined to derive other embodiments that may be understood by a person skilled in the art.

[0123] A series of detailed descriptions given in this specification are merely intended to illustrate feasible embodiments of the present disclosure, instead of limiting the protection scope of the present disclosure. Any equivalent embodiments or modifications, for example, combinations, segmentations, or repetition of features, derived without departing from the spirit of the present disclosure shall fall within the protection scope of the present disclosure.

Claims

1.A method for generating a flowblock animation, comprising:S100, creating a plurality of tool classes to constitute a two-dimensional image infrastructure, wherein the two-dimensional image infrastructure is configured to calculate point data, line data, vector data, and matrix data in a two-dimensional space in subsequent steps;S200, acquiring intermediate data of path segments constituting a polyline path based on setting data of the flowblock animation, and drawing the polyline path in the case that the polyline path is set to be displayed;S300, with respect to a block to be processed, acquiring original data of the block from the setting data, and determining, based on the original data and data of the polyline path, whether the block needs to be deformed;in response to determining that the block does not need to be deformed, proceeding to S400: performing matrix transformation for edge vertices of the block based on the original data and the intermediate data of the path segment where the block is located to obtain block edge transformation points of the block, wherein the block edge transformation points are vertices enclosing the transformed block, determining whether an unprocessed block exists, and returning to S300 in response to determining that no unprocessed block exists;in response to determining that the block needs to be deformed, proceeding to S500: performing matrix deformation and matrix transformation for edge vertices of the block based on the original data and the intermediate data of the path segment which the block traverses to obtain block edge transformation points of the block, determining whether an unprocessed block exists, and returning to S300 in response to determining that an unprocessed block exists; andS600, drawing the block based on the block edge transformation points of the block.2.The method according to claim 1, wherein step S300 comprises:S320, calculating a path segment where a center point of the block is located and a position of the center point on the path segment based on the setting data;S330, performing matrix transformation for the original data to generate block transformation data based on the intermediate data of the path segment where the center point of the block is located; andS340, determining, based on the block transformation data, whether an end point of the path segment where the center point of the block is located is traversed to determine whether the block needs to be deformed.3.The method according to claim 2, wherein step S340 comprises:S341, determining, based on the setting data, whether a width of the polyline path is 0;in response to determining that the width of the polyline path is 0, proceeding to S342: determining, based on the block transformation data, whether the block traverses a bend point of the polyline path, determining that the block needs to be deformed in response to determining that the block traverses a bend point, and determining that the block does not need to be deformed in response to determining that the block does not traverse a bend point;in response to determining that the width of the polyline path is not 0, proceeding to S343: calculating a rotation boundary of the block and a minimum boundary of bend points of the polyline path based on the original data; andS344, performing a collision test using the rotation boundary of the block and the minimum boundary of the bend points of the polyline path, determining whether the collision test is passed, determining that the block does not need to be deformed in response to determining that the collision test is passed, and determining that the block needs to be deformed in response to determining that the collision test is not passed.4.The method according to claim 2, wherein step S500 comprises:S510, clockwise or counterclockwise traversing each of edge segments of the block to determine whether the edge segments exceed the path segments, wherein the edge segments are segments enclosing the block, and the block edge transformation points of the block are end points of the edge lines;in response to determining that the edge segments do not exceed the path segments, proceeding to S520: acquiring the block edge transformation points of the edge segments; andin response to determining that the edge segments exceed the path segments, proceeding to S530: performing iterative calculations for the edge segments to obtain the block edge transformation points of the deformed block.5.The method according to claim 4, wherein step S510 comprises:S511, successively selecting one of the edge segments with the block edge transformation points to be acquired to acquire a perpendicular line, at a tail end, of the path segment where the acquired edge segment is located; andS512, determining whether the perpendicular line of the path segment at the tail end is intersected with the edge segment, determining that the edge segment exceeds the path segment in response to determining that the perpendicular line is intersected with the edge segment, and determining that the edge segment does not exceed the path segment in response to determining that the perpendicular line is not intersected with the edge segment.6.The method according to claim 4, wherein step S530 comprises: performing iterative calculations for the edge segments multiple times, and acquiring the block edge transformation points a portion of the edge segments not exceeding the current path segments and remaining edge segments exceeding the current path segments in a first iterative calculation, acquiring the block edge transformation points of a portion of the remaining edge segments acquired in the last iterative calculation not exceeding the current path segments in each of the iterative calculations from a second iterative calculation and the remaining edge segments exceeding the current path segments, and performing an interpolation process based on the setting data and performing the iterative calculations until no edge segment remains.7.The method according to claim 6, wherein performing the interpolation process based on the setting data in step S530 comprises: in the case that the remaining edge segment is located outside the bend point of two of the path segments, and the deformed block in the setting data has a round corner at the bend, adding a plurality of the block edge transformation points, wherein the added plurality of the block edge transformation points are evenly distributed around the bend point of the two path segments as a center of circle; or in the case that the remaining edge segments are located inside the bend points of two of the path segments, or the deformed block in the setting data has a right corner at the bend, not adding the block edge transformation points.8.The method according to claim 1, wherein step S300 comprises:S310, determining, based on the original data, whether a ratio of a length of the block along an extension direction to a length of the block along a direction perpendicular to the extension direction is less than a predetermined threshold, and determining that the block does not need to be deformed by adjusting the original data of the block in response to determining that the ratio is less than the predetermined threshold;in response to determining that the ratio is not less than the predetermined threshold, proceeding to S320: calculating a path segment where a center point of the block is located and a position of the center point on the path segment based on the setting data;S330, performing matrix transformation for the original data to generate block transformation data based on the intermediate data of the path segment where the center point of the block is located; andS340, determining, based on the block transformation data, whether an end point of the path segment where the center point of the block is located is traversed to determine whether the block needs to be deformed.9.The method according to claim 1, wherein step S200 comprises:S210, acquiring the intermediate data of the path segments constituting the polyline path based on the setting data;S220, determining, based on the setting data, whether a width of each of the path segments is 0;in response to determining that the width is not 0, proceeding to S230: determining two of the path segments connected by bending exist;in response to determining that the two path segments connected by bending exist, proceeding to S240: in the case that the polyline path in the setting data is a round corner at the bend, adding a plurality of path interpolation points, wherein the plurality of path interpolation points are evenly distributed around the bend point of the two path segments as a center of circle, connecting end points of side segments enclosing a pattern of the polyline path and the path interpolation points to form a closed pattern to draw the polyline path; or in the case that the polyline path in the setting data has a right angle at the bend, connecting end points of side segments to form a closed pattern to draw the polyline path; andin response to determining that the two path segments connected by bending do not exist, proceeding to S250: connecting the end points of the side segments to form the closed pattern to draw the polyline path.10.The method according to claim 1, wherein step S100 comprises:S110, creating a two-dimensional point tool class, wherein the two-dimensional point tool class is configured to perform a calculation related to point data;S120, creating a two-dimensional vector tool class, wherein the two-dimensional vector tool class is dependent on the two-dimensional point tool class and configured to perform a calculation related to vector data;S130, creating a two-dimensional line tool class, wherein the two-dimensional line tool class is dependent on the two-dimensional point tool class and the two-dimensional vector tool class and configured to perform a calculation related to line data; andS140, creating a two-dimensional matrix tool class, wherein the two-dimensional vector tool class is dependent on the two-dimensional point tool class and configured to perform a calculation related to matrix data.11.A system for generating a flowblock animation, comprising:a memory, configured to store a computer program; anda processor, configured to call the computer program stored in the memory to perform the method according to any one of claims 1 to 10.12.A computer-readable storage medium, storing a computer program, whereinthe computer program is executable by a processor to implement the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Image processing method and device, electronic equipment, and storage medium

    CN107154030A

  • Image processing apparatus and image processing method

    JP2011253218A

  • Generating A Triangle Mesh For An Image Represented By Curves

    US20190206100A1

  • Multi-State Vector Graphics

    US20200334874A1