Graph interactive transformation method and device, electronic equipment and storage medium

By allowing users to interactively input motion references and objects, and combining this with continuous matrix transformation calculations, the system achieves dynamic display of graphics from two-dimensional to three-dimensional, solving the problems of complex operation and insufficient interactivity of existing tools, and improving the efficiency of geometry teaching and spatial cognitive ability.

CN121300675APending Publication Date: 2026-01-09IFLYTEK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511524305.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

Existing geometry teaching tools are complex to operate and lack interactivity in displaying graphic motion, and cannot achieve real-time flexible adjustment and dynamic visualization from two-dimensional to three-dimensional, making it difficult to meet the teaching needs of fast-paced classrooms.

Method used

This paper provides an interactive transformation method for graphics. By inputting motion references and objects by the user and combining continuous matrix transformation calculations, the transformation process of the graphics is rendered in real time, supporting dynamic display from two-dimensional to three-dimensional.

Benefits of technology

It enhances the interactivity and flexibility of teaching, lowers the threshold for students to understand the movement of complex shapes, helps students build spatial cognition, and improves teaching efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121300675A_ABST
    Figure CN121300675A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and provides a graph interactive transformation method and device, electronic equipment and a storage medium, and the method comprises the steps: displaying an initial geometric graph; acquiring a motion reference input by a user for the initial geometric figure, and acquiring a motion object determined by the user in the initial geometric figure; in response to a continuous motion control operation of a user, carrying out continuous matrix transformation calculation on the motion object based on the motion reference to obtain a plurality of continuously transformed coordinate data of the motion object; and rendering and displaying a transformation process and a transformation result of the moving object based on the plurality of coordinate data after continuous transformation. Through real-time coordinate calculation, dynamic rendering and touch screen interaction logic design, dynamic visual display of graphic motion is realized, operation is simple and convenient, and interaction is flexible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to an interactive method, apparatus, electronic device, and storage medium for transforming graphics. Background Technology

[0002] In geometry teaching, it is crucial to cultivate students' core competency of intuitive imagination, especially in teaching knowledge points about geometric motion such as translation, symmetry, and folding.

[0003] However, existing methods and tools for geometric transformations in teaching geometry generally have limitations. On the one hand, traditional static teaching aids, blackboard writing, and pre-made multimedia animations either fail to present the continuous dynamic process of geometric movement, or the content is fixed and lacks real-time interactivity, making it impossible for teachers to flexibly adjust transformation parameters (such as folding axes) for demonstrations based on the actual classroom situation.

[0004] On the other hand, existing digital teaching software often goes to two extremes: powerful professional geometry software has complex operating logic and high lesson preparation costs, making it unsuitable for fast-paced real-time classroom demonstrations; while simple teaching software has too limited functions and insufficient spatial perception assistance, usually only supporting simple transformations in a two-dimensional plane and lacking the visualization ability to dynamically extend two-dimensional graphics to three-dimensional space, which is not conducive to the development of students' spatial cognition.

[0005] Therefore, how to provide a graphical transformation method that can be applied to geometry teaching scenarios and has the functions of convenient operation, real-time interactivity and dynamic visualization is a technical problem that urgently needs to be solved. Summary of the Invention

[0006] This invention provides an interactive transformation method, device, electronic device, and storage medium for graphics, which addresses the shortcomings of existing teaching tools in demonstrating graphic movement, such as complex operation, inflexible interaction, and insufficient spatial perception assistance.

[0007] This invention provides an interactive transformation method for graphics, comprising: Display the initial geometry; Obtain the motion reference input by the user for the initial geometry, and obtain the motion object determined by the user in the initial geometry; In response to the user’s continuous motion control operation, the motion object is subjected to continuous matrix transformation calculation based on the motion reference to obtain the coordinate data of the motion object after multiple continuous transformations; Based on the coordinate data after multiple continuous transformations, the transformation process and results of the moving object are rendered and displayed, and the transformation process and results of the moving object correspond to the flipping process and results of the initial geometry.

[0008] According to an interactive transformation method for graphics provided by the present invention, the method further includes, before obtaining the motion reference input by the user for the initial geometric figure: Identify key geometric points in the initial geometry, including vertices and / or midpoints of edges of the initial geometry; The key geometric points are marked on the display interface in a first-person visual style.

[0009] According to an interactive transformation method for graphics provided by the present invention, the motion reference includes a folding axis, and the step of acquiring the motion reference input by the user for the initial geometry includes: In response to a user's specified operation for determining the fold axis, the target line segment corresponding to the specified operation is obtained, and the target line segment is determined as the fold axis; The folding axis is identified on the display interface in a second visual style.

[0010] According to an interactive transformation method for graphics provided by the present invention, after obtaining the motion reference input by the user for the initial geometric figure, the method further includes: Receive user movement operations on the motion reference; In response to the movement operation, the position coordinates of the motion reference are updated, and the updated position of the motion reference is rendered on the display interface.

[0011] According to an interactive transformation method for graphics provided by the present invention, the moving object is at least one line segment or at least one closed surface in the initial geometry, and the step of obtaining the moving object determined by the user in the initial geometry includes: Perform topological analysis on the initial geometry to identify all line segments and closed surfaces in the initial geometry; In response to a user’s first selection operation on any line segment in the initial geometry, the line segment corresponding to the first selection operation is determined as the moving object; In response to a user's second selection operation targeting any closed region within the initial geometry, the closed surface corresponding to the second selection operation is determined as the moving object; The moving object is identified on the display interface in a third-person perspective style.

[0012] According to an interactive transformation method for graphics provided by the present invention, after obtaining the moving object determined by the user in the initial geometry, the method further includes: Receive cancellation operation from the user for the moving object; In response to the cancel operation, the selected state of the moving object is canceled, and the third visual style is removed.

[0013] According to an interactive transformation method for graphics provided by the present invention, the step of performing continuous matrix transformation calculations on the moving object to obtain coordinate data of the moving object after multiple continuous transformations includes: Obtain the original vertex coordinates of the moving object; Based on the position coordinates of the motion reference, a first translation matrix is ​​constructed, which is used to translate the motion reference to the origin of the coordinate system. Based on the continuous motion control operation, the user-inputted folding parameters are obtained, and multiple folding matrices are constructed according to the folding parameters; Based on the position coordinates of the motion reference, a second translation matrix is ​​constructed, which is used to translate the motion reference back to its original position. Based on the first translation matrix, the plurality of reflection matrices, and the second translation matrix, a plurality of composite transformation matrices are constructed, and the plurality of composite transformation matrices are applied to the original vertex coordinates to calculate the coordinate data after the plurality of continuous transformations.

[0014] According to an interactive graphic transformation method provided by the present invention, the step of obtaining user-inputted flipping parameters based on the continuous motion control operation includes: When the continuous motion control operation is a drag operation, the folding angle is calculated based on the trajectory of the drag operation.

[0015] According to an interactive transformation method for graphics provided by the present invention, the step of rendering and displaying the transformation process and transformation result of the moving object based on the multiple continuously transformed coordinate data includes: In response to the user's view switching command, the rendering perspective is switched from a 2D view to a 3D view; Based on the coordinate data after multiple continuous transformations, a three-dimensional shape is generated by the moving object folding around the motion reference, and the three-dimensional shape is rendered and displayed in the three-dimensional view.

[0016] According to an interactive transformation method for graphics provided by the present invention, the method further includes rendering and displaying the transformation process and result of the moving object based on the multiple continuously transformed coordinate data, and then further comprising: Upon receiving a user's instruction to retain the initial graphic of the moving object, the initial graphic of the moving object is displayed in a first display style, and the transformed graphic of the moving object is displayed in a second display style, wherein the first display style and the second display style differ in line type or color.

