Revision, Doubt and Practice Session (RDP -1)
Revision: Motion Blocks Overview
1. Introduction to Scratch & Basic Motion Blocks
- Move Block: This block helps to move the sprite in steps in X-axis. (positive numbers → right direction, negative numbers → left direction).
- Try It: Drag a Move [10] Steps block and click it. Change the value to -10 to move left.
- Turn Block: This block helps to rotate the sprites clockwise or counterclockwise.
- Understanding Angles: The turn block rotates a sprite based on degrees:
- Turn Right (Clockwise): A positive angle moves the sprite to the right (e.g., 90° turns it to the right side).
- Turn Left (Counterclockwise): A negative angle moves the sprite to the left (e.g., -90° turns it to the left side).
- Full Rotation: A 360° turn brings the sprite back to its original position.
- Try It: Use Turn Right [15] Degrees and Turn Left [45] Degrees to rotate the sprite.
- Understanding Angles: The turn block rotates a sprite based on degrees:
- Go to Random Position Block: This block helps to teleport the sprite to a random position on the stage.
- Try It: Drag this block and click it multiple times to see the sprite jump around.
2. Understanding Coordinates & Advanced Motion Blocks
- X-Y Coordinate System:
- X-axis: It controls left-right movement (-240 to 240).
- Y-axis: It controls up-down movement (-180 to 180).
- (0,0) is the center of the stage, the origin.
- Try It: Move the sprite to X: 100, Y: 50 manually and observe.
- Go to X-Y Block: Moves the sprite instantly to a specified location.
- Try It: Set Go to X: 50, Y: -100 and run the script.
- Glide Block: Moves the sprite smoothly over time to a specific X-Y position.
- Try It: Glide 2 secs to X: -100, Y: 100.
3. Motion Blocks Practice with an Animation
- Forever Loop: This block helps to keep the animation running continuously.
- Why use a Forever Loop?
- Without it, actions in the program would happen only once and then stop.
- With a Forever loop, the program can create continuous animations, movements, or repetitive behaviors, making interactions more dynamic and engaging.
- Why use a Forever Loop?
Try It: Make a sprite bounce continuously across the screen.
- Steps:
- Choose a ball sprite.
- Add move 10 steps and if on edge, bounce inside a Forever loop.
- Run the script and see the ball move endlessly.
Doubt Session
- Allow students to ask questions about any previous concepts.
- Discuss common mistakes (e.g., sprite not moving, incorrect X-Y values).
- Provide live debugging assistance for students facing issues with their Scratch projects.
Tricky Questions:
- What happens if you set a sprite’s X value to 500 in Scratch? Will it be visible on the stage?
ANS: No, because the maximum X value visible on the stage is 240. Any value greater than that moves the sprite off-screen.
- What will happen if you use both 'Go to X: 100 Y: 50' and 'Glide 2 secs to X: 100 Y: 50' back to back?
ANS: The sprite will instantly move to (100, 50) because of the Go to X-Y block and then try to glide to the same location, which means no visible movement.
- How can you make a sprite move in a perfect circle using only Motion Blocks?
ANS: Use a combination of Glide blocks or small angle Turn blocks with a loop.
Example Script: This makes the sprite turn 360 degrees in small steps, forming a perfect circle.
Practice Project: Solar System Animation
Objective:
Create an animation where planets orbit around the sun using Set X-Y and Glide Blocks.
Steps to Create the Project:
1. Choose Sprites and Backdrop:
- Add a sun sprite at the center.
- Add three planet sprites (e.g., Earth, Mars(Use a ball sprite for this), Saturn).
- Choose a space-themed backdrop.
- Adjust the sizes and rename the sprites according to the project.
Sun Size - 60
Earth Size - 40
Mars(Ball Sprite) - 50
Saturn(Planet 2 Sprite) - 50
2. Set Initial Positions:
Each planet should start from a fixed position using Go to X-Y.
- Sun: Go to X: 0, Y: 0
- Planet 1 (Earth): Go to X: 150, Y: 50
- Planet 2 (Mars): Go to X: 100, Y: 0
- Planet 3 (Saturn): Go to X: 200, Y: -75
3. Create Orbital Motion Using Glide Blocks:
- Make each planet move around the sun in a circular path using Glide Blocks.
- Example for Earth:
- Glide 2 secs to (0, 100)
- Glide 2 secs to (-100, 0)
- Glide 2 secs to (0, -100)
- Glide 2 secs back to (150, 50)
- Repeat similar Glide Blocks for Mars and Saturn, adjusting their speeds to mimic real-world orbits.
- Mars:
- Glide 3 secs to (0, 100)
- Glide 3 secs to (-100, 0)
- Glide 3 secs to (0, -100)
- Glide 3 secs back to (100, 0)
- Saturn:
- Glide 4 secs to (0, 100)
- Glide 4 secs to (-100, 0)
- Glide 4 secs to (0, -100)
- Glide 4 secs back to (200, -75)
EARTH | MARS | SATURN
4. Use When Green Flag Clicked:
- Attach the movement script to When Green Flag Clicked to start the animation.
5. Use Rotate Block to make Sun rotate:
- Use a Rotate 5 deg block to turn the Sun.
6. Wrap in a Forever Loop:
Place all movement scripts inside a Forever Loop so the planets continuously orbit around the sun.
https://drive.google.com/file/d/1DLOKIuN6Gx8Xw8Xk3drBVAsZWU31F7EM/view?usp=sharing {Video Reference Link}
SUN | EARTH
MARS | SATURN