Author Topic: Ejs open source Vernier calipers java applet with objects, help & 0-error logic  (Read 120529 times)

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1774
  • http://weelookang.blogspot.com
    • lookang web
Ejs open source Vernier calipers java applet with objects (Sept2009) and zero error logic (Sept2009) with now input field (Nov2009) for checking understanding (29Nov2009) better blue object collision detection, now with depth stem and test-tube (07Mar2010), added some cosmetic inspired by the Vernier logo after AAPT 17-21 July 2010 workshop W05, got to know the fantastic host Mr. Vernier!

Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ 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 are welcomed to check out
vernier cliper (inch/mm mode, dial mode, measure inner/outer diameter and depth) in misc by Fu-Kwun Hwang http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1408.0
vernier cliper (inch/mm mode, dial mode, measure inner/outer diameter and depth) in Ahmed's contribution http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1573.0
Vernier Calipers in Ahmed's contribution http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1513.0
Vernier Caliper and Micrometer with zero error options in misc by Fu-Kwun Hwang http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1292.0
Vernier in Misc by Fu-Kwun Hwang http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=52.0
Another Cliper in misc by Fu-Kwun Hwang http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1189.0
« Last Edit: December 11, 2012, 12:23:59 pm by lookang »

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1774
  • http://weelookang.blogspot.com
    • lookang web
Re: Vernier caliper applet with many options for smallest division
« Reply #1 on: June 07, 2008, 10:17:02 am »
Thanks to Prof Hwang for being a great teacher.
Ejs open source Vernier calipers applet with many options for smallest division

This is an EJS version of vernier caliper with option for positive or negative zero error for faulty caliper(Adjust the vertical slider up/down).
Click the checkbox to find out the base unit and the correct value.
You can select different type of vernier caliper,too (from the selection list).

Vernier calipers applet with many options for smallest division by Prof Hwang and lookang
Thanks to Prof Hwang for sharing his original source codes, his passion for sharing knowledge and guidance .
This work is licensed under a Creative Commons Attribution 2.5 Taiwan License.
reference:
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=567.msg1940#msg1940
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1189
http://home.phy.ntnu.edu.tw/~lookang/EJS_4.1_090115/weecaliper09international_Simulation.html
http://home.phy.ntnu.edu.tw/~lookang/EJS_4.1_090122/weecaliper09international.html

cited by:
http://en.wikipedia.org/wiki/Vernier_caliper not any more, think wikipedia got some rules against external links to discussion forum, some body always delete the link. accurate as 01 dec 2009
http://en.wikipedia.org/wiki/Caliper


Vernier calipers
Vernier calipers can measure internal dimensions (using the uppermost jaws in the picture at right), external dimensions using the pictured lower jaws, and depending on the manufacturer, depth measurements by the use of a probe that is attached to the movable head and slides along the centre of the body. This probe is slender and can get into deep grooves that may prove difficult for other measuring tools.
The vernier scales can be in metric measurements on the upper and lower part of the scale.
Vernier calipers commonly used in industry provide a precision to a hundredth of a millimetre (10 micrometres).
A more precise instrument used for the same purpose is the micrometer
 
.Parts of a vernier caliper:
Outside jaws: used to measure external diameter or width of an object (Blue)
Inside jaws: used to measure internal diameter of an object
Depth probe: used to measure depths of an object or a hole ( not shown in this model)
Main scale: gives measurements in mm.
Vernier gives measurements up to one decimal places in mm
Retainer: used to block movable part to allow the easy transferring a measurement ( not shown in this model)
The Vernier calipers model has
an object (Blue) for the internal jaws to measure width of an object with slider to control width of the object and simple drag action to control position of object.
an object (Green) for external jaws to measure internal diameter of a cylinder for example with slider to control dimensions of the cylinder.
a slider for zero error slider
checkbox for hint to scaffold the learners attention and point of focus
checkbox for answer to show the meaning of reading on the main scale and the vernier scale with zero error calculations if any.
drop down menu of the various common vernier scales for sense making and additional testing out by learners their ideas of how vernier works.
fine <> control buttons for learners to manipulate the model with single incremental precision
slider control for fast changes in the vernier measurement
reset button to bring simulaton back to original (default) setting.



A youtube video made to spread the news of learning by doing & exploring sense making physics.






