Compass implementation method and device for electronic whiteboard, equipment and storage medium

By real-time detection of the pen tip coordinates and calculating the increment angle, the problem of poor circle drawing of electronic whiteboards is solved, and the effect of efficient drawing and intuitive display of parameter changes is achieved.

CN120411301APending Publication Date: 2025-08-01GUANGZHOU LANGO ELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510531298.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing electronic whiteboards have poor results when drawing circles, and cannot visually display parameter changes, which affects the teaching effect.

Method used

By obtaining the anchor coordinates, initial nib coordinates and screen DPI, the nib coordinates are detected in real time, the increment angle and radius are calculated, the increment angle is displayed, and the circle is filled to generate the target circle.

Benefits of technology

It realizes efficient drawing of circles and improves the circle drawing effect, and users can intuitively understand the parameter changes during the drawing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120411301A_ABST
    Figure CN120411301A_ABST
Patent Text Reader

Abstract

The invention provides a compass implementation method and device for an electronic whiteboard, equipment and a storage medium, and the compass implementation method for the electronic whiteboard comprises the steps: obtaining an anchor point coordinate, an initial first pen point coordinate and a screen DPI, determining an initial first radius according to the distance between the anchor point coordinate and the first pen point coordinate, and in a pen moving process, determining a second radius according to the distance between the first radius and the anchor point coordinate; detecting each second pen point coordinate of the pen point in real time, determining an increment angle and a second radius corresponding to each second pen point coordinate according to the first pen point coordinate, the second pen point coordinate, the anchor point coordinate and the screen DPI, displaying the increment angle, and visually displaying parameter change in the drawing process for a user. The total increment angle is determined according to the increment angle corresponding to each second pen point coordinate, circle filling processing is carried out according to the total increment angle, the target circle is obtained, efficiency is higher, and the circle drawing effect is good.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic whiteboards, and particularly to a method, device, equipment and storage medium for implementing a compass on an electronic whiteboard. Background Art

[0002] As an interactive teaching tool, electronic whiteboards have been widely used in educational and conference scenarios. However, there are still significant technical deficiencies in the drawing of geometric figures (especially circles). The existing technology mainly relies on users to manually draw circles, resulting in irregular figures, disproportionate ratios, poor circle-drawing effects, and affecting the teaching effect. In addition, most electronic whiteboards only support inserting fixed figures or simple gesture drawing, and cannot intuitively display the parameter changes during the drawing process. Therefore, there is an urgent need for a more interactive and immersive compass implementation solution. Summary of the Invention

[0003] Embodiments of the present application provide a method, device, equipment and storage medium for implementing a compass on an electronic whiteboard to solve at least one problem existing in the related technology. The technical solutions are as follows:

[0004] In a first aspect, an embodiment of the present application provides a method for implementing a compass on an electronic whiteboard, including:

[0005] Obtain an anchor point coordinate, an initial first pen tip coordinate, and the screen DPI, and determine an initial first radius according to the distance between the anchor point coordinate and the first pen tip coordinate;

[0006] During the movement of the pen, continuously detect each second pen tip coordinate of the pen tip, and respectively determine an incremental angle and a second radius corresponding to each second pen tip coordinate according to the first pen tip coordinate, the second pen tip coordinate, the anchor point coordinate, and the screen DPI, and display the incremental angle;

[0007] Determine a total incremental angle according to the incremental angle corresponding to each second pen tip coordinate;

[0008] Perform a supplementary circle process according to the total incremental angle to obtain a target circle.

[0009] In an implementation manner, the step of respectively determining an incremental angle and a second radius corresponding to each second pen tip coordinate according to the first pen tip coordinate, the second pen tip coordinate, the anchor point coordinate, and the screen DPI includes:

[0010] Determine a first vector pointing from the anchor point coordinate to the first pen tip coordinate and a second vector pointing from the anchor point coordinate to each second pen tip coordinate;

[0011] Determine the first cross product of the second vector of the earliest generated second pen tip coordinate and the first vector, and the second cross products between the second vectors of the second pen tip coordinates generated at adjacent times, and determine the incremental angle corresponding to each second pen tip coordinate according to the first cross product, each of the second cross products, the magnitude of the first vector, and the magnitudes of each of the second vectors;

[0012] Respectively determine the second radius corresponding to each second pen tip coordinate according to the second pen tip coordinate, the anchor point coordinate, and the screen DPI.

[0013] In one implementation, the respectively determining the second radius corresponding to each second pen tip coordinate according to the second pen tip coordinate, the anchor point coordinate, and the screen DPI includes:

