CN109102458A - The generation method and device of figure - Google Patents
The generation method and device of figure Download PDFInfo
- Publication number
- CN109102458A CN109102458A CN201810831338.XA CN201810831338A CN109102458A CN 109102458 A CN109102458 A CN 109102458A CN 201810831338 A CN201810831338 A CN 201810831338A CN 109102458 A CN109102458 A CN 109102458A
- Authority
- CN
- China
- Prior art keywords
- scheme
- graphic
- coordinate
- space
- schemes
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000003860 storage Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 5
- 230000002452 interceptive effect Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000002045 lasting effect Effects 0.000 description 3
- 238000003672 processing method Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000005611 electricity Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 230000035800 maturation Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000000465 moulding Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
Classifications
-
- G06T3/08—
Abstract
The embodiment of the present application provides the generation method and device of a kind of figure, is related to graph processing technique field.Method includes: to obtain multiple X-Y schemes, and obtain the relative positional relationship of every two X-Y scheme in space in multiple X-Y schemes;According to the relative positional relationship of multiple X-Y schemes and every two X-Y scheme in space, the 3-D graphic being made of multiple X-Y schemes is constructed;3-D graphic is shown.3-D graphic is constructed by complicated and cumbersome operation without user, more conducively also improves the efficiency of drawing 3 D graphics while hand on new hand's short time.
Description
Technical field
This application involves graph processing technique fields, in particular to the generation method and device of a kind of figure.
Background technique
As the performance of electronic equipment is constantly promoted, electronic equipment can handle complicated image operation, it can in electronics
Large-scale 3-D graphic is drawn in equipment.
Currently, large-scale 3-D graphic can be drawn in the electronic device using the graphic plotting software of profession, for example, adopting
3-D graphic is modeled with 3DMax.But professional graphic plotting software often operate it is more complicated and cumbersome, not only
It is unfavorable for learning drawing 3 D graphics in new hand's short time, and the time spent by drawing 3 D graphics is also longer, drawing three-dimensional
Under the efficiency of figure is relatively low.
Summary of the invention
The application is to provide the generation method and device of a kind of figure, to there is improvement drawbacks described above.
To achieve the goals above, embodiments herein is accomplished in that
In a first aspect, the embodiment of the present application provides a kind of generation method of figure, which comprises obtain multiple two
Figure is tieed up, and obtains the relative positional relationship of every two X-Y scheme in space in the multiple X-Y scheme;According to institute
The relative positional relationship of multiple X-Y schemes and every two X-Y scheme in space is stated, is constructed by the multiple X-Y scheme
The 3-D graphic of composition;The 3-D graphic is shown.
It is described according to the multiple X-Y scheme and every two two dimension in some optional implementations of first aspect
The relative positional relationship of figure in space, constructs the 3-D graphic being made of the multiple X-Y scheme, comprising: calls pre-
If ThreeJS engine, by X-Y scheme correspondence establishment each in the multiple X-Y scheme into three-dimensional system of coordinate;It is described
Relative positional relationship of the ThreeJS engine according to every two X-Y scheme in space, is constructed in the three-dimensional system of coordinate
The 3-D graphic being made of multiple X-Y schemes in the three-dimensional system of coordinate.
It is described to call preset ThreeJS engine in some optional implementations of first aspect, it will be the multiple
Before each X-Y scheme correspondence establishment is into three-dimensional system of coordinate in X-Y scheme, the method also includes: according to the multiple
X-Y scheme obtains multiple characteristics of each X-Y scheme, and the characteristic is on corresponding X-Y scheme: figure
Apex coordinate, circular central coordinate of circle and radius length, arc extreme coordinates and control point coordinates at least partly coordinate;
It is corresponding, it is described to call preset ThreeJS engine, X-Y scheme each in the multiple X-Y scheme is corresponding
It establishes in three-dimensional system of coordinate, comprising: preset ThreeJS engine is called, according to multiple characteristics of each X-Y scheme
Corresponding each X-Y scheme is established in three-dimensional system of coordinate with preset index relative.
It is described to show the 3-D graphic, comprising: described in some optional implementations of first aspect
The 3-D graphic is switched to the bufferGeometry model data that can be shown by ThreeJS engine;According to described
BufferGeometry model data shows the 3-D graphic.
It is described to obtain multiple X-Y schemes in some optional implementations of first aspect, and obtain described more
The relative positional relationship of every two X-Y scheme in space in a X-Y scheme, comprising: respond the figure of the user detected
Operation is drawn, generates and obtain multiple X-Y schemes, and obtains in the multiple X-Y scheme every two X-Y scheme in sky
Between in relative positional relationship.
Second aspect, the embodiment of the present application provide a kind of generating means of figure, and described device includes: acquisition module,
For obtaining the opposite position of every two X-Y scheme in space in multiple X-Y schemes, and the multiple X-Y scheme of acquisition
Set relationship.Module is constructed, for closing according to the relative position of the multiple X-Y scheme and every two X-Y scheme in space
System, constructs the 3-D graphic being made of the multiple X-Y scheme.Display module, for showing the 3-D graphic.
In some optional implementations of second aspect, the building module is also used to call preset ThreeJS
Engine, by X-Y scheme correspondence establishment each in the multiple X-Y scheme into three-dimensional system of coordinate;The ThreeJS engine root
According to the relative positional relationship of every two X-Y scheme in space, constructed in the three-dimensional system of coordinate by the three-dimensional coordinate
The 3-D graphic that multiple X-Y schemes in system are constituted.
In some optional implementations of second aspect, the building module is also used to according to the multiple two dimension
Figure obtains multiple characteristics of each X-Y scheme, and the characteristic is on corresponding X-Y scheme: the vertex of figure
Coordinate, circular central coordinate of circle and radius length, arc extreme coordinates and control point coordinates at least partly coordinate.
Corresponding, the building module is also used to call preset ThreeJS engine, according to the more of each X-Y scheme
A characteristic and preset index relative establish corresponding each X-Y scheme in three-dimensional system of coordinate.
In some optional implementations of second aspect, the display module, being also used to the ThreeJS engine will
The 3-D graphic switchs to the bufferGeometry model data that can be shown;According to the bufferGeometry pattern number
It is shown according to by the 3-D graphic.
In some optional implementations of second aspect, the acquisition module is also used to respond the user detected
Graphic plotting operation, generate and obtain multiple X-Y schemes, and obtain every two X-Y scheme in the multiple X-Y scheme
The relative positional relationship of shape in space.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, and the electronic equipment includes: processor, storage
Device, bus and communication module.The processor, the communication module and memory are connected by the bus.The memory,
For storing program.The processor, for executed by calling storage program in the memory first aspect or
The generation method of figure described in any optional implementation of first aspect.
Fourth aspect, the embodiment of the present application provide a kind of meter of non-volatile program code that can be performed with processor
The readable storage medium of calculation machine, said program code make any optional reality of the processor execution first aspect or first aspect
The generation method of figure described in existing mode.
The beneficial effect of the embodiment of the present application is:
During user's drawing 3 D graphics, user only needs to draw out multiple X-Y schemes, and determines more
The relative positional relationship of every two X-Y scheme in space in a X-Y scheme.So electronic equipment is according to multiple X-Y scheme
The relative positional relationship of shape and every two X-Y scheme in space, so that it may automatically construct by multiple X-Y schemes
The 3-D graphic of composition, and the 3-D graphic is shown, three are constructed by complicated and cumbersome operation without user
Figure is tieed up, more conducively also improves the efficiency of drawing 3 D graphics while hand on new hand's short time.
To enable the above objects, features, and advantages of the application to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate
Appended attached drawing, is described in detail below.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be to needed in the embodiment attached
Figure is briefly described, it should be understood that the following drawings illustrates only some embodiments of the application, therefore is not construed as pair
The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this
A little attached drawings obtain other relevant attached drawings.
Fig. 1 shows the structural block diagram of a kind of electronic equipment of the application first embodiment offer;
Fig. 2 shows a kind of flow charts of the generation method of figure of the application second embodiment offer;
Fig. 3 shows a kind of structural block diagram of the generating means of figure of the application 3rd embodiment offer.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Ground description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.Usually exist
The component of the embodiment of the present application described and illustrated in attached drawing can be arranged and be designed with a variety of different configurations herein.Cause
This, is not intended to limit claimed the application's to the detailed description of the embodiments herein provided in the accompanying drawings below
Range, but it is merely representative of the selected embodiment of the application.Based on embodiments herein, those skilled in the art not into
Row goes out every other embodiment obtained under the premise of creative work, shall fall in the protection scope of this application.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.Term " first ", " the
Two " etc. are only used for distinguishing description, are not understood to indicate or imply relative importance.Furthermore term in the application " and/
Or ", only a kind of incidence relation for describing affiliated partner, indicates may exist three kinds of relationships, for example, A and/or B, it can be with table
Show: individualism A exists simultaneously A and B, these three situations of individualism B.
First embodiment
Referring to Fig. 1, the application's provides a kind of electronic equipment 10, the electronic equipment 10 may include: memory 11,
Communication module 12, bus 13 and processor 14.Wherein, processor 14, communication module 12 and memory 11 are connected by bus 13.
Processor 14 is for executing the executable module stored in memory 11, such as computer program.Electricity shown in FIG. 1
The component and structure of sub- equipment 10 be it is illustrative, and not restrictive, as needed, electronic equipment 10 also can have it
His component and structure
Wherein, memory 11 may include high-speed random access memory (Random Access Memory RAM),
It may further include non-labile memory (non-volatile memory), for example, at least a magnetic disk storage.This implementation
In example, memory 11 stores processor 14 and executes program required for the generation method of figure.
Bus 13 can be isa bus, pci bus or eisa bus etc..It is total that bus can be divided into address bus, data
Line, control bus etc..Only to be indicated with a four-headed arrow in Fig. 1, it is not intended that an only bus or one convenient for indicating
The bus of seed type.
Processor 14 may be a kind of IC chip, the processing capacity with signal.During realization, above-mentioned side
Each step of method can be completed by the integrated logic circuit of the hardware in processor 14 or the instruction of software form.Above-mentioned
Processor 14 can be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network
Processor (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (DSP), specific integrated circuit
(ASIC), ready-made programmable gate array (FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components.It may be implemented or execute disclosed each method, step and the logic diagram in the embodiment of the present invention.It is general
Processor can be microprocessor or the processor is also possible to any conventional processor etc..In conjunction with institute of the embodiment of the present invention
The step of disclosed method, can be embodied directly in hardware decoding processor and execute completion, or with the hardware in decoding processor
And software module combination executes completion.Software module can be located at random access memory, and flash memory, read-only memory may be programmed read-only
In the storage medium of this fields such as memory or electrically erasable programmable memory, register maturation.
Method performed by the device of stream process or definition that any embodiment of the embodiment of the present invention discloses can be applied to
In processor 14, or realized by processor 14.Processor 14 is stored in after receiving and executing instruction by the calling of bus 13
After program in memory 11, processor 14 controls communication module 12 by bus 13 then can be with the stream of the generation method of figure
Journey.
Second embodiment
Present embodiments provide a kind of generation method of figure, it should be noted that step shown in the flowchart of the accompanying drawings
Suddenly it can execute in a computer system such as a set of computer executable instructions, although also, showing in flow charts
Logical order, but in some cases, it can be with the steps shown or described are performed in an order that is different from the one herein.It is right below
The present embodiment describes in detail.
Referring to Fig. 2, the generation method of the figure is applied to electronics in the generation method of figure provided in this embodiment
Equipment, and the image processing method may include: step S100, step S200 and step S300.
Step S100: obtaining multiple X-Y schemes, and obtains every two X-Y scheme in the multiple X-Y scheme and exist
Relative positional relationship in space.
Step S200: according to the relative positional relationship of the multiple X-Y scheme and every two X-Y scheme in space,
Construct the 3-D graphic being made of the multiple X-Y scheme.
Step S300: the 3-D graphic is shown.
The scheme of the application will be specifically described below.
Step S100: obtaining multiple X-Y schemes, and obtains every two X-Y scheme in the multiple X-Y scheme and exist
Relative positional relationship in space.
Can have on electronic equipment as interactive interface and display interface, then user be based on interactive interface can be to electronics
Equipment tablet pattern draws operation, for example, user can be realized by operation keyboard or mouse to electronic equipment tablet pattern
Draw operation.Correspondingly, electronic equipment can respond the graphic plotting operation of the user's input detected, electronic equipment is based on certainly
The data-handling capacity of body can then generate and according to the graphic plotting operation detected by display interface, such as display screen
Show corresponding X-Y scheme.
It is understood that in practice, the interactive interface and display interface of electronic equipment may be an interface, example
Such as, in the case where electronic equipment is tablet computer, the liquid crystal display of electronic equipment just has the function of interaction and display.
In this present embodiment, when user needs drawing 3 D graphics on an electronic device, user can be first in electronic equipment
On draw out X-Y scheme.Optionally, user is also possible to based on the interactive interface on electronic equipment to electronic equipment input figure
Shape draws operation, is a lasting process due to drawing X-Y scheme, then the response detection that electronic equipment can then continue
The graphic plotting operation arrived, and be continuously generated and show corresponding X-Y scheme in the display interface.
In the present embodiment, a 3-D graphic can have multiple faces, then user then needs to operate by graphic plotting
To draw out the X-Y scheme in each face in 3-D graphic comprising pattern.In this way, the lasting response figure of electronic equipment is drawn
System operation, so that it may generate and obtain multiple X-Y schemes that are corresponding with graphic plotting operation and needing to draw out for user.
It is assumed that needing the 3-D graphic drawn is video wall, and in 6 faces of the video wall, front has pattern, and just
Also there is pattern on the adjacent side of left and right two in face, and it is remaining with it is positive with respect to and parallel reverse side and with positive phase
Adjacent two sides up and down do not have pattern then.So, it includes: that tool is figuratum just that user, which needs the X-Y scheme drawn then,
Face, the figuratum left side of tool and the figuratum right side of tool.
For convenient for being subsequently generated 3-D graphic, user be can also continue to based on carrying out figure on the interactive interface on electronic equipment
Shape draws operation and inputs the relative positional relationship of every two X-Y scheme in space in multiple X-Y schemes to electronic equipment.
In this way, electronic equipment is operated also based on the graphic plotting is responded, so that it may obtain the user and input every two in multiple X-Y schemes
The relative positional relationship of a X-Y scheme in space.
It is assumed that electronic equipment generates and the multiple X-Y schemes obtained are the figuratum front of tool of the video wall, have
The left side and the figuratum right side of tool of pattern.So, every two X-Y scheme exists in multiple X-Y schemes of user's input
Relative positional relationship in space then can be with are as follows: have figuratum left side with have figuratum positive left side and connect and vertical
Directly in having figuratum front, has figuratum right side and connect and with having figuratum positive right edge perpendicular to figure
The front of case.
It should be noted that if the height for having any one X-Y scheme that can indicate the 3-D graphic in multiple X-Y schemes
Perhaps thickness so user is then not necessarily to define the height or thickness of 3-D graphic.If but not any in multiple X-Y schemes
A X-Y scheme can indicate the height or thickness of the 3-D graphic, for example, multiple X-Y schemes be video wall front and with
The capable back side is commented in front, then user just needs for the height of 3-D graphic or thickness to be input in electronic equipment, so that electronics
Equipment also obtains the height or thickness of the 3-D graphic.
Step S200: according to the relative positional relationship of the multiple X-Y scheme and every two X-Y scheme in space,
Construct the 3-D graphic being made of the multiple X-Y scheme.
For electronic equipment during obtaining multiple X-Y schemes, electronic equipment is according to default analysis program to multiple two dimensions
Figure carries out lasting parsing, then electronic equipment is obtained with multiple features of each X-Y scheme in multiple X-Y schemes
Data, wherein characteristic is on corresponding X-Y scheme: the apex coordinate of figure, circular central coordinate of circle and radius length,
At least partly coordinate in the extreme coordinates and control point coordinates of arc.It is understood that due to the figure on each X-Y scheme
Shape moulding and/or pattern are different, so that the characteristic on each X-Y scheme is at least partly coordinate in above-mentioned coordinate.
In the present embodiment, has the advantages that strong flexibility due to ThreeJS engine and low, therefore electronics is required to equipment performance
Equipment can automatically generate 3-D graphic by ThreeJS engine, then the ThreeJS engine can be pre-installed in the electricity
In sub- equipment.
As a kind of mode optionally, electronic equipment can call and run the ThreeJS engine, allow to basis
Multiple characteristics, preset index relative and the preset normal relationship of each X-Y scheme, can be in three-dimensional system of coordinate
Establish corresponding each X-Y scheme, it can be interpreted as each X-Y scheme being mapped in three-dimensional system of coordinate.Electronics is set
It is standby to continue to run the ThreeJS engine, then the ThreeJS engine can be according to the phase of every two X-Y scheme in space
To positional relationship, the three-dimensional figure being made of multiple X-Y schemes in the three-dimensional system of coordinate is constructed in the three-dimensional system of coordinate
Shape.
It is understood that since multiple X-Y schemes all have built up in the three-dimensional system of coordinate, then construct this three
The process of dimension figure then can be understood as the relative positional relationship based on every two X-Y scheme in space, by multiple two dimensions
The process that figure is spliced.Further, since multiple X-Y schemes are to have figuratum face in 3-D graphic, it may not be three
Tie up face all in figure.So, during constructing 3-D graphic, other faces without pattern then may be used in 3-D graphic
To be generated accordingly based on the relative positional relationship of every two X-Y scheme in space.
It should be noted that if the data of user's input further include the height or thickness of the 3-D graphic, then building three
Tieing up the process of figure then can be for first based on every two X-Y scheme relative positional relationship in space by multiple X-Y scheme
In three-dimensional system of coordinate be arranged after, then based on height or thickness adjust the mutual distance of multiple X-Y schemes, to be formed
The 3-D graphic.
Step S300: the 3-D graphic is shown.
In the present embodiment, electronic equipment can be shown 3-D graphic based on the Flash client of installation, but Flash
The 3-D graphic that client can not directly generate ThreeJS engine is shown, therefore electronic equipment is needed to the 3-D graphic
It formats.
Optionally, which can be switched to can to show by ThreeJS engine according to preset conversion program
BufferGeometry model data, and include in the threedimensional model in the bufferGeometry model data: all faces
Characteristic, the normal relationship of the index relative in each face and each face.Correspondingly, the Flash client on electronic equipment
The bufferGeometry model data is obtained, and the interior rendering engine of the Flash client is based on bufferGeometry mould
The three-dimensional then can be generated in the normal relationship in the characteristic in all faces in type data, the index relative in each face and each face
Figure, such electronic equipment then show the 3-D graphic in the display interface of the Flash client.It even, is raising
User experience, the angles of display of user's also adjustable 3-D graphic.
3rd embodiment
Referring to Fig. 3, the embodiment of the present application provides a kind of generating means 100 of figure, the generating means 100 of the figure
Applied to electronic equipment, the generating means 100 of the figure include:
Module 110 is obtained, for obtaining every two two dimension in multiple X-Y schemes, and the multiple X-Y scheme of acquisition
The relative positional relationship of figure in space.
Module 120 is constructed, for the opposite position according to the multiple X-Y scheme and every two X-Y scheme in space
Relationship is set, the 3-D graphic being made of the multiple X-Y scheme is constructed.
Display module 130, for showing the 3-D graphic.
Wherein, the acquisition module 110 is also used to respond the graphic plotting operation of the user detected, generates and obtain
Multiple X-Y schemes, and obtain the relative positional relationship of every two X-Y scheme in space in the multiple X-Y scheme.
The building module 120 is also used to call preset ThreeJS engine, will be each in the multiple X-Y scheme
X-Y scheme correspondence establishment is into three-dimensional system of coordinate;Phase of the ThreeJS engine according to every two X-Y scheme in space
To positional relationship, the three-dimensional being made of multiple X-Y schemes in the three-dimensional system of coordinate is constructed in the three-dimensional system of coordinate
Figure.
The building module 120, is also used to obtain multiple characteristics of each X-Y scheme in the multiple X-Y scheme
According to the characteristic is on corresponding X-Y scheme: the apex coordinate of figure, circular central coordinate of circle and radius length, arc
At least partly coordinate in the extreme coordinates and control point coordinates of shape
Corresponding, the building module 120 is also used to call preset ThreeJS engine, according to each X-Y scheme
Multiple characteristics and preset index relative establish corresponding each X-Y scheme in three-dimensional system of coordinate.
The display module 130 is also used to what the 3-D graphic was switched to can to show by the ThreeJS engine
BufferGeometry model data;The 3-D graphic is shown according to the bufferGeometry model data.
It should be noted that due to it is apparent to those skilled in the art that, for the convenience and letter of description
Clean, system, the specific work process of device and unit of foregoing description can be with reference to corresponding in preceding method embodiment
Journey, details are not described herein.
Fourth embodiment
The embodiment of the present application also provides a kind of computer-readable storages for the non-volatile program code that processor can be performed
Medium is deposited, is stored with program code on the computer readable storage medium, which executes above-mentioned when being run by processor
The step of any embodiment chain of rings worksheet processing method.
Specifically, which can be general storage medium, such as mobile disk, hard disk, on the storage medium
Program code when being run, the above-mentioned generation method for applying example diagram shape is able to carry out, to solve the graphic plotting software of profession
Often operate more complicated and cumbersome, the time spent by drawing 3 D graphics is also longer, and the efficiency of drawing 3 D graphics compares
Low technical problem.
The program code product of chain of rings worksheet processing method provided by the embodiment of the present application, the meter including storing program code
Calculation machine readable storage medium storing program for executing, the instruction that program code includes can be used for executing the method in previous methods embodiment, specific implementation
It can be found in embodiment of the method, details are not described herein.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description
It with the specific work process of device, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
In conclusion the embodiment of the present application provides the generation method and device of a kind of figure.Method includes: that acquisition is multiple
X-Y scheme, and obtain the relative positional relationship of every two X-Y scheme in space in multiple X-Y schemes;According to multiple
The relative positional relationship of X-Y scheme and every two X-Y scheme in space, constructs the three-dimensional being made of multiple X-Y schemes
Figure;3-D graphic is shown.
During user's drawing 3 D graphics, user only needs to draw out multiple X-Y schemes, and determines more
The relative positional relationship of every two X-Y scheme in space in a X-Y scheme.So electronic equipment is according to multiple X-Y scheme
The relative positional relationship of shape and every two X-Y scheme in space, so that it may automatically construct by multiple X-Y schemes
The 3-D graphic of composition, and the 3-D graphic is shown, three are constructed by complicated and cumbersome operation without user
Figure is tieed up, more conducively also improves the efficiency of drawing 3 D graphics while hand on new hand's short time.
The above is only preferred embodiment of the present application, are not intended to limit this application, for those skilled in the art
For member, various changes and changes are possible in this application.Within the spirit and principles of this application, it is made it is any modification,
Equivalent replacement, improvement etc., should be included within the scope of protection of this application.It should also be noted that similar label and letter are under
Similar terms are indicated in the attached drawing in face, therefore, once being defined in a certain Xiang Yi attached drawing, are not then needed in subsequent attached drawing
It is further defined and explained.
More than, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, and it is any to be familiar with
Those skilled in the art within the technical scope of the present application, can easily think of the change or the replacement, and should all cover
Within the protection scope of the application.Therefore, the protection scope of the application should be subject to the protection scope in claims.
Claims (10)
1. a kind of generation method of figure, which is characterized in that the described method includes:
Multiple X-Y schemes are obtained, and obtain the opposite position of every two X-Y scheme in space in the multiple X-Y scheme
Set relationship;
According to the relative positional relationship of the multiple X-Y scheme and every two X-Y scheme in space, construct by described more
The 3-D graphic that a X-Y scheme is constituted;
The 3-D graphic is shown.
2. the generation method of figure according to claim 1, which is characterized in that it is described according to the multiple X-Y scheme and
The relative positional relationship of every two X-Y scheme in space, constructs the 3-D graphic being made of the multiple X-Y scheme,
Include:
Preset ThreeJS engine is called, by X-Y scheme correspondence establishment each in the multiple X-Y scheme to three-dimensional coordinate
In system;
Relative positional relationship of the ThreeJS engine according to every two X-Y scheme in space, in the three-dimensional system of coordinate
In construct the 3-D graphic being made of multiple X-Y schemes in the three-dimensional system of coordinate.
3. the generation method of figure according to claim 2, which is characterized in that it is described to call preset ThreeJS engine,
By X-Y scheme correspondence establishment each in the multiple X-Y scheme into three-dimensional system of coordinate before, the method also includes:
Multiple characteristics of each X-Y scheme in the multiple X-Y scheme are obtained, the characteristic is corresponding two dimension
On figure: the apex coordinate of figure, circular central coordinate of circle and radius length, arc extreme coordinates and control point coordinates in
At least partly coordinate;
It is corresponding, it is described to call preset ThreeJS engine, by X-Y scheme correspondence establishment each in the multiple X-Y scheme
Into three-dimensional system of coordinate, comprising:
Preset ThreeJS engine is called, according to multiple characteristics of each X-Y scheme and preset index relative three
Corresponding each X-Y scheme is established in dimension coordinate system.
4. the generation method of figure according to claim 2 or 3, which is characterized in that it is described to show the 3-D graphic,
Include:
The 3-D graphic is switched to the bufferGeometry model data that can be shown by the ThreeJS engine;
The 3-D graphic is shown according to the bufferGeometry model data.
5. the generation method of figure according to claim 2 or 3, which is characterized in that it is described to obtain multiple X-Y schemes, with
And obtain the relative positional relationship of every two X-Y scheme in space in the multiple X-Y scheme, comprising:
The graphic plotting operation for responding the user detected, generates and obtains multiple X-Y schemes, and obtain the multiple two
Tie up the relative positional relationship of every two X-Y scheme in space in figure.
6. a kind of generating means of figure, which is characterized in that described device includes:
Module is obtained, is existed for obtaining every two X-Y scheme in multiple X-Y schemes, and the multiple X-Y scheme of acquisition
Relative positional relationship in space;
Module is constructed, for the relative positional relationship according to the multiple X-Y scheme and every two X-Y scheme in space,
Construct the 3-D graphic being made of the multiple X-Y scheme;
Display module, for showing the 3-D graphic.
7. the generating means of figure according to claim 6, which is characterized in that
The building module is also used to call preset ThreeJS engine, by X-Y scheme each in the multiple X-Y scheme
Correspondence establishment is into three-dimensional system of coordinate;The ThreeJS engine is closed according to the relative position of every two X-Y scheme in space
System, constructs the 3-D graphic being made of multiple X-Y schemes in the three-dimensional system of coordinate in the three-dimensional system of coordinate.
8. the generating means of figure according to claim 7, which is characterized in that
The building module is also used to obtain multiple characteristics of each X-Y scheme in the multiple X-Y scheme, described
Characteristic is on corresponding X-Y scheme: the endpoint of the apex coordinate of figure, circular central coordinate of circle and radius length, arc
At least partly coordinate in coordinate and control point coordinates;
Corresponding, the building module is also used to call preset ThreeJS engine, according to multiple spies of each X-Y scheme
Sign data and preset index relative establish corresponding each X-Y scheme in three-dimensional system of coordinate.
9. the generating means of figure according to claim 7 or 8, which is characterized in that
The display module is also used to what the 3-D graphic was switched to can to show by the ThreeJS engine
BufferGeometry model data;The 3-D graphic is shown according to the bufferGeometry model data.
10. the generating means of figure according to claim 7 or 8, which is characterized in that
The acquisition module is also used to respond the graphic plotting operation of the user detected, generates and obtain multiple X-Y schemes,
And obtain the relative positional relationship of every two X-Y scheme in space in the multiple X-Y scheme.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810831338.XA CN109102458A (en) | 2018-07-25 | 2018-07-25 | The generation method and device of figure |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810831338.XA CN109102458A (en) | 2018-07-25 | 2018-07-25 | The generation method and device of figure |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109102458A true CN109102458A (en) | 2018-12-28 |
Family
ID=64847576
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810831338.XA Pending CN109102458A (en) | 2018-07-25 | 2018-07-25 | The generation method and device of figure |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109102458A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102982579A (en) * | 2011-12-14 | 2013-03-20 | 微软公司 | Image three-dimensional (3D) modeling |
CN104778741A (en) * | 2014-01-14 | 2015-07-15 | 北大方正集团有限公司 | Method and device for converting two-dimensional figure into three-dimensional figure |
CN105808220A (en) * | 2014-12-30 | 2016-07-27 | 深圳Tcl数字技术有限公司 | Method and apparatus for displaying three-dimensional effect by application |
CN106530388A (en) * | 2016-09-08 | 2017-03-22 | 上海术理智能科技有限公司 | 3D printing device based on two-dimensional image, and three-dimensional modeling method for 3D printing device |
-
2018
- 2018-07-25 CN CN201810831338.XA patent/CN109102458A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102982579A (en) * | 2011-12-14 | 2013-03-20 | 微软公司 | Image three-dimensional (3D) modeling |
CN104778741A (en) * | 2014-01-14 | 2015-07-15 | 北大方正集团有限公司 | Method and device for converting two-dimensional figure into three-dimensional figure |
CN105808220A (en) * | 2014-12-30 | 2016-07-27 | 深圳Tcl数字技术有限公司 | Method and apparatus for displaying three-dimensional effect by application |
CN106530388A (en) * | 2016-09-08 | 2017-03-22 | 上海术理智能科技有限公司 | 3D printing device based on two-dimensional image, and three-dimensional modeling method for 3D printing device |
Non-Patent Citations (1)
Title |
---|
杨钟藩: "用微型计算机绘制二维与三维工程图样的探讨", 《电气传动》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11842438B2 (en) | Method and terminal device for determining occluded area of virtual object | |
US10698599B2 (en) | Connecting graphical shapes using gestures | |
EP3001331A1 (en) | Method and system for ranking desktop objects | |
CN107451272B (en) | Information display method, medium, device and computing equipment | |
US20230325062A1 (en) | Method for adjusting interface display state, and electronic device | |
CN106846490B (en) | A kind of methods of exhibiting and device that cambered surface model is used to be shown in 3D scene | |
CN109471626A (en) | Page logic structure, page generation method, page data processing method and device | |
CN108965575A (en) | A kind of gesture motion recognition methods, device and terminal device | |
CN108279956B (en) | Progress indicating method, progress indicating device, storage medium and electronic equipment | |
CN109634428A (en) | Electronic equipment, feedback prompts method, apparatus and terminal device | |
CN106713962B (en) | Video display method, apparatus and terminal device | |
CN108846901A (en) | Model introduction method and device | |
CN111553962A (en) | Chart display method, system and display equipment | |
WO2023173728A1 (en) | Graphic rendering method and apparatus, and storage medium | |
CN109102458A (en) | The generation method and device of figure | |
CN114863008B (en) | Image processing method, image processing device, electronic equipment and storage medium | |
CN109582269A (en) | Physics mosaic screen display methods, device and terminal device | |
CN114797109A (en) | Object editing method and device, electronic equipment and storage medium | |
CN114564268A (en) | Equipment management method and device, electronic equipment and storage medium | |
CN114629800A (en) | Visual generation method, device, terminal and storage medium for industrial control network target range | |
CN110647263B (en) | Mobile terminal desktop icon moving method, device, medium and equipment | |
CN110888787A (en) | Data monitoring method, device and system | |
WO2020133386A1 (en) | Note partial selection method, apparatus, electronic terminal and readable storage medium | |
CN111179174B (en) | Image stretching method and device based on face recognition points | |
CN110223225B (en) | Data processing method and device for picture combination |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181228 |