Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you please describe what is going on in lines 24-25. Python knowledge would be useful. 1 GlowScript 2.7 VPython 2 begin{code} 4 ## Scene

image text in transcribed

Can you please describe what is going on in lines 24-25. Python knowledge would be useful.

1 GlowScript 2.7 VPython 2 \begin{code} 4 ## Scene Setup 5 scene = display(width=1000, height = 1000) 7 #Parameters and Initial Conditions 8 k = 9e9 9 cloud_height = 500 10 Q1 = 50 11 Q2 = 100 12 03 = -50 13 14 #Objects 15 cloud_1 = sphere (pos = vec(-500,cloud_height,0), Q = 21, radius = 50, color = color.white) 16 cloud_2 = sphere (pos = vec(100,cloud_height,0), Q = Q2, radius = 100, color = color.white) 17 cloud_3 = sphere (pos = vec(600,cloud_height,0), q = Q3, radius = 50, color = color.white) 18 #List 19 Clouds = [cloud_1, cloud_2, cloud_3] 20 21 #Calculation for loop 22 obs_pos = vec(0,0,0) 23 E = vec(0,0,0) 24 for c in Clouds: r = obs_pos - c.pos 25

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

Sql++ For Sql Users A Tutorial

Authors: Don Chamberlin

1st Edition

0692184503, 978-0692184509

More Books

Students also viewed these Databases questions

Question

5. Understand how cultural values influence conflict behavior.

Answered: 1 week ago

Question

8. Explain the relationship between communication and context.

Answered: 1 week ago