CN114138396B - High-efficiency linkage digital graphic engine implementation method and storage medium - Google Patents

High-efficiency linkage digital graphic engine implementation method and storage medium Download PDF

Info

Publication number
CN114138396B
CN114138396B CN202111493845.5A CN202111493845A CN114138396B CN 114138396 B CN114138396 B CN 114138396B CN 202111493845 A CN202111493845 A CN 202111493845A CN 114138396 B CN114138396 B CN 114138396B
Authority
CN
China
Prior art keywords
primitive
abstract
primitives
graphic
coordinate
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
CN202111493845.5A
Other languages
Chinese (zh)
Other versions
CN114138396A (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.)
China Southwest Architectural Design and Research Institute Co Ltd
Original Assignee
China Southwest Architectural Design and Research Institute 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 China Southwest Architectural Design and Research Institute Co Ltd filed Critical China Southwest Architectural Design and Research Institute Co Ltd
Priority to CN202111493845.5A priority Critical patent/CN114138396B/en
Publication of CN114138396A publication Critical patent/CN114138396A/en
Application granted granted Critical
Publication of CN114138396B publication Critical patent/CN114138396B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention relates to the technical field of computer graphic display and graphic engines, and discloses a high-efficiency linkage digital graphic engine implementation method, which comprises the following steps: the control points (or parameters) and specific control logic combine various basic graphics to form any complex graphics, the abstract area of the graphics primitive is calculated and stored together with the graphics primitive, a new complex graphics is formed by combining the change of the control points or the adjustment of the parameters and the specific logic, other affected graphics primitives are quickly positioned in massive graphics primitives by the calculation of the abstract area, and the affected graphics primitives finish redrawing according to the self control logic. The method has the advantages that the graph is driven in a digital mode, the consistency of the graph and information can be effectively guaranteed, meanwhile, the high efficiency of graph modification can be guaranteed, and in addition, the high efficiency of graph linkage modification is guaranteed based on a rapid filtering algorithm of an abstract area.

Description

