1. Field of the Invention
The present invention relates to a line symmetrical graphic arrangement device. More specifically, it relates to a line symmetrical graphic arrangement device capable of automatically arranging input graphics into line symmetrical figures, and modifying the positional relation among a plurality of input graphics so that they may stand in the line symmetrical relation with respect to a certain reference line.
2. Description of the Related Art
In such a conventional technique as processing image data by the use of a computer, like a CAD system, image data is processed by, for example, graphic software running on a personal computer.
In this kind of the conventional technique using graphic software, such an interface is generally used that a desired function is executed by entering a desired command selected from a menu displayed on a display or the like by the use of input means such as a mouse. Specifically, a desired command is selected from various commands prepared as a menu of "Draw" for drawing graphics, e.g. "Straight Line", "Rectangle", "Parallelogram", "Circle", "Curve", "Locus", "Painting" and "Regular Polygon", and various commands prepared as a menu of "Edit" for editing graphics, e.g. "Copy", "Move", "Delete", "Deform", "Mirror", "Turn" and "Compose". Some commands are entered so as to execute graphical drawing and editing. For example, the "Rectangle" command is selected from the menu of "Draw", and a predetermined entry such as the specification of the location of the rectangle is performed. As a result, a rectangle is displayed on the screen of a display device.
In case of entering a line symmetrical graphic by this conventional technique, for example, an operator can draw and enter a desired line symmetrical graphic, with "Grid" displayed on a screen, while confirming the position of coordinates with reference to the displayed grid. Or a line symmetrical graphic can be entered by the use of a command of reversing an entered graphic symmetrically (hereinafter, referred to as "Mirror" command).
At this time, a method of entering a line symmetrical graphic by the use of the "Mirror" command will be described with reference to FIG. 23.
On a graphic which an operator wants to enter (a house with a gable roof in this example), one side portion 101 thereof with respect to the symmetry axis is only entered at first ((A) in FIG. 23). If "Mirror" command is selected, a sub-command 102 will appears, to specify a method for appointing the graphic he wants to reverse and to specify whether the original graphic is kept or not ((B) in FIG. 23). At this time, when one side portion 101, which has been entered, is specified and the mode "Keep original graphic" is selected ((B) in FIG. 23), another side portion 103 is created symmetrically with respect to the symmetry axis 104 ((C) in FIG. 23), so that the desired symmetrical graphic 105 is obtained ((D) in FIG. 23). In case of arranging a plurality of graphics so as to be in the line symmetric positional relation, the same way as mentioned above can be used.
As other conventional technique for processing image data by the use of a computer, for example, "A Method of Recognizing Symmetry of Graphics in a Graphic Recognizing Device" is disclosed in Japanese Patent Laid-Open No. 63-261481. The constitution of the conventional technique described in the same is shown in FIG. 24. As shown in FIG. 24, a graphic recognizing device according to the conventional technique can recognize a drawing drawn by the mnemonic operation method. It has a function for supplementing measures not described in the drawing, and comprises a graphic recognizing device 106, a symmetry segment candidate extracting means 107, a vertical segment setting means 108, an arithmetic means 109, and a graphic information setting means 110. The graphic recognizing device 106 comprises a readout processing unit 111, an image data storing unit 112, a vector processing unit 113, a vector classification processing unit 114, a symbol recognition processing unit 115, a segment discrimination processing unit 116, a character recognition processing unit 117 and a recognition result storing unit 118.
An operation of this conventional technique will be described with reference to FIGS. 24 to 27. In the graphic recognizing device 106, a drawing 119, including characters, symbols, center lines and the like, which is entered from the readout processing unit 111, is stored into the image data storing unit 112 as image data. The vector processing unit 113 reads out the image data stored into the image data storing unit 112, performs a polygonal line approximation on the image data, converts the image data into vector data, and enters the data into the vector classification processing unit 114. The vector classification processing unit 114 classifies the entered vector data into a symbol, character, and segment, and supplies each data classified into a symbol, character, and segment to the symbol recognition processing unit 115, the segment discrimination processing unit 116 and the character recognition processing unit 117 respectively. The segment discrimination processing unit 116 further classifies the vector data showing a segment into a shape line, a center line and the like by the type of segment, and stores the result into the recognition result storing unit 118. The symbol recognition processing unit 115 and the character recognition processing unit 117 recognize symbols and characters respectively, so to store the data into the recognition result storing unit 118 with attributes attached thereto according to the recognition result.
As shown in the flow chart of FIG. 25, the symmetry segment candidate extracting unit 107 extracts the data on some center lines which are possible to serve as symmetry axes from the recognition result storing unit 118 at first (Step 2501), and computes the number of center lines (Step 2502). As for each of the extracted center lines, the unit 107 checks whether there are any shape lines intersecting the center line, or any shape lines of graphics isolated from the center line (Steps 2503 and 2504). When such a center line exists as mentioned above, the vertical segment setting means 108 and the arithmetic means 109 are used in order to check the shape lines, and the symmetric positional relation among the isolated graphics (Step 2505).
A method of judging symmetric condition will be explained with reference to FIG. 26. The vertical segment setting means 108 draws a perpendicular line L2, for example, from an endpoint P2 of a vector to the center line Q1, while the arithmetic means 109 acquires the distance d2 from the endpoint P2 to M1, which is on the perpendicular line L2, and further acquires the distance m2 from M1 to the intersection x2 on the vector C2 where the perpendicular line L2 comes across the vector C2. The difference between the distance d2 and m2 is calculated. If the result satisfies the following formula (1) with regard to the constant threshold level (.DELTA.d/2), the similar calculation will be sequentially performed with regard to the other endpoints P3 and the like of the other vectors. EQU .vertline.d2-m2.vertline.&lt;.DELTA.d/2 (1)
When the formula (1) is satisfied as for all the end points P2, P3, etc. and the total value .SIGMA..vertline.dn-mn.vertline. of each difference of the distance satisfies the following formula (2) with regard to the constant threshold level Q, the shape lines are judged to be symmetrical with respect to the center line Q1. EQU .SIGMA..vertline.dn-mn.vertline.&lt;Q (2)
As illustrated in FIG. 27, in the routine of judging a symmetry axis and the symmetric positional relation between isolated graphics, the vertical segment setting means 108 draws a perpendicular line L from an endpoint P of a vector to a center line Q2, while the arithmetic means 109 acquires the distance D from the endpoint P to M2 on the perpendicular L, and further acquires the respective distance s and s' from M2 to the respective intersections X and X' on the vectors C and C' coming across the perpendicular line L. The difference between the distance s and D, and the difference between the distance s' and D are respectively computed. If the above formula (1),is satisfied as for the intersection where the difference is smaller, the similar calculation is performed as for the other endpoints. When the total value of the difference of each distance satisfies the above formula (2), the two graphics (isolated figures) are judged to be symmetrical with respect to the center line Q2 (Steps 2505 and 2506). When a shape line having symmetrical relation is extracted after the completion of symmetry judgement as for all the center lines, the graphic information setting means 110 sets up the graphic information of the other party (which is omitted), on the basis of the graphic information of this party, which is attached to the shape line having symmetrical property (Step 2507).
The first conventional technique by the use of a graphic software as mentioned above, however, has a drawback in that it is difficult to enter a line symmetrical graphic meeting an operation's intention when the line symmetrical graphic to be entered is complicated. This is why, in the input method of drawing a graphic referring to the grid, an operator should enter the graphic with meticulous care, counting squares of the grid to make each vertex symmetric. Also, in the case of entering a line symmetrical graphic including curve, it is very difficult to symmetrize the curved shapes with the grid only. In the input method by the use of "Mirror" command, it is difficult to grasp the whole figure of a complicated graphic by only one side portion thereof that has been entered, so that an operator cannot draw a desirable line symmetrical graphic meeting as he wants.
The second conventional technique by which the shape of an input graphic and the symmetric positional relation are judged, has another drawback in that line symmetry cannot be recognized when the center lines have not been described in the predetermined type of line and when there is no description of the center lines because only the center lines described in the predetermined type of line are regarded as the candidates for the symmetry axes. When there are a lot of center lines described on the input graphic, there exist a lot of candidates for the symmetry axes. Therefore, it takes much time in the process of selecting which symmetry axis candidates to select, which results in decreasing the processing speed.