Jump to main content

Pinwheel Magic: Take a Spin with Animation

28 reviews


Do you enjoy watching cartoons and animated movies? Do you have fun playing video games? What do all of these things have in common? Fantastic computer animation, that's what! It's a cool job to take an interesting story or game and make it more entertaining by animating it. In this computer science project, you won't animate a full-length feature movie, but you will animate a pinwheel—a project that can go a long way toward creating your own longer animations! You will create an animated pinwheel that can spin as a result of a push of a button. How? Not by magic, but by writing a simple computer program. Don't worry, even if you've never programmed before, this pinwheel animation magic is within your reach. Sound interesting? Then read this science project and get started!


Areas of Science
Time Required
Long (2-4 weeks)
Material Availability
Computer with internet access.
Very Low (under $20)
When working in front of the computer, be sure to take plenty of breaks in order to stretch and give your eyes a rest.

Michelle Maranowski, PhD, Science Buddies


In this computer science project, you will create a pinwheel animation in Scratch that will spin as a response to user input.


It's fun to enjoy a nice day at the park. There might be just enough breeze to fly a kite and enough space to run with a pinwheel and watch it spin with each step. You already know that a pinwheel needs wind in order to spin, even if it is just someone blowing on it. But what if you could make a pinwheel spin without wind, and instead, by pushing a button or adjusting a slider? That would be different and interesting! But how can you do this? Well, you can write a computer program that will make a pinwheel appear on your computer screen and spin when you push a button or provide some other kind of user input. You might be asking, what is a computer program and what is user input? How do you put together a computer program? Let's start with some quick definitions.

A child blows on a pinwheel
Figure 1. This girl is having fun blowing on and spinning a real pinwheel—something you can do, too, on the computer screen! (istock.com, 2010.)

A computer program is a set of algorithms (instructions) that tell a computer exactly what to do. What can you use to put together such a set of instructions? One way you can put together a computer program is in Scratch, an easy-to-learn programming environment for your computer. Scratch is easy to use, so even if you've never written a program before, you'll be able to use Scratch! Plus, Science Buddies has put together a lot of help resources, including the Procedure of this project, to help you get started. You can write all kinds of programs in Scratch, including animations, stories, and games. Scratch offers the user (in this case, you!) many different types of instructions, called blocks, which you can snap together. All you have to do is to drag and drop the blocks that you need into the editing window and you can create something amazing!

Scratch offers all kinds of instruction blocks—blocks to change the appearance of objects on the screen, blocks that can make objects on the screen move, and even blocks that ask for user input. Wait, what is user input? User input is information that the user (the person using the computer) shares with the computer program, like pushing a button or talking into a microphone. The computer program then uses the user input to run the tasks in the program. Even now, as you, the user, read this on the computer monitor, you're giving the computer input. You're probably clicking the mouse or using an arrow key to tell the computer that you want to scroll down the page. The computer program, in this case your Internet browser, responds to that input by moving to the next part of the webpage.

scratch code block that spins the pinwheel when spacebar pressed
Figure 2. Example of a code block in Scratch. This block spins the pinwheel whenever the user presses the spacebar.

In this computer science project, you will build an interactive pinwheel animation using Scratch. The beauty of computer programming is that it allows you to create just about anything you can imagine, and this science project is a great way to get started. You can create a very cool computer science project, while having lots of fun!

Terms and Concepts



This resource will introduce you to Scratch:

Materials and Equipment

Disclaimer: Science Buddies participates in affiliate programs with Home Science Tools, Amazon.com, Carolina Biological, and Jameco Electronics. Proceeds from the affiliate programs help support Science Buddies, a 501(c)(3) public charity, and keep our resources free for everyone. Our top priority is student learning. If you have any comments (positive or negative) related to purchases you've made for science projects from recommendations on our site, please let us know. Write to us at scibuddy@sciencebuddies.org.

Experimental Procedure

Note: This engineering project is best described by the engineering design process, as opposed to the scientific method. You might want to ask your teacher whether it's acceptable to follow the engineering design process for your project before you begin. You can learn more about the engineering design process in the Science Buddies Engineering Design Process Guide.

Getting Started with Scratch

  1. The first thing you should do is sign into Scratch. If you do not have an account yet, click on 'Sign Up' to create an account.
  2. If this is your first time using Scratch or if you need a refresher, read the Getting Started with Scratch guide from the Raspberry Pi foundation.