High-efficiency linkage digital graphic engine implementation method and storage medium
Technical Field
The invention relates to the technical field of computer graphic display and graphic engines, in particular to a high-efficiency linkage digital graphic engine implementation method and a storage medium.
Background
The graphic engine and the corresponding software products are necessary tools for engineering design and drawing, common graphic software on the market at present comprises AutoCAD, zhongwang CAD, haochen CAD and the like, all products focus on drawing and displaying of the graphics, and the digital driving of the graphics and the linkage modification of the graphics and the information are weaker. Graphic software focusing on informatization, such as Revit and the like, has slow response speed, and the Kanton feeling is obvious during large-model operation. At present, the digital transformation of enterprises is greatly promoted at home, and the realization of the dynamic association of graphs and digital information is particularly important for design enterprises.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: aiming at the existing problems, the method for realizing the high-efficiency linkage digital graphic engine is provided, the high-efficiency linkage of the graphic and the information can be realized through the method, the design result of a design enterprise is more valuable, and the digital transformation of the design enterprise is assisted.
The technical scheme adopted by the invention is as follows:
in one aspect, the invention provides a method for implementing an efficient linked digital graphic engine, comprising the following steps:
step 1: controlling various basic graphic elements to be combined through the control points and the control logic to form any complex graphic, and calling the complex graphic as a primitive;
wherein, the control logic refers to a rule for limiting how basic graphic elements are combined into an arbitrary complex graphic;
step 2: calculating a minimum outsourcing regular rectangle capable of surrounding the graphic primitive, calling the minimum outsourcing regular rectangle as an abstract area, storing the abstract area and the graphic primitive together, and associating the abstract area with the graphic primitive to realize synchronous updating;
and step 3: when a certain primitive is changed, synchronously updating an abstract area associated with the primitive, and finding out other primitives influenced by the primitive by adopting a mode of quickly calculating the abstract area;
and 4, step 4: and other primitives are influenced by the primitives, redrawing is carried out based on the control logic of the primitives, and the associated abstract area is updated, so that linkage modification is realized.
Further, the control points are associated with parameters of primitives.
Further, the control points refer to abstraction points defining primitive positions and shapes.
Further, in step 3, the primitive is modified by changing the position of the control point or adjusting the parameter of the primitive.
Further, in step 4, the step of redrawing other primitives under the influence of the primitive based on the control logic of the other primitives specifically includes:
when a certain primitive is affected by a changed primitive, the primitive automatically changes a control point or adjusts parameters, calls a control logic of the primitive itself, and re-combines basic graphic elements to realize re-drawing of the primitive itself.
Further, the abstract region fast calculation comprises: the positional relationship between the two abstract regions is calculated.
Further, the calculating the position relationship between the two abstract areas specifically includes:
step a1: under the same coordinate system, defining the abstract area coordinate of the primitive which is firstly changed as: a left X coordinate LX1, a right X coordinate RX1, an upper Y coordinate TY1, and a lower Y coordinate BY1;
defining the abstract area coordinates of other primitives influenced by the redrawn primitive as follows: a left X coordinate LX2, a right X coordinate RX2, an upper Y coordinate TY2, a lower Y coordinate BY2;
step a2: if RX1< LX2 is satisfied, determining that the two abstract regions are not intersected, wherein the calculation amount is one size comparison operation, and if RX1< LX2 is not satisfied, entering a step a3 for further comparison;
step a3: if the TY1< BY2 is satisfied, determining that the two abstract regions are not intersected, wherein the calculated amount is a secondary size comparison operation, and if the TY1< BY2 is not satisfied, entering a step a4 for further comparison;
step a4: if LX1> RX2 is satisfied, determining that the two abstract regions are not intersected, wherein the calculation amount is three times of comparison operation, and if LX1> RX2 is not satisfied, entering a step a5 for further comparison;
step a5: if the BY1 TY2 is satisfied, the two abstract regions are determined to be not intersected, the calculated amount is four times of size comparison operation, if the BY1 TY2 is not satisfied, the two primitive abstract regions are determined to be intersected, the calculated amount is four times of size comparison operation, and the position relation judgment between the two abstract regions is completed.
Further, the control logic of each primitive is stored together with each primitive, and the primitives are updated synchronously.
Further, the basic graphic element refers to a non-repartitionable basic element constituting a primitive.
In another aspect, the present invention provides a storage medium having stored thereon computer instructions which, when run on a computer, cause the computer to perform the method of the first aspect described above.
Compared with the prior art, the beneficial effects of adopting the technical scheme are as follows:
the invention drives the graph in a digital mode, can effectively ensure the consistency of the graph and the information, can ensure the high efficiency of graph modification, and ensures the high efficiency of graph linkage modification by a rapid filtering algorithm based on an abstract region.
Drawings
Fig. 1 is a schematic flow chart of an implementation method of an efficient linked digital graphics engine according to an embodiment of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
As shown in fig. 1, the embodiment provides a method for implementing an efficient linked digital graphics engine, including:
step 1: and controlling various basic graphic elements to be combined through the control points and the control logic to form any complex graphic, wherein the complex graphic is called a primitive.
The control logic refers to rules for limiting how basic graphic elements are combined into any complex graphic; the control point is an abstraction point for limiting the position and the shape of the complex graph, the control point does not participate in the composition of the complex graph, but can control the shape of the complex graph, and the control point is associated with the parameters of the primitive.
Each primitive may define its own control logic, which is stored with the primitive and is continuously executed when the control point (or parameter) of the primitive is modified to obtain the update of the primitive in time.
Specifically, in this embodiment, the basic graphic elements refer to basic elements that constitute the complex graphic and are not divisible, such as: straight lines, arcs, any independent curve that can be described by a function, circles, ellipses, any closed curve that can be described by a function, pattern filling in any pattern, independent characters in any pattern, and the like.
Step 2: and when the primitive is created, calculating a minimum outsourcing positive rectangle capable of surrounding the primitive, calling the minimum outsourcing positive rectangle as an abstract area, storing the abstract area and the primitive together, and associating the abstract area with the primitive to ensure that the abstract area is updated in time along with the change of the primitive.
The abstract area is a rough description of the coverage range of the graphic element, and the requirement is that the two sides of the length and the width of a right rectangle forming the abstract area are respectively parallel to the horizontal side and the vertical side of the computer operation interface. The reason that the regular rectangles which are parallel to the two sides of the computer operation interface are required is that in the position relation judgment of massive graphs, the calculation efficiency of the regular rectangles can be greatly improved, and therefore efficient linkage is achieved.
And step 3: when a certain primitive is changed, the abstract area associated with the primitive is updated synchronously, and other primitives influenced by the primitive are found out by adopting a mode of quickly calculating the abstract area.
When the primitive is created and displayed on a screen or other devices, a user drags or raises the control point through an interactive device of the engine, or adjusts parameters of the primitive, and after the primitive receives changes of the control point or the parameters, the primitive executes self control logic, changes the primitive, and updates abstract area data.
Specifically, in this embodiment, the abstract region fast calculation includes: and calculating the position relation between the two abstract areas, wherein the concrete calculation steps are as follows:
step a1: under the same coordinate system, defining the abstract area coordinate of the primitive which is firstly changed as: a left X coordinate LX1, a right X coordinate RX1, an upper Y coordinate TY1, and a lower Y coordinate BY1;
defining the abstract area coordinates of other primitives influenced by the redrawn primitive as follows: a left X coordinate LX2, a right X coordinate RX2, an upper Y coordinate TY2, and a lower Y coordinate BY2;
step a2: if RX1< LX2 is satisfied, determining that the two abstract regions are not intersected, wherein the calculation amount is one size comparison operation, and if RX1< LX2 is not satisfied, entering a step a3 for further comparison;
step a3: if the TY1< BY2 is satisfied, determining that the two abstract regions are not intersected, wherein the calculated amount is a secondary size comparison operation, and if the TY1< BY2 is not satisfied, entering a step a4 for further comparison;
step a4: if LX1> RX2 is satisfied, determining that the two abstract regions are not intersected, wherein the calculation amount is three times of comparison operation, and if LX1> RX2 is not satisfied, entering a step a5 for further comparison;
step a5: if the BY1 TY2 is satisfied, the two abstract regions are determined to be not intersected, the calculated amount is four times of size comparison operation, if the BY1 TY2 is not satisfied, the two primitive abstract regions are determined to be intersected, the calculated amount is four times of size comparison operation, and the position relation judgment between the two abstract regions is completed.
And 4, step 4: and other primitives are influenced by the changed primitives, redrawing is carried out based on the control logic of the primitives, the associated abstract area is updated, when part of the primitives are changed, the control logic of the primitives is automatically executed to redraw the graph and inform the influenced primitives, and the other primitives determine whether to change the graph according to the control logic of the primitives, so that linkage modification is realized.
The process of redrawing other primitives is as follows: when a certain primitive is affected by a changed primitive, the primitive automatically changes a control point or adjusts parameters, calls a control logic of the primitive itself, and re-combines basic graphic elements to realize re-drawing of the primitive itself.
The present embodiment also provides a storage medium, where the storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer is caused to execute the implementation method of the efficient linked digital graphics engine provided by the present embodiment.
The invention is not limited to the foregoing embodiments. The invention extends to any novel feature or any novel combination of features disclosed in this specification and any novel method or process steps or any novel combination of features disclosed. Those skilled in the art to which the invention pertains will appreciate that insubstantial changes or modifications can be made without departing from the spirit of the invention as defined by the appended claims.

Claims (8)

1. An implementation method of an efficient linked digital graphic engine is characterized by comprising the following steps:
step 1: controlling various basic graphic elements to be combined through control points and control logics to form any complex graphic, and calling the complex graphic as a primitive;
the control logic refers to rules for limiting how basic graphic elements are combined into any complex graphic;
step 2: calculating a minimum outsourcing positive rectangle capable of surrounding the graphic primitive, calling the minimum outsourcing positive rectangle as an abstract area, storing the abstract area and the graphic primitive together, and associating the abstract area with the graphic primitive to realize synchronous updating;
and step 3: when a certain primitive is changed, synchronously updating an abstract area associated with the primitive, and finding out other primitives influenced by the primitive by adopting a mode of quickly calculating the abstract area;
and 4, step 4: other primitives are influenced by the primitives, redrawing is carried out based on own control logic, and associated abstract areas are updated, so that linkage modification is realized;
the abstract area rapid calculation comprises calculating the position relation between two abstract areas, and the calculating the position relation between the two abstract areas comprises:
step a1: under the same coordinate system, defining the abstract area coordinate of the primitive which is firstly changed as: a left X coordinate LX1, a right X coordinate RX1, an upper Y coordinate TY1, and a lower Y coordinate BY1;
defining the abstract area coordinates of other primitives influenced by the redrawn primitive as follows: a left X coordinate LX2, a right X coordinate RX2, an upper Y coordinate TY2, and a lower Y coordinate BY2;
step a2: if RX1< LX2 is satisfied, determining that the two abstract regions are not intersected, wherein the calculation amount is one size comparison operation, and if RX1< LX2 is not satisfied, entering a step a3 for further comparison;
step a3: if the TY1< BY2 is satisfied, determining that the two abstract regions are not intersected, wherein the calculated amount is a secondary size comparison operation, and if the TY1< BY2 is not satisfied, entering a step a4 for further comparison;
step a4: if LX1> RX2 is satisfied, determining that the two abstract regions are not intersected, wherein the calculation amount is three times of comparison operation, and if LX1> RX2 is not satisfied, entering a step a5 for further comparison;
step a5: if the BY1 TY2 is satisfied, the two abstract regions are determined to be not intersected, the calculated amount is four times of size comparison operation, if the BY1 TY2 is not satisfied, the two primitive abstract regions are determined to be intersected, the calculated amount is four times of size comparison operation, and the position relation judgment between the two abstract regions is completed.
2. The method of claim 1, wherein the control points are associated with parameters of primitives.
3. An efficient ganged digital graphic engine implementation method as claimed in claim 1, wherein the control points are abstraction points defining primitive positions and shapes.
4. The method as claimed in claim 2, wherein in step 3, the primitives are modified by changing the positions of the control points or adjusting the parameters of the primitives.
5. The method for implementing the high-efficiency linked digital graphic engine according to claim 1, wherein in the step 4, other primitives are influenced by the primitives, and the step of redrawing based on the control logic of the other primitives specifically comprises the following steps:
when a certain primitive is affected by a changed primitive, the primitive automatically changes a control point or adjusts parameters, calls a control logic of the primitive itself, and re-combines basic graphic elements to realize re-drawing of the primitive itself.
6. The method of claim 1, wherein the control logic of each primitive is stored with each primitive and updated synchronously.
7. The method of claim 1, wherein the primitive elements are non-repartitionable primitives.
8. A storage medium having stored thereon computer instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1-7.
CN202111493845.5A 2021-12-08 2021-12-08 High-efficiency linkage digital graphic engine implementation method and storage medium Active CN114138396B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111493845.5A CN114138396B (en) 2021-12-08 2021-12-08 High-efficiency linkage digital graphic engine implementation method and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111493845.5A CN114138396B (en) 2021-12-08 2021-12-08 High-efficiency linkage digital graphic engine implementation method and storage medium

