Computer Science Simple Animations

In summary, Computer Science Simple Animations is a branch of computer science that focuses on creating simple and interactive animations using computer programming languages and software. Learning this skill can improve critical thinking, problem-solving, and creativity, and open up opportunities in fields such as game development and web design. Commonly used programming languages for this purpose include HTML, CSS, JavaScript, and Python, as well as animation software and game engines like Adobe Animate and Unity. Anyone can learn Computer Science Simple Animations with a basic understanding of programming and a passion for animation, and it has various applications in creating interactive websites, educational tools, video games, advertising, film and television, and scientific visualizations.
  • #1
Hypnos_16
153
1

Homework Statement



Create a class called, ThreeObjectAnimation, that creates a graphic animation with three animation object. The ThreeObjectAnimation class should move three objects around the frame, either randomly, or following a fixed pattern. The movements should occur every 250 milliseconds. The ThreeObjectAnimation class should use three classes, ObjectA, ObjectB, and ObjectC for these three movable objects. The object are allowed to intersect. Each of these classes is responsible for drawing a distinct graphics object with at least four shapes and two colours.

The size and colour of the shapes drawn by ObjectA, ObjectB, and ObjectC should be modified every 500 milliseconds. For example, if ObjectA draw a rectangle, then the size of the rectangle could change, a circle in ObjectB could changle colour.

The Car class, on page 106, can be used as an example for the implementation of ObjectA, ObjectB, and ObjectC. The ThreeObjectAnimation class implementation can be based on DrawingTemplate form the course notes.

Note, there are two kinds of animations, one for modify how a object is drawn, and on the modifies where the object is drawn. The movement occurs every 250 ms and the modification of the object is every 500 ms.

The ObjectA, ObjectB, and ObjectC should implement the Animate interface and the Drawable interface. Drawing is done the the Drawable.draw method. Moving the center of the object is done with Animate.move, and changing how the object will be drawn is done with Animate.changeConfiguration.

The interfaces are:

--- Animate ---
public interface Animate {
void move( double x, double y);
void changeConfiguration();
}

--- Drawable -----
import java.awt.Graphics2D;

public interface Drawable {
void draw(Graphics2D g2d);
}

The ThreeObjectAnimation class will invoked Animate.move and Animate.changeConfiguration in the timer callback. The Drawable.draw could be call in the paintComponent method.

Homework Equations



N/A

The Attempt at a Solution



I'm having a hard time figuring out really where to start here, i have a basic idea for the three objects, I'm just having a really hard time making them work! If someone could help me with animating just one of them i could figure out the others on my own!

please! i really need help here you guys.
 
Physics news on Phys.org
  • #2


Hi there,

First, let's break down the task into smaller steps:

1. Create a class called ThreeObjectAnimation
- This class will be responsible for creating the graphic animation with three animation objects.

2. Create three classes - ObjectA, ObjectB, and ObjectC
- These classes will represent the three movable objects in the animation.

3. Implement the Animate and Drawable interfaces in ObjectA, ObjectB, and ObjectC
- This will allow us to use the methods move() and changeConfiguration() to animate the objects, and the method draw() to draw them on the frame.

4. Use the Car class on page 106 as an example for the implementation of ObjectA, ObjectB, and ObjectC
- This will help you understand how to use the Animate and Drawable interfaces in your code.

5. Use the DrawingTemplate from the course notes as a basis for the ThreeObjectAnimation class implementation
- This will provide you with a starting point for your code.

6. Define the movements and modifications of the objects
- The movements should occur every 250 milliseconds, while the modifications should occur every 500 milliseconds. You can use the timer callback to invoke the methods move() and changeConfiguration() for each object.

7. Use the paintComponent method to call the draw() method for each object
- This will draw the objects on the frame.

I hope this helps you get started on your assignment. If you have any specific questions or are stuck on a particular step, please feel free to ask for further assistance. Good luck!
 

1. What is Computer Science Simple Animations?

Computer Science Simple Animations is a branch of computer science that focuses on creating simple and interactive animations using computer programming languages and software.

2. What are the benefits of learning Computer Science Simple Animations?

Learning Computer Science Simple Animations can improve critical thinking skills, problem-solving abilities, and creativity. It can also open up opportunities in various fields, such as game development, web design, and digital media.

3. What programming languages are commonly used in creating Computer Science Simple Animations?

Some of the commonly used programming languages for creating Computer Science Simple Animations are HTML, CSS, JavaScript, and Python. There are also animation software and game engines that have their own programming languages, such as Adobe Animate and Unity.

4. Can anyone learn Computer Science Simple Animations?

Yes, anyone can learn Computer Science Simple Animations. It is important to have a basic understanding of programming concepts and a passion for creating animations. With dedication and practice, anyone can become proficient in this field.

5. What are some applications of Computer Science Simple Animations?

Computer Science Simple Animations can be used in various applications, such as creating interactive websites, educational tools, and video games. It can also be used in advertising, film and television, and scientific visualizations.

Similar threads

  • Special and General Relativity
Replies
6
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
15
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
4K
  • Programming and Computer Science
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • STEM Academic Advising
Replies
27
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
3K
Back
Top