[0017] The present invention also provides an interactive graphic transformation device, comprising: Display unit, used to display the initial geometric shape; The acquisition unit is used to acquire the motion reference input by the user for the initial geometry, and to acquire the motion object determined by the user in the initial geometry; The transformation unit is used to respond to the user's continuous motion control operation, and to perform continuous matrix transformation calculations on the moving object based on the motion reference to obtain the coordinate data of the moving object after multiple continuous transformations; The rendering unit is used to render and display the transformation process and transformation result of the moving object based on the multiple continuously transformed coordinate data. The transformation process and transformation result of the moving object correspond to the flipping process and flipping result of the initial geometry, respectively.

[0018] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement an interactive transformation method of graphics as described above.

[0019] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an interactive transformation method of graphics as described in any of the above.

[0020] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements an interactive transformation method for graphics as described above.

[0021] The interactive graphic transformation method, device, electronic device, and storage medium provided by this invention greatly enhance interactivity and flexibility by allowing users to input motion references and determine moving objects in real time, and responding to continuous motion control operations from the user to perform transformations. This overcomes the shortcomings of existing teaching animations, which have fixed content and cannot be interactive in real time. Secondly, this invention can respond to continuous motion control operations from the user and generate multiple continuously transformed coordinate data of the moving object in real time through continuous matrix transformation calculations. Finally, based on these continuous coordinate data, the transformation process and results of the moving object are rendered and displayed. This allows students to see a continuous and dynamic transformation process, rather than a rigid jump from the initial graphic to the flipped result, thus providing students with a coherent and dynamic visual experience and helping them develop spatial cognition. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in this invention or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart illustrating the interactive transformation method for graphics provided by the present invention; Figure 2 This is a schematic diagram of the original graphic and the graphic reference selection state provided by the present invention; Figure 3 This is a schematic diagram illustrating the determination of the folding shaft provided by the present invention; Figure 4 This is a schematic diagram of the folding shaft adjustment provided by the present invention; Figure 5 This is a schematic diagram of the object selection state provided by the present invention; Figure 6 This is a schematic diagram of the face object selection provided by the present invention; Figure 7 This is a two-dimensional schematic diagram of the surface winding motion provided by the present invention; Figure 8 This is a schematic diagram of the perspective switching of the surface winding motion provided by the present invention; Figure 9 This is a three-dimensional schematic diagram of the surface winding motion provided by the present invention; Figure 10 This is a two-dimensional schematic diagram of the wire winding motion provided by the present invention; Figure 11 This is a schematic diagram illustrating the display styles of the initial and transformed graphics provided by the present invention; Figure 12 This is a schematic diagram of the structure of the interactive graphic transformation device provided by the present invention; Figure 13 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0025] In the current mathematics teaching system, cultivating students' intuitive imagination is one of the core subject competencies. This competency is particularly important in teaching knowledge points related to geometric motion, such as translation, symmetry, and folding of figures. In particular, folding transformations involving changes in spatial position, with their inherent dynamics and three-dimensional spatial characteristics, place high demands on students' spatial cognition and logical reasoning abilities.

[0026] In teaching practice, teachers typically rely on various tools and methods to help students understand the complete process of a figure from its initial state to its transformed state. However, existing teaching methods generally have significant limitations, making it difficult to achieve teaching objectives efficiently and intuitively.

[0027] First, traditional teaching aids have inherent limitations. For example, static teaching aids (such as paper models and plastic geometric pieces) or static blackboard writing, while demonstrating the two states of a shape before and after a transformation, cannot present the continuous and dynamic process of change from the initial state to the final state. Students find it difficult to construct a clear and coherent spatial motion logic in their minds simply by observing static textbook illustrations or teaching aids, especially when dealing with complex transformations, such as folding a two-dimensional plane figure around a straight line outside the figure to form a three-dimensional solid; the comprehension threshold is very high.

[0028] Second, existing multimedia teaching resources lack flexibility. To overcome the shortcomings of static displays, teachers sometimes use pre-made teaching videos or animations (i.e., single-point resource tools). While these resources can dynamically demonstrate a specific graphic movement process, their content is preset and fixed, lacking flexibility and interactivity. In the classroom, teachers cannot instantly modify and demonstrate animation parameters based on students' real-time feedback and questions. This one-way, didactic approach cannot meet the needs of exploratory and interactive modern teaching, and its applicability is very limited.

[0029] Third, professional geometric drawing software is complex to operate and unsuitable for real-time teaching scenarios. While some powerful professional drawing software (such as GeoGebra) exists, capable of dynamic graphic transformations, these programs are typically geared towards professional users. Their complex operational logic presents a high technical barrier. Teachers using these programs for classroom demonstrations often need to spend considerable time preparing beforehand, such as creating graphics by inputting specific commands or codes and manually setting the relationships and animation parameters between graphic elements. In the fast-paced environment of a classroom lesson, temporarily modifying a folding reference (such as changing the folding axis) can take several minutes, severely impacting the flow of instruction. Furthermore, although some of these software programs possess 3D capabilities, generating and adjusting 3D views still requires complex manual parameter settings, making it difficult to quickly and conveniently generate 2D-to-3D dynamic visualizations that meet teaching needs.

[0030] Fourth, simple teaching software has limited functionality and cannot meet the needs of spatial cognition development. While some teaching software is easy to use, its functions are often very limited. For example, many programs can only perform mirror or symmetric transformations within a two-dimensional plane, directly outputting the final result. They do not support more complex folding transformations, nor can they demonstrate dynamic transformation processes. More importantly, these tools generally lack the ability to extend two-dimensional graphics to three-dimensional space, thus offering limited help in developing students' spatial imagination.

[0031] In summary, existing tools and methods for teaching graphic motion generally suffer from at least one of the following drawbacks: (1) Poor universality: Most tools are only for a single or a few fixed knowledge points and cannot cover diverse teaching scenarios, such as arbitrary shapes, arbitrary folding references and arbitrary angle combinations.

[0032] (2) High operation and preparation costs: Professional tools are complex to operate, requiring teachers to have specialized skills and invest a lot of time in building pre-class models, which cannot meet the needs of immediacy and flexibility in classroom teaching.

[0033] (3) Insufficient spatial perception assistance: Most tools are limited to two-dimensional plane display. Even if they have 3D functions, their operation is very cumbersome and cannot conveniently and intuitively realize the dynamic visualization transformation from two-dimensional graphics to three-dimensional forms, which is not conducive to the cultivation of students' spatial cognition ability.

[0034] To address the aforementioned shortcomings, this invention provides an interactive transformation method for graphics in mathematical geometry teaching scenarios. Through touchscreen interaction, real-time coordinate calculation, and dynamic rendering logic design, it achieves a dynamic and customized display of two-dimensional graphics into three-dimensional forms, allowing students to intuitively explore the changes in graphic movement under different conditions. Ultimately, this aims to reduce students' comprehension costs, enhance their spatial perception abilities, and improve teaching efficiency and quality, thereby helping to create an efficient and interactive digital classroom and overcoming the aforementioned shortcomings.

[0035] It should be noted that the interactive graphic transformation method provided by this invention is typically executed by an electronic device. This electronic device can be a personal computer, server, interactive whiteboard, smart blackboard, tablet computer, smartphone, or other computing device with graphics processing, display, and human-computer interaction capabilities. In specific application scenarios, the electronic device runs a specific computer program to implement the various steps of the method described in this invention. The electronic device executes program instructions through its processor, calls data from its memory, and interacts with the user through its display screen and input devices (such as a touchscreen, mouse, and keyboard) to complete the entire process from graphic display and parameter acquisition to dynamic rendering.

