Open Juli-amo opened 1 week ago
I have some OOP suggestions to make the project more "structured:
prep_field
should return a list, dict or array of particle types, coordinates and starting speed
there should be a function movement
that uses the InteractionMatrix
and the positions from prep_field
to return the next positions
Hi everyone,
I’ve written some basic code for our particle_field class, but I believe we might need to revisit and redo parts of it since there are still many open questions.
Here are some observations I made during the implementation process:
Visualization: For now, visualizing the particle positions in a plot and updating it repeatedly works, but many similar projects skip this step and go straight to GUI-based visualization. This might be something to consider moving forward.
Movement Functions: I’m unsure whether the particle movement logic should live in the Particle class or the ParticleField class. My preference is to keep all movement-related functionality in the ParticleField class. This way, it would be easier to incorporate input from the interaction matrix into each particle’s movement. It could also make future optimizations simpler.
Starting Point Generation: I think it would be beneficial to move the function for generating particles' starting positions into the ParticleField class. This way, we can ensure particles are evenly distributed across the field. If we stick with the originally planned random generation, we might encounter issues like particles clustering too closely or being too far apart to interact effectively.
Sorry for the delay I totally underestimated the complexity of this task and should have started way earlier! I promise it won't happen again 😊
After our last team call on Wednesday, we agreed on the following changes:
This Class is supposed to represent the field in which all the particles are placed and react to one another.
It would be nice if this class has these functions: