WPF simulates QQ logon background animation and wpf logon background animation

Source: Internet
Author: User

WPF simulates QQ logon background animation and wpf logon background animation
Introduction

The reason is simple simulation, because I don't know how the QQ login background animation is implemented. Here, it is simplified through some methods and achieved a similar effect.

 

General idea

First, we regard the background as the array distance of a 4-row and 8-column point. The Y axis is 70. connect points to a triangle. it is displayed in the Blue Circle of the outer layer. Only the section in the green box of the middle layer is displayed. in this way, the points in the outermost layer do not need to be moved, and only the points in the green box can be randomly moved. then, the color and time of the triangle Fill will be randomly colored. After the animation is completed, the color animation will be re-executed to loop.

In terms of implementation, you should note that each vertex corresponds to multiple triangles. When a triangle is generated, you must register it to the vertex and record the index of the triangle vertex set where the vertex is located. when the points change, traverse the registered triangle set, corresponding points in the triangle. also changes.

See the code for specific implementation.

Source code download: QQ ghost page background animation. Zip

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.