Publications (2)

Publication Number Publication Date
CN114138396A CN114138396A (en) 2022-03-04
CN114138396B true CN114138396B (en) 2023-03-24

Family

ID=80385240

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111493845.5A Active CN114138396B (en) 2021-12-08 2021-12-08 High-efficiency linkage digital graphic engine implementation method and storage medium

Country Status (1)

Country Link
CN (1) CN114138396B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101303649A (en) * 2008-06-20 2008-11-12 北京大学 Method and apparatus for generating model building language geometric notation

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW509879B (en) * 2001-01-29 2002-11-11 Silicon Integrated Sys Corp Method and apparatus for minimizing the idle time of a graphics engine by using rendering control before flipping frame buffer
US9792734B2 (en) * 2013-09-13 2017-10-17 Carnegie Mellon University Methods and software for volume-centric shape abstraction and simplification of a 3D digital model
CN109814857B (en) * 2017-11-22 2022-10-21 中国电力科学研究院有限公司 Method and device for customizing primitive linkage

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101303649A (en) * 2008-06-20 2008-11-12 北京大学 Method and apparatus for generating model building language geometric notation

Also Published As

Publication number Publication date
CN114138396A (en) 2022-03-04

Similar Documents

Publication Publication Date Title
JP6301590B2 (en) Design of 3D modeling objects
US6781597B1 (en) Edit modes for three dimensional modeling systems
EP2282245B9 (en) Cutting process simulation display device, method for displaying cutting process simulation, and cutting process simulation display program
WO2011158446A1 (en) Animation control device, animation control method and animation control program
US20160224693A1 (en) Engraving a 2d image on a subdivision surface
JP2007264989A (en) Graphic drawing device, graphic drawing method and program
CN114138396B (en) High-efficiency linkage digital graphic engine implementation method and storage medium
JPH03266086A (en) Display method for graphic
JP2012043057A (en) Face image editing program, recording medium storing face image editing program, and face image editing system
US8279239B1 (en) Graphical user interface for performing deformations
CN113569157A (en) Radar scanning effect simulation method and system, terminal equipment and storage medium
US7330772B2 (en) Knit design method and apparatus
CN108986212B (en) Three-dimensional virtual terrain LOD model generation method based on crack elimination
JP4646712B2 (en) Computer graphics drawing method and drawing apparatus
TW201537144A (en) Image display system
JP3186240B2 (en) Figure editing device
CN111260780B (en) Real-time terrain modification method based on elevation of altitude map
CN112419445A (en) Primitive state switching method and device based on layer switching and storage medium
WO2006003856A1 (en) Image drawing device, vertex selecting method, vertex selecting program, and integrated circuit
CN111199512A (en) SVG vector graphics adjusting method, SVG vector graphics adjusting device, storage medium and terminal
JP4042377B2 (en) Image processing apparatus, image processing method, and computer program
CN113902609B (en) Method and device for smoothly rendering control animation based on OpenGL embedded device
CN116301747A (en) User interface design method and device and electronic equipment
JPH08202341A (en) Graphic editing device
CN115457166A (en) Irregular round-corner polygon drawing method

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