CN104461443A - Method and system for achieving animation effect - Google Patents
Method and system for achieving animation effect Download PDFInfo
- Publication number
- CN104461443A CN104461443A CN201410857312.4A CN201410857312A CN104461443A CN 104461443 A CN104461443 A CN 104461443A CN 201410857312 A CN201410857312 A CN 201410857312A CN 104461443 A CN104461443 A CN 104461443A
- Authority
- CN
- China
- Prior art keywords
- animation
- area
- actual area
- region
- current screen
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
Abstract
The invention discloses a method for achieving the animation effect. The method comprises the steps of acquiring the actual area, where an animation is displayed, on a current screen; calculating the distance between the actual area and each boundary of the current screen to obtain the boundary closest to the actual area; obtaining the motion track of the animation according to the closest boundary and the actual area; flying in or out the animation according to the motion track. Correspondingly, the invention further discloses a system for achieving the animation effect. By means of the method and system for achieving the animation effect, the motion track of the animation can be automatically set according to the area, where the animation is displayed, on a current screen. The method and system are convenient to use and rapid in operation.
Description
Technical field
The present invention relates to technical field of image processing, particularly relate to a kind of method and system realizing animation effect.
Background technology
PowerPoint, such as: the WPS demonstration in Kingsoft, the PPT (Powerpoint abbreviation) of Microsoft, it has advantage that is visual in image, high-level efficiency displaying, has been widely used in the middle of teaching and office.Current PowerPoint software both provides cartoon setting function, and good PowerPoint animation brings certain help and thrust can to the demonstration of manuscript.
The realization of animation effect of the prior art, the animation effect to each object (image, word etc.) (as fly into, fly out) is needed repeatedly to arrange, and need user to select the movement locus of animation, complex operation, affect work efficiency.
Summary of the invention
The embodiment of the present invention proposes a kind of method and system realizing animation effect, and the movement locus of the region Lookup protocol animation that can show on screen according to animation is easy to use, swift to operate.
The embodiment of the present invention provides a kind of method realizing animation effect, comprising:
Obtain the actual area that animation shows on current screen;
Calculate the distance on described actual area and the every bar border of described current screen, obtain the border nearest with described actual area;
The movement locus of described animation is set according to described nearest border and described actual area;
Fly into according to described movement locus or fly out described animation.
Further, before the actual area that described acquisition animation shows on current screen, also comprise:
Obtain the resolution of described current screen;
According to the resolution of described current screen, obtain the size of the second visibility region on described current screen; Described visibility region is demonstrate the maximum region of described animation; The size in described region comprises length and the width in region;
Calculate the area ratio of the first visibility region and described second visibility region preset; Described area ratio comprises lenth ratio and the width ratio in region.
Further, the actual area that described acquisition animation shows on current screen, specifically comprises:
According to the size of described area ratio with the viewing area of presetting, calculate the size of the actual area that described animation shows in described second visibility region; Described viewing area is the region that described animation shows in described first visibility region;
According to the apex coordinate of described area ratio with the described viewing area of presetting, calculate the apex coordinate of described actual area;
According to size and the apex coordinate of described actual area, obtain the actual area that described animation shows on described current screen.
Further, the distance on the described actual area of described calculating and the every bar border of described current screen, obtains the border nearest with described actual area, specifically comprises:
According to the size of described second visibility region, and the size of described actual area and apex coordinate, calculate the distance on every bar border of the second visibility region on described actual area and described current screen;
Obtain the border nearest with described actual area.
Correspondingly, the embodiment of the present invention also provides a kind of system realizing animation effect, comprising:
Region acquisition module, for obtaining the actual area that animation shows on current screen;
Distance calculation module, for calculating the distance on described actual area and the every bar border of described current screen, obtains the border nearest with described actual area;
Track arranges module, for arranging the movement locus of described animation according to described nearest border and described actual area; And,
Animation effect module, for the described animation that flies into according to described movement locus or fly out.
Further, the described system realizing animation effect also comprises:
Resolution acquisition module, for obtaining the resolution of described current screen;
Second visibility region acquisition module, for the resolution according to described current screen, obtains the size of the second visibility region on described current screen; Described visibility region is demonstrate the maximum region of described animation; The size in described region comprises length and the width in region; And,
Ratio calculation module, for calculating the area ratio of the first default visibility region and described second visibility region; Described area ratio comprises lenth ratio and the width ratio in region.
Further, described region acquisition module specifically comprises:
Actual area computing unit, for the size according to described area ratio and default viewing area, calculates the size of the actual area that described animation shows in described second visibility region; Described viewing area is the region that described animation shows in described first visibility region;
Coordinate calculating unit, for the apex coordinate according to described area ratio and default described viewing area, calculates the apex coordinate of described actual area; And,
Viewing area acquiring unit, for according to the size of described actual area and apex coordinate, obtains the actual area that described animation shows on described current screen.
Further, described distance calculation module specifically comprises:
Metrics calculation unit, for the size according to described second visibility region, and the size of described actual area and apex coordinate, calculate the distance on every bar border of the second visibility region on described actual area and described current screen; And,
Border acquiring unit, for obtaining the border nearest with described actual area.
Implement the embodiment of the present invention, there is following beneficial effect:
The method and system of animation effect that what the embodiment of the present invention provided realize, the region of the animation display that can arrange on screen according to user, obtain the screen border that distance animation viewing area is nearest, thus make animation automatically fly into from this screen border or fly out, realize animation effect, easy to use, swift to operate.
And, when different screen is demonstrated, the size of viewing area can be drawn according to the resolution automatic regulation moving of screen, and then according to the position of animation viewing area, the movement locus of auto Select Animated, realizes animation effect.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet realizing an embodiment of the method for animation effect provided by the invention;
Fig. 2 is the schematic flow sheet of an embodiment of step S1 in Fig. 1;
Fig. 3 is the structural representation of an embodiment of the second visibility region;
Fig. 4 is the structural representation realizing an embodiment of the system of animation effect provided by the invention;
Fig. 5 is the structural representation of an embodiment of region acquisition module in Fig. 4.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
See Fig. 1, be the schematic flow sheet realizing an embodiment of the method for animation effect provided by the invention, comprise:
The actual area that S1, acquisition animation show on current screen;
S2, calculate the distance on described actual area and the every bar border of described current screen, obtain the border nearest with described actual area;
S3, the movement locus of described animation is set according to described nearest border and described actual area;
S4, fly into according to described movement locus or fly out described animation.
It should be noted that, after the actual area that acquisition animation shows on screen, calculate the distance of this actual area and screen four edges circle, obtain nearest border.When flying into animation, using the starting point of this border as animation movement locus, using the terminal of actual area as animation movement locus, fly into animation; When flying out animation, using the starting point of actual area as animation movement locus, using the terminal of this border as animation movement locus, fly out animation.
Further, before the actual area that described acquisition animation shows on current screen, also comprise:
Obtain the resolution of described current screen;
According to the resolution of described current screen, obtain the size of the second visibility region on described current screen; Described visibility region is demonstrate the maximum region of described animation; The size in described region comprises length and the width in region;
Calculate the area ratio of the first visibility region and described second visibility region preset; Described area ratio comprises lenth ratio and the width ratio in region.
Further, before the resolution of the described current screen of described acquisition, also comprise:
The resolution of default screen is set;
According to the resolution of described default screen, obtain the size of the first visibility region in described default screen; Described visibility region is demonstrate the maximum region of described animation.
It should be noted that, the screen that user uses when making PowerPoint or courseware is default screen, and the screen that user uses when PowerPoint or demonstration courseware is current screen.If current screen is different from the resolution of default screen, varying in size of visibility region then on screen, thus lenth ratio and the width ratio in two regions need be calculated, make the viewing area of animation can scaled down or amplification, thus the relative position in visibility region remain unchanged.
On assumed by default screen, the length of the first visibility region is QL, width is QB, according to the resolution of current screen, the length a obtaining the second visibility region 5 of current screen is VL, and width b is VB, as shown in Figure 3, the lenth ratio then calculating the second visibility region 5 and the first visibility region is BL, and width ratio is BB, wherein, BL=VL/QL, BB=VB/QB.
Further, as shown in Figure 2, the actual area that described acquisition animation shows on current screen, specifically comprises:
S11, size according to described area ratio and default viewing area, calculate the size of the actual area that described animation shows in described second visibility region; Described viewing area is the region that described animation shows in described first visibility region;
S12, apex coordinate according to described area ratio and default described viewing area, calculate the apex coordinate of described actual area;
S13, according to the size of described actual area and apex coordinate, obtain the actual area that described animation shows on described current screen.
Further, before step S11, also comprise:
Size and the apex coordinate of described animation viewing area in described first visibility region are set.
It should be noted that, user, when making PowerPoint or courseware, arranges the viewing area of animation in the visibility region of default screen.When user demonstrates on current screen, due to the change of screen resolution, on screen, visibility region there occurs change.In order to make the relative position of the viewing area of animation in visibility region remain unchanged, according to the lenth ratio of two visibility regions and width ratio, size and the apex coordinate of the actual area that animation shows on current screen need be calculated.Wherein, apex coordinate can be the center point coordinate of any one apex coordinate in actual area four summits or actual area.
Suppose that the length of the viewing area of animation in default screen is DL, width is DB, then, as shown in Figure 3, according to lenth ratio BL and width ratio BB, the length c calculating the actual area 6 that animation shows on current screen is EL, and width d is EB, wherein, EL=DL*BL, EB=DB*BB.In default screen, with the top left corner apex of the first visibility region for initial point sets up rectangular coordinate system, suppose that the horizontal ordinate of the top left corner apex of viewing area is DX, ordinate is DY.In current screen, as shown in Figure 3, with the top left corner apex O of the second visibility region 5 for initial point sets up rectangular coordinate system, the horizontal ordinate calculating the top left corner apex A of the actual area 6 shown on current screen is EX, and ordinate is EY, wherein, EX=DX*BL, EY=DY*BB.
Further, the distance on the described actual area of described calculating and the every bar border of described current screen, obtains the border nearest with described actual area, specifically comprises:
According to the size of described second visibility region, and the size of described actual area and apex coordinate, calculate the distance on every bar border of the second visibility region on described actual area and described current screen;
Obtain the border nearest with described actual area.
It should be noted that, after the actual area that acquisition animation shows on current screen, calculate the distance with four edges circle of the visibility region of current screen according to this actual area, thus obtain nearest border, fly into from this border or fly out animation.
As shown in Figure 3, the second visibility region 5 of current screen has OB border, BC border, CD border and OD border.According to the length VL of the second visibility region 5, width VB, the length EL of actual area 6, width EB, and the horizontal ordinate of actual area 6 top left corner apex A is EX, and ordinate is EY, calculates the distance of four edges circle of actual area 6 and the second visibility region 5.Wherein, actual area 6 is d1=EX with the distance on OB border, and being d2=EY with the distance on OD border, is d3=VL-EX-EL with the distance on CD border, is d4=VB-EY-EB with the distance on BC border.In d1, d2, d3 and d4, if d1 is minimum, then animation flies into from OB boundary or flies out; If d2 is minimum, then animation flies into from OD boundary or flies out; If d3 is minimum, then animation flies into from CD boundary or flies out; If d4 is minimum, then animation flies into from BC boundary or flies out.
The embodiment of the present invention also provides a kind of method realizing animation effect, comprising:
S301, the resolution of default screen is set, obtains the size of the first visibility region in described default screen; Described visibility region is demonstrate the maximum region of described animation; The size in described region comprises length and the width in region;
S302, the size that the viewing area of animation in described first visibility region is set and apex coordinate;
The resolution of S303, acquisition current screen, according to the resolution of current screen, obtains the size of the second visibility region on current screen;
S304, calculate the area ratio of described first visibility region and described second visibility region; Described area ratio comprises lenth ratio and the width ratio in region;
S305, size according to described area ratio and described viewing area, calculate the size of the actual area that animation shows in described second visibility region;
S306, apex coordinate according to described area ratio and described viewing area, calculate the apex coordinate of described actual area;
S307, size according to described second visibility region, and the size of described actual area and apex coordinate, calculate the border that the second visibility region every bar border middle distance actual area is nearest;
S308, animation is made to fly into actual area display from nearest boundary, or, make animation fly out boundary nearest from actual area and disappear.
User is when making PowerPoint or courseware, and arrange a certain object, as picture, word etc., for intelligence flies into the pattern of animation, system is then for its interpolation flies into animation effect.When PowerPoint or courseware, the animation position that system is arranged on screen according to user, flies into the animation position display arranged automatically from different directions by animation.
Correspondingly, the embodiment of the present invention also provides a kind of system realizing animation effect.
See Fig. 4, be a kind of system realizing animation effect that the embodiment of the present invention provides, comprise:
Region acquisition module 1, for obtaining the actual area that animation shows on current screen;
Distance calculation module 2, for calculating the distance on described actual area and the every bar border of described current screen, obtains the border nearest with described actual area;
Track arranges module 3, for arranging the movement locus of described animation according to described nearest border and described actual area; And,
Animation effect module 4, for the described animation that flies into according to described movement locus or fly out.
Further, the described system realizing animation effect also comprises:
Resolution acquisition module, for obtaining the resolution of described current screen;
Second visibility region acquisition module, for the resolution according to described current screen, obtains the size of the second visibility region on described current screen; Described visibility region is demonstrate the maximum region of described animation; The size in described region comprises length and the width in region; And,
Ratio calculation module, for calculating the area ratio of the first default visibility region and described second visibility region; Described area ratio comprises lenth ratio and the width ratio in region.
Further, the described system realizing animation effect also comprises:
Resolution arranges module, for arranging the resolution of default screen; And,
First visibility region acquisition module, for the resolution according to described default screen, obtains the size of the first visibility region in described default screen.
Further, as shown in Figure 5, described region acquisition module 1 specifically comprises:
Actual area computing unit 11, for the size according to described area ratio and default viewing area, calculates the size of the actual area that described animation shows in described second visibility region; Described viewing area is the region that described animation shows in described first visibility region;
Coordinate calculating unit 12, for the apex coordinate according to described area ratio and default described viewing area, calculates the apex coordinate of described actual area; And,
Viewing area acquiring unit 13, for according to the size of described actual area and apex coordinate, obtains the actual area that described animation shows on described current screen.
Further, described region acquisition module 1 also comprises:
Viewing area setting unit, for arranging size and the apex coordinate of described animation viewing area in described first visibility region.
Further, described distance calculation module specifically comprises:
Metrics calculation unit, for the size according to described second visibility region, and the size of described actual area and apex coordinate, calculate the distance on every bar border of the second visibility region on described actual area and described current screen; And,
Border acquiring unit, for obtaining the border nearest with described actual area.
The method and system of animation effect that what the embodiment of the present invention provided realize, the region of the animation display that can arrange on screen according to user, obtain the screen border that distance animation viewing area is nearest, thus make animation automatically fly into from this screen border or fly out, realize animation effect, easy to use, swift to operate.
And, when different screen is demonstrated, the size of viewing area can be drawn according to the resolution automatic regulation moving of screen, and then according to the position of animation viewing area, the movement locus of auto Select Animated, realizes animation effect.
The above is the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications are also considered as protection scope of the present invention.
Claims (8)
1. realize a method for animation effect, it is characterized in that, comprising:
Obtain the actual area that animation shows on current screen;
Calculate the distance on described actual area and the every bar border of described current screen, obtain the border nearest with described actual area;
According to described nearest border and described actual area, obtain the movement locus of described animation;
Fly into according to described movement locus or fly out described animation.
2. realize the method for animation effect as claimed in claim 1, it is characterized in that, before the actual area that described acquisition animation shows on current screen, also comprise:
Obtain the resolution of described current screen;
According to the resolution of described current screen, obtain the size of the second visibility region on described current screen; Described visibility region is demonstrate the maximum region of described animation; The size in described region comprises length and the width in region;
Calculate the area ratio of the first visibility region and described second visibility region preset; Described area ratio comprises lenth ratio and the width ratio in region.
3. realize the method for animation effect as claimed in claim 2, it is characterized in that, the actual area that described acquisition animation shows on current screen, specifically comprise:
According to the size of described area ratio with the viewing area of presetting, calculate the size of the actual area that described animation shows in described second visibility region; Described viewing area is the region that described animation shows in described first visibility region;
According to the apex coordinate of described area ratio with the described viewing area of presetting, calculate the apex coordinate of described actual area;
According to size and the apex coordinate of described actual area, obtain the actual area that described animation shows on described current screen.
4. realize the method for animation effect as claimed in claim 3, it is characterized in that, the distance on the described actual area of described calculating and the every bar border of described current screen, obtain the border nearest with described actual area, specifically comprise:
According to the size of described second visibility region, and the size of described actual area and apex coordinate, calculate the distance on every bar border of the second visibility region on described actual area and described current screen;
Obtain the border nearest with described actual area.
5. realize a system for animation effect, it is characterized in that, comprising:
Region acquisition module, for obtaining the actual area that animation shows on current screen;
Distance calculation module, for calculating the distance on described actual area and the every bar border of described current screen, obtains the border nearest with described actual area;
Track arranges module, for arranging the movement locus of described animation according to described nearest border and described actual area; And,
Animation effect module, for the described animation that flies into according to described movement locus or fly out.
6. realize the system of animation effect as claimed in claim 1, it is characterized in that, the described system realizing animation effect also comprises:
Resolution acquisition module, for obtaining the resolution of described current screen;
Second visibility region acquisition module, for the resolution according to described current screen, obtains the size of the second visibility region on described current screen; Described visibility region is demonstrate the maximum region of described animation; The size in described region comprises length and the width in region; And,
Ratio calculation module, for calculating the area ratio of the first default visibility region and described second visibility region; Described area ratio comprises lenth ratio and the width ratio in region.
7. realize the system of animation effect as claimed in claim 6, it is characterized in that, described region acquisition module specifically comprises:
Actual area computing unit, for the size according to described area ratio and default viewing area, calculates the size of the actual area that described animation shows in described second visibility region; Described viewing area is the region that described animation shows in described first visibility region;
Coordinate calculating unit, for the apex coordinate according to described area ratio and default described viewing area, calculates the apex coordinate of described actual area; And,
Viewing area acquiring unit, for according to the size of described actual area and apex coordinate, obtains the actual area that described animation shows on described current screen.
8. realize the system of animation effect as claimed in claim 7, it is characterized in that, described distance calculation module specifically comprises:
Metrics calculation unit, for the size according to described second visibility region, and the size of described actual area and apex coordinate, calculate the distance on every bar border of the second visibility region on described actual area and described current screen; And,
Border acquiring unit, for obtaining the border nearest with described actual area.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410857312.4A CN104461443A (en) | 2014-12-31 | 2014-12-31 | Method and system for achieving animation effect |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410857312.4A CN104461443A (en) | 2014-12-31 | 2014-12-31 | Method and system for achieving animation effect |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104461443A true CN104461443A (en) | 2015-03-25 |
Family
ID=52907565
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410857312.4A Pending CN104461443A (en) | 2014-12-31 | 2014-12-31 | Method and system for achieving animation effect |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104461443A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110517341A (en) * | 2018-05-21 | 2019-11-29 | 北京京东尚科信息技术有限公司 | The physics animation effect implementation method and device of view |
CN111506241A (en) * | 2020-05-21 | 2020-08-07 | 网易(杭州)网络有限公司 | Special effect display method and device for live broadcast room, electronic equipment and computer medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6512522B1 (en) * | 1999-04-15 | 2003-01-28 | Avid Technology, Inc. | Animation of three-dimensional characters along a path for motion video sequences |
CN101009022A (en) * | 2007-01-24 | 2007-08-01 | 杭州电子科技大学 | Control method of motion trace of animation based on chaos theory |
CN103021007A (en) * | 2012-09-04 | 2013-04-03 | 北京小米科技有限责任公司 | Animation playing method, device and equipment |
-
2014
- 2014-12-31 CN CN201410857312.4A patent/CN104461443A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6512522B1 (en) * | 1999-04-15 | 2003-01-28 | Avid Technology, Inc. | Animation of three-dimensional characters along a path for motion video sequences |
CN101009022A (en) * | 2007-01-24 | 2007-08-01 | 杭州电子科技大学 | Control method of motion trace of animation based on chaos theory |
CN103021007A (en) * | 2012-09-04 | 2013-04-03 | 北京小米科技有限责任公司 | Animation playing method, device and equipment |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110517341A (en) * | 2018-05-21 | 2019-11-29 | 北京京东尚科信息技术有限公司 | The physics animation effect implementation method and device of view |
CN111506241A (en) * | 2020-05-21 | 2020-08-07 | 网易(杭州)网络有限公司 | Special effect display method and device for live broadcast room, electronic equipment and computer medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107369197B (en) | Picture processing method, device and equipment | |
CN104035664A (en) | Display method and device for user interface of application program | |
CN105373291A (en) | Interface switching method and device | |
EP3147816A3 (en) | Mobile terminal and method of controlling the same | |
CN104123742A (en) | Method and player for translating static cartoon picture into two dimensional animation | |
WO2016167213A1 (en) | Program for improving operability of user input, electronic device, and method | |
CN102339141B (en) | Mobile terminal and display control method thereof | |
CN103021007B (en) | A kind of method that animation is play and device | |
WO2012176926A1 (en) | Information processing device, information processing system, server, information processing method, and computer program | |
CN111870956B (en) | Method and device for split screen display of game sightseeing, electronic equipment and storage medium | |
EP2613552A3 (en) | Method for moving image reproduction processing and mobile information terminal using the method | |
CN103164121A (en) | Method and device for terminal software interface display | |
CN107357501B (en) | Desktop wallpaper updating method and device and terminal | |
WO2022194003A1 (en) | Screen capture method and apparatus, electronic device, and readable storage medium | |
CN104461312A (en) | Display control method and electronic equipment | |
WO2017133475A1 (en) | Multimedia data playing method, apparatus and device, and interface rendering method, apparatus and device | |
CN104536650A (en) | Parallax page turning man-machine interaction method based on IOS | |
CN104423779A (en) | Interactive display implementation method and device | |
CN110007838B (en) | Processing method, device and equipment for erasing control | |
CN104461443A (en) | Method and system for achieving animation effect | |
CN105094586A (en) | Display window adjustment method and electronic device | |
US10645144B2 (en) | Computer-implemented method for controlling a remote device with a local device | |
KR101709529B1 (en) | Apparatus and method for controlling image screen using portable terminal | |
CN101635807A (en) | Smooth scrolling method of characters of set-top box according to pixels | |
JP2020014075A (en) | Image projection system, image projection method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
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: 20150325 |