I just modified the code. You should be able to adjust cta to zero now.

Let me know if you need more function for this java applet (simulation).