https://github.com/pedropark99/jobard-lefer-algorithm
Implementing the Jobard-Lefer algorithm in C, C++ and Rust
https://github.com/pedropark99/jobard-lefer-algorithm
curves flowfield geometry graphics
Last synced: 10 months ago
JSON representation
Implementing the Jobard-Lefer algorithm in C, C++ and Rust
- Host: GitHub
- URL: https://github.com/pedropark99/jobard-lefer-algorithm
- Owner: pedropark99
- Created: 2024-02-25T16:31:25.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-28T10:53:35.000Z (almost 2 years ago)
- Last Synced: 2025-01-26T19:12:06.952Z (12 months ago)
- Topics: curves, flowfield, geometry, graphics
- Language: C
- Homepage: https://pedro-faria.netlify.app/posts/2024/2024-02-19-flow-even/en/
- Size: 11.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Implementing the Jobard and Lefer algorithm
This small project implements the Jobard and Lefer (1997) algorithm
in three different languages (C, C++ and Rust). This algorithm is used for drawing non-overlapping
and evenly-spaced curves in a flow field (also called of a vector field).
The algorithm is described in a scientific paper:
Jobard, Bruno, and Wilfrid Lefer. 1997. “Creating Evenly-Spaced Streamlines of Arbitrary Density.” In Visualization in Scientific Computing ’97, edited by Wilfrid Lefer and Michel Grave, 43–55. Vienna: Springer Vienna.
But you mmight find my article about this algorithm an useful resource as well:
# Build
Both C and C++ projects use CMake to build the project. So, you can build them by running:
```bash
cmake .
make
```
In contrast, the Rust project is built by running `cargo`:
```bash
cargo build
```
# An example of output
Just to clarify the objective of the algorithm,
the two images below demonstrates the effect of the algorithm
in the process of drawing multiple curves in a flow field.
First, an example of curves drawn without the Jobard and Lefer (1997) algorithm:

Now, the same example, but this time, using the Jobard and Lefer (1997) algorithm. You
can see that we get non-overlapping curves that are evenly-spaced between each other:
