# Midterm exam

## Information (from website)

The midterm exam will be held on March 8 at 16:30 (after the Homework 1 feedback) and it will be a **1-hour exam** consisting of **9 open questions**.
However, **you will answer only 6 questions**, which you can choose.
That means 10 minutes per question, so try to manage your time.
There will be one question per lesson (1.1 to 4.2) plus one question about Homework 1.
That means that it's not a problem if you're a bit behind the course schedule, or if you haven't fully understood some topics yet.

You are free to check the course materials (videos/handouts/assignments) and any other materials you can find (eg books or the internet).
Just please don't communicate with others.
We are asking for your honesty to help us push back against invasive methods in remote education (eg online proctoring).

The exam will be a Markdown (plain text) file that will be published at 16:25 [here](https://3d.bk.tudelft.nl/courses/backup/geo1004/2021/data/midtermexam.md).
You should download it to your computer, add your answers by directly editing the file, and upload it through a Dropbox request [here](
https://www.dropbox.com/request/T4clcJVsvedwp171BS5c).
Exams will be accepted until 17:35, so please avoid problems by uploading it at 17:30 at the latest.
If you're worried about the time, maybe set an alarm for 17:30 on your phone?
We will also post a message on Discord at 17:30.

Markdown files look like plain text with minimal formatting, like [this](https://3d.bk.tudelft.nl/courses/backup/geo1004/2022/data/index.md).
You can edit Markdown files with any text editor, including whatever you use for Python or C++ programming.
Some possibilities: Sublime Text (my preferred option), Atom, VS Code, Notepad++.
If you really want to answer your questions in another software, you are allowed to upload a PDF file instead.

If you have any questions during the exam, you can send Ken (kenohori#5365) a DM on Discord.
[Email](mailto:k.ohori@tudelft.nl) is also fine.

If something goes seriously wrong (eg sudden illness or internet going down), do not worry.
Just contact Ken as soon as you can for alternative arrangements (most likely an oral exam through a video call).

## Questions

### 1.1. How would you represent a temperature field using polyhedra, voxels, and a 3D Voronoi diagram? For each of the three, mention: (i) the data structure you would use, and (ii) where the temperature would be stored in this data structure.

### 1.2. Describe in your own words the difference between a 1-manifold and a 2-manifold. Give a practical example of each and where it is used.

### 2.1. Using also the knowledge you gained from Homework 1, explain the changes in your code that would be required to use a sparse voxel representation in your assignment.

### 2.2. In Section 1.3 of Handout 2.2, a building reconstruction method is described. Could the mesh shown in [this image](https://3d.bk.tudelft.nl/courses/backup/geo1004/2021/data/building.png) be an output of this method? If not, explain why.

### 3.1. Imagine you have a set of 10 points in the 3D Euclidean space, all lying inside a cube; thus you have 10 points + 8 points (corners of the cube). For further processsing, you want to create the Delaunay tetrahedralisation of the 18 points (not the constrained/conforming, simply of the DT). How many tetrahedra will the DT contain?

### 3.2. You obtained from your municipality a building footprint (see below, it has 1 interior boundary) and you extrude it to a height of 16m to create a 3D model. Characterise the 3D shape you obtain, using the ISO19107-terminology. What type? how many surfaces? Their orientation? Is it valid?

              ┌──────────────────────────────────────────────────────┐
              │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
              │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
              │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
              │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
              │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
┌─────────────┼───────────┐■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
│■■■■■■■■■■■■■│           │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
│■■■■■■■■■■■■■│           │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
│■■■■■■■■■■■■■│           │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
│■■■■■■■■■■■■■│           └────┐■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
│■■■■■■■■■■■■■│                │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
│■■■■■■■■■■■■■│                │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
│■■■■■■■■■■■■■│                │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
│■■■■■■■■■■■■■│                │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
│■■■■■■■■■■■■■└────────────────┘■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
└───┐■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
    │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
    │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
    │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
    │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
    │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
    │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
    │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
    │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│
    │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■┌────────────────────────────────┘
    │■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■│                                 
    └───────────────────────────────┘                                 



### 4.1. In the handout, it is stated that a given CityJSON file will be on average 6X compacter than an equivalent CityGML file. Give 2 reasons and explain them.

### 4.2. Imagine the voxel CSG engine briefly mentioned in Section 1.4 of the handout. What do you think should be stored in the leaf nodes in the CSG tree? Justify your choice. Based on this, how would you implement Boolean set operations?

### Hw1. Using voxels made it possible to compute the volume of the faculty buildings even when the input data had some validity problems. Explain in your own words why is possible and whether there are any limits to voxelisation-based "fixing".
