Assignment One
Open your favorite Generative AI tool and give it the following prompt:
Create a JavaScript animation of a blue ball bouncing around inside of a rectangle. Add a slider to allow the user to change the speed of the ball.
If you can get that to work, wonderful! If it does not work, you can also try the following prompt, which is a little more precise:
Create a p5.js sketch on a 400x300 canvas that contains an animation of a blue ball bouncing around. The ball has both position and direction. As the ball reaches the edge of the canvas, reverse the direction. Add a slider to allow the user to change the speed of the ball.
You can use the p5.js editor to test this code. You can save your code there and send out links for others to see. If you are familiar with GitHub, try to save both the prompt and the resulting code in a new GitHub repository in your personal public account.
If you can get this working, try to add another slider input control to change the color of the ball, the size of the ball, the number of balls, or the gravity.
The point of this exercise is not to create the perfect application. It is to get you started learning how to write prompts and integrate with your chatbot tools. Please take notes on what worked, what didn't work, and be prepared to share your findings with the group.