Answered step by step
Verified Expert Solution
Question
1 Approved Answer
OBJECTIVES In this activity you will learn how to: Create 3 D box objects Update the position of an object iteratively ( repeatedly ) to
OBJECTIVES
In this activity you will learn how to:
Create D box objects
Update the position of an object iteratively repeatedly to animate its motion
Update the momentum and position of an object iteratively repeatedly to predict its motion
TIME
You should plan to finish this activity in minutes or less.
I. Setup statements
In this task, we are going to use VPython to model a moving cart on a m track.
In a browser, go to the webpage wwwglowscript.org to get to the Glowscript home page.
In the right hand corner click Sign In and login using your existing Google account from Lab
You are now on the Glowscript program development page where you can either run programs that you have previously
written or create new programs. We want to click on the Create New Program
In the popup display give the program the name Cart
a Creating objects
We use a white box to represent the track. Type the following command and run the program.
track boxposvector sizevector colorcolor.white
We will now use a red box whose center is at the origin to represent a moving cart located at the origin. Type the following
command and run the program.
cartboxposvector sizevector colorcolor.red
Test Your Knowledge
Reposition the cart so its left end is aligned with the left end of the track.
Run the program and make are sure it is working.
b Initial conditions
To model the motion of an object over time, we need to know the value of two vector:
initial position; and
initial velocity.
You have already given the cart an initial position. Now you need to give it an initial velocity, velcart. If you push the cart with your
hand, the initial velocity is the velocity of the cart just after it leaves your hand.
Give the cart a velocity of ms in the x direction by adding the following command
velcart vector #sets the carts velocity at ms in the x direction
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started