Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
iGEMOslo authored Oct 26, 2020
1 parent 1dc2a80 commit 7dd306a
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions blenderScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,21 @@
# Initialize array to hold coordinates
coordinates=[]

# For N_obj append positional values for each agent to the coordinate array
for i in range(N_obj):
# Ff dimension equals 2 then set z=0
if dim==2:
temp_pos=[fpos[i-1]/scale,fpos[i]/scale,0]
# For dim*N_obj append positional values for each agent to the coordinate array
if dim==3:
i=0
while (i<(3*N_obj-2)):
temp_pos=[fpos[i]/scale,fpos[i+1]/scale,fpos[i+2]/scale]
coordinates.append(temp_pos)

if dim==3:
temp_pos=[fpos[i-1]/scale,fpos[i]/scale,fpos[i+1]/scale]
i=i+3

#if dimension equals 2 then set z=0
if dim==2:
i=0
while (i<(3*N_obj-1)):
temp_pos=[fpos[i]/scale,fpos[i+1]/scale,0]
coordinates.append(temp_pos)
i=i+2

# Set frame
bpy.context.scene.frame_set(frame_num)
Expand Down

0 comments on commit 7dd306a

Please sign in to comment.