Devise and implement an animation that is drawn using via horizontal and vertical lines. The animations must be computed frame by frame ("off-line rendering"), which are later combined into an actual movie, e.g. via the ffmpeg application.
The template application 110animation from the repository grcis serves as the basis of this project. It is a simple application that repeatedly runs your method Animation.DrawFrame() and writes the results to individual PNG files. The calculation is done in a separate thread so that it can, if necessary, be interrupted via the Stop button.
For instance, move or change a shape in the plane. A 3D effect you would have to handle yourself, e.g. by drawing back-to-front (i.e. via the painter's algorithm). There are no limits on your imagination, you only have to draw the animations frames, finish your program and only use the class Canvas. This means that apart from the movie generation/encoding tools, no other tools may be used.
The images must be generated via the Canvas class, which has the following API (identical to those in task 082):
The method Animation.DrawFrame() is handed data on the current time (see the reference implementation) and a reference to the Drawing Canvas object. The method also has access to data that defines the image size.
You can not assume anything about the order in which individual frames of the animation are rendered. Individual threads can draw images in any order. At the beginning of calculating the animation (or before each picture) your method Animation.InitAnimation() is executed: there, you can put any initialisation of global shared data, and suchlike. If you need to perform a comprehensive calculation (physical / mechanical simulation, etc.), you must also run InitAnimation().
Initialisation of parameters: in order to have all relevant code nicely grouped in a single location, you can initialise your application parameters in the function InitParams(). It is called during application start-up.
See e.g. this manual. ffmpeg binaries for Windows can be downloaded from here. The generated video can be uploaded to YouTube: send us the link to the video once you are done with that! And do not forget to attach the source file Animation.cs.
Hand in the assignment until: 7. 1. 2018
Basic: 5 to 20 points, depending on difficulty and attractivity of the solution.
Bonus: for exceptional solutions
Visual Studio project: 110animation
Modify and hand in the source file: Animation.cs
As a comment in the first line, please include your name!
Do not forget to send a link to your video!
Please vote in the contest before xx. 1. 2017 (date to be announced).
Copyright (C) 2015-2016 J. Pelikán & A. Wilkie, last change: 2020-12-08 00:57:30 +0100 (Tue, 08 Dec 2020)