Commit 31255dd6 authored by Rafael Peretti Pezzi's avatar Rafael Peretti Pezzi

Tweaking parameters

parent 97bfee72
......@@ -37,7 +37,7 @@ particle_colors = {"Electron":clRed, "Pion":clGreen, "Muon":clBlue, "Proton":clM
r_part = 0.05
# Event Multiplicity
n_particles = 200
n_particles = 1000
# Configure Environment
bcs = bpy.context.scene
......@@ -47,7 +47,7 @@ bcs.world.light_settings.environment_energy = 0.1
# Configure Output
bcsr = bcs.render
bcsr.resolution_percentage = 50
bcsr.resolution_percentage = 100
bcsr.image_settings.file_format = 'FFMPEG'
bcsr.ffmpeg.format = "MPEG4"
bcsr.ffmpeg.codec = "H264"
......@@ -79,6 +79,8 @@ def create(particles):
bpy.data.materials.new(name=type)
#bpy.context.object.active_material = (1, 0, 0)
bpy.data.materials[type].diffuse_color = particle_colors[type]
bpy.data.materials[type].use_shadows = False
bpy.data.materials[type].use_cast_shadows = False
# Create blender spheres (particles)
for particle in particles:
......@@ -166,6 +168,6 @@ bpy.context.scene.frame_current = 20
#bpy.ops.wm.save_as_mainfile(filepath="/home/pezzi/particles_"+str(n_particles)+".blend")
# Render animation
#bpy.ops.render.render(animation=True)
bpy.ops.render.render(animation=True)
#exit()
......@@ -28,7 +28,7 @@ def createNparticles(N_particles, x = 0, y = 0, z = 0): # Create particles at g
# Derived class to computes the time evolution particle positions
class ParticlePropagator(Particle):
def SetMagneticField(self, B = 0.5*10):
def SetMagneticField(self, B = 0.5):
self.B = B
def SetProperties(self, Px, Py, Pz, charge = 1):
self.charge = charge
......@@ -56,6 +56,6 @@ def createNparticlesPropGaussian(N_particles, x = 0, y = 0, z = 0): # Create pa
charge = random.choice([+1,-1])
part = ParticlePropagator(i,x,y,z)
part.SetMagneticField()
part.SetProperties(random.gauss(0,1),random.gauss(0,1),random.gauss(0,1),charge)
part.SetProperties(random.gauss(0,4),random.gauss(0,4),random.gauss(0,4),charge)
particles.append(part)
return particles;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment