Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

thanks. 1. Go to www.glowscript.com www.glowscript.com, login, create a new progran, and write a Vpython program that displays the following three objects An object called

thanks.

image text in transcribed

1. Go to www.glowscript.com www.glowscript.com, login, create a new progran, and write a Vpython program that displays the following three objects An object called sphere1 located at m. An object called sphere2 located at m. An object called sphere3 located at m. Remember glowscript automatically creates the first lines that appears in every Vpython program (as you leaned in lab). You can get help by clicking help" in the upper right corner of the main Glowscript page or go directly to http://www.glowscript.org/docs/VPythonDocs/index.html and look at the links in the middle of the page or pulldowns on the left column. You will need to adjust the size of your spheres so you can see all three spheres. You can choose any color you wish for the spheres. Be sure to run your program and verify 3 spheres are created in the display window. Don't continue until you verify step 1 is working. 2. Now create two arrows: An arrow named arrow1 should point from sphere1 to sphere2. An arrow named arrow2 should point from sphere2 to sphere3. Make certain that you code this symbolically (without numbers) so the arrow position and axis will change automatically when you move the spheres. You may need to adjust your arrow size so that your display is viewable 3. Now try changing the coordinate positions of your spheres and make certain that the arrows automatically connect the spheres (without any change in the code associated with the arrows) as you move the spheres 4. Move sphere 5. Change the color of arrow2 so it is red. 6. Move sphere2 to m. 7. Add two print statements to your program: 1 and sphere3 back to their original locations listed above. prints the value of the axis of arrow2 A print statement that A print statement that prints the value of the position of arrowz Make sure that your program is working completely with no errors before you answer these questions. a) Fill in the boxes below from the pull down choices that make a line of code that will work to define arrow2 correctly arrow2- arrow(pos-sphere2.pos b) Fill in the printed value that your program produces for the axis of arrow2: :.> ),axis-(l sphere3.pos-sphere2.pos #. ), color-color.red) 4 > m c) Fill in the printed value that your program produces for the position of arrow2 1. Go to www.glowscript.com www.glowscript.com, login, create a new progran, and write a Vpython program that displays the following three objects An object called sphere1 located at m. An object called sphere2 located at m. An object called sphere3 located at m. Remember glowscript automatically creates the first lines that appears in every Vpython program (as you leaned in lab). You can get help by clicking help" in the upper right corner of the main Glowscript page or go directly to http://www.glowscript.org/docs/VPythonDocs/index.html and look at the links in the middle of the page or pulldowns on the left column. You will need to adjust the size of your spheres so you can see all three spheres. You can choose any color you wish for the spheres. Be sure to run your program and verify 3 spheres are created in the display window. Don't continue until you verify step 1 is working. 2. Now create two arrows: An arrow named arrow1 should point from sphere1 to sphere2. An arrow named arrow2 should point from sphere2 to sphere3. Make certain that you code this symbolically (without numbers) so the arrow position and axis will change automatically when you move the spheres. You may need to adjust your arrow size so that your display is viewable 3. Now try changing the coordinate positions of your spheres and make certain that the arrows automatically connect the spheres (without any change in the code associated with the arrows) as you move the spheres 4. Move sphere 5. Change the color of arrow2 so it is red. 6. Move sphere2 to m. 7. Add two print statements to your program: 1 and sphere3 back to their original locations listed above. prints the value of the axis of arrow2 A print statement that A print statement that prints the value of the position of arrowz Make sure that your program is working completely with no errors before you answer these questions. a) Fill in the boxes below from the pull down choices that make a line of code that will work to define arrow2 correctly arrow2- arrow(pos-sphere2.pos b) Fill in the printed value that your program produces for the axis of arrow2: :.> ),axis-(l sphere3.pos-sphere2.pos #. ), color-color.red) 4 > m c) Fill in the printed value that your program produces for the position of arrow2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions

Question

1. Why have benefits grown in strategic importance to employers?

Answered: 1 week ago

Question

Find the derivative of y= cos cos (x + 2x)

Answered: 1 week ago

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago