diff options
author | pacien | 2017-12-28 18:20:44 +0100 |
---|---|---|
committer | pacien | 2017-12-28 18:20:44 +0100 |
commit | b1eec2f9af2412b29719bc898a96d60379501b42 (patch) | |
tree | 2aa5862946fb8733bf322981ee7b7036f2d889c0 /doc | |
parent | 4ec302ab3905dca5155c3aa17099c98652ecd443 (diff) | |
download | morpher-b1eec2f9af2412b29719bc898a96d60379501b42.tar.gz |
Partial report writing
Signed-off-by: pacien <pacien.trangirard@pacien.net>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/project-report.md | 81 |
1 files changed, 78 insertions, 3 deletions
diff --git a/doc/project-report.md b/doc/project-report.md index e0339d6..c798107 100644 --- a/doc/project-report.md +++ b/doc/project-report.md | |||
@@ -1,30 +1,105 @@ | |||
1 | --- | 1 | --- |
2 | title: "Morphing in C" | 2 | title: "BSc IN S5 / Advanced C programming / Morphing" |
3 | author: [Pacien TRAN-GIRARD, Adam NAILI] | 3 | author: [Pacien TRAN-GIRARD, Adam NAILI] |
4 | date: 2017-11-09 | 4 | date: 2017-12-28 |
5 | ... | 5 | ... |
6 | 6 | ||
7 | # Project description | 7 | # Project description |
8 | 8 | ||
9 | The goal of this project is to develop a graphical application capable of generating morphing animations given two | ||
10 | images and constraint parameters. | ||
11 | |||
12 | Being part of the "Advanced C programming" course at [UPEM](http://www.u-pem.fr/), this application has been entirely | ||
13 | written in C and makes use of the C standard library and the university's graphical application wrapper library. | ||
14 | |||
9 | ## Licensing | 15 | ## Licensing |
10 | 16 | ||
17 | This work is licensed under the terms of the | ||
18 | [Creative Commons BY-NC-SA 4.0 license](https://creativecommons.org/licenses/by-nc-sa/4.0/) by its authors: | ||
19 | Pacien TRAN-GIRARD and Adam NAILI. | ||
20 | |||
21 | Build-time and run-time dependencies of this program are licensed under their own respective terms. | ||
22 | |||
11 | ## Credits | 23 | ## Credits |
12 | 24 | ||
25 | This report has been generated using the [Eisvogel template](https://github.com/Wandmalfarbe/pandoc-latex-template), | ||
26 | licensed under the BSD 3-Clause License. | ||
27 | |||
13 | --- | 28 | --- |
14 | 29 | ||
15 | # Compilation and usage | 30 | # Compilation and usage |
16 | 31 | ||
17 | ## Building the project | 32 | ## Building the project |
18 | 33 | ||
34 | The different parts of the project can be built using the make targets listed in `topics/Build.txt`. | ||
35 | |||
36 | Compilation of the program requires gcc (>=6.3), libc (>=2.24) and libMLV (=2.0.2). | ||
37 | |||
38 | Natural Docs (=1.51) and Pandoc are needed to generate the HTML API documentation and the project PDF report | ||
39 | respectively. | ||
40 | |||
41 | The whole build process has been tested and is known to work on Debian 9. | ||
42 | |||
19 | ## Running the program | 43 | ## Running the program |
20 | 44 | ||
45 | The executable binary file resulting from the compilation of the project accepts two arguments: the base and the target | ||
46 | images. Accepted file formats are ICO, CUR, BMP, PNM, XPM, LBM, PCX, GIF, JPEG, PNG, TGA, TIFF, and XV. | ||
47 | |||
48 | The graphical interface of the application let the user define constraint points on the two images, as well as define | ||
49 | parameters such as the number of desired frames and visualise the morphing animation. | ||
50 | |||
51 | The program has been tested on Debian 9. Known bugs in the MLV library may prevent it from running correctly on other | ||
52 | Linux distributions and operating systems. | ||
53 | |||
21 | --- | 54 | --- |
22 | 55 | ||
23 | # Implementation details | 56 | # Implementation details |
24 | 57 | ||
58 | ## Considerations | ||
59 | |||
60 | ### API and documentation | ||
61 | |||
62 | Auxiliary functions have been kept module-private to avoid context pollution in the absence of namespaces. | ||
63 | Exported functions and data types have been prefixed and documented properly. | ||
64 | |||
65 | Natural Docs has been selected as the documentation generator for this projects for its simplicity. | ||
66 | |||
67 | Some MLV library functions have been partly wrapped to ensure the coherence with the internally defined types. | ||
68 | |||
69 | ### Unit testing | ||
70 | |||
71 | _"Sir, the testing?"_, Caroline reminds. | ||
72 | Almost all utility, logic and mathematical functions have been covered by automatic unit tests to reduce the risk of | ||
73 | small-but-yet-critical mistakes and regressions during the development. Graphical unit tests requiring human validation | ||
74 | have also been written in order to test the graphical user interface at the component level. | ||
75 | |||
76 | Assertions have also been used within the module implementations, enforcing pre- and post-conditions inside functions. | ||
77 | |||
25 | ## Modules | 78 | ## Modules |
26 | 79 | ||
80 | The application has been broken down into several sub-modules, each of which responsible for a well defined and | ||
81 | semantically related set of tasks, with little or no coupling between each of those parts. | ||
82 | |||
83 | Following an object-oriented-like paradigm, APIs of said modules are centered around struct data type. | ||
84 | Furthermore, the number of exposed functions has been kept minimal to ensure the containment of the implementations. | ||
85 | |||
86 | ### Common | ||
87 | |||
88 | ### Morpher | ||
89 | |||
90 | ### Painter | ||
91 | |||
92 | ### GUI | ||
93 | |||
27 | ## Additional features | 94 | ## Additional features |
28 | 95 | ||
29 | ## Notes | 96 | --- |
97 | |||
98 | # References | ||
30 | 99 | ||
100 | 1. [MLV Library reference manual](http://www-igm.univ-mlv.fr/~boussica/mlv/api/French/html/index.html), A. Boussicault and M. Zipstein, September 2015 | ||
101 | 1. [Natural Docs 1.x reference manual](https://web.archive.org/web/20170504223714/http://www.naturaldocs.org:80/documenting/reference.html), Greg Valure, May 2017 | ||
102 | 1. [Barycentric coordinate system](https://en.wikipedia.org/w/index.php?title=Barycentric_coordinate_system&oldid=816475141), Wikipedia contributors, December 2017 | ||
103 | 1. [Delaunay triangulation](https://en.wikipedia.org/w/index.php?title=Delaunay_triangulation&oldid=817290072), Wikipedia contributors, December 2017 | ||
104 | 1. [Computer Color is Broken](https://www.youtube.com/watch?v=LKnqECcg6Gw), Minute Physics, March 2015 | ||
105 | 1. [Software Rasterization Algorithms for Filling Triangles](http://www.sunshine2k.de/coding/java/TriangleRasterization/TriangleRasterization.html), Sunshine, May 2012 | ||