Dear Prof Hwang,

I tried to remix the clock.

but i could not replicate the drag on of the minute and hour hand in your simulation model to have a second hand drag-able with the perfect transition of the second hand from 1 to 59. I have created a second hand drag-gable ( http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2276.0 ) but with bugs i cannot eliminated thus, i seek your help :)

i do not understand the codes inside the minute hand and the hour hand.
for example: in the minute hand
ctam=Math.atan2(mx,my);// ctaangle of minute hand
if(ctam<0)ctam+=pi2;
vm=(int)(ctam/pi2*T);
if(Math.abs(vm-vms)>40.){[b][color=blue]// why 40? arbitrary[/color][/b]
if(vms<30){ [b][color=blue]// why 30? i thought it should be 60 minutes?[/color][/b]
  vh=vh-1; // original was vh+=1; i think
  testm=-1; [color=blue][b]// my codes to debug which lines is executed [/b][/color]
  }
else if(vms>30){  // why 30? i thought it should be 60 minutes?
  vh=vh+1;
  testm=1; // my codes to debug which lines is executed
  }
if(vh==12 || vh==0){ [b][color=blue]// this should not impact the drag right? i have not implemented it[/color][/b]
 if(hadd>0)hadd=0;
 else hadd=12;
 if(hours24)vh2=vh+hadd;
 }
}
set();
//cta=(vs+vm*60+vh*3600*5)*pi2/T;

where
public void set () {
vs=vs+vm*60+vh*3600*5;
cta=vs*pi2/T;
}


could i request 1 thing?  ;D

an add-on to your simulation to have the second hand drag-gable without the bugs i have created in my remixed sim found here http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2276.0

please add some useful comments lines // so i can follow the program logic more closely to your thoughts.
Thanks!!