CN106600664B - drawing method and device of symmetric graph - Google Patents

drawing method and device of symmetric graph Download PDF

Info

Publication number
CN106600664B
CN106600664B CN201611124504.XA CN201611124504A CN106600664B CN 106600664 B CN106600664 B CN 106600664B CN 201611124504 A CN201611124504 A CN 201611124504A CN 106600664 B CN106600664 B CN 106600664B
Authority
CN
China
Prior art keywords
coordinate
symmetric
coordinates
group
symmetrical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611124504.XA
Other languages
Chinese (zh)
Other versions
CN106600664A (en
Inventor
张盛祺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201611124504.XA priority Critical patent/CN106600664B/en
Priority to PCT/CN2017/077157 priority patent/WO2018103227A1/en
Publication of CN106600664A publication Critical patent/CN106600664A/en
Application granted granted Critical
Publication of CN106600664B publication Critical patent/CN106600664B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/80Creating or modifying a manually drawn or painted image using a manual input device, e.g. mouse, light pen, direction keys on keyboard
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof
    • G06T3/604Rotation of whole images or parts thereof using coordinate rotation digital computer [CORDIC] devices

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • User Interface Of Digital Computer (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method and a device for drawing a symmetrical graph. The drawing method of the symmetrical graph comprises the following steps: detecting a user click position in a display screen in real time, and calculating to obtain a first coordinate of the position relative to a preset central point; obtaining a corresponding group of symmetrical coordinates according to the first coordinates and each rotation angle in a group of rotation angles generated in advance; the group of rotation angles are generated according to the number of preset drawing directions, and the central point is used as an angular vertex; and simultaneously drawing and displaying the handwriting with the same shape and size at the position corresponding to the first coordinate in the display screen and each symmetric coordinate in the group of symmetric coordinates. By adopting the invention, the drawn symmetrical graphs in all directions can be ensured to be completely the same, and the efficiency of the drawing process can be improved.

Description

drawing method and device of symmetric graph
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for drawing a symmetric graph.
background
in the related art, when a user draws a rotationally symmetric figure (particularly, the rotationally symmetric figure is a center symmetric figure) in drawing software (particularly, the drawing software is whiteboard software of a smart conference tablet), the entire rotationally symmetric figure is generally drawn in the drawing software using a pen, a finger, a mouse, or the like. In the scheme, the graphs in all directions of the rotationally symmetric graph need to be drawn respectively in a manual mode, so that the rotationally symmetric graph cannot meet the requirement that the graphs in all directions are completely the same, and the drawing process is low in efficiency.
Another scheme for drawing a rotationally symmetric graph in drawing software is realized by a rotation tool in the drawing software, that is, a user draws a graph in one direction in the rotationally symmetric graph in the drawing software, then determines a rotation fixed point of the rotationally symmetric graph in the drawing software, and finally rotates the drawn graph in one direction around the rotation fixed point by using the rotation tool in the drawing software, so as to obtain graphs in other directions and generate a final rotationally symmetric graph. Since in this scheme, the user needs to obtain the graphics in one direction of the rotationally symmetric graphics after drawing the graphics in the other direction, the drawing process of this scheme is inefficient.
disclosure of Invention
The invention provides a method and a device for drawing symmetrical graphs, which can ensure that the graphs of the drawn symmetrical graphs in all directions are completely the same and can improve the efficiency of the drawing process.
the invention provides a method for drawing a symmetrical graph, which specifically comprises the following steps:
detecting a user click position in a display screen in real time, and calculating to obtain a first coordinate of the position relative to a preset central point;
obtaining a corresponding group of symmetrical coordinates according to the first coordinates and each rotation angle in a group of rotation angles generated in advance; the group of rotation angles are generated according to the number of preset drawing directions, and the central point is used as an angular vertex;
and simultaneously drawing and displaying the handwriting with the same shape and size at the position corresponding to the first coordinate in the display screen and each symmetric coordinate in the group of symmetric coordinates.
further, the first coordinate comprises a first abscissa x and a first ordinate y;
Then, the obtaining a corresponding set of symmetric coordinates according to the first coordinate and each rotation angle in a set of rotation angles generated in advance specifically includes:
Rotating a transformation formula according to each rotation angle theta in the set of rotation angles and coordinatesRespectively calculating to obtain the phase of each rotation angle thetaa set of symmetry coordinates is generated corresponding to the symmetry coordinates comprising the symmetry abscissa x 'and the symmetry ordinate y'.
Further, the detecting a position clicked by a user in the display screen in real time, and calculating to obtain a first coordinate of the position relative to a preset central point specifically includes:
detecting a user click position in the display screen in real time, and obtaining a second coordinate of the position relative to an origin of a default coordinate system;
Converting the second coordinate into the first coordinate according to the relative position relation between the default coordinate system origin and the central point;
simultaneously drawing and displaying the handwriting with the same shape and size at the position corresponding to the first coordinate and each symmetric coordinate in the group of symmetric coordinates in the display screen, specifically comprising:
Converting each symmetric coordinate in the first coordinate and the set of symmetric coordinates into a set of display coordinates relative to the default coordinate system origin according to a relative position relationship between the default coordinate system origin and the center point;
And simultaneously drawing and displaying the handwriting at the position corresponding to each display coordinate in the group of display coordinates in the display screen.
further, the drawing and displaying the handwriting with the same shape and size at the same time on the position corresponding to the first coordinate and each symmetric coordinate in the set of symmetric coordinates in the display screen specifically includes:
and according to preset handwriting colors respectively corresponding to the first coordinate and each symmetrical coordinate in the group of symmetrical coordinates, simultaneously drawing and displaying the handwriting with the same shape and size but the corresponding color of the handwriting color at the position corresponding to each symmetrical coordinate in the first coordinate and the group of symmetrical coordinates.
further, after the handwriting with the same shape and size is simultaneously drawn and displayed at the position corresponding to the first coordinate and each symmetric coordinate in the set of symmetric coordinates in the display screen, the method further includes:
when detecting that the user sets the state of the display screen to be the handwriting erasing state, detecting and obtaining a third coordinate of the position clicked by the user in the display screen relative to the central point in real time;
obtaining a corresponding group of erasing symmetrical coordinates according to the third coordinate and each rotating angle in the group of rotating angles;
And deleting the handwriting on the position corresponding to the third coordinate and each erasing symmetric coordinate in the group of erasing symmetric coordinates in the display screen.
Correspondingly, the invention also provides a device for drawing the symmetrical graph, which specifically comprises:
The first coordinate obtaining module is used for detecting the position clicked by a user in the display screen in real time and calculating to obtain a first coordinate of the position relative to a preset central point;
the symmetrical coordinate obtaining module is used for obtaining a corresponding group of symmetrical coordinates according to the first coordinate and each rotation angle in a group of rotation angles generated in advance; the group of rotation angles are generated according to the number of preset drawing directions, and the central point is used as an angular vertex; and the number of the first and second groups,
and the drawing module is used for simultaneously drawing and displaying the handwriting with the same shape and size at the position corresponding to the first coordinate in the display screen and each symmetric coordinate in the group of symmetric coordinates.
Further, the first coordinate comprises a first abscissa x and a first ordinate y;
The symmetric coordinate obtaining module specifically includes:
a symmetric coordinate calculation obtaining unit for obtaining a coordinate rotation transformation formula according to each rotation angle theta in the set of rotation anglesRespectively calculating to obtain symmetrical horizontal seats corresponding to each rotation angle thetaAnd marking the symmetric coordinates of x 'and the symmetric ordinate y' to generate a set of symmetric coordinates.
Further, the first coordinate obtaining module specifically includes:
The second coordinate obtaining unit is used for detecting the position clicked by the user in the display screen in real time and obtaining a second coordinate of the position relative to the origin of the default coordinate system; and the number of the first and second groups,
a first coordinate conversion obtaining unit, configured to convert the second coordinate into the first coordinate according to a relative position relationship between the default coordinate system origin and the central point;
the drawing module specifically includes:
a display coordinate conversion obtaining unit, configured to convert the first coordinate and each of the set of symmetric coordinates into a set of display coordinates corresponding to the default coordinate system origin according to a relative positional relationship between the default coordinate system origin and the center point; and the number of the first and second groups,
And the handwriting drawing unit is used for simultaneously drawing and displaying the handwriting at the position corresponding to each display coordinate in the group of display coordinates in the display screen.
Further, the drawing module specifically includes:
and the coloring drawing unit is used for simultaneously drawing and displaying the handwriting with the same shape and size but the corresponding color on the position corresponding to each symmetric coordinate in the first coordinate and the group of symmetric coordinates according to the preset handwriting color corresponding to each symmetric coordinate in the first coordinate and the group of symmetric coordinates.
further, the drawing apparatus of the symmetric graph further includes:
The third coordinate obtaining module is used for detecting and obtaining a third coordinate of the position clicked by the user in the display screen relative to the central point in real time when the condition that the user sets the state of the display screen to be the handwriting erasing state is detected;
the erasing symmetrical coordinate obtaining module is used for obtaining a corresponding group of erasing symmetrical coordinates according to the third coordinate and each rotating angle in the group of rotating angles; and the number of the first and second groups,
and the handwriting erasing module is used for deleting the handwriting on the position corresponding to the third coordinate in the display screen and each erasing symmetric coordinate in the group of erasing symmetric coordinates.
The implementation of the invention has the following beneficial effects:
according to the drawing method and device for the symmetric graph, the drawing action of the user in one drawing direction of the symmetric graph to be drawn is detected, and the drawing positions symmetrical to the drawing action in other drawing directions are obtained through calculation, so that the same handwriting is drawn and displayed at the corresponding positions in all the drawing directions of the symmetric graph to be drawn at the same time, the drawn graphs in all the drawing directions are completely the same, and the drawing efficiency can be improved.
drawings
FIG. 1 is a schematic flow chart diagram illustrating a method for drawing a symmetric graph according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a symmetric graph in the method for drawing a symmetric graph according to the present invention;
fig. 3 is a schematic structural diagram of an embodiment of a symmetrical graph drawing apparatus provided in the present invention.
Detailed Description
the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, it is a schematic flow chart of an embodiment of the method for drawing a symmetric graph provided in the present invention, including steps S11 to S13, specifically as follows:
s11: detecting a user click position in a display screen in real time, and calculating to obtain a first coordinate of the position relative to a preset central point;
S12: obtaining a corresponding group of symmetrical coordinates according to the first coordinates and each rotation angle in a group of rotation angles generated in advance; the group of rotation angles are generated according to the number of preset drawing directions, and the central point is used as an angular vertex;
s13: and simultaneously drawing and displaying the handwriting with the same shape and size at the position corresponding to the first coordinate in the display screen and each symmetric coordinate in the group of symmetric coordinates.
it should be noted that, when a user draws a symmetric figure (in particular, the symmetric figure is a rotationally symmetric figure), the apparatus detects, in real time, a drawing motion of the user in one drawing direction of the symmetric figure, and simultaneously draws and displays the same figure in all drawing directions according to the drawing motion.
in a preferred embodiment, before drawing the symmetric figure, the user sets the number of drawing directions of the symmetric figure to be drawn and the center point of the symmetric figure in advance. The device generates a group of rotation angles according to the number of the drawing directions set by the user, wherein the group of rotation angles are angles between other drawing directions in the symmetric graph to be drawn and the drawing direction in which the drawing action of the user is located (the angles take the center point of the symmetric graph to be drawn as the vertex of the angle). When the user sets the state of the display screen to be a drawing state and starts drawing, the equipment detects the clicking action of the user in the display screen in real time, and when the user is detected to click the display screen, the equipment obtains the coordinate of the position clicked by the user, namely the first coordinate, through calculation. The first coordinate takes the central point of the symmetrical graph to be drawn as the origin of coordinates. After obtaining the first coordinate, the device obtains a set of symmetric coordinates corresponding to the set of rotation angles according to the first coordinate and the generated set of rotation angles, wherein each symmetric coordinate in the set of symmetric coordinates is a coordinate corresponding to the first coordinate in each other drawing direction in the symmetric graph to be drawn. And finally, simultaneously drawing and displaying the handwriting with the same shape and size on the first coordinate in the display screen and the position corresponding to each symmetric coordinate in the obtained group of symmetric coordinates by the equipment.
For example, see FIG. 2, which is a schematic illustration of a symmetrical pattern. Before drawing the symmetric graph shown in fig. 2, the user sets the number of drawing directions of the symmetric graph to be drawn to 8, and sets the position of the center point of the symmetric graph to be drawn. The device generates a group of rotation angles according to the number of drawing directions set by the user, wherein the rotation angles in the group of rotation angles are 45 degrees, 90 degrees, 135 degrees, 180 degrees, 225 degrees, 270 degrees and 315 degrees respectively. When the drawing is started, the device detects the position clicked by the user in the display screen in real time, and calculates and obtains the coordinate of the position relative to the center point of the symmetrical graph to be drawn, namely a first coordinate. Assume that the first coordinate is (x0, y 0). Then, according to a set of rotation angles generated in advance, the first coordinate is rotated clockwise (or counterclockwise) by 45 °, 90 °, 135 °, 180 °, 225 °, 270 °, and 315 ° around the center point of the symmetric graph to be drawn, respectively, to obtain a corresponding set of symmetric coordinates (x1, y1), (x2, y2), (x3, y3), (x4, y4), (x5, y5), (x6, y6), and (x7, y 7). Finally, the device draws and displays the same handwriting at the positions corresponding to the coordinates (x0, y0), (x1, y1), (x2, y2), (x3, y3), (x4, y4), (x5, y5), (x6, y6), and (x7, y7) in the display screen, thereby finally generating a symmetrical figure which is completely symmetrical in 8 drawing directions.
the drawing action of a user in one drawing direction of the symmetrical figure to be drawn is detected, and the drawing positions symmetrical to the drawing action in other drawing directions are obtained through calculation, so that the same handwriting is drawn and displayed at the corresponding positions in all the drawing directions of the symmetrical figure to be drawn, the figures of the drawn symmetrical figure in all the drawing directions are completely the same, and the drawing process efficiency can be improved.
further, the first coordinate comprises a first abscissa x and a first ordinate y;
then, the obtaining a corresponding set of symmetric coordinates according to the first coordinate and each rotation angle in a set of rotation angles generated in advance specifically includes:
rotating a transformation formula according to each rotation angle theta in the set of rotation angles and coordinatesand respectively calculating to obtain symmetrical coordinates corresponding to each rotation angle theta and including a symmetrical abscissa x 'and a symmetrical ordinate y', and generating a group of symmetrical coordinates.
It should be noted that the first coordinate obtained by the device through calculation includes a first abscissa x and a first ordinate y. When the equipment generates a corresponding group of symmetrical coordinates according to the first coordinates and a group of rotation angles generated in advance, reading each rotation angle theta in the group of rotation angles, and respectively substituting each read rotation angle theta into a coordinate rotation transformation formulathe corresponding symmetrical abscissa x 'and the symmetrical ordinate y' are obtained by calculation, i.e. the corresponding symmetrical coordinates (x ', y') are obtained. And after reading each rotation angle theta in the rotation angles in sequence and carrying out corresponding calculation, a group of corresponding symmetric coordinates can be obtained.
Further, the detecting a position clicked by a user in the display screen in real time, and calculating to obtain a first coordinate of the position relative to a preset central point specifically includes:
Detecting a user click position in the display screen in real time, and obtaining a second coordinate of the position relative to an origin of a default coordinate system;
Converting the second coordinate into the first coordinate according to the relative position relation between the default coordinate system origin and the central point;
simultaneously drawing and displaying the handwriting with the same shape and size at the position corresponding to the first coordinate and each symmetric coordinate in the group of symmetric coordinates in the display screen, specifically comprising:
converting each symmetric coordinate in the first coordinate and the set of symmetric coordinates into a set of display coordinates relative to the default coordinate system origin according to a relative position relationship between the default coordinate system origin and the center point;
and simultaneously drawing and displaying the handwriting at the position corresponding to each display coordinate in the group of display coordinates in the display screen.
It should be noted that, in order to facilitate subsequent calculation and processing of coordinate information, the apparatus needs to perform coordinate system transformation on the obtained coordinates as necessary.
The default coordinate system for a device is typically the origin of the coordinate system at a corner of the display area of the display screen of the device. After the device obtains the coordinates of the user click position in the display screen relative to the default coordinate system origin, namely the second coordinates, through real-time detection, the second coordinates are converted into the first coordinates with the center point as the coordinate system origin according to the relative position relationship between the preset center point of the symmetrical graph to be drawn and the default coordinate system origin.
On the contrary, after the device calculates and obtains a set of symmetric coordinates according to the first coordinate and a set of rotation angles, according to the relative position relationship between the preset central point of the symmetric graph to be drawn and the origin of the default coordinate system, the first coordinate and each symmetric coordinate in the set of symmetric coordinates are converted into a set of display coordinates with the origin of the default coordinate system as the origin of the coordinate system, and handwriting with the same shape and size is drawn and displayed at the position corresponding to each display coordinate in the set of display coordinates in the display screen.
For example, assuming that the default coordinate system of the device has the upper left corner of the display area of the display screen as the origin of the coordinate system, the user sets the center point of the display screen (width/2, -height/2) as the center point of the symmetric figure to be drawn. Wherein, width is the width of the display area of the display screen, and height is the height of the display area of the display screen. The apparatus substitutes a second coordinate (x0, y0) obtained by real-time detection and having the default coordinate system origin as the coordinate system origin into the coordinate transformation formula after the second coordinate is (x0, y0)the corresponding first coordinate (x1, y1) with the central point of the symmetrical graph to be drawn as the origin of the coordinate system is obtained through calculation. Subsequently, a set of symmetric coordinates is calculated from the first coordinates (x1, y1) and the set of rotation angles. Then, taking one of the symmetric coordinates (x2, y2) of the set of symmetric coordinates as an example, the symmetric coordinate (x2, y2) is substituted into the inverse operation formula of the coordinate transformation formulaThe corresponding display coordinates (x3, y3) are obtained by calculation. According to the same method, the first coordinate (x1, y1) and each symmetric coordinate in the obtained set of symmetric coordinates are sequentially substituted into the inverse operation formula of the coordinate transformation formula, and then the corresponding set of display coordinates can be obtained through calculation. And finally, drawing and displaying the same handwriting at the position corresponding to each display coordinate in the display screen.
in another preferred embodiment, the simultaneously drawing and displaying the handwriting with the same shape and size at the position corresponding to the first coordinate and each symmetric coordinate in the set of symmetric coordinates on the display screen specifically includes:
and according to preset handwriting colors respectively corresponding to the first coordinate and each symmetrical coordinate in the group of symmetrical coordinates, simultaneously drawing and displaying the handwriting with the same shape and size but the corresponding color of the handwriting color at the position corresponding to each symmetrical coordinate in the first coordinate and the group of symmetrical coordinates.
it should be noted that, when a user draws a symmetrical graph with the same shape but different colors in each drawing direction, the handwriting colors corresponding to the graphs in each drawing direction need to be preset. When the device simultaneously draws the handwriting on the positions corresponding to the first coordinate and the other symmetric coordinates in the display screen, the device generates the handwriting with the same shape and size but the corresponding color on the corresponding positions in each drawing direction according to the color of the handwriting corresponding to each drawing direction.
The graphics with the same shape and size but different colors are generated in all the drawing directions according to the setting of the user, so that the diversity of the generated symmetrical graphics can be improved, more user requirements are met, and the user experience is improved.
in another preferred embodiment, after the writing with the same shape and size is drawn and displayed on the display screen at the same time at the position corresponding to the first coordinate and each symmetric coordinate in the set of symmetric coordinates, the method further includes:
when detecting that the user sets the state of the display screen to be the handwriting erasing state, detecting and obtaining a third coordinate of the position clicked by the user in the display screen relative to the central point in real time;
Obtaining a corresponding group of erasing symmetrical coordinates according to the third coordinate and each rotating angle in the group of rotating angles;
And deleting the handwriting on the position corresponding to the third coordinate and each erasing symmetric coordinate in the group of erasing symmetric coordinates in the display screen.
it should be noted that, when the user draws an error, needs to erase part of the handwriting, and sets the state of the display screen to the handwriting erasing state, the device detects the position clicked by the user in the display screen in real time, and obtains the coordinate of the position, that is, the third coordinate. The third coordinate takes a central point set by a user as a coordinate system origin. And according to the same steps and methods as the handwriting generating process, calculating and obtaining a corresponding group of erasing symmetrical coordinates according to the third coordinate and a group of rotation angles generated in advance. And finally, deleting the handwriting on the position corresponding to each erasing symmetric coordinate in the third coordinate and the group of erasing symmetric coordinates by the equipment.
According to the drawing method of the symmetric graph provided by the embodiment of the invention, the drawing action of the user in one drawing direction of the symmetric graph to be drawn is detected, and the drawing positions symmetrical to the drawing action in other drawing directions are obtained through calculation, so that the same handwriting is drawn and displayed at the corresponding positions in each drawing direction of the symmetric graph to be drawn at the same time, the drawn graphs in each drawing direction of the symmetric graph can be ensured to be completely the same, and the drawing efficiency can be improved. In addition, the graphics with the same shape and size but different colors are generated in all the drawing directions according to the setting of the user, so that the diversity of the generated symmetrical graphics can be improved, more user requirements can be met, and the user experience can be improved.
correspondingly, the invention also provides a device for drawing the symmetrical graph, which can realize all the processes of the method for drawing the symmetrical graph in the embodiment.
Referring to fig. 3, it is a schematic structural diagram of an embodiment of the device for drawing a symmetric graph provided in the present invention, and the details are as follows:
The first coordinate obtaining module 31 is configured to detect a user click position in the display screen in real time, and calculate to obtain a first coordinate of the position relative to a preset central point;
A symmetric coordinate obtaining module 32, configured to obtain a corresponding set of symmetric coordinates according to the first coordinate and each rotation angle in a set of rotation angles generated in advance; the group of rotation angles are generated according to the number of preset drawing directions, and the central point is used as an angular vertex; and the number of the first and second groups,
And the drawing module 33 is configured to draw and display handwriting with the same shape and size at the same time at the position corresponding to the first coordinate and each symmetric coordinate in the set of symmetric coordinates in the display screen.
further, the first coordinate comprises a first abscissa x and a first ordinate y;
the symmetric coordinate obtaining module 32 specifically includes:
A symmetric coordinate calculation obtaining unit for obtaining a coordinate rotation transformation formula according to each rotation angle theta in the set of rotation anglesrespectively calculating to obtain symmetrical coordinates corresponding to each rotation angle theta and including a symmetrical abscissa x 'and a symmetrical ordinate y', and generating a group of symmetriesand (4) coordinates.
Further, the first coordinate obtaining module 31 specifically includes:
The second coordinate obtaining unit is used for detecting the position clicked by the user in the display screen in real time and obtaining a second coordinate of the position relative to the origin of the default coordinate system; and the number of the first and second groups,
a first coordinate conversion obtaining unit, configured to convert the second coordinate into the first coordinate according to a relative position relationship between the default coordinate system origin and the central point;
The drawing module 33 specifically includes:
a display coordinate conversion obtaining unit, configured to convert the first coordinate and each of the set of symmetric coordinates into a set of display coordinates corresponding to the default coordinate system origin according to a relative positional relationship between the default coordinate system origin and the center point; and the number of the first and second groups,
and the handwriting drawing unit is used for simultaneously drawing and displaying the handwriting at the position corresponding to each display coordinate in the group of display coordinates in the display screen.
in another preferred embodiment, the drawing module 33 specifically includes:
And the coloring drawing unit is used for simultaneously drawing and displaying the handwriting with the same shape and size but the corresponding color on the position corresponding to each symmetric coordinate in the first coordinate and the group of symmetric coordinates according to the preset handwriting color corresponding to each symmetric coordinate in the first coordinate and the group of symmetric coordinates.
in another preferred embodiment, the drawing apparatus of the symmetric figure further includes:
the third coordinate obtaining module is used for detecting and obtaining a third coordinate of the position clicked by the user in the display screen relative to the central point in real time when the condition that the user sets the state of the display screen to be the handwriting erasing state is detected;
the erasing symmetrical coordinate obtaining module is used for obtaining a corresponding group of erasing symmetrical coordinates according to the third coordinate and each rotating angle in the group of rotating angles; and the number of the first and second groups,
and the handwriting erasing module is used for deleting the handwriting on the position corresponding to the third coordinate in the display screen and each erasing symmetric coordinate in the group of erasing symmetric coordinates.
according to the drawing device for the symmetric graph, provided by the embodiment of the invention, the drawing action of the user in one drawing direction of the symmetric graph to be drawn is detected, and the drawing positions symmetrical to the drawing action in other drawing directions are obtained through calculation, so that the same handwriting is drawn and displayed at the corresponding positions in all the drawing directions of the symmetric graph to be drawn at the same time, the drawn graphs in all the drawing directions are completely the same, and the drawing efficiency can be improved. In addition, the graphics with the same shape and size but different colors are generated in all the drawing directions according to the setting of the user, so that the diversity of the generated symmetrical graphics can be improved, more user requirements can be met, and the user experience can be improved.
while the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (8)

1. A method for drawing a symmetric graph is characterized by comprising the following steps:
when the situation that the user sets the state of the display screen to be a drawing state is detected, detecting the position clicked by the user in the display screen in real time, and calculating to obtain a first coordinate of the position relative to a preset central point; wherein the central point is preset by a user before drawing the symmetric graph;
Obtaining a corresponding group of symmetrical coordinates according to the first coordinates and each rotation angle in a group of rotation angles generated in advance; the group of rotation angles are generated according to a preset drawing direction number, the central point is used as an angular vertex, and the drawing direction number is preset by a user before drawing the symmetrical graph;
Simultaneously drawing and displaying handwriting with the same shape and size at the position corresponding to the first coordinate in the display screen and each symmetric coordinate in the group of symmetric coordinates;
The method includes the steps of detecting a user click position in a display screen in real time, and calculating to obtain a first coordinate of the position relative to a preset central point, and specifically includes:
detecting a user click position in the display screen in real time, and obtaining a second coordinate of the position relative to an origin of a default coordinate system;
Converting the second coordinate into the first coordinate according to the relative position relation between the default coordinate system origin and the central point;
simultaneously drawing and displaying the handwriting with the same shape and size at the position corresponding to the first coordinate and each symmetric coordinate in the group of symmetric coordinates in the display screen, specifically comprising:
converting each symmetric coordinate in the first coordinate and the set of symmetric coordinates into a set of display coordinates relative to the default coordinate system origin according to a relative position relationship between the default coordinate system origin and the center point;
And simultaneously drawing and displaying the handwriting at the position corresponding to each display coordinate in the group of display coordinates in the display screen.
2. A drawing method of a symmetric figure according to claim 1, wherein the first coordinate includes a first abscissa x and a first ordinate y;
then, the obtaining a corresponding set of symmetric coordinates according to the first coordinate and each rotation angle in a set of rotation angles generated in advance specifically includes:
rotating a transformation formula according to each rotation angle theta in the set of rotation angles and coordinatesAnd respectively calculating to obtain symmetrical coordinates corresponding to each rotation angle theta and including a symmetrical abscissa x 'and a symmetrical ordinate y', and generating a group of symmetrical coordinates.
3. the method for drawing a symmetric graph according to claim 1, wherein the drawing and displaying handwriting with the same shape and size at the same time at the position corresponding to the first coordinate and each symmetric coordinate in the set of symmetric coordinates on the display screen specifically comprises:
and according to preset handwriting colors respectively corresponding to the first coordinate and each symmetrical coordinate in the group of symmetrical coordinates, simultaneously drawing and displaying the handwriting with the same shape and size but the corresponding color of the handwriting color at the position corresponding to each symmetrical coordinate in the first coordinate and the group of symmetrical coordinates.
4. The method for drawing a symmetric figure according to claim 1, wherein after the handwriting having the same shape and size is simultaneously drawn and displayed at the position corresponding to the first coordinate and each symmetric coordinate in the set of symmetric coordinates on the display screen, the method further comprises:
When detecting that the user sets the state of the display screen to be the handwriting erasing state, detecting and obtaining a third coordinate of the position clicked by the user in the display screen relative to the central point in real time;
obtaining a corresponding group of erasing symmetrical coordinates according to the third coordinate and each rotating angle in the group of rotating angles;
and deleting the handwriting on the position corresponding to the third coordinate and each erasing symmetric coordinate in the group of erasing symmetric coordinates in the display screen.
5. a symmetric drawing apparatus, comprising:
the first coordinate obtaining module is used for detecting the position clicked by the user in the display screen in real time when the condition that the user sets the state of the display screen to be the drawing state is detected, and calculating to obtain a first coordinate of the position relative to a preset central point; wherein the central point is preset by a user before drawing the symmetric graph;
the symmetrical coordinate obtaining module is used for obtaining a corresponding group of symmetrical coordinates according to the first coordinate and each rotation angle in a group of rotation angles generated in advance; the group of rotation angles are generated according to a preset drawing direction number, the central point is used as an angular vertex, and the drawing direction number is preset by a user before drawing the symmetrical graph; and the number of the first and second groups,
The drawing module is used for simultaneously drawing and displaying the handwriting with the same shape and size at the position corresponding to the first coordinate in the display screen and each symmetric coordinate in the group of symmetric coordinates;
The first coordinate obtaining module specifically includes:
The second coordinate obtaining unit is used for detecting the position clicked by the user in the display screen in real time when the condition that the user sets the state of the display screen to be the drawing state is detected, and obtaining a second coordinate of the position relative to the origin of the default coordinate system; and the number of the first and second groups,
a first coordinate conversion obtaining unit, configured to convert the second coordinate into the first coordinate according to a relative position relationship between the default coordinate system origin and the central point;
The drawing module specifically includes:
a display coordinate conversion obtaining unit, configured to convert the first coordinate and each of the set of symmetric coordinates into a set of display coordinates corresponding to the default coordinate system origin according to a relative positional relationship between the default coordinate system origin and the center point; and the number of the first and second groups,
and the handwriting drawing unit is used for simultaneously drawing and displaying the handwriting at the position corresponding to each display coordinate in the group of display coordinates in the display screen.
6. A symmetrical figure drawing apparatus according to claim 5, wherein said first coordinate includes a first abscissa x and a first ordinate y;
The symmetric coordinate obtaining module specifically includes:
a symmetric coordinate calculation obtaining unit for obtaining a coordinate rotation transformation formula according to each rotation angle theta in the set of rotation anglesAnd respectively calculating to obtain symmetrical coordinates corresponding to each rotation angle theta and including a symmetrical abscissa x 'and a symmetrical ordinate y', and generating a group of symmetrical coordinates.
7. the device for drawing a symmetric figure according to claim 5, wherein the drawing module specifically comprises:
And the coloring drawing unit is used for simultaneously drawing and displaying the handwriting with the same shape and size but the corresponding color on the position corresponding to each symmetric coordinate in the first coordinate and the group of symmetric coordinates according to the preset handwriting color corresponding to each symmetric coordinate in the first coordinate and the group of symmetric coordinates.
8. The symmetric figure drawing apparatus according to claim 5, further comprising:
The third coordinate obtaining module is used for detecting and obtaining a third coordinate of the position clicked by the user in the display screen relative to the central point in real time when the condition that the user sets the state of the display screen to be the handwriting erasing state is detected;
the erasing symmetrical coordinate obtaining module is used for obtaining a corresponding group of erasing symmetrical coordinates according to the third coordinate and each rotating angle in the group of rotating angles; and the number of the first and second groups,
And the handwriting erasing module is used for deleting the handwriting on the position corresponding to the third coordinate in the display screen and each erasing symmetric coordinate in the group of erasing symmetric coordinates.
CN201611124504.XA 2016-12-08 2016-12-08 drawing method and device of symmetric graph Active CN106600664B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201611124504.XA CN106600664B (en) 2016-12-08 2016-12-08 drawing method and device of symmetric graph
PCT/CN2017/077157 WO2018103227A1 (en) 2016-12-08 2017-03-17 Method and device for drawing symmetrical figure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611124504.XA CN106600664B (en) 2016-12-08 2016-12-08 drawing method and device of symmetric graph

Publications (2)

Publication Number Publication Date
CN106600664A CN106600664A (en) 2017-04-26
CN106600664B true CN106600664B (en) 2019-12-17

Family

ID=58598750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611124504.XA Active CN106600664B (en) 2016-12-08 2016-12-08 drawing method and device of symmetric graph

Country Status (2)

Country Link
CN (1) CN106600664B (en)
WO (1) WO2018103227A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107230239A (en) * 2017-05-11 2017-10-03 广州视源电子科技股份有限公司 Pattern drawing method, device and equipment
CN107862725B (en) * 2017-12-01 2021-03-23 井冈山大学 Digital art pattern drawing method with infinite symmetrical structure
CN109920029A (en) * 2019-03-18 2019-06-21 河北华发教育科技股份有限公司 A method of drawing erasable figure
CN116324689A (en) 2020-10-30 2023-06-23 海信视像科技股份有限公司 Display device, geometric figure recognition method and multi-layer stacked display method
CN112799627B (en) * 2021-02-08 2022-12-09 海信视像科技股份有限公司 Display apparatus and image display method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103034998A (en) * 2012-12-04 2013-04-10 中国科学院自动化研究所 Detection method capable of detecting center and rotation angle of rotational symmetry figure and device thereof
CN104461119A (en) * 2013-09-24 2015-03-25 株式会社东芝 Stroke processing device and stroke processing method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101281688A (en) * 2008-03-26 2008-10-08 博采林电子科技(深圳)有限公司 Portable learning equipment as well as dynamic geometric construction method thereof
JP4572947B2 (en) * 2008-03-31 2010-11-04 ブラザー工業株式会社 Image generating apparatus and printing apparatus
CN102063698A (en) * 2009-11-17 2011-05-18 新奥特(北京)视频技术有限公司 Method and device for obliquely aligning objects in graph and picture treatment
CN104424473A (en) * 2013-09-06 2015-03-18 北京三星通信技术研究有限公司 Method and device for identifying and editing freehand sketch
CN104462691B (en) * 2014-12-09 2017-12-26 广州大学 A kind of method and device that mouse is realized in dynamic geometry software and is intelligently drawn
CN104484893B (en) * 2014-12-16 2018-07-10 广东威创视讯科技股份有限公司 The method for drafting and system of circular ring shape image

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103034998A (en) * 2012-12-04 2013-04-10 中国科学院自动化研究所 Detection method capable of detecting center and rotation angle of rotational symmetry figure and device thereof
CN104461119A (en) * 2013-09-24 2015-03-25 株式会社东芝 Stroke processing device and stroke processing method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
AI高级教程!教你绘制电压的欧式复古花纹;3年2班程远;《https://www.uisdc.com/create-pattern-for-royalty》;20141010;第1-39页 *
中心对称图形的制作;余雪玉;《贵阳学院学报》;20070915;第2卷(第3期);第33-36页 *

Also Published As

Publication number Publication date
CN106600664A (en) 2017-04-26
WO2018103227A1 (en) 2018-06-14

Similar Documents

Publication Publication Date Title
CN106600664B (en) drawing method and device of symmetric graph
US20210035346A1 (en) Multi-Plane Model Animation Interaction Method, Apparatus And Device For Augmented Reality, And Storage Medium
EP1899793B1 (en) Control device for information display, corresponding system, method and program product
US8860675B2 (en) Drawing aid system for multi-touch devices
US10289214B2 (en) Method and device of controlling virtual mouse and head-mounted displaying device
JP2010079834A (en) Device for determination of mounting position of coordinate detection device and electronic board system
US10558288B2 (en) Multi-touch display panel and method of controlling the same
CN108919839A (en) Holder rotating direction control method, device, electronic equipment and storage medium
CN103412720A (en) Method and device for processing touch-control input signals
CN104461335A (en) Data processing method and electronic instrument
CN109671133A (en) Generation method, device, electronic equipment and the storage medium of track
CN103077026A (en) Method for writing under desktop environment of operating system
CN104899361A (en) Remote control method and apparatus
JP2015225652A (en) Systems, methods and programs of enabling fine user interactions for projector-camera or display-camera systems
JP2018142109A (en) Display control program, display control method, and display control apparatus
CN109032190A (en) Holder rotating direction control method, device, electronic equipment and storage medium
JP4021249B2 (en) Information processing apparatus and information processing method
CN103559809A (en) Computer-based on-site interaction demonstration system
US20160054879A1 (en) Portable electronic devices and methods for operating user interfaces
US10175780B2 (en) Behind-display user interface
JP2012203440A (en) Information processor, information processing method, and program
US11069326B2 (en) Processing method for character stroke and related device
CN114327140B (en) Screen touch method, device, system, equipment and storage medium
CN106873823B (en) A kind of screen picture method of controlling rotation, device and mobile device
JP2016024804A (en) Touch device

Legal Events

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