[0014] Determine the conversion coefficient corresponding to the screen according to the screen DPI;

[0015] Respectively determine the distance between each second pen tip coordinate and the anchor point coordinate according to the second pen tip coordinate and the anchor point coordinate;

[0016] Respectively obtain the second radius corresponding to each second pen tip coordinate according to the product of each distance and the conversion coefficient.

[0017] In one implementation, the method further includes:

[0018] Respectively determine the polar angle corresponding to each second pen tip coordinate according to the second pen tip coordinate and the anchor point coordinate, where the polar angle is the angle between the direction from the anchor point coordinate to the second pen tip coordinate and the horizontal direction;

[0019] Respectively determine the angle difference between each polar angle and a preset angle in a preset angle set;

[0020] When the angle difference is less than or equal to an angle threshold, play a prompt sound and display a scale UI in real time, and make the scale UI rotate synchronously with the change of the polar angle.

[0021] In one implementation, the method further includes:

[0022] In the case of determining the first radius, simulate drawing a circle with the current anchor point coordinate and the first radius to determine whether the circle can be completely displayed on the screen. If it cannot be completely displayed on the screen, prompt to trigger a swap operation. In response to the trigger instruction of the swap operation, use the anchor point coordinate as the new first pen tip coordinate, and use the first pen tip coordinate as the new anchor point coordinate;

[0023] Or,

[0024] In response to a trigger instruction for a swapping operation, use the anchor coordinates as the new first pen tip coordinates, and use the first pen tip coordinates as the new anchor coordinates.

[0025] In one implementation, the process of completing a circle based on the total incremental angle to obtain a target circle includes:

[0026] When the total incremental angle reaches an angle threshold, perform a correction process based on each of the second pen tip coordinates to obtain an updated circular arc;

[0027] Use the updated circular arc to complete a circle to obtain a target circle.

[0028] In one implementation, the process of performing a correction process based on each of the second pen tip coordinates to obtain an updated circular arc includes:

[0029] Perform fitting based on each of the second pen tip coordinates to determine a fitting center and a fitting radius, and generate a fitting circular arc based on the fitting center, the fitting radius, and the total incremental angle;

[0030] Determine the radius difference value between the fitting radius and the first radius;

[0031] When the radius difference value is less than or equal to a radius threshold, use the fitting circular arc as the updated circular arc. When the radius difference value is greater than the radius threshold, determine a jitter abnormal state, and generate an updated circular arc based on the first radius and the total incremental angle with the fitting center or the anchor coordinates as the center.

[0032] In a second aspect, an embodiment of the present application provides a device for implementing a pair of compasses on an electronic whiteboard, including:

[0033] An acquisition module, configured to acquire anchor coordinates, initial first pen tip coordinates, and a screen DPI, and determine an initial first radius based on the distance between the anchor coordinates and the first pen tip coordinates;

[0034] A first determination module, configured to, during the movement of the pen, detect each second pen tip coordinate of the pen tip in real time, and respectively determine an incremental angle and a second radius corresponding to each second pen tip coordinate based on the first pen tip coordinates, the second pen tip coordinates, the anchor coordinates, and the screen DPI, and display the incremental angle;

[0035] A second determination module, configured to determine a total incremental angle based on the incremental angle corresponding to each second pen tip coordinate;

[0036] A processing module, configured to perform a circle completion process based on the total incremental angle to obtain a target circle.

[0037] In one implementation, the processing module is further configured to:

[0038] respectively determine a polar angle corresponding to each of the second pen tip coordinates according to the second pen tip coordinates and the anchor point coordinates, where the polar angle is an angle between a direction from the anchor point coordinates to the second pen tip coordinates and the horizontal direction;

[0039] respectively determine an angle difference between each of the polar angles and a preset angle in a preset angle set;

[0040] When the angle difference is less than or equal to an angle threshold, play a prompt sound and display a scale UI in real time, and make the scale UI rotate synchronously following the change of the polar angle.

[0041] In one implementation, the processing module is further configured to:

[0042] In the case of determining the first radius, perform a simulated circle drawing with the current anchor point coordinates and the first radius to determine whether the circle can be completely displayed on the screen. If it cannot be completely displayed on the screen, prompt to trigger a swap operation. In response to the trigger instruction of the swap operation, use the anchor point coordinates as the new first pen tip coordinates, and use the first pen tip coordinates as the new anchor point coordinates;

[0043] Or,

[0044] In response to the trigger instruction of the swap operation, use the anchor point coordinates as the new first pen tip coordinates, and use the first pen tip coordinates as the new anchor point coordinates.

[0045] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory. Instructions are stored in the memory, and the instructions are loaded and executed by the processor to implement the method in any one of the above aspects.

[0046] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed, the method in any one of the above aspects is implemented.

[0047] The beneficial effects in the above technical solutions at least include:

[0048] By obtaining the anchor point coordinates, the initial first pen tip coordinates, and the screen DPI, and determining the initial first radius based on the distance between the anchor point coordinates and the first pen tip coordinates, during the movement of the pen, the second pen tip coordinates of the pen tip are detected in real time. According to the first pen tip coordinates, the second pen tip coordinates, the anchor point coordinates, and the screen DPI, the incremental angle and the second radius corresponding to each second pen tip coordinate are determined, and the incremental angle is displayed to visually show the parameter changes during the drawing process for the user. According to the incremental angle corresponding to each second pen tip coordinate, the total incremental angle is determined, and circle completion processing is performed based on the total incremental angle to obtain the target circle, which is more efficient and has a good circle-drawing effect.

[0049] The above summary is only for the purpose of the specification and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present application will be readily apparent by reference to the drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In the drawings, unless otherwise specified, the same reference numerals throughout the several views represent the same or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present application and should not be regarded as limiting the scope of the present application.

[0051] Figure 1 It is a schematic flowchart of the steps of the method for implementing a compass on an electronic whiteboard according to an embodiment of the present application;

[0052] Figure 2 It is a structural block diagram of the device for implementing a compass on an electronic whiteboard according to an embodiment of the present application;

[0053] Figure 3 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0054] In the following, only some exemplary embodiments are briefly described. As those skilled in the art can recognize, the described embodiments can be modified in various different ways without departing from the spirit or scope of the present application. Therefore, the drawings and the description are considered to be exemplary in nature rather than restrictive.

[0055] Referring to Figure 1 , a flowchart of the method for implementing a compass on an electronic whiteboard according to an embodiment of the present application is shown. This method is executed by the system of the electronic whiteboard. The method for implementing a compass on the electronic whiteboard can at least include steps S100 - S400:

[0056] S100. Obtain the anchor point coordinates, the initial first pen tip coordinates, and the screen DPI, and determine the initial first radius according to the distance between the anchor point coordinates and the first pen tip coordinates.

[0057] S200. During the movement of the pen, continuously detect the respective second pen tip coordinates of the pen tip. According to the first pen tip coordinates, the second pen tip coordinates, the anchor point coordinates, and the screen DPI, determine the incremental angle and the second radius corresponding to each second pen tip coordinate, and display the incremental angle.

[0058] S300. Determine the total incremental angle according to the incremental angle corresponding to each second pen tip coordinate.

[0059] S400. Perform circle completion processing according to the total incremental angle to obtain the target circle.

[0060] The technical solution of the embodiment of the present application, by obtaining the anchor point coordinates, the initial first pen tip coordinates, and the screen DPI, and determining the initial first radius according to the distance between the anchor point coordinates and the first pen tip coordinates. During the movement of the pen, continuously detect the respective second pen tip coordinates of the pen tip. According to the first pen tip coordinates, the second pen tip coordinates, the anchor point coordinates, and the screen DPI, determine the incremental angle and the second radius corresponding to each second pen tip coordinate, and display the incremental angle, intuitively showing the parameter changes during the drawing process for the user. Determine the total incremental angle according to the incremental angle corresponding to each second pen tip coordinate. Perform circle completion processing according to the total incremental angle to obtain the target circle, which is more efficient and has a good circle drawing effect.

[0061] In one implementation, in step S100, when the user uses the compass function of the electronic whiteboard, the user will click on the screen with the pen first to determine the anchor point A and the anchor point coordinates. Then the screen will display "Please drag the pen tip to draw an arc" for the user to click on a point B or drag to a point B (the coordinates of this point are the initial first pen tip coordinates) to determine the radius and the radius direction, and then drag. For example, the initial first radius AB can be determined based on the distance between the anchor point A and the anchor point coordinates and the first pen tip coordinates of the point B. In addition, the system can read the screen DPI (Dots Per Inch).

[0062] In one implementation, when the user uses the pen to draw a circle with the first radius, during the movement of the pen, the respective second pen tip coordinates of the pen tip will be continuously detected, so as to continuously render the trace of drawing the circle and display it. In the embodiment of the present application, the sampling rate of continuous detection can be determined according to the actual situation. In the embodiment of the present application, taking the high-frequency sampling rate of 60 frames per second as an example, so during the movement of the pen, each frame of the pen tip will have corresponding second pen tip coordinates, thus obtaining multiple second pen tip coordinates. The multiple second pen tip coordinates are actually the coordinate data of consecutive time points.

