Task 063: Flame animation in 2D


Your task is to implement a 2D flame animation using your own continuous noise function.


One possible approach was explained in the lecture, examples are on this page, slideshow in PDF is dealing with noise functions.
You can use set of popular hash functions from the RandomStatic class to help implementing deterministic noise functions..

Interface ITimeDependent

Current time (in seconds, type double) is set using this interface. Any reasonable object in ray-tracing data set can implement this interface, thereby it announces dependency on time (i.e. "it can be animated"). Attention: because frame rendering is usually parallelized in multiple threads, you have to abide the re-entrancy rules of your code. Especially animated object instances must not be shared, therefore the time-dependent objects (interface ITimeDependent) must be able to clone itself (interface IClonable - see the AnimatedRayScene.Clone() function). The idea is to separate all the parts which are actually dependent on time, static parts of a scene need not be cloned (can be shared).

What to change

Modify the class Animation in the AnimationIF.cs source file. Add your noise-function implementation classes into the same source file.
If your IImageFunction needs any additional [shared] data, you can put it into a support data class AnimationData (it can be time-dependent as well).
Please set the default image resolution and time interval to some reasonable values - in the InitializeParams() function (edit your name there as well).

What to hand in

You must send the modified file AnimationIF.cs. Please declare the valid range of resolution and time interval settings.

Production of the video file

Instruction page for video encoding. Windows executable of ffmpeg can be downloaded from this page. Sample batch file for AVI video encoding from sequence of disk images is in the repository (../062animation/encode.bat).

Animations sample animations (pilot implementation - vertical takeof over an infinite checkerboard)


Hand in the assignment until: 29. 4. 2018


Masis: 25 points (flame animated in time)


Visual Studio project: 063animation.

Source file

Modify and hand in the source file: AnimationIF.cs
Edit your name in the InitializeParams() function!

Copyright (C) 2013-2018 J.Pelikán, last change: 2018-04-10 23:51:52 +0200 (Tue, 10 Apr 2018)