Author Topic: Another Cliper  (Read 13398 times)

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Another Cliper
« on: September 03, 2009, 07:30:55 pm »
The following is a cliper simulation.
You can change the width of the blue object or the diameter of the green object
(click diameter to show the object and measure it's diameter).

Full screen applet or Problem viewing java?Add to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!

You may want to view the following video


  • Hero Member
  • *****
  • Posts: 1772
    • lookang web
Re: Another Cliper
« Reply #1 on: September 04, 2009, 06:08:17 pm »
Hi Prof,

i been exploring the codes here for embedding the "blue object" into another vernier calipers applet.

i am puzzled how u make the blue object push the right internal jaw on both move together.

i can't locate the code for that "behavior".

chance to advise? thanks!

reference your codes under fixed constraints:
if(ox < oxmin+w/2)ox=oxmin+w/2;
else if(ox > x+w)ox=x+w;



xdmin = ox+d+w/2;
if(oy > oymin && x < xdmin) x=xdmin;
if(x < x1)x=x1;
else if(x > x2)x = x2;


and the blue object has no code ON DRAG;

how is "the blue object push the right internal jaw on both move together" done?
« Last Edit: September 04, 2009, 06:13:15 pm by lookang »


  • Hero Member
  • *****
  • Posts: 1772
    • lookang web
Re: Another Caliper
« Reply #2 on: September 04, 2009, 06:21:28 pm »
sorry i found it, no worries.

"if(oy > oymin && x < xdmin) x=xdmin;"

i will ask when need again.

quite a challenging task to do remixing alone. ;D