Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Do the rollowing exercise: We want to make an arrow represent the relative position vector of the tennis ball with respect to the cricket ball.

Do the rollowing exercise:
We want to make an arrow represent the relative position vector of the tennis ball with respect to the cricket ball. That is, the arrow's tail should be at the position of the cricket ball (the white sphere), and the tip should be at the position of the tennis ball (the green sphere).
main.py
GlowScript 3.1 VPython
sphere (pos=vector (2,4,0), radius =0.20, color =color. whi
sphere(pos=vector (-3,-1,0), radius =0.3, color = color. gr
arrow pos =vector(2,-3,0), axis=vector (3,4,0), color-co
11.
What would be the pos of this arrow, whose tail is on the cricket ball (the white sphere)?
What would be the axis of this arrow, so that the tip is on the tennis ball (the green sphere)?
Using these values of pos and axis, change the last line of the program to make the red arrow point from the white cricket ball to the green tennis ball.
Run the program.
Self check: Examine the 3D display carefully. If the red arrow does not point from the white cricket ball to the green tennis ball, correct your program.
image text in transcribed

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

Relational Database Design A Practical Approach

Authors: Marilyn Campbell

1st Edition

1587193175, 978-1587193170

More Books

Students also viewed these Databases questions