Modifications done are:
1. cant remember now
June 03 2009
34. left and right button for fine control of slider
35. added scaffolds of the hints to be more meaningful, show exactly the difficult cases of understanding the reading with zero errors
36. added the final answer also to display the logic of how the top scale + lower scale + error.
37. fool prove it to work even for difficult cases the scaffolds are dynamically displayed
July 23 2009
38. added autoscale for hard to see scaffolds
39. change the text to the new version in Ejs 4.1 pixel size = true for nicer display
September 08 2009
40. added object blue for internal jaws with proper constraints and push if touch and slider control
41. added green object for external jaws with slider control
42. redesigned the scaffolds for the zero error to reflect correctly the logic of reading with zero error
43. sync the pointers position to correctly reflect the zero error calculation
44. redesign the zero error slider to show 0.05mm instead of e=1 increment to be easily to understand
45. redesign the look and feel of the controls and the color scheme so it is easier to read white top scale on darkgrey top scale and light color bottom scale on black lines.
46. all new objects in Ejs 4.2 instead of the older objects drawing originally
12Sept 2009
47 fix bug due to 0.08 being read as 0.05 instead of 0.1 if the marking are 0, 0.05 0.1. by hwang @ http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=567.30
18Sept 2009
48. added html and png to description
49. added comments to all variables for ease of open source sharing
18Nov2009
50 found a bug created by the pointer vss when l_x = 15.00 mm = 14.00+0.00 mm instead of the correct 15.00+0.00 caused by the slider value not 14.999999999 going to 14 and fixed it by using code
vss = (int)((x/dxm+error*unit+1.e-2)); // introduce to point to include zero error and debug need + 1.e-2 for cases where there may be error is calculation
51 fixed more bug with 2.e-2 for text1 and vss
52 added text input field for learner to test their understanding http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1309.0 thanks to prof hwang. It has the input field for student checking their understanding especially useful for learning the importance of precision of measurement. This is because 19.40 mm is precise, 19.450 mm is too precise and 19.4 mm is not precise enough for the vernier caliper of smallest unit 0.01 mm.
29Nov2009
53 made it possible to select either external jaws use ( example diameter of green object) or internal jaws (example use on external dimensions of blue rectangle)

54 made the vernier caliper behavior more like a real life one with some boundary detection that works well if lightly pressed like in real life? http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1313.0
55 it is possible by accident to over-compressed the blue object for teachable moments with the students to illustrate inappropriate use of vernier caliper ;D
56 possible to over force blue object into be vernier caliper like in 3D z direction, but it should work nicely if the movement of the mouse on drag is gentle!
57 used prof hwang's code in blue object on drag and made the blue object behave determistically so 54-55-56 is not going to in future release of the applet, if u r looking for that, download the version 4 at the bottom post.
58 fixed an array out of bound discovered by wolfgang error http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1183.msg5076;topicseen#msg5076
59 fixed another array runtime error when slider is drag to 70.00mm and beyond
60 made the yellow slider and vernier scale max slide to 69.80 mm to avoid over drag to very large values which is surprising possible, the applet still is measuring.
07March2010
61 added depth stem and object for simulating measurement on objects like test-tube, thanks Prof Hwang inspiration to http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1408.0 vernier cliper (inch/mm mode, dial mode, measure inner/outer diameter and depth)
13june2010
62 made the dimension of web applet width = 600 to fit http://sgeducation.blogspot.com/2010/06/ejs-open-source-vernier-calipers-java.html
26june2010
63 made the x max view bigger to include part of the depth probe of the vernier caliper
64 made autoscale==true when the depth probe is selected
21 july 2011
added zoom for close up view of the vernier scale on the main scale
27july 2011
fixed bug where 0.02mm is selected the hints is 11.98 mm is shown as 12.00 + .98 mm the top pointer jump ahead due to a code
if(unit==0.02)out=((int)(v*50+dv))/50.;
the correct code is inserted as
if(unit==0.02)out=((int)(v*50.+dv))/50.; //// 50. instead of 50 fix bug of pointer
real photo from
http://www.phy.uct.ac.za/courses/c1lab/vfig03a.jpg


old embed codes
Quote
Code:

 code="weecaliper09international.weecaliper09internationalApplet.class" codebase="http://home.phy.ntnu.edu.tw/~lookang/EJS/ejs_group.files/weecaliper09international.app/" archive="../../_library/ejsBasic.jar,weecaliper09international.jar" name="weecaliper09international"id="weecaliper09international" width="760" height="428">


new post 20Jan 2009
i notice a display bug but i can't figure out what is causing it. prof hwang any thought?


open source codes and creative commons attribute

source code
download the *.jar for using the applet on standalone without internet connection.


31 october 2011
redo the zoom into a similar magnify just like the micrometer thanks to ability to draw students attention to the lines based on codes from http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2268.0 by Fu-Kwun Hwang
randomize the size of the black object each time to simulation is reset for greater challenge and fun

enjoy!
« Last Edit: October 31, 2011, 10:52:13 pm by lookang »

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: Vernier caliper applet with many options for smallest division
« Reply #2 on: June 07, 2008, 12:08:49 pm »
I guess the initial value for the distance d was set to 0.
And the applet will calculate new value and change displayed value when user drag it (several related values are changed,too.)
However, when you change the initial value to other value, but did not change the displayed String.
How to fix it:
method 1: change initial value for the display string.
method 2: add the function to be called when use drag the mouse to the initialization page.


lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1774
  • http://weelookang.blogspot.com
    • lookang web
Re: Vernier caliper applet with many options for smallest division
« Reply #3 on: June 08, 2008, 08:00:34 pm »
it is almost impossible to debug, lucky i am able to revert to version 8 which does not have the problem in version 9.

i will start work on version 8 on now.

cheers ;D

and by that, i found out it was a syntax problem, after replacing

0.05 mm version 1 singapore schools" with "0.05mm_version_1_singapore_schools" notice no space the 6,7,8,9,0 did not cluster together.

now it works!!! beautifully ;D

but firefox refresh still got problem, i used ie to open the files are the new ones and are ok.

any idea how to make firefox re download the files? i think firefox has cache the jar files n thus the display is still the buggy one ???
« Last Edit: June 08, 2008, 08:39:13 pm by lookang »

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: Vernier caliper applet with many options for smallest division
« Reply #4 on: June 09, 2008, 10:59:40 am »
For the Text display in some of the View Element, the _ is used for subscript.

So, B_x will be displayed as Bx.

And 0 is used for numerical value for the variable.
For example: "Vx=0.0 m/s" might be displayed as "Vx=3.45 m/s" if the value of the variable is 3.45

So avoid 0 as part of displayed syntax for slider/numerical display...etc. However, it should work fine in "Combobox".


You will find java in the window/control Panel , open it and click remove cache or you can select cached applets and remove the one you want.

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1774
  • http://weelookang.blogspot.com
    • lookang web
Re: Vernier caliper applet with many options for smallest division
« Reply #5 on: June 27, 2008, 10:37:55 am »


The diagram shows a vernier caliper. The reading is _______  mm ?
« Last Edit: June 27, 2008, 12:12:50 pm by lookang »

jeff_forssell

  • teacher/web course designer
  • Newbie
  • *
  • Posts: 11
  • environment, computers, gardening, politics, Africa
Re: Vernier caliper applet with many options for smallest division
« Reply #6 on: August 15, 2008, 04:00:07 pm »
Those reaching this page might be interested in a Physlet animator application I made to show the more practical side of using a vernier caliper for internal, external and depth measurements. Also about some common errors. http://www.tupo.biz/kurser/FyA/English/VernierCaliper.htm

I have have it in connection with Hwangs old applet for reading the vernier scales.

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: Vernier caliper applet with many options for smallest division
« Reply #7 on: August 15, 2008, 06:05:02 pm »
I like the applet at http://www.tupo.biz/kurser/FyA/English/VernierCaliper.htm
It is a very good one.  ;)

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1774
  • http://weelookang.blogspot.com
    • lookang web
Re: Vernier caliper applet with many options for smallest division
« Reply #8 on: August 15, 2008, 11:40:38 pm »
thanks for the info jeff_forssell
 ;D

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1774
  • http://weelookang.blogspot.com
    • lookang web
« Last Edit: November 19, 2009, 09:36:35 am by lookang »

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1774
  • http://weelookang.blogspot.com
    • lookang web
Re: Vernier calipers applet with many options for smallest division
« Reply #10 on: February 01, 2009, 12:35:29 am »


added externaL JAWS on 01 Feb 2009.

super nice now!

refer to top post for the applet!

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1774
  • http://weelookang.blogspot.com
    • lookang web
Re: Vernier calipers applet with many options for smallest division
« Reply #11 on: February 04, 2009, 11:48:50 pm »
suggested this resource here!
http://www.compadre.org/precollege/items/suggest.cfm
used Fu-Kwun Hwang and lookang as authors
okay?  ;D

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: Vernier calipers applet with many options for smallest division
« Reply #12 on: February 05, 2009, 10:09:22 pm »
No problem with me. You did some extra work for that final design.  :D

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1774
  • http://weelookang.blogspot.com
    • lookang web
hi prof,

when i use EJS_4.1_090115EJS_4.1 to compile this file, the applet shows the numbers nicely as designed by the codes for example the codes for bottom scale


but when i use EJS_4.1_090426 or EJS_4.1_090518 the following codes seems to be not correctly compiled.
for(int i=0;i tm2t[i]=i+"";
// tm2t[i]=i+"";
 if(i==n2t-1)
 tm2t[i]="0"; // i think is to draw 0 in place of 10
}
zeroxm=zerox+error*unit*dxm;

do you know how to fix it?, is the problem with newer Ejs ?

thanks!
« Last Edit: June 01, 2009, 10:51:30 pm by lookang »

mn12833

  • Newbie
  • *
  • Posts: 7
This is definitely the applet that I was looking for.  I am still having difficulty obtaining this file.  I am looking to use the app as is for educational purposes.  However, I am still having difficulty with the jar file.  Any suggestions?