Programming Your Pinwheel Animation

  1. In this computer science project, you will create a pinwheel animation in Scratch that will spin as a response to user input.
  2. Once you feel comfortable in the Scratch programming environment, it is time to start the project. As noted at the beginning of the procedure, this science project follows the engineering design process.
  3. Define a need. In this case, you'll create a fun, interactive pinwheel. But you should first think about things like who is going to play with it and what colors might they like. First, define who your audience is and what features in a pinwheel they would like to see.
  4. Develop the project requirements. Before you start programming, you'll need to make a decision about what the pinwheel will look like and what the user will do to make it spin. Write down all your decisions.
  5. Establish design criteria. Once you have settled upon the project requirements, you need to get down to the business of developing the specific details. These details are called the design criteria. Having a good set of design criteria will help you focus your efforts. The following is a set of questions to help you think about your design criteria. Note that it is not a complete list. You can either use this list of questions to develop your design requirements, or you can develop your own.
    1. How long will the pinwheel spin when the input is given?
    2. How many sprites will you use in the animation? From where will you get the sprites and how will they look? For example, will the pinwheel have three wings or four wings? Will you take a digital picture and then upload the image into Scratch or draw your own pinwheel using the paint feature in Scratch?
    3. Will you provide an instructions background sometime during the animation so that the viewer will know how to make the pinwheel spin?
    4. How many backgrounds do you plan to use in the course of the animation? Will you take a digital picture and then upload the image into Scratch?
    5. Would you like to use music in your animation? Will the animation be associated with a background or a sprite?
    6. How many different categories of blocks do you want to attempt to use?
    7. Try to use at least two blocks from the Control category.
    8. What kind of motion do you want the pinwheel sprite to make once it receives input? How long should the pinwheel sprite move once it has received input from the user? In which direction will it move?
  6. Create and analyze designs. Keeping your design criteria in mind, make a rough sketch, flow chart, or plan of what your pinwheel animation will look like and what the sprites do and/or say. A flow chart is a diagram of boxes where each box represents a step in the program you wrote.
  7. Build and test a sample program. Once you have created a set of design criteria, it is time to open up Scratch and start working on a sample program. Build your pinwheel sprite and have it do something interesting. Remember to review your design criteria as you work so that you keep yourself focused on the task.
  8. Program your pinwheel animation. Keep testing the animation as you work. When you feel that you have accomplished a certain design criteria or task, run the animation and test it out.
    1. Break the task up into smaller tasks. For example, the first task to accomplish is to get a pinwheel to appear on the screen. The second task is to decide which blocks to use to start the pinwheel spinning.
    2. It is a good idea to test along the way so that you can iron out small issues as they crop up. You don't want to have a long program at the end that doesn't work and you don't know why.
    3. If you don't like what you see, then rearrange the instruction blocks into a configuration that you believe will work better.
    4. Once you have finished your animation, check to see that all of the requirements that you set at the beginning of the project have been met.
  9. Test and redesign. Test your animation on your friends and family and sit back and watch the fun! How did they like it? Can you use their feedback to improve your animation? Read the Science Buddies Troubleshooting a Program in Scratch if you need help with your program.

The Final Product: Presenting Your Animation

  1. Once you have finished the final version of your animation and you are happy with it, it is time to show it to your friends and family again.
  2. When presenting your animation work at your science fair, try to bring in a computer with internet access. If you are not able to do so, take many screenshots of your work, print them out, and mount them on a poster board.
  3. Your science fair presentation should also include:
    1. The requirements list and the design criteria that guided your animation.
    2. A flow chart of how your animation program works.
    3. An explanation of what you learned from your research and from doing the animation.
icon scientific method

Ask an Expert

Do you have specific questions about your science project? Our team of volunteer scientists can help. Our Experts won't do the work for you, but they will make suggestions, offer guidance, and help you troubleshoot.


  • Try to use as many sensors from the PicoBoard as possible in your animation.
  • Try creating a story around the pinwheel, using different backgrounds, other sprites, and text. Can the audience use the pinwheel input to affect the outcome of the story?
  • Tired of pinwheels? Apply the same principles to making an interactive animation of another object that interests you. Hint: When creating your design criteria, think carefully about what the object does and how people normally interact with it.


If you like this project, you might enjoy exploring these related careers:

Career Profile
Are you interested in developing cool video game software for computers? Would you like to learn how to make software run faster and more reliably on different kinds of computers and operating systems? Do you like to apply your computer science skills to solve problems? If so, then you might be interested in the career of a computer software engineer. Read more
Career Profile
If you've ever watched a cartoon, played a video game, or seen an animated movie, you've seen the work of multimedia artists and animators. People in these careers use computers to create the series of pictures that form the animated images or special effects seen in movies, television programs, and computer games. Read more

News Feed on This Topic

, ,

Cite This Page

General citation information is provided here. Be sure to check the formatting, including capitalization, for the method you are using and update your citation, as needed.

MLA Style

Science Buddies Staff. "Pinwheel Magic: Take a Spin with Animation." Science Buddies, 7 Feb. 2024, https://www.sciencebuddies.org/science-fair-projects/project-ideas/CompSci_p039/computer-science/pinwheel-animation. Accessed 27 Feb. 2024.

APA Style

Science Buddies Staff. (2024, February 7). Pinwheel Magic: Take a Spin with Animation. Retrieved from https://www.sciencebuddies.org/science-fair-projects/project-ideas/CompSci_p039/computer-science/pinwheel-animation

Last edit date: 2024-02-07
Free science fair projects.