Answered step by step
Verified Expert Solution
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
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 25Step 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