forked from root/public
Augusto
3 years ago
2 changed files with 54 additions and 0 deletions
@ -0,0 +1,25 @@ |
|||||||
|
## Chaikin |
||||||
|
|
||||||
|
### Instructions |
||||||
|
|
||||||
|
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 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. |
||||||
|
|
||||||
|
- 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 |
||||||
|
|
||||||
|
- After pressing `Return` should start the animation of the steps until reaching the 7th step of the `Chaikin's` algorithm. |
||||||
|
|
||||||
|
- 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. |
||||||
|
|
||||||
|
### Bonus |
||||||
|
|
||||||
|
- Add the ability to clear the screen and add new control points. |
||||||
|
|
||||||
|
- Make possible to drag the control points in real time. |
@ -0,0 +1,29 @@ |
|||||||
|
#### Functional |
||||||
|
|
||||||
|
##### Run the program using `cargo run` |
||||||
|
|
||||||
|
###### Does it compile and run without any warnings? |
||||||
|
|
||||||
|
##### Left click in three different positions in the canvas |
||||||
|
|
||||||
|
###### Does the program draw a small circle surrounding the area where you clicked? |
||||||
|
|
||||||
|
##### Press `Return` |
||||||
|
|
||||||
|
###### Does the animation of the Chaikin's algorithm starts? |
||||||
|
|
||||||
|
###### Does the animations the animation completes 7 steps before starting again? |
||||||
|
|
||||||
|
##### Press `Escape` |
||||||
|
|
||||||
|
###### Does the program exit without errors? |
||||||
|
|
||||||
|
##### Run the program again and this time press `Return` without selecting any points |
||||||
|
|
||||||
|
###### Is the program still running? |
||||||
|
|
||||||
|
##### Bonus |
||||||
|
|
||||||
|
###### +Are you able 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? |
Loading…
Reference in new issue