From 8a8c30753751c9139e7515fc32b453acb425af1c Mon Sep 17 00:00:00 2001 From: miguel Date: Thu, 5 May 2022 16:46:32 +0100 Subject: [PATCH] updating the chaikins raid --- subjects/chaikin/README.md | 19 +++++++++++++++---- subjects/chaikin/audit/README.md | 32 ++++++++++++++++++++++---------- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/subjects/chaikin/README.md b/subjects/chaikin/README.md index b73d4ab1..3a03cefc 100644 --- a/subjects/chaikin/README.md +++ b/subjects/chaikin/README.md @@ -4,19 +4,30 @@ Implement the [Chaikin's](http://graphics.cs.ucdavis.edu/education/CAGDNotes/Chaikins-Algorithm/Chaikins-Algorithm.html) algorithm step by step in an animation. -The objective is to create a canvas where the user will draw 1 or more points, and then the screen will play an animation of each step to get to the final result of a curve drawn using the `Chaikin's` algorithm. You can see [here](https://youtu.be/PbB2eKnA2QI) a demo of how the application should work. +The objective is to create a canvas where the user will be able to draw 1 or more points on it, and then the screen will play an animation of each step that is taken to obtain the final result of a drawn curve. The animation must play for 7 steps and then it must restart. + +It is mandatory to use the `Chaikin's` algorithm. + +You can see how the application should work [here](https://youtu.be/PbB2eKnA2QI). - Functionality: - - The canvas should receive input from the mouse: the user of the program should be able to use the left button to select the control point for the `Chaikin's` algorithm + - The canvas should receive input from the mouse: + - The user of the program should be able to use the left button to select the control point for the `Chaikin's` algorithm. + + - The selected points must be visible in the canvas, so you will have to draw a small circle surrounding the selected points. + + - After pressing `Enter` the program should start the animation of the steps until reaching the 7th step of the `Chaikin's` algorithm. After the 7th step the program must restart. + + - If the canvas only has only one control point, the program must only present that point and do no change at all. - - After pressing `Return` should start the animation of the steps until reaching the 7th step of the `Chaikin's` algorithm. + - If the canvas has only two control points, the program must draw a straight line. - Pressing `Escape` should quit the window. ### Note -You are free to use any library for creating and handling window creation, rendering, keyboard and mouse events. +You are free to use any library to create and handle windows, rendering, keyboard and mouse events. ### Bonus diff --git a/subjects/chaikin/audit/README.md b/subjects/chaikin/audit/README.md index 7a84a91d..a6e84ba5 100644 --- a/subjects/chaikin/audit/README.md +++ b/subjects/chaikin/audit/README.md @@ -1,29 +1,41 @@ #### Functional -##### Run the program using `cargo run` +##### Run the program using `cargo run`. ###### Does it compile and run without any warnings? -##### Left click in three different positions in the canvas +##### Left click in the canvas to set one or more control points. -###### Does the program draw a small circle surrounding the area where you clicked? +###### Does the program allow you to mark these control points? -##### Press `Return` +###### Can You confirm that the program draws a small circle around the control points, in order to identify them? + +##### Left click in the canvas to set one or more control points and press `Enter`. ###### Does the animation of the Chaikin's algorithm starts? -###### Does the animations the animation completes 7 steps before starting again? +##### Left click in the canvas to set just one control point and press `Enter`. + +###### Can you confirm that only the control point is shown and nothing changes? + +##### Left click in the canvas to set just two control points and press `Enter`. + +###### Can you confirm that only a straight line was drawn? + +##### Left click in the canvas to set one or more control points and press `Enter`. + +###### Does the animation complete 7 steps before starting again? -##### Press `Escape` +##### Left click in the canvas to set one or more control points and press `Enter` then press `Escape`. ###### Does the program exit without errors? -##### Run the program again and this time press `Return` without selecting any points +##### Press `Enter` without selecting any points. -###### Is the program still running? +###### Does the program returns an error? ##### Bonus -###### +Are you able to clear the screen and add new control points without killing and relaunching the program? +###### +Is it possible to clear the screen and add new control points without killing and relaunching the program? -###### +Are you able to drag the control points in real time and get a new curve? +###### +Is it possible to drag the control points in real time and get a new curve?