[0036] Figure 1 This is a flowchart illustrating the interactive transformation method for graphics provided by the present invention, as shown below. Figure 1 As shown, the method includes: Step S10: Display the initial geometry.

[0037] Specifically, the initial geometric figure is the original object for motion transformation, which is displayed on the screen interface of the electronic device. The range of this initial geometric figure is very broad; it can be any two-dimensional planar figure. For example, in mathematics teaching, it can be a preset standard figure, such as a triangle, rectangle, circle, trapezoid, or other regular figures; it can also be a figure drawn on the spot by the user (such as a teacher) according to classroom needs, such as arbitrary polygons, irregular closed figures, or even open line segments or curves. This universal support for graphic types allows the present invention to adapt to most teaching scenarios involving graphic motion. For ease of understanding, the technical solution of the present invention will be described in detail below using a triangle with auxiliary lines (such as a median) as an application scenario for the initial geometric figure.

[0038] Step S20: Obtain the motion reference input by the user for the initial geometry, and obtain the motion object determined by the user in the initial geometry.

[0039] Specifically, a motion datum is a reference standard that defines how a graphic moves and serves as the basis for subsequent transformation calculations. Users can input the motion datum through interactive operations on the display interface. The motion datum can take various forms; for example, it can be a line, which typically serves as the fold axis for subsequent folding motions or the axis of symmetry for symmetry transformations. It should be understood that the motion datum can be located inside the initial geometry, and this flexibility makes it possible to simulate complex motion scenarios.

[0040] The moving object is the main part of the initial geometry that actually performs the motion transformation; it's the part the user wants to observe its motion process. The moving object is a subset of the initial geometry, which the user also determines through interactive operations within the initial geometry. For example, a user can select one or more line segments in the initial geometry as moving objects to observe the trajectory of the edges; or they can select a face formed by a closed region as a moving object to observe the overall motion of the entire shape. By separating the motion reference and the moving object, users can flexibly combine various transformation scenarios.

[0041] Step S30: In response to the user's continuous motion control operation, perform continuous matrix transformation calculation on the moving object based on the motion reference to obtain the coordinate data of the moving object after multiple continuous transformations.

[0042] Specifically, continuous motion control operations are user-issued commands used to drive and control the transformation process. This operation can be a continuous input, such as a user dragging a moving object on a touchscreen. The system responds to the user's continuous motion control operations in real time.

[0043] Upon receiving an operation, the system performs continuous matrix transformation calculations on the moving object based on the acquired motion reference. This calculation is not performed only once, but repeatedly and at high speed with each continuous motion control operation by the user. The system constructs one or a series of composite transformation matrices based on the determined position information of the motion reference and parameters parsed from the motion control operations (e.g., the flip angle calculated in real-time from the drag trajectory). Applying this transformation matrix to the original coordinates of all vertices of the moving object calculates the new coordinates of each vertex after the transformation, thus obtaining the transformed coordinate data of the moving object. By performing continuous matrix transformation calculations on the moving object, multiple transformed coordinate data can be obtained.

[0044] Step S40: Based on the coordinate data after the multiple continuous transformations, render and display the transformation process and transformation result of the moving object, wherein the transformation process and transformation result of the moving object correspond to the flipping process and flipping result of the initial geometry.

[0045] Specifically, rendering and displaying is not just about showing a final result, but about presenting a dynamic transformation process. This means that when the user's motion control operations are continuous (such as dragging), the system will continuously calculate new coordinate data and redraw the moving object, thus creating a smooth animation effect on the screen, allowing students to intuitively see how the graphics dynamically change.

[0046] It is understood that, by acquiring user-defined motion references and moving objects, and combining real-time motion control operations, this invention intelligently determines the motion scene and performs matrix transformations and dynamic rendering, constructing a highly flexible, universal, and intuitive graphics transformation framework. It can present abstract geometric transformation rules in a dynamic and visual way, especially enabling the dynamic process display from two-dimensional to three-dimensional, effectively lowering the cognitive threshold for students regarding graphic motion, particularly complex folding and spatial transformations, and significantly improving the interactivity and efficiency of teaching.

[0047] The method provided in this invention greatly enhances interactivity and flexibility by allowing users to input motion references and determine moving objects in real time, and responding to continuous motion control operations from the user. This overcomes the shortcomings of existing teaching animations, which suffer from fixed content and lack of real-time interactivity. Secondly, this invention responds to continuous motion control operations from the user by generating multiple continuously transformed coordinate data of the moving object in real time through continuous matrix transformation calculations. Finally, based on these continuous coordinate data, the transformation process and results of the moving object are rendered and displayed. This allows students to see a continuous and dynamic transformation process, rather than a rigid jump from the initial shape to the flipped result, thus providing a coherent and dynamic visual experience and helping students develop spatial cognition.

[0048] Based on the above embodiments, before performing step S20, the method provided by the embodiments of the present invention further includes a preprocessing step, which aims to improve the convenience and accuracy of subsequent user operations. This preprocessing step includes: Identify key geometric points in the initial geometry, including vertices and / or midpoints of edges of the initial geometry; The key geometric points are marked on the display interface in a first-person visual style.

[0049] Specifically, key geometric points refer to points in a geometric figure that have special definitions or important significance. These are usually reference points that users tend to choose as a basis when performing geometric transformations. In this embodiment of the invention, the identification process is automatically completed by the electronic device. The system analyzes the vertex coordinates and positional relationships between line segments of the initial geometric figure and combines them with a closed-shape algorithm to automatically identify these key points in the figure. For example, for a triangle, its key geometric points may include its three vertices and the midpoints of its three sides; for a rectangle, it may include its four vertices and the midpoints of its four sides. Of course, key geometric points are not limited to these. Depending on the needs of the teaching scenario, more complex points may also be included, such as the centroid, orthocenter, or incenter of a triangle, or the geometric center of a polygon. The system automatically obtains the position coordinates of these points by calculating the geometric properties of the initial geometric figure.

[0050] After identifying these key geometric points, the system will also mark them on the display interface using a first-person visual style. The purpose of this step is to present these automatically identified points to the user in a visual way, providing clear guidance for the user's next steps. Here, the first-person visual style is a visual marker distinct from the graphic itself, used to indicate to the user that these points are interactive and have special geometric meaning. For example, the system can render a semi-transparent small circle, a tiny cross mark, highlight these points, or emphasize them with a magnified icon visual effect at the location of each key geometric point.

[0051] For example, Figure 2 This is a schematic diagram of the original graphic and graphic reference selection state provided by the present invention, such as... Figure 2 As shown, the original graphic is a triangle with auxiliary lines. After displaying the triangle as the initial geometric shape, the system will immediately and automatically calculate the positions of its three vertices (A, B, C) and the endpoints and midpoint of the auxiliary lines (i.e., the median line EF). These key geometric points will be highlighted on the display interface with enlarged icons. For example, each key geometric point will be marked with an enlarged dot to help users quickly locate selectable reference points and reduce the difficulty of selection.

[0052] The method provided by this invention provides clear visual guidance to users by identifying and marking key geometric points in advance before the user inputs the motion reference, so that users do not have to spend effort to find or estimate important geometric positions.

[0053] Based on any of the above embodiments, the motion reference includes a folding axis; correspondingly, in step S20, obtaining the motion reference input by the user for the initial geometry includes: Step S21: In response to the user's specified operation for determining the folding axis, obtain the target line segment corresponding to the specified operation, and determine the target line segment as the folding axis; Step S22: Identify the folding axis on the display interface using a second visual style.

[0054] It should be noted that entering such Figure 2 After selecting the graphical reference mode as shown, users can perform corresponding operations on the interface to determine the motion reference.

