Browse Source

Con 1813 markdown chaikin raid for java piscine (#2177)

* docs(jaikin): add the subject of  the raid jaikin

* docs(Jaikin): correct jainkin subject
 docs(jaikin): add jaikin audit

* docs(jaikin): remove additional files

* docs: move move jaikin raid java/piscine/raids -> java/raids

* docs: replace unreachable resource and fix the project name

* docs: fix audit format

---------

Co-authored-by: zainbdnaya <diyanazizo13@gmail.com>
pull/2107/merge
zanninso 2 months ago committed by GitHub
parent
commit
24c7f9ed33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 37
      subjects/java/raids/Jaikin/README.md
  2. 53
      subjects/java/raids/Jaikin/audit/README.md

37
subjects/java/raids/Jaikin/README.md

@ -0,0 +1,37 @@
## Jaikin
### Objective
The goal of this project is to implement Chaikin's algorithm and create a step-by-step animation of the process using a canvas.
### Instructions
Follow these instructions to create the Chaikin's algorithm step-by-step animation:
1. Create a canvas where the user can draw one or more points. Each point should be represented by a small circle.
2. Receive input from the mouse, allowing the user to place control points for Chaikin's algorithm using the left button.
3. Display the selected points on the canvas as small circles surrounding each point.
4. If the canvas has control points drawn on it, pressing the `Enter` key should initiate the animation. The animation should cycle through the steps of Chaikin's algorithm, proceeding until it reaches the 7th step. After completing the 7th step, the animation should restart.
5. If the user presses `Enter` before any points have been drawn, nothing should happen. However, the user should still be able to draw points, and an optional message may be displayed to remind the user to draw points.
6. If the canvas has only one control point, the program must display that point without cycling through the steps.
7. If the canvas has only two control points, the program must draw a straight line between those two points.
8. Pressing the `Escape` key should close the window.
### Bonus Features
Optionally, you may implement the following bonus features:
1. Allow the user to clear the screen, enabling them to select new control points.
2. Implement real-time dragging of the control points, so the user can adjust their position interactively.
> Note: You are free to choose any library for handling windows, rendering, keyboard, and mouse events.
For more information on Chaikin's algorithm, refer to [this resource](https://www.cs.unc.edu/~dm/UNC/COMP258/LECTURES/Chaikins-Algorithm.pdf). You can also view an example of how the application should work in this [video](https://youtu.be/PbB2eKnA2QI). Remember, the usage of Chaikin's algorithm is mandatory for this implementation.

53
subjects/java/raids/Jaikin/audit/README.md

@ -0,0 +1,53 @@
#### Functional
##### Execute the program using the command `Java Main`.
###### Does the program compile and run without any warnings?
##### Set one or more control points by left-clicking on the canvas.
###### Does the program allow you to mark these control points?
##### Check if the program draws a small circle around the control points for identification purposes.
###### Does the program draw a small circle around the control points?
##### Set three or more control points on the canvas and press `Enter`.
###### Does Chaikin's algorithm start the animation?
##### To exit the program, press the `Escape` key.
###### Does the program exit without any errors?
##### Start the program and set only one control point by left-clicking on the canvas. Then, press `Enter`.
###### Is only the selected control point visible, and nothing else changes?
##### Restart the program, set two control points by left-clicking on the canvas, and press `Enter`.
###### Is only a straight line drawn between the two control points?
##### Restart the program, set three or more control points by left-clicking on the canvas, and press `Enter`.
###### Does the animation complete 7 steps before restarting?
##### Restart the program, set three or more control points by left-clicking on the canvas, and press `Enter`. Then, press `Escape` to exit the program.
###### Does the program exit without any errors?
##### Start the program and press `Enter` without selecting any points.
###### Does the program continue without any errors?
##### After pressing `Enter` without selecting points, try placing points without needing to restart the program.
###### Does the program allow placement of points without needing to restart?
#### Bonus Features
###### +Is a message displayed when you press `Enter` without drawing any points, reminding you to add points?
###### +Can you clear the screen and add new control points without restarting the program?
###### +Is it possible to drag the control points in real-time and observe the generation of a new curve?
Loading…
Cancel
Save