Implementing Chaotic and Chicken Particle Classes with a Particle Repeller
This project involves creating a `ChaoticParticle` class that changes its movement speed randomly, and a `ChickenParticle` class that behaves like a `ChaoticParticle` but randomly stops to lay new particles. Both classes must be tested using the `ParticleSystemMain` class. Additionally, implement a `ParticleRepeller` class that pushes other particles away from it within a specified radius, using Euclidean distance for calculations. Ensure no existing classes are modified during implementation.
Implementing Chaotic and Chicken Particle Classes with a Particle Repeller
E N D
Presentation Transcript
Exercises • Create a ChaoticParticle class, which is a Particle, randomly changing its movement (Speed). You are not allowed to edit any existing class. • Test the ChaoticParticle through the ParticleSystemMain class • Create a ChickenParticle class. The ChickenParticle class moves like a ChaoticParticle, but randomly stops at different positions for several simulation ticks and, for each of those stops, creates (lays) a new ChickenParticle. You are not allowed to edit any existing class. • Test the ChickenParticle class through the ParcticleSystemMain class. 1
Exercises (2) • Implement a ParticleRepeller class. A ParticleRepeller is a Particle, which pushes other particles away from it (i.e. accelerates them in a direction, opposite of the direction in which the repeller is). The repeller has an effect only on particles within a certain radius (see Euclidean distance) • Test the ParticleRepeller class through the ParticleSystemMain class