[0055] Specifically, in the scenario where a flip axis is selected, the motion reference is specifically the flip axis (line). The system responds to the user's specified operation and determines the flip axis selected by the user accordingly. Here, the specified operation is an interactive behavior for selecting a line segment, and its implementation can be varied. For example, the user could click on two different points sequentially, and the system would determine the line segment connecting these two points as the flip axis; the user could also long-press on an edge of the initial geometry, and the system would determine that edge as the flip axis; or the user could directly draw a line segment on the screen using a drag gesture as the flip axis. The system would obtain the target line segment corresponding to the specified operation and determine that target line segment as the flip axis.

[0056] For example, Figure 3 This is a schematic diagram of the folding axis determination provided by the present invention, as shown below. Figure 3 As shown, a user (such as a teacher) can tap two different points on the screen sequentially with their finger. These points can be inside or outside the graphic. Figure 3The example shown uses a graphic to illustrate this. The system automatically generates a straight line using a two-point line-forming algorithm, marks it as the fold axis, and displays it as a fixed dashed line, while also labeling it "baseline" next to the line; alternatively, the teacher can long-press on a line segment to quickly confirm the fold axis.

[0057] Understandably, after determining the fold axis, the system will identify the fold axis on the display interface (or screen) using a secondary visual style to provide clear operational feedback to the user. This secondary visual style is a visual marker used to confirm and highlight the selected reference point; it can be distinguished from the primary visual style to avoid user confusion. For example, if the primary visual style is a small white dot, then the two endpoints selected as the fold axis could become small blue dots (secondary visual style), and the line segment could become red (secondary visual style).

[0058] It should be noted that, considering that when users select the endpoints of the folding axis by clicking on the display screen, the selected points may sometimes not be perfectly precise, this embodiment of the invention is designed with snapping effects on the endpoints and midpoints within the graphic to enable users to easily select the desired points. Specifically, when the point selected by the user is near an endpoint or midpoint within the graphic, it will automatically snap to that endpoint or midpoint, ensuring convenient operation and accurate display.

[0059] Specifically, after obtaining the screen coordinates of the target point generated by the user's click, the system iterates through the list of key geometric points of the initial geometry and calculates the straight-line distance between the target point and each key geometric point in the list. This distance is usually calculated in screen pixels. It should be understood that the target point here can be understood as a point on the graphic that the user clicked to select the flip axis.

[0060] Next, the system determines whether there are any key geometric points whose distance to the target point is less than a preset threshold. Here, the preset threshold is a crucial parameter for achieving the adsorption effect; it can be understood as an adsorption radius or capture range. This value can be preset based on factors such as screen resolution and user experience; for example, it can be set to 10 pixels or 15 pixels. The system compares each distance value calculated in the previous step with this preset threshold. If the distance between a key geometric point and the target point is less than this threshold, then the key geometric point is considered a valid candidate adsorption point.

[0061] Subsequently, based on the above judgment results, the system will execute branching logic. If there are one or more candidate snap points, the key geometric point with the smallest distance from the target point will be determined as the endpoint ultimately selected by the user. This means that even if the user's click operation does not fall 100% precisely on the key geometric point, as long as its landing point (target point) is within the snap radius of that point, the system will automatically correct the flip center to this precise key geometric point. If there are multiple key geometric points within the snap radius (for example, a vertex and the midpoint of an edge are very close), the system will select the one closest to the user's click position (i.e., the smallest distance), which best matches the user's operation intention.

[0062] If no candidate snap points exist, the target point clicked by the user is directly designated as the endpoint selected by the user. If the system determines that there are no key geometric points within a preset threshold range around the target point clicked by the user, then the system assumes that the user intends to place the object freely at that location. Therefore, the system directly uses the original coordinates of the target point generated by the user's click as the coordinates of the flip axis endpoint.

[0063] The method provided in this invention achieves a balance between operational precision and operational flexibility by employing an adsorption algorithm based on distance judgment and threshold comparison. It helps users easily and accurately set the selected points on key points with clear geometric significance, avoiding errors from manual positioning and improving setting efficiency and the accuracy of subsequent transformations. At the same time, it also retains the user's right to freely define the endpoints of the folding axis at any position in the graphic, enhancing the universality of the method and the user experience.

[0064] Based on any of the above embodiments, the step of obtaining the motion reference input by the user for the initial geometry further includes: Receive user movement operations on the motion reference; In response to the movement operation, the position coordinates of the motion reference are updated, and the updated position of the motion reference is rendered on the display interface.

[0065] Specifically, for the selected folding axis, users can make real-time adjustments without any shift in the graphic during the adjustment process. The system receives user movement operations on the motion reference. Here, a movement operation is an interactive behavior distinct from the initially specified operation, intended to adjust the position of an existing element. Specifically, the user can move the cursor or finger to the identified motion reference, press and hold (e.g., hold down the left mouse button or press and hold the screen), and then move the cursor or finger. The system recognizes this combination of input events and parses it as a movement operation on that motion reference.

[0066] Once the system detects the start of a movement operation, it will continuously perform the following two actions as the user's cursor or finger moves: updating coordinates and re-rendering. Specifically, the system will continuously obtain the current screen coordinates of the cursor or finger and use these new coordinates to update the position data of the motion reference stored in memory in real time. For example, if the movement involves a fold axis, the coordinates of its two endpoints will be updated accordingly. After the coordinates are updated, the system will immediately trigger a UI redraw, drawing the graphic representing the second visual style of the motion reference at the new coordinate position.

[0067] Because this update rendering cycle is very frequent (usually synchronized with the screen refresh rate), from the user's perspective, the effect is that they can directly drag the visual marker representing the motion reference and move it freely on the screen until they release the mouse button or finger, the movement operation ends, and the position of the motion reference is finally determined at the current position.

[0068] Figure 4 This is a schematic diagram of the folding shaft adjustment provided by the present invention, as shown below. Figure 4 As shown, when adjusting the folding axis, the teacher can press and drag any one end of the folding axis. The point moves in real time following the finger drag, and the system collects the coordinate changes of the end point in real time. Combined with the position of the other end point, the system updates the position and direction of the folding axis synchronously in real time. The moving point is displayed as a fixed yellow solid circle to avoid confusion with other points.

[0069] It is understandable that the snapping logic described in the above embodiments can also be used during the movement operation. That is, when the moving reference is dragged, it can automatically snap to any other key geometric point when its position is close to it, thus making it convenient for the user to move the reference from one key point to another accurately.

[0070] The motion reference adjustment function introduced in this embodiment of the invention enhances the interactive flexibility and fault tolerance of the method. Users no longer need to repeat the tedious steps of deletion and recreation due to initial selection errors or changes in intent; they can easily complete position corrections through intuitive drag-and-drop operations.

[0071] Based on any of the above embodiments, the system responds to the user's specified operation and determines the motion reference by the following steps: The first step is to transform the coordinates of all vertices based on the initial geometry on the two-dimensional plane, generating the coordinates of each vertex. At the same time, when creating line segments, the coordinates of the midpoint of the line segment are generated ((x1+x2) / 2, (y1+y2) / 2). The second step is to determine the coordinates of the pick point b based on the user's selected point (x, y, y). b , y bThe coordinates of the picked point are compared with those of all points in the first step above. When the deviation of the point is less than the threshold, the coordinates of point b are corrected to the vertex coordinates.

[0072] in, Represents the relationship between point b and some geometric point The distance between them, (x i , y i ) is a point The coordinates.

[0073] The third step is to record the adjusted coordinates when the user moves the reference point. If the reference point belongs to a line segment, the user's movement is limited to the line segment. If the reference point does not belong to a line segment, the user's movement is not limited.

[0074] Understandably, when a mouse or gesture moves along an edge, it's difficult for the hand or mouse to maintain precise alignment throughout. This step calculates the transformation of the reference point's movement, causing a point to move along an existing edge within a certain range. Among these... Indicates mouse or hand touch coordinates. It calculates the mouse position online ( The relative ratio of ). They are the two points connected by a line. This refers to the new coordinates obtained by multiplying by this relative ratio.

[0075] Once the motion reference is confirmed (for example, when the user switches to object selection mode, the system automatically confirms the motion reference by default), the baseline becomes confirmed and the endpoint display is canceled. It cannot be adjusted at this time. When the user needs to adjust it, they can switch back to reference selection mode via the menu to make modifications.

[0076] Based on any of the above embodiments, the moving object is at least one line segment or at least one closed surface in the initial geometry. Accordingly, in step S20, obtaining the moving object determined by the user in the initial geometry includes: Perform topological analysis on the initial geometry to identify all line segments and closed surfaces in the initial geometry; In response to a user’s first selection operation on any line segment in the initial geometry, the line segment corresponding to the first selection operation is determined as the moving object; In response to a user's second selection operation targeting any closed region within the initial geometry, the closed surface corresponding to the second selection operation is determined as the moving object; The moving object is identified on the display interface in a third-person perspective style.

[0077] Specifically, Figure 5 This is a schematic diagram of the object selection state provided by the present invention, such as... Figure 5 As shown, the system interface features menus such as "Baseline" and "Object." Users can click on the corresponding menu to enter the appropriate selection mode. In object selection mode, the system performs topological analysis on the initial geometry, identifying all line segments and closed surfaces within the shape. Specifically, the system automatically identifies line segments and closed surfaces in the shape by calculating the endpoint coordinates of line segments, the positional relationships between different line segments, and the boundary coordinates of closed regions in real time. It also highlights vertices in complex shapes, helping teachers quickly select selectable folding objects.

[0078] Understandably, topological analysis refers to a system that doesn't simply view the initial geometry as a collection of pixels, but rather parses it into structured data consisting of vertices and edges. By analyzing this structure, the system can automatically and accurately identify all the basic geometric elements that make up the figure, including all line segments and all closed faces in the image.

[0079] In this context, "all line segments" refers to each individual edge that forms the outline or internal auxiliary lines of a shape. For example, for a triangle with a median, the system will identify its three edges and one median, totaling four line segments. "All closed faces" refers to a closed region enclosed by several line segments connected end-to-end. The system uses algorithms (such as scan-line algorithms or graph-based loop-finding algorithms) to determine these regions. For example, for a triangle with a median, the system will identify a small triangle at the top and a trapezoid at the bottom, totaling two closed faces.

[0080] After completing the topology analysis, the system can respond to the user's specific selection operation. This embodiment of the invention provides two parallel selection paths to handle different user intentions; that is, this embodiment supports the confirmation of two object types (line objects and polygon objects) and supports the simultaneous selection of multiple objects.

[0081] In one embodiment, when the user's intention is to move a specific edge or line of a graphic—for example, to observe the curved surface formed by folding an edge—this path is adopted. That is, in response to the user's first selection operation, the line segment corresponding to that operation is identified as the moving object. Here, the first selection operation refers to a precise point selection behavior, such as a mouse click or screen tap. The system performs a hit detection to determine whether the user's operation point falls on an identified line segment or within its nearest neighborhood. Once a hit occurs, the system marks the data structure of that line segment as the moving object.

[0082] For example, taking a triangle as an example, teachers can select lines in two ways: first, by long-pressing a line segment (for ≥0.5 seconds), the system immediately marks the line segment as a line object and colors it red; second, by clicking on the two endpoints of a line segment (two points form a line), the system marks the line segment as a line object and colors it red. Multiple line segments can be selected simultaneously (by repeating the above operations), and all selected line objects will remain highlighted in red, with no limit on the number.

[0083] In another embodiment, when the user's intention is to move a specific face of a graphic as a whole—for example, folding a triangle around a point—this path is used. That is, in response to the user's second selection operation, the closed face corresponding to that operation is identified as the moving object. This second selection operation can also be a mouse click or a screen tap, but the key is that the operation is performed inside a closed region, not on an edge. The system uses an algorithm to determine which pre-identified closed face the user's operation point belongs to. Once determined, the system marks the set of all vertices and edges constituting that closed face as the moving object.

[0084] For example, Figure 6 This is a schematic diagram of the face object selection provided by the present invention, such as... Figure 6 As shown in (a) and (b), the teacher can click any point within the graphic (the click location must be within a closed area). The system automatically identifies the smallest closed face containing that point using a closed graphic algorithm (e.g., a point inside a triangle corresponds to a triangle face; when a polygon contains nested smaller polygons, clicking a point inside the smaller polygon corresponds to a smaller polygon face), marks the closed face as a face object, and fills it with a red semi-transparent color. Multiple closed faces can be selected simultaneously (e.g., ...). Figure 6 As shown in (b) above, repeat the above operation. All selected objects will remain highlighted in red, and there is no limit to the number of objects.

[0085] Understandably, after the user selects and confirms the moving object, the system will display the moving object in a third-view style to provide immediate visual confirmation. Here, the third-view style is a visual effect specifically designed to highlight the selected moving object, and it can be distinguished from the first-view style used to identify key geometric points and the second-view style used to identify motion references.

[0086] The method provided in this invention uses topological analysis to structure complex graphics, allowing users to accurately and unambiguously specify line segments or closed surfaces as the main moving objects with a simple click, without the need for cumbersome selection or multi-point selection. Simultaneously, the unique visual feedback reduces the possibility of accidental operation and improves the smoothness and accuracy of human-computer interaction.

[0087] Based on any of the above embodiments, after step S20, the method further includes: Receive cancellation operation from the user for the moving object; In response to the cancel operation, the selected state of the moving object is canceled, and the third visual style is removed.

[0088] It should be noted that when a user has already selected a moving object, and that object is highlighted using a third-person visual style, the user may accidentally select the wrong object, or change their mind after selection and wish to select a different object. This embodiment of the invention provides a convenient way to correct this.

[0089] Specifically, embodiments of the present invention can support the deselection of one or more objects, making the operation convenient. When a user clicks on a selected line or surface object, the system immediately cancels its special display style and removes the object marker.

[0090] Specifically, the system first receives a cancellation operation from the user targeting a moving object. Here, a cancellation operation is a user-issued instruction to undo the current selection. This operation can be implemented in various ways that align with user habits. For example, it could involve repeating the selection process; if the user performs the same selection operation again on the same highlighted moving object (such as clicking the area or line segment again), the system can interpret this as a cancellation operation. Another example is a clearly defined "Cancel Selection" or "Clear" button on the user interface, which the user clicks. Upon receiving any of these cancellation operations, the system immediately executes a response action: deselecting the moving object and removing the third-party visual style.

[0091] In this embodiment of the invention, by introducing a cancellation operation, the selection process of the moving object forms a complete closed loop. Users can correct selection errors or change the focus of the teaching demonstration at any time without cost, without interrupting the current process or performing any complex reset operations.

[0092] Based on any of the above embodiments, the system responds to the user's selection operation and determines the implementation steps of the moving object, including: The first step is to uniformly transform all vertices to the screen coordinate system to obtain the projected points on the plane; The second step is to use breadth-first traversal to find all closed planar figures in the connection relationship between the projection points and the edges. The third step is to remove duplicates from all closed planar figures. When there are consecutive repeated non-same-direction line segments, the smallest planar figure is retained. The fourth step is to fill and outline the calculated set of closed planar shapes and edges. Fifth, when the user clicks, determine which plane or edge the click belongs to and select the nearest object.

[0093] Based on any of the above embodiments, step S30, which involves performing continuous matrix transformation calculations on the moving object to obtain coordinate data of the moving object after multiple continuous transformations, includes: Step S31: Obtain the original vertex coordinates of the moving object; Step S32: Based on the position coordinates of the motion reference, construct a first translation matrix. The first translation matrix is ​​used to translate the motion reference to the origin of the coordinate system. Step S33: Based on the continuous motion control operation, obtain the folding parameters input by the user, and construct multiple folding matrices according to the folding parameters; Step S34: Based on the position coordinates of the motion reference, construct a second translation matrix. The second translation matrix is ​​used to translate the motion reference back to its original position. Step S35: Based on the first translation matrix, the plurality of reflection matrices and the second translation matrix, construct a plurality of composite transformation matrices, and apply the plurality of composite transformation matrices to the original vertex coordinates to calculate the coordinate data after the plurality of continuous transformations.

[0094] It should be noted that in computer graphics, standard reflection matrices operate around the origin of the coordinate system. However, in the application scenario of this invention, the user-selected motion reference can be almost arbitrary. To address this issue, this embodiment of the invention employs an efficient composite transformation method, the specific steps of which are described below.

[0095] Specifically, once the user identifies the moving object, the system already possesses the coordinates of all vertices constituting that object in the current coordinate system. These coordinates, called the original vertex coordinates, are the input data for calculating graphical transformations. For example, for a triangular moving object, the system obtains the coordinates of its three vertices (x1, y1, z1), (x2, y2, z2), and (x3, y3, z3); ​​for a pentagonal moving object, the system obtains the coordinates of its five vertices A(x1, y1, z1), B(x2, y2, z2), C(x3, y3, z3), D(x4, y4, z4), and E(x5, y5, z5). The z-axis coordinate of a planar graphic is always 0.

[0096] Next, the system begins constructing a series of transformation matrices for composite transformations. First, based on the position coordinates of the motion reference, the first translation matrix is ​​constructed, denoted as... The purpose of this step is to simplify the complex problem of flipping around an arbitrary axis into a simple problem of flipping around a coordinate axis. The first translation matrix translates the entire coordinate space so that the motion reference selected by the user is moved exactly to the origin of the coordinate system, that is, the endpoint of the flip axis is located at the origin, and the flip axis is located on the coordinate axis.

[0097] Then, based on continuous motion control operations, the system obtains the user-inputted flipping parameters and constructs multiple flipping matrices accordingly. Specifically, after the coordinate axes are aligned with the motion reference, a standard flipping operation can be executed. The system parses the flipping parameters from the user's motion control operations, with the most crucial parameter being the flipping angle θ. The system constructs a standard flipping matrix R based on these parameters. For example, a matrix for flipping around the Z-axis by an angle θ in three-dimensional space.

[0098] Subsequently, based on the position coordinates of the motion reference, a second translation matrix is ​​constructed, denoted as... After flipping the coordinate system around the coordinate axes, it is necessary to restore the coordinate system to its original state, which was previously moved for computational convenience. This step is the inverse operation of constructing the first translation matrix. The second translation matrix is ​​used to translate the coordinate system back to its original position.

[0099] Finally, the system combines the three independent transformation matrices into a single composite transformation matrix M through matrix multiplication, i.e. By applying this composite transformation matrix to the original vertex coordinates of the moving object, the transformed coordinate data can be calculated. Specifically, the system iterates through the original vertex coordinates of the moving object and directly calculates the new coordinates of that vertex through matrix multiplication. The set of all the new coordinates is the transformed coordinate data.

[0100] The method provided in this invention transforms a geometrically complex multi-step transformation process into a single, efficient matrix operation by constructing and applying a composite transformation matrix. This not only makes the computational logic clear and the implementation standardized, but more importantly, it improves computational efficiency.

[0101] Based on any of the above embodiments, in step S33, obtaining the folding parameters input by the user based on the continuous motion control operation includes: When the continuous motion control operation is a drag operation, the folding angle is calculated based on the trajectory of the drag operation.

[0102] Specifically, the flipping parameters, especially the flipping angle, are the core variables driving the transformation. When the motion control operation is a dragging operation, the flipping angle is calculated based on the dragging trajectory. This method provides a highly intuitive and dynamic interactive experience. When the user presses and drags on a moving object, the system tracks its trajectory in real time to calculate the flipping angle. Because this calculation process occurs continuously with the user's dragging, it can generate a series of continuously changing flipping angle values, thereby driving a smooth and fluid flipping animation.

[0103] This invention enriches its functionality and applicability by providing a drag-and-drop operation to obtain folding parameters. The drag-and-drop operation offers an intuitive and exploratory interaction, facilitating user perception and understanding of the dynamic transformation process.

[0104] Based on any of the above embodiments, step S40 specifically includes: In response to the user's view switching command, the rendering perspective is switched from a 2D view to a 3D view; Based on the coordinate data after multiple continuous transformations, a three-dimensional shape is generated by the moving object folding around the motion reference, and the three-dimensional shape is rendered and displayed in the three-dimensional view.

[0105] Specifically, in scenarios involving surface-to-line or line-to-line motion, the display effect can be 2D or 3D. Once the user confirms the 3D display effect, the system recognizes that the transformation will break through the two-dimensional plane, generating a three-dimensional geometry or surface. To fully and intuitively demonstrate this process, the rendering and display steps include: First, switching the rendering perspective from a two-dimensional view to a three-dimensional view. Initially, the interface is typically a two-dimensional view with orthographic projection. When the system receives the user's view switching command, it automatically changes the rendering camera parameters and projection matrix, switching from a two-dimensional orthographic projection to a three-dimensional perspective projection that can represent depth and perspective relationships, preparing for the subsequent display of the three-dimensional form.

[0106] Then, as the folding parameters continuously change, the corresponding coordinate data is calculated for each intermediate folding state. When the user inputs a folding command through continuous operations such as dragging, the folding parameters (such as the folding angle) change continuously. The system does not only calculate the final state, but discretizes the entire folding process into a series of tiny steps. For example, the process of folding from 0 degrees to 90 degrees can be broken down into 90 or more intermediate folding states, each corresponding to a specific angle. For each intermediate folding state, the system uses the composite transformation matrix method described in the above embodiments to calculate the coordinate data of the moving object at that specific angle.

[0107] Finally, the system will dynamically render and display the graphic corresponding to each intermediate state in the 3D view, allowing users to clearly observe the complete process of a 2D graphic being flipped.

[0108] To facilitate understanding, the above motion scenarios will be described in detail below. In scenarios involving surface-to-line motion (i.e., the reference is a line and the object is a surface), both 2D symmetry and 2D-to-3D flipping effects are supported. Figure 7 This is a two-dimensional schematic diagram of the surface winding motion provided by the present invention, as shown below. Figure 7 As shown, this motion effect is equivalent to the symmetric transformation of a surface about a line. After the teacher confirms the parameters, the system will generate a symmetrical figure in real time, and the position of the symmetrical figure corresponds clearly with that of the original figure.

[0109] To further enhance interactivity during the 2D-to-3D folding effect demonstration, users are allowed to freely observe the 3D form by switching perspectives during its generation. Specifically, the perspective switching process includes: receiving user commands to adjust the 3D perspective; responding to the adjustment commands, changing the viewing angle of the 3D view, and re-rendering the 3D form based on the changed viewing angle.

[0110] Figure 8 This is a schematic diagram of the perspective switching of the surface winding motion provided by the present invention, as shown below. Figure 8 As shown, in a scene involving surface-to-surface motion, after the teacher confirms the 3D effect, the system automatically switches the 2D perspective to a 3D perspective, for example, from a frontal view to a 45° oblique view, allowing students to intuitively experience three-dimensional space. Simultaneously, based on the positional relationship between the folding axis and the surface, the system displays the folding direction next to the graphic (e.g., ...). Figure 8 (As shown by the green arrow in the image), this direction adjusts synchronously with changes in the reference / object.

[0111] Figure 9 This is a three-dimensional schematic diagram of the surface winding motion provided by the present invention, as shown below. Figure 9 As shown, teachers can drag an object's surface using gestures, causing it to fold around a folding axis in real time. The system calculates the folding angle in real time (e.g., gradually increasing from 0° to 90°) and displays the angle value simultaneously. At the same time, it renders the surface's 3D shape, showing how the side length and angle of the 3D graphic change with the viewing angle during the folding process. For a fixed-angle demonstration, teachers can directly input the folding angle (e.g., 55°) in the input box, and the system will automatically fold the surface to the corresponding angle and freeze the fold, meeting the needs of precise teaching.

[0112] In online wire-wound motion scenarios (where the reference line is the wire and the object is the wire), the system supports 2D symmetry effects. Figure 10 This is a two-dimensional schematic diagram of the wire winding motion provided by the present invention, as shown below. Figure 10As shown, the motion effect is equivalent to the symmetrical transformation of the line about the folding axis. After the teacher confirms the parameters, the system will generate the symmetrical line in real time, and the symmetrical relationship is clearly visible.

[0113] Based on any of the above embodiments, after step S40, the method further includes: Upon receiving a user's instruction to retain the initial graphic of the moving object, the initial graphic of the moving object is displayed in a first display style, and the transformed graphic of the moving object is displayed in a second display style, wherein the first display style and the second display style differ in line type or color.

[0114] It should be noted that, to help students clearly distinguish between the initial graphic and the transformed graphic, the system provides two display styles: a dashed line contrast style and a style without an initial graphic, for teachers to choose from according to their teaching needs.

[0115] Specifically, the system determines whether it has received a user's command to retain the initial graphic of the moving object. Here, the retain command is a user's instruction to simultaneously view the before and after graphics on the screen for comparison. Upon receiving this command, the system executes specific rendering logic: displaying the initial graphic of the moving object in a first display style, while simultaneously displaying the transformed graphic of the moving object in a second display style.

[0116] The first display style is used to render the initial graphic (the graphic before transformation). For example, it can be rendered as a gray, semi-transparent outline, or its boundaries can be drawn using dashed / dotted lines. The second display style is used to render the transformed graphic (the graphic in its current or final position). For example, its outline can be drawn using opaque solid lines, possibly with a fill color.

[0117] For example, Figure 11 This is a schematic diagram illustrating the display styles of the initial and transformed graphics provided by the present invention, as shown below. Figure 11 As shown, in the dashed line contrast style, the system retains the initial shape (the line or surface before folding) on ​​the screen as a dashed line, while the transformed shape is dynamically displayed as a solid line. Students can visually compare where and how the shape has changed, and understand the transformation rules. In the no initial shape style, the system only displays the transformed shape. Selecting this style avoids the initial shape interfering with students' observation of the post-movement form, allowing them to focus on the final finished effect.

[0118] The interactive graphic transformation device provided by the present invention will be described below. The interactive graphic transformation device described below can be referred to in correspondence with the interactive graphic transformation method described above.

[0119] Based on any of the above embodiments Figure 12This is a schematic diagram of the structure of the interactive graphic transformation device provided by the present invention, as shown below. Figure 12 As shown, the device includes: Display unit 1210 is used to display the initial geometric shape; The acquisition unit 1220 is used to acquire the motion reference input by the user for the initial geometry, and to acquire the motion object determined by the user in the initial geometry; The transformation unit 1230 is used to respond to the user's continuous motion control operation, perform continuous matrix transformation calculation on the moving object based on the motion reference, and obtain the coordinate data of the moving object after multiple continuous transformations; The rendering unit 1240 is used to render and display the transformation process and transformation result of the moving object based on the multiple continuously transformed coordinate data, wherein the transformation process and transformation result of the moving object correspond to the flipping process and flipping result of the initial geometry, respectively.

[0120] The device provided in this invention greatly enhances interactivity and flexibility by allowing users to input motion references and determine moving objects in real time, and responding to continuous motion control operations from the user to transform the objects. This overcomes the shortcomings of existing teaching animations, which have fixed content and cannot be interacted with in real time. Secondly, this invention can respond to continuous motion control operations from the user and generate multiple continuously transformed coordinate data of the moving object in real time through continuous matrix transformation calculations. Finally, based on these continuous coordinate data, the transformation process and results of the moving object are rendered and displayed. This allows students to see a continuous and dynamic transformation process, rather than a rigid jump from the initial shape to the flipped result, thus providing a coherent and dynamic visual experience and helping students develop spatial cognition.

[0121] Based on any of the above embodiments, the device further includes an identification unit, the identification unit being used for: Identify key geometric points in the initial geometry, including vertices and / or midpoints of edges of the initial geometry; The key geometric points are marked on the display interface in a first-person visual style.

[0122] Based on any of the above embodiments, the motion reference includes a folding axis, and the acquisition unit 1220 includes a reference acquisition subunit, which is used for: In response to a user's specified operation for determining the fold axis, the target line segment corresponding to the specified operation is obtained, and the target line segment is determined as the fold axis; The folding axis is identified on the display interface in a second visual style.

[0123] Based on any of the above embodiments, the device further includes a reference adjustment unit, the reference adjustment unit being used for: Receive user movement operations on the motion reference; In response to the movement operation, the position coordinates of the motion reference are updated, and the updated position of the motion reference is rendered on the display interface.

[0124] Based on any of the above embodiments, the moving object is at least one line segment or at least one closed surface in the initial geometry, and the acquisition unit 1220 further includes an object acquisition subunit, which is used for: Perform topological analysis on the initial geometry to identify all line segments and closed surfaces in the initial geometry; In response to a user’s first selection operation on any line segment in the initial geometry, the line segment corresponding to the first selection operation is determined as the moving object; In response to a user's second selection operation targeting any closed region within the initial geometry, the closed surface corresponding to the second selection operation is determined as the moving object; The moving object is identified on the display interface in a third-person perspective style.

[0125] Based on any of the above embodiments, the device further includes an object cancellation unit, the object cancellation unit being used for: Receive cancellation operation from the user for the moving object; In response to the cancel operation, the selected state of the moving object is canceled, and the third visual style is removed.

[0126] Based on any of the above embodiments, the transformation unit 1230 is specifically used for: Obtain the original vertex coordinates of the moving object; Based on the position coordinates of the motion reference, a first translation matrix is ​​constructed, which is used to translate the motion reference to the origin of the coordinate system. Based on the continuous motion control operation, the user-inputted folding parameters are obtained, and multiple folding matrices are constructed according to the folding parameters; Based on the position coordinates of the motion reference, a second translation matrix is ​​constructed, which is used to translate the motion reference back to its original position. Based on the first translation matrix, the plurality of reflection matrices, and the second translation matrix, a plurality of composite transformation matrices are constructed, and the plurality of composite transformation matrices are applied to the original vertex coordinates to calculate the coordinate data after the plurality of continuous transformations.

[0127] Based on any of the above embodiments, the transformation unit 1230 includes a parameter acquisition subunit, which is specifically used for: When the continuous motion control operation is a drag operation, the folding angle is calculated based on the trajectory of the drag operation.

[0128] Based on any of the above embodiments, the rendering unit 1240 is specifically used for: In response to the user's view switching command, the rendering perspective is switched from a 2D view to a 3D view; Based on the coordinate data after multiple continuous transformations, a three-dimensional shape is generated by the moving object folding around the motion reference, and the three-dimensional shape is rendered and displayed in the three-dimensional view.