[0063] In one embodiment, in step S200, according to the first pen tip coordinate, the second pen tip coordinate, the anchor point coordinate, and the screen DPI respectively, determining the increment angle and the second radius corresponding to each second pen tip coordinate includes steps S210 - S230:

[0064] S210. Determine a first vector from the anchor point coordinate to the first pen tip coordinate and a second vector from the anchor point coordinate to each second pen tip coordinate.

[0065] In one embodiment, determining a first vector V1 from the anchor point coordinate to the first pen tip coordinate and a second vector V ( 2i (i.e., the vector from the anchor point coordinate to the i-th second pen tip coordinate)).

[0066] S220. Determine a first cross product of the second vector of the earliest generated second pen tip coordinate and the first vector, and second cross products between the second vectors of the second pen tip coordinates generated at each adjacent time, and determine the increment angle corresponding to each second pen tip coordinate according to the first cross product, each second cross product, the magnitude of the first vector, and the magnitudes of each second vector.

[0067] In one embodiment, determining the second vector V ( 21 of the earliest generated second pen tip coordinate (i.e., the second pen tip coordinate adjacent to the first pen tip coordinate after the first pen tip coordinate)) and the first cross product of the first vector V1: V1×V 21 , and second cross products between the second vectors of the second pen tip coordinates generated at each adjacent time, and determine the increment angle corresponding to each second pen tip coordinate according to the first cross product, each second cross product, the magnitude of the first vector, and the magnitudes of each second vector.

[0068] For example, taking the first vector and the second vector of the earliest generated second pen tip coordinate as an example, based on the first cross product V1×V 21 the magnitude of the first vector |V1| and the magnitude of the second vector of the earliest generated second pen tip coordinate |V 21 |, determining that the increment angle corresponding to the earliest generated second pen tip coordinate is arccos[(V1×V 21 ) / (|V1||V 21 |)], so based on this principle, the increment angles corresponding to other second pen tip coordinates can be determined based on each second cross product and the magnitudes of each second vector, and finally the increment angle corresponding to each second pen tip coordinate is determined.

[0069] In the embodiments of the present application, in order to improve the user experience and assist the user in understanding the circle drawing progress, the corresponding increment angle can be displayed in real time.

[0070] S230. Determine the second radius corresponding to each second pen tip coordinate respectively according to the second pen tip coordinate, the anchor point coordinate, and the screen DPI.

[0071] In one implementation, S230 includes S2301 - S2303:

[0072] S2301. Determine the conversion coefficient corresponding to the screen according to the screen DPI.

[0073] It should be noted that, for example, if the screen DPI is 160, since 1 foot is 2.54 cm, then 2.54 / 160, and the conversion coefficient k ≈ 0.015875 can be calculated. Generally, the DPI of a typical electronic whiteboard is between 100 and 300, so the conversion coefficient k is usually between 0.008 and 0.025. The conversion coefficient can also be directly obtained through the system API to automatically convert the physical resolution and size.

[0074] S2302. Determine the distance L between each second pen tip coordinate and the anchor point coordinate respectively according to the second pen tip coordinate and the anchor point coordinate i , that is, the distance between the anchor point coordinate and the i-th second pen tip coordinate.

[0075] S2303. Obtain the second radius corresponding to each second pen tip coordinate respectively according to the product of each distance and the conversion coefficient.

[0076] Optionally, according to each distance L i and the product of the conversion coefficient k, obtain the second radius R corresponding to each second pen tip coordinate i , that is, the second radius corresponding to the i-th second pen tip coordinate, with the unit of cm.

[0077] It should be noted that when the second radius R1 determined for the first time is greater than or less than the first radius, or the second radius R i is greater than or less than R i-1 , a prompt sound effect and record will be sent to prompt the user that there is a deviation from the radius triggered at the previous time.

[0078] In one implementation, in step S300, after determining the incremental angle corresponding to each second pen tip coordinate, directly accumulate all the incremental angles to determine the total incremental angle, which is equivalent to how many angles the current user has drawn in total. For example, if it is 300°, then at this time, an arc of 300° will be on the screen of the electronic whiteboard.

[0079] In one implementation, step S400 includes steps S410 - S420:

[0080] S410. When the total incremental angle reaches the angle threshold, perform correction processing based on each second nib coordinate to obtain an updated arc.

