Skip to content
Snippets Groups Projects
Commit 88dac30d authored by KELES CEMRENUR's avatar KELES CEMRENUR
Browse files

Update README.md

parent 790b4a84
Branches
No related merge requests found
......@@ -3,8 +3,48 @@
- .gitignore
# Treemap
# Tree Map Generator
The goal of this project is to implement a program that generates **tree maps**, a visual representation where data is divided into regions proportional to their values. This involves processing input data, applying recursive splitting strategies, and rendering the result as a PDF image.
## Final Result
Here is an example of the final tree map generated by the program (scaled to fit the display):
<img src="images/example.png" alt="Final Tree Map" width="300px">
---
## Project Structure
The program follows a pipeline structure:
1. **Input Data**: Parses input in various formats (plain text, optional SQL database, etc.).
2. **Data Splitting**: Groups data hierarchically using recursive splitting strategies.
3. **Placement**: Assigns regions to data values within a square.
4. **Rendering**: Produces a visual representation in PDF format.
The project includes:
- A main program, `treemap.c`, that orchestrates the pipeline.
- A test suite, `test-treemap.c`, implemented with the Check library.
- Utility scripts for generating PDF files from vector output.
---
## Difficulties Encountered
### 1. Configuring `vector2tex` and `pdflatex`
The provided script `vector2tex.sh` converts vector output into LaTeX code for rendering. Challenges included:
- Ensuring that the script had executable permissions (`chmod +x vector2tex.sh`).
- Handling errors in LaTeX compilation with `pdflatex`, such as missing or malformed `.tex` files.
### 2. `<check.h>` Not Found
The **Check** library, used for the test suite, was not initially recognized by the compiler. This required:
- Installing the library with Homebrew: `brew install check`.
- Adding the appropriate include (`-I`) and library (`-L`) paths:
```bash
gcc -I/opt/homebrew/include -L/opt/homebrew/lib -lcheck test-treemap.c -o test-treemap
``
## Integrate with your tools
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment