I'm having trouble finding out how to dynamically instantiate multiple instances of a class. For example, I'm given a file with an x,y,z and t coordinate on each line. I want to place each line into a class named Droplet that is uniquely identified bu the x,y because the z position and time varies with time. Each Droplet will have a hashtable that maps a time to a z coordinate.
The big picture is that each line of input specifies a location of a water surface at a point in time and I will be animating this in Blender using python.
The part I'm having trouble with that I don't know how many instances of Droplet I will have to instantiate, so I can't do something like
drop1 = Droplet(0,0)
drop2 = Droplet(0,1)
... and so on
Is there a way for me to automate class instantiation using the unique x,y as an identifier in Python?