[0129] Based on any of the above embodiments, the device further includes a display style control unit, the display style control unit being used for: Upon receiving a user's instruction to retain the initial graphic of the moving object, the initial graphic of the moving object is displayed in a first display style, and the transformed graphic of the moving object is displayed in a second display style, wherein the first display style and the second display style differ in line type or color.

[0130] Figure 13 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 13 As shown, the electronic device may include a processor 1310, a communication interface 1320, a memory 1330, and a communication bus 1340, wherein the processor 1310, the communication interface 1320, and the memory 1330 communicate with each other via the communication bus 1340. The processor 1310 can call logical instructions in the memory 1330 to execute an interactive graphic transformation method. This method includes: displaying an initial geometric figure; acquiring a motion reference input by a user for the initial geometric figure, and acquiring a moving object determined by the user in the initial geometric figure; responding to continuous motion control operations by the user, performing continuous matrix transformation calculations on the moving object based on the motion reference to obtain coordinate data of the moving object after multiple continuous transformations; and rendering and displaying the transformation process and results of the moving object based on the multiple continuously transformed coordinate data, wherein the transformation process and results of the moving object correspond to the flipping process and flipping results of the initial geometric figure.

[0131] Furthermore, the logical instructions in the aforementioned memory 1330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to related technologies, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0132] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the interactive transformation method of graphics provided by the above methods. The method includes: displaying an initial geometric figure; acquiring a motion reference input by a user for the initial geometric figure, and acquiring a moving object determined by the user in the initial geometric figure; responding to the user's continuous motion control operation, performing continuous matrix transformation calculations on the moving object based on the motion reference to obtain coordinate data of the moving object after multiple continuous transformations; and rendering and displaying the transformation process and transformation result of the moving object based on the multiple continuously transformed coordinate data, wherein the transformation process and transformation result of the moving object correspond to the flipping process and flipping result of the initial geometric figure.

[0133] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements an interactive transformation method for graphics provided by the methods described above. The method includes: displaying an initial geometric figure; acquiring a motion reference input by a user for the initial geometric figure, and acquiring a moving object determined by the user in the initial geometric figure; responding to continuous motion control operations by the user, performing continuous matrix transformation calculations on the moving object based on the motion reference to obtain coordinate data of the moving object after multiple continuous transformations; and rendering and displaying the transformation process and transformation result of the moving object based on the multiple continuously transformed coordinate data, wherein the transformation process and transformation result of the moving object correspond to the flipping process and flipping result of the initial geometric figure.

[0134] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0135] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of software products. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An interactive transformation method for graphics, characterized in that, include: Display the initial geometry; Obtain the motion reference input by the user for the initial geometry, and obtain the motion object determined by the user in the initial geometry; In response to the user’s continuous motion control operation, the motion object is subjected to continuous matrix transformation calculation based on the motion reference to obtain the coordinate data of the motion object after multiple continuous transformations; Based on the coordinate data after multiple continuous transformations, the transformation process and results of the moving object are rendered and displayed, and the transformation process and results of the moving object correspond to the flipping process and results of the initial geometry.

2. The interactive transformation method for graphics according to claim 1, characterized in that, Prior to obtaining the motion reference input by the user for the initial geometry, the process also includes: Identify key geometric points in the initial geometry, including vertices and / or midpoints of edges of the initial geometry; The key geometric points are marked on the display interface in a first-person visual style.

3. The interactive transformation method for graphics according to claim 2, characterized in that, The motion reference includes a folding axis, and acquiring the motion reference input by the user for the initial geometry includes: In response to a user's specified operation for determining the fold axis, the target line segment corresponding to the specified operation is obtained, and the target line segment is determined as the fold axis; The folding axis is identified on the display interface in a second visual style.

4. The interactive transformation method for graphics according to claim 3, characterized in that, The process of obtaining the motion reference input by the user for the initial geometry also includes: Receive user movement operations on the motion reference; In response to the movement operation, the position coordinates of the motion reference are updated, and the updated position of the motion reference is rendered on the display interface.

5. The interactive transformation method for graphics according to claim 1, characterized in that, The moving object is at least one line segment or at least one closed surface in the initial geometry. Obtaining the moving object determined by the user in the initial geometry includes: Perform topological analysis on the initial geometry to identify all line segments and closed surfaces in the initial geometry; In response to a user’s first selection operation on any line segment in the initial geometry, the line segment corresponding to the first selection operation is determined as the moving object; In response to a user's second selection operation targeting any closed region within the initial geometry, the closed surface corresponding to the second selection operation is determined as the moving object; The moving object is identified on the display interface in a third-person perspective style.

6. The interactive transformation method for graphics according to claim 5, characterized in that, The process of obtaining the moving object determined by the user in the initial geometry further includes: Receive cancellation operation from the user for the moving object; In response to the cancel operation, the selected state of the moving object is canceled, and the third visual style is removed.

7. The interactive transformation method for graphics according to claim 1, characterized in that, The step of performing continuous matrix transformation calculations on the moving object to obtain coordinate data of the moving object after multiple continuous transformations includes: Obtain the original vertex coordinates of the moving object; Based on the position coordinates of the motion reference, a first translation matrix is ​​constructed, which is used to translate the motion reference to the origin of the coordinate system. Based on the continuous motion control operation, the user-inputted folding parameters are obtained, and multiple folding matrices are constructed according to the folding parameters; Based on the position coordinates of the motion reference, a second translation matrix is ​​constructed, which is used to translate the motion reference back to its original position. Based on the first translation matrix, the plurality of reflection matrices, and the second translation matrix, a plurality of composite transformation matrices are constructed, and the plurality of composite transformation matrices are applied to the original vertex coordinates to calculate the coordinate data after the plurality of continuous transformations.

8. The interactive transformation method for graphics according to claim 7, characterized in that, The step of obtaining the folding parameters input by the user based on the continuous motion control operation includes: When the continuous motion control operation is a drag operation, the folding angle is calculated based on the trajectory of the drag operation.

9. The interactive transformation method for graphics according to claim 7, characterized in that, The process of rendering and displaying the transformation process and results of the moving object based on the multiple continuously transformed coordinate data includes: In response to the user's view switching command, the rendering perspective is switched from a 2D view to a 3D view; Based on the coordinate data after multiple continuous transformations, a three-dimensional shape is generated by the moving object folding around the motion reference, and the three-dimensional shape is rendered and displayed in the three-dimensional view.

10. The interactive transformation method for graphics according to any one of claims 1 to 9, characterized in that, The process of rendering and displaying the transformation process and result of the moving object based on the coordinate data after multiple continuous transformations, further includes: Upon receiving a user's instruction to retain the initial graphic of the moving object, the initial graphic of the moving object is displayed in a first display style, and the transformed graphic of the moving object is displayed in a second display style, wherein the first display style and the second display style differ in line type or color.

11. An interactive graphic transformation device, characterized in that, include: Display unit, used to display the initial geometric shape; The acquisition unit is used to acquire the motion reference input by the user for the initial geometry, and to acquire the motion object determined by the user in the initial geometry; The transformation unit is used to respond to the user's continuous motion control operation, and to perform continuous matrix transformation calculations on the moving object based on the motion reference to obtain the coordinate data of the moving object after multiple continuous transformations; The rendering unit is used to render and display the transformation process and transformation result of the moving object based on the multiple continuously transformed coordinate data. The transformation process and transformation result of the moving object correspond to the flipping process and flipping result of the initial geometry, respectively.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the interactive transformation method of the graphics as described in any one of claims 1 to 10.

13. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the interactive transformation method of the graphics as described in any one of claims 1 to 10.