Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions subjects/chaikin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ You can see how the application should work [here](https://youtu.be/PbB2eKnA2QI)

> You are free to use any library to create and handle windows, rendering, keyboard and mouse events.

### Unit Tests

You must implement unit tests to verify your implementation of the Chaikin algorithm. Your tests should:

- Verify the coordinates of the new points generated after one iteration of the algorithm (cutting the corners at 25% and 75%).
- Verify that the number of points increases correctly per iteration (e.g., for an open curve, $N$ points should result in $2N - 2$ points in the next step).
- Ensure the algorithm handles edge cases, such as an input list of 0, 1, or 2 points, without crashing.

### Bonus

- Make it possible to clear the screen, so that the user can select new control points.
Expand Down
12 changes: 12 additions & 0 deletions subjects/chaikin/audit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@

###### After you pressed `Enter` before selecting points, is it possible to place points without needing to kill the program?

##### Unit Tests

##### Run the command `cargo test`.

###### Do all tests pass without errors?

###### Is there a test that verifies the math of a single Chaikin iteration (calculating the 1/4 and 3/4 points)?

###### Is there a test checking that the point count grows correctly according to the algorithm?

###### Are there tests ensuring the algorithm handles empty or single-point inputs safely?

##### Bonus

###### +When you pressed `Enter` without drawing any points, was a message displayed to inform you that you forgot to draw any points?
Expand Down
Loading