For each cloud chunk in the x-direction
#Define the x-location of the cloud chunk
xloc startx + i*stepx
for i in range(0,nx):
#For each cloud chưnk in the z-direction
for j in range(0,nz):
#Define the z-location of the cloud chunk
zloc startz + j*stepz
#Make a sphere at that x-z location
cloudChunk = sphere(pos = vector(xloc, 1000,zloc), radius 50, color color.red)
#Add the sphere to the list of cloud chunks (so we can use it later)
list0fCloudChunks.append(cloudChunk)
#This part needs to be fixed and commented...
Enet vector(0,0,0)
0-15
dQQ/(nx*nz)
k 9e9
dx 10
dz 10
initx -100
initz -100
while initx < 100:
initz-100
while initz < 100:
Enet vec (0,0,0)
for chunk in listofCloudChunks:
r_sep vec(initx, 0, initz) chunk.pos
Enet += (k*dQ*r_sep)/mag(r_sep)**3
arrow(posvec(initx, 0, initz), axis Enet vscale, color = color.yellow)
initz initz + dz
initx initx + dx