[0081] Optionally, the angle threshold includes but is not limited to 300° or 330°. If the angle threshold is reached, it indicates that the arc drawn by the user at this time is an arc that reaches the angle threshold.

[0082] In one implementation, S410 includes steps S4101 - S4103:

[0083] S4101. Fit according to each second nib coordinate, determine the fitting center and the fitting radius, and generate a fitting arc based on the fitting center, the fitting radius, and the total incremental angle.

[0084] Optionally, fit according to each second nib coordinate by the least squares method to determine the fitting center (i.e., the center of the fit) and the fitting radius. Then, based on the fitting center and the fitting radius, a fitting circle can be determined. Assuming the angle threshold is 300°, then the part of the fitting circle that is 300° is generated at this time, that is, a 300° arc is generated as the fitting arc, aiming to correspond to the arc of the angle drawn by the current user. In some embodiments, after generating a 300° arc, the fitting center can be translated to the anchor point coordinate so that the finally generated fitting arc is a 300° arc centered on the anchor point coordinate.

[0085] S4102. Determine the radius difference value between the fitting radius and the first radius.

[0086] For example, determine the absolute value of the difference between the fitting radius and the first radius to determine the radius difference value.

[0087] S4103. When the radius difference value is less than or equal to the radius threshold, use the fitting arc as the updated arc. When the radius difference value is greater than the radius threshold, determine the jitter abnormal state, and generate an updated arc based on the first radius and the total incremental angle with the fitting center or the anchor point coordinate as the center.

[0088] Optionally, the radius threshold is adjusted according to the actual situation. For example, if the pen thickness is relatively high, the radius threshold is relatively large; if the pen thickness is relatively thin, the radius threshold is relatively small. Among them, when the radius difference value is less than or equal to the radius threshold, it indicates that the user's circle drawing is relatively regular and close to the initial standard at this time. Therefore, the fitting arc can be directly used as the updated arc.

[0089] When the radius difference value is greater than the radius threshold, it indicates that the current radius deviation is relatively large, and there may be situations such as jitter when the user draws a circle. The system determines it as a jitter abnormal state, and generates an updated arc centered on the fitting center or the anchor point coordinates according to the first radius and the total incremental angle. For example, assuming that the angle threshold is 300°, then the updated arc at this time is a 300° arc, and the purpose is to correspond to the arc of the angle currently drawn by the user.

[0090] S420. Perform a circle completion process using the updated arc to obtain the target circle.

[0091] For example, assuming that the angle threshold is 300°, when it reaches 300°, it is considered an "approximate closed trajectory", and directly perform a circle completion process with the radius of the currently updated arc, directly generate the remaining 60° arc, and directly obtain the target circle, which is convenient and fast.

[0092] In one implementation, the method for implementing a compass on an electronic whiteboard according to an embodiment of the present application may further include steps S510 - S530:

[0093] S510. Respectively determine the polar angle corresponding to each second pen tip coordinate according to the second pen tip coordinate and the anchor point coordinate.

[0094] Optionally, respectively determine the polar angle θ corresponding to each second pen tip coordinate according to the second pen tip coordinate and the anchor point coordinate. For example, taking the anchor point coordinate (X1, Y1) and a certain second pen tip coordinate (X2, Y2) as an example, the polar angle θ corresponding to this second pen tip coordinate can be determined as θ = atan2(Y2 - Y1, X2 - X1). Based on this principle, the polar angle corresponding to each second pen tip coordinate can be determined. Among them, the polar angle is the angle between the direction from the anchor point coordinate to the second pen tip coordinate and the horizontal direction (X - axis direction).

[0095] S520. Respectively determine the angle difference between each polar angle and the preset angles in the preset angle set.

[0096] Optionally, integer preset angles such as {10°, 20°,... 360°} and / or common preset angles based on the user's own habits such as 15°, 45°, etc. can be set in advance, and finally form a preset angle set, and there can be several preset angles in the preset angle set. Specifically, respectively determine the absolute value of the difference between each polar angle and the preset angles in the preset angle set, so as to determine the angle difference between each polar angle and the preset angles in the preset angle set.

[0097] S530. When the angle difference is less than or equal to the angle threshold, play a prompt sound and display the scale UI in real - time, and make the scale UI rotate synchronously with the change of the polar angle.

[0098] Optionally, when the angle difference is less than or equal to the angle threshold, it indicates that the angle is close to or has reached the preset angle. At this time, a prompt sound is played and the scale UI (an interface component that rotates around the center of the circle) is displayed in real time to remind the user and enable the user to know which preset angle has been specifically reached through the display of the scale UI, facilitating the user to understand the progress of drawing a circle. Because in some cases, the user may use the compass tool to draw an arc of a certain angle rather than a complete circle. At the same time, in the embodiments of the present application, the scale UI is synchronously rotated following the change of the polar angle, that is, the angle between the scale UI and the X-axis is the same as the current polar angle and changes with the change of the polar angle. And the angle on the scale UI is displayed by an angle value display independent of the scale UI, always keeping the text upright and not rotating for the user to read the current angle.

[0099] In one implementation manner, the method for implementing a compass on an electronic whiteboard according to the embodiments of the present application may further include steps S610 - S620:

[0100] S610. When the first radius is determined, simulate drawing a circle with the current anchor point coordinates and the first radius to determine whether the circle can be completely displayed on the screen. If it cannot be completely displayed on the screen, prompt to trigger the swap operation. In response to the trigger instruction of the swap operation, take the anchor point coordinates as the new first pen tip coordinates, and take the first pen tip coordinates as the new anchor point coordinates.

[0101] Optionally, when the first radius is determined, simulate drawing a circle with the current anchor point coordinates and the first radius to determine whether the circle can be completely displayed on the screen. Because in some cases, during the process of drawing a circle with the current anchor point coordinates and the first radius, it may exceed the boundary of the screen, resulting in an inability to complete the circle drawing finally, wasting time and affecting the drawing effect. At this time, the system automatically simulates drawing a circle to determine whether the circle can be completely displayed on the screen for early prediction.

[0102] Optionally, if it cannot be completely displayed on the screen, at this time the system issues a prompt to ask the user whether to trigger the swap operation. In response to the trigger instruction of the swap operation selected by the user, at this time, the anchor point coordinates can be taken as the new first pen tip coordinates, and the first pen tip coordinates can be taken as the new anchor point coordinates to achieve position swapping, which is beneficial to ensuring the generation of a subsequent complete circle.

[0103] S620. In response to the trigger instruction of the swap operation, take the anchor point coordinates as the new first pen tip coordinates, and take the first pen tip coordinates as the new anchor point coordinates.

[0104] In some embodiments, when determining the first radius, sometimes the user does not necessarily always start operating from the logic of "fixed point → rotation point". The user may first hold the edge of the circle (instead of the center of the circle), and then set the center of the circle. Or due to direction habits (left hand / right hand), space limitations, writing direction, etc., it may be more convenient to operate from "outside to inside". Or sometimes two users collaborate to draw, and the starting points and rotation points such as the requirements for constructing double circles and arc groups may be interchanged as needed. In this case, the user can generate a trigger instruction for the interchange operation by means of a voice command or by clicking the "Interchange Operation" button displayed on the screen by the system. In response to this instruction, the system takes the anchor point coordinates as the new first pen tip coordinates and the first pen tip coordinates as the new anchor point coordinates, that is, realizes the interchange of the center of the circle and the circle edge point. At this time, based on the newly determined first pen tip coordinates and anchor point coordinates, the calculations in S100 - S400 above are re - executed to realize the automatic update of the incremental angle, polar angle, etc., which is very convenient and has a wider range of usage scenarios.

[0105] Referring to Figure 2 , a structural block diagram of a compass implementation device of an electronic whiteboard according to an embodiment of the present application is shown. The device may include:

[0106] An acquisition module, configured to acquire anchor point coordinates, initial first pen tip coordinates, and the screen DPI, and determine an initial first radius according to the distance between the anchor point coordinates and the first pen tip coordinates;

[0107] A first determination module, configured to, during the movement of the pen, real - time detect each second pen tip coordinate of the pen tip, and respectively determine an incremental angle and a second radius corresponding to each second pen tip coordinate according to the first pen tip coordinates, the second pen tip coordinates, the anchor point coordinates, and the screen DPI, and display the incremental angle;

[0108] A second determination module, configured to determine a total incremental angle according to the incremental angle corresponding to each second pen tip coordinate;

[0109] A processing module, configured to perform a circle - completion process according to the total incremental angle to obtain a target circle.

[0110] In one implementation manner, the processing module is further configured to:

[0111] Respectively determine a polar angle corresponding to each second pen tip coordinate according to the second pen tip coordinates and the anchor point coordinates, where the polar angle is the included angle between the direction from the anchor point coordinates to the second pen tip coordinates and the horizontal direction;

[0112] Respectively determine the angle difference between each polar angle and a preset angle in a preset angle set;

[0113] When the angle difference is less than or equal to an angle threshold, play a prompt sound and real - time display a scale UI, and make the scale UI rotate synchronously with the change of the polar angle.

