INNER CODE UNIT · Python

expand

tuangauss/DataScienceProjects · Python/fireworks.py:81

    def expand (self):
        return self.age <= 1.2

    # check if particle is still alive in lifespan
    def alive(self):
        return self.age <= self.lifespan

'''
Firework simulation loop:
Recursively call to repeatedly emit new fireworks on canvas

a list of list (list of stars, each of which is a list of particles)
is created and drawn on canvas at every call, 
via update protocol inside each 'part' object 
'''
def simulate(cv):
    t = time()
    explode_points = []

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…