|
|
Numerical Geometry Wiki
|
|
|
=======================
|
|
|
|
|
|
## Your project
|
|
|
|
|
|
* [Project description](project-description)
|
|
|
* [List of algorithms](list-of-algorithms)
|
|
|
|
|
|
## Draw-tools
|
|
|
|
|
|
* [Compiling and running](Compiling and running)
|
|
|
* [Doing animations in C with `draw_tools`](Doing-animations-in-C-with-`draw_tools`)
|
|
|
|
|
|
## FAQ
|
|
|
|
|
|
**What is the archive directory ?**
|
|
|
|
|
|
It's a directory containing previous assignments for this course.
|
|
|
We decided to change the project completely since 2018, so there
|
|
|
is not much to see there for students, except if you are really
|
|
|
interested in doing your own computer graphics program using modern
|
|
|
OpenGL shaders.
|
|
|
|
|
|
|
|
|
**Why C ?**
|
|
|
|
|
|
The first question that you might ask is:
|
|
|
|
|
|
> Why is the Numerical Geometry project in C and not in Python, Java,
|
|
|
C++, Rust or Julia ?
|
|
|
|
|
|
You will realize that C is very transparent about memory allocation.
|
|
|
Every non-constant chunk of memory that you use must be allocated on
|
|
|
the heap via a `malloc()` call. Therefore, you will realize precisely
|
|
|
how much memory is consumed by your algorithm, and you will naturally
|
|
|
avoid unnecessary allocations. In addition, in 2D, it is very easy to
|
|
|
allocate the right amount of memory from the very beginning. Take a
|
|
|
Delaunay Triangulation algorithm for example. If you have *n* points,
|
|
|
you are going to end up with *2\*(n-2)* triangles. You can allocate
|
|
|
all the space needed right from the beginning. That transparency and
|
|
|
simplicity give C a clear advantage over languages with fancy (but
|
|
|
costly) features. Finally, a well-realized C program will be as fast
|
|
|
as any C++ or Rust.
|
|
|
|
|
|
**What is draw_tools ?**
|
|
|
|
|
|
It is a small and simple OpenGL library created by your assistants to
|
|
|
help you draw lines, text, and simple markers (little shapes to 'mark'
|
|
|
the position of a point). All functions are defined and briefly
|
|
|
explained in `draw_tools.h`. The most useful ones are described in the
|
|
|
[tutorial](Doing-animations-in-C-with-`draw_tools`). We figured it
|
|
|
would be easier than using libraries like CSFML or BGFX, and lighter
|
|
|
than requiring the SDL. |
|
|
\ No newline at end of file |
|
|
moved to https://git.immc.ucl.ac.be/marotc/ngp/wikis/home |
|
|
\ No newline at end of file |