[0114] In one embodiment, the processing module is further configured to:

[0115] When the first radius is determined, a circle is simulated with the current anchor point coordinates and the first radius to determine whether the circle can be completely displayed on the screen. If it cannot be completely displayed on the screen, a swap operation is prompted to be triggered. In response to the trigger instruction of the swap operation, the anchor point coordinates are used as the new first pen tip coordinates, and the first pen tip coordinates are used as the new anchor point coordinates;

[0116] Or,

[0117] In response to the trigger instruction of the swap operation, the anchor point coordinates are used as the new first pen tip coordinates, and the first pen tip coordinates are used as the new anchor point coordinates.

[0118] For the functions of the modules in the device according to the embodiments of the present application, reference may be made to the corresponding descriptions in the above methods, which will not be elaborated herein.

[0119] Referring to Figure 3 , a structural block diagram of an electronic device according to an embodiment of the present application is shown. The electronic device includes: a memory 310 and a processor 320. Instructions that can run on the processor 320 are stored in the memory 310. The processor 320 loads and executes the instructions to implement the method for implementing a pair of compasses on an electronic whiteboard in the above embodiment. Among them, the number of the memory 310 and the processor 320 can be one or more.

[0120] In one embodiment, the electronic device further includes a communication interface 330, which is used to communicate with external devices and perform data interaction and transmission. If the memory 310, the processor 320, and the communication interface 330 are implemented independently, the memory 310, the processor 320, and the communication interface 330 can be connected to each other through a bus and complete communication with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity of representation, Figure 3 only a thick line is shown in

[0121] but it does not mean that there is only one bus or one type of bus. Optionally, in a specific implementation, if the memory 310, the processor 320, and the communication interface 330 are integrated on a chip, the memory 310, the processor 320, and the communication interface 330 can complete communication with each other through an internal interface.

[0122] An embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for implementing a pair of compasses of an electronic whiteboard provided in the above embodiment.

[0123] An embodiment of the present application further provides a chip, which includes a processor for calling and running instructions stored in a memory, so that a communication device equipped with the chip executes the method provided in the embodiment of the present application.

[0124] An embodiment of the present application further provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected through an internal connection path. The processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided in the embodiment of the application.

[0125] It should be understood that the above processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced RISC machines (ARM) architecture.

[0126] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory, and may further include a non-volatile random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct rambus random access memory (DR RAM).

[0127] In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0128] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of this application. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0129] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In the description of this application, "a plurality of" means two or more unless otherwise specifically defined.

[0130] Any process or method description represented in the flowchart or described in other ways herein can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a specific logical function or process. And the scope of the preferred embodiments of this application includes additional implementations, where the functions can be executed in a substantially simultaneous manner or in the reverse order according to the functions involved, rather than in the order shown or discussed.

[0131] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a sequenced list of executable instructions for implementing a logical function and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in conjunction with these instruction execution systems, apparatuses, or devices.

[0132] It should be understood that each part of this application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the method in the above embodiments can be completed by a program instructing relevant hardware, and this program can be stored in a computer-readable storage medium. When this program is executed, it includes one or a combination of the steps of the method embodiment.

[0133] In addition, each functional unit in various embodiments of the present application may be integrated into a processing module, may exist separately as individual physical units, or two or more units may be integrated into one module. The above integrated module may be implemented in the form of hardware or in the form of a software functional module. If the above integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. This storage medium may be a read-only memory, a magnetic disk, an optical disc, or the like.

[0134] As described above, the foregoing is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of various changes or substitutions thereof, and these should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A method for implementing a compass on an electronic whiteboard, characterized in that, Including: Obtain the anchor point coordinates, the initial first pen tip coordinates, and the screen DPI, and determine the initial first radius according to the distance between the anchor point coordinates and the first pen tip coordinates; During the movement of the pen, detect the respective second pen tip coordinates of the pen tip in real time, and determine the incremental angle and the second radius corresponding to each second pen tip coordinate respectively according to the first pen tip coordinates, the second pen tip coordinates, the anchor point coordinates, and the screen DPI, and display the incremental angle; Determine the total incremental angle according to the incremental angle corresponding to each second pen tip coordinate; Perform a supplementary circle process according to the total incremental angle to obtain a target circle.

