NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Easy Java Simulations (2001- ) => Collaborative Community of EJS => Topic started by: lookang on January 19, 2009, 10:23:33 am



Title: Ejs open source Linear Equation Interactive Java Applet
Post by: lookang on January 19, 2009, 10:23:33 am
Open source Ejs Linear Equation Interactive Java Applet
Linear Equation created by Wee Loo Kang 黄如刚 (Good!)
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=546.msg1806#msg1806
http://home.phy.ntnu.edu.tw/~lookang/EJS_4.1_090115/weelookanglinear_Simulation.html
Ejs open source



Title: Re: Open source Ejs Linear Equation Interactive Java Applet
Post by: lookang on June 18, 2009, 12:18:08 pm
changes made:
customize from an earlier source code by Hwang Fu-Kwun
06May 2011
add Length = Math.sqrt( ( y2-y1) + (x2-x1) ) for the learning of length of segment
add input field and options to draw green line


it just hit me that i will be cool, if an option to

input the equation and it show the line on the drawing panel! Got time will improve it  Done!

Just found
http://www.geogebra.org/en/wiki/index.php/Step_by_Step_Graphing_of_Absolute_Value_Equations_%28Linear_%26_Quadratic%29
Step by Step Graphing of Absolute Value Equations (Linear & Quadratic)Jump to: navigation, searchUse this applet to demonstrate and visualize how to sketch graphs of absolute valued functions containing linear or quadratic terms. Suitable for pupil self learning as well

Sketching Graphs of Absolute Valued Functions(with linear or quadratic terms) Step by Step Approach
The file is downloadable at step_by_step_abs_graphing_linear_quad1.ggb

Feel free to modify it. Do appreciate your feedback to lewweisern@gmail.com





Title: Re: Ejs open source Linear Equation Interactive Java Applet
Post by: lookang on May 06, 2011, 10:17:02 am
not sure why but there is an error?

Java Plug-in 1.6.0_20
Using JRE version 1.6.0_20-b02 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to
----------------------------------------------------


java.lang.reflect.InvocationTargetException
   at java.awt.EventQueue.invokeAndWait(Unknown Source)
   at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
   at users.sgeducation.lookang.LinearEquation_pkg.LinearEquationView.(LinearEquationView.java:188)
   at users.sgeducation.lookang.LinearEquation_pkg.LinearEquationSimulation.(LinearEquationSimulation.java:20)
   at users.sgeducation.lookang.LinearEquation_pkg.LinearEquation.(LinearEquation.java:93)
   at users.sgeducation.lookang.LinearEquation_pkg.LinearEquationApplet.init(LinearEquationApplet.java:26)
   at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied (java.net.SocketPermission www.moe.gov.sg resolve)
   at java.security.AccessControlContext.checkPermission(Unknown Source)
   at java.security.AccessController.checkPermission(Unknown Source)
   at java.lang.SecurityManager.checkPermission(Unknown Source)
   at java.lang.SecurityManager.checkConnect(Unknown Source)
   at sun.plugin2.applet.Applet2SecurityManager.checkConnect(Unknown Source)
   at sun.awt.SunToolkit.getImageFromHash(Unknown Source)
   at sun.awt.SunToolkit.getImage(Unknown Source)
   at javax.swing.ImageIcon.(Unknown Source)
   at javax.swing.ImageIcon.(Unknown Source)
   at org.opensourcephysics.tools.ResourceLoader.getIcon(Unknown Source)
   at org.colos.ejs.library.control.swing.ControlSwingElement.getIcon(Unknown Source)
   at org.colos.ejs.library.control.swing.ControlMenuItem.setValue(Unknown Source)
   at org.colos.ejs.library.control.ControlElement.setProperty(Unknown Source)
   at org.colos.ejs.library.control.ControlElement.setProperty(Unknown Source)
   at users.sgeducation.lookang.LinearEquation_pkg.LinearEquationView.createControl50(LinearEquationView.java:1360)
   at users.sgeducation.lookang.LinearEquation_pkg.LinearEquationView.createControl(LinearEquationView.java:1206)
   at users.sgeducation.lookang.LinearEquation_pkg.LinearEquationView.access$000(LinearEquationView.java:19)
   at users.sgeducation.lookang.LinearEquation_pkg.LinearEquationView$1.run(LinearEquationView.java:190)
   at java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
java.lang.NullPointerException
   at users.sgeducation.lookang.LinearEquation_pkg.LinearEquationView.reset(LinearEquationView.java:1653)
   at org.colos.ejs.library.Animation.reset(Unknown Source)
   at users.sgeducation.lookang.LinearEquation_pkg.LinearEquationSimulation.(LinearEquationSimulation.java:24)
   at users.sgeducation.lookang.LinearEquation_pkg.LinearEquation.(LinearEquation.java:93)
   at users.sgeducation.lookang.LinearEquation_pkg.LinearEquationApplet.init(LinearEquationApplet.java:26)
   at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Exception: java.lang.NullPointerException


Title: Re: Ejs open source Linear Equation Interactive Java Applet
Post by: lookang on May 06, 2011, 12:20:51 pm
not to worry!
the error is a result of using Ejs 4.3.0
i used Ejs 4.3.3.1 and it is ok now
enjoy!


Title: Re: Ejs open source Linear Equation Interactive Java Applet
Post by: ahmedelshfie on May 06, 2011, 05:11:22 pm
Do you mean when use diffrent Ejs version can have error i already use last version and also ejs 4.3.0 but didn't have errors when run or recompile to jar file.
However seems error that you got is between JDK (Java Plug) may if you set the right path to jdk in your PC can solve it also you can know the path of jdk using command
start>>cmd>>set Java_Home, to can watch the right path.


Title: Re: Ejs open source Linear Equation Interactive Java Applet
Post by: lookang on May 06, 2011, 05:51:37 pm
Web deploy didn't work on 4.3
The jar runs perfectly that is why need to check web version


Title: Re: Ejs open source Linear Equation Interactive Java Applet
Post by: ahmedelshfie on May 06, 2011, 07:51:34 pm
I suggest you uninstall and install again JDK, may this solve the probelm.


Title: Re: Ejs open source Linear Equation Interactive Java Applet
Post by: geeknick on November 10, 2011, 01:28:10 pm
Is there any java program for solving linear equations (http://linearequationssolutionsonline.wordpress.com/2011/11/01/graphing-equations-through-tutorvista/) or any java applet for that?? Hello! Could you please help me with this? I have my answer but I am not sure. I am also not sure in my solution. Thanks in advance


Title: Re: Ejs open source Linear Equation Interactive Java Applet
Post by: Fu-Kwun Hwang on November 11, 2011, 10:48:33 pm
Please write down your "answer" so that others might be able to help!