2. The method for implementing a compass on the electronic whiteboard according to claim 1, wherein: The step of respectively determining the incremental angle and the second radius corresponding to each second pen tip coordinate according to the first pen tip coordinates, the second pen tip coordinates, the anchor point coordinates, and the screen DPI includes: Determine a first vector from the anchor point coordinates to the first pen tip coordinates and a second vector from the anchor point coordinates to each second pen tip coordinate; Determine a first cross product of the second vector of the earliest generated second pen tip coordinate and the first vector, and second cross products between the second vectors of the second pen tip coordinates generated at adjacent times, and determine the incremental angle corresponding to each second pen tip coordinate according to the first cross product, each of the second cross products, the magnitude of the first vector, and the magnitudes of each of the second vectors; Respectively determine the second radius corresponding to each second pen tip coordinate according to the second pen tip coordinates, the anchor point coordinates, and the screen DPI.

3. The method for implementing a pair of compasses on an electronic whiteboard according to claim 2, wherein: The step of respectively determining the second radius corresponding to each second pen tip coordinate according to the second pen tip coordinates, the anchor point coordinates, and the screen DPI includes: Determine the conversion coefficient corresponding to the screen according to the screen DPI; Respectively determine the distance between each second pen tip coordinate and the anchor point coordinates according to the second pen tip coordinates and the anchor point coordinates; Respectively obtain the second radius corresponding to each second pen tip coordinate according to the product of each of the distances and the conversion coefficient.

4. The method for implementing a pair of compasses on an electronic whiteboard according to claim 2 or 3, characterized in that: The method further includes: Respectively determine the polar angle corresponding to each second pen tip coordinate according to the second pen tip coordinates and the anchor point coordinates, where the polar angle is the angle between the direction from the anchor point coordinates to the second pen tip coordinate and the horizontal direction; Respectively determine the angle difference between each polar angle and a preset angle in a preset angle set; When the angle difference is less than or equal to an angle threshold, play a prompt sound and display a scale UI in real time, and make the scale UI rotate synchronously with the change of the polar angle.

5. The method for implementing a compass on the electronic whiteboard according to claim 2 or 3, characterized in that: The method further includes: In the case of determining the first radius, perform a simulated circle drawing with the current anchor point coordinates and the first radius to determine whether the circle can be completely displayed on the screen. If it cannot be completely displayed on the screen, prompt to trigger a swap operation. In response to the trigger instruction of the swap operation, use the anchor point coordinates as the new first pen tip coordinates, and use the first pen tip coordinates as the new anchor point coordinates; Or, In response to a trigger instruction for a swapping operation, use the anchor coordinates as the new first pen tip coordinates, and use the first pen tip coordinates as the new anchor coordinates.

6. The method for implementing a pair of compasses on an electronic whiteboard according to claim 2 or 3, characterized in that: The obtaining the target circle through complementary circle processing according to the total incremental angle includes: When the total incremental angle reaches an angle threshold, perform correction processing according to each of the second pen tip coordinates to obtain an updated circular arc; Use the updated circular arc for complementary circle processing to obtain the target circle.

7. The method for implementing a pair of compasses on an electronic whiteboard according to claim 6, wherein: The performing correction processing according to each of the second pen tip coordinates to obtain an updated circular arc includes: Perform fitting according to each of the second pen tip coordinates to determine a fitting center and a fitting radius, and generate a fitting circular arc according to the fitting center, the fitting radius, and the total incremental angle; Determine the radius difference value between the fitting radius and the first radius; When the radius difference value is less than or equal to a radius threshold, use the fitting circular arc as the updated circular arc. When the radius difference value is greater than the radius threshold, determine a jitter abnormal state, and use the fitting center or the anchor coordinates as the center, and generate an updated circular arc according to the first radius and the total incremental angle.

8. A device for implementing a compass on an electronic whiteboard, characterized in that, It includes: An obtaining module, configured to obtain anchor coordinates, initial first pen tip coordinates, and a screen DPI, and determine an initial first radius according to the distance between the anchor coordinates and the first pen tip coordinates; A first determination module, configured to, during the movement of the pen, detect each second pen tip coordinate of the pen tip in real time, determine an incremental angle and a second radius corresponding to each second pen tip coordinate respectively according to the first pen tip coordinates, the second pen tip coordinates, the anchor coordinates, and the screen DPI, and display the incremental angle; A second determination module, configured to determine a total incremental angle according to the incremental angle corresponding to each second pen tip coordinate; A processing module, configured to perform complementary circle processing according to the total incremental angle to obtain the target circle.

9. An electronic device, characterized in that, It includes: A processor and a memory, wherein instructions are stored in the memory, and the instructions are loaded and executed by the processor to implement the method according to any one of claims 1-7.

10. A computer-readable storage medium, in which a computer program is stored, and when the computer program is executed, the method according to any one of claims 1-7 is implemented.