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

Easy Java Simulations (2001- ) => misc => Topic started by: lookang on September 27, 2007, 12:53:28 am



Title: Linear Equation by Wee Loo Kang
Post by: lookang on September 27, 2007, 12:53:28 am
hi prof,

i am puzzled why i can't get point (xp1, yp1) to lie on the x axis?

chance to debug my xml?

really can't do it alone. tried a long time already.

sorry to trouble you. ;D

Thanks!!


Title: Re: Linear Equation by Wee Loo Kang
Post by: Fu-Kwun Hwang on September 27, 2007, 09:55:21 am
From you source file. when user select  A=B=0 you should only have horizontal line.
If you change so that B<>0, you will be able to drag xp1,yp1 horizontally.
(Check the logic at "interactivity" and "displaywithout" zero pages on your code).


Title: Re: Linear Equation by Wee Loo Kang
Post by: lookang on September 27, 2007, 03:48:51 pm
ok, i will debug when i reach home  :D


Title: Re: Linear Equation by Wee Loo Kang
Post by: lookang on September 27, 2007, 08:09:26 pm
ya!!!

it works after i delete the constraints A == B ; // previously from your quadratic equation.

cool,

i think i need to think about a input system of (xp,yp) and  (xp1,yp1) and from there calculate the display.

having some problem displaying x = 0 , x = -3 etc.

i think it is a bit harder than simply downgrading from a quadratic equation display.

need to think more!!

thanks!!





Title: Re: Linear Equation by Wee Loo Kang
Post by: Fu-Kwun Hwang on September 28, 2007, 09:45:04 am
For different situation, you will need to use different constraint/relations among variables.
It is this kind of process during creating simulation which will help you think more in depth into physics and logic.
Keep up the good work.

I am not fully understand what do you mean about the "input system of (xp,yp)"?


Title: Re: Linear Equation by Wee Loo Kang
Post by: lookang on September 28, 2007, 10:59:53 pm
i finish it already!!!


looks something like this.

the rationale i created it was my side has not made an interactive like EJS.

http://66.7.205.91/~lookangc/forum/index.php?topic=322.msg514#msg514

to see more!!


Title: Re: Linear Equation by Wee Loo Kang
Post by: Fu-Kwun Hwang on September 28, 2007, 11:39:10 pm
I got the following message when I check out the above URL.

Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.


Title: Re: Linear Equation by Wee Loo Kang
Post by: lookang on September 29, 2007, 01:16:06 am
ya. i not sure why. usually caused by browser closed as it hangs.

it is working now. sometimes it is not reliable.

i used the mysql provided by my host.

did you do something special to make your database 99.99% reliable?

wonder if there are settings like to make the database drop request if it takes more than 2 minutes to process?



not sure if i install my own mysql database will improve the reliablility.

any thoughts?



Title: Re: Linear Equation by Wee Loo Kang
Post by: Fu-Kwun Hwang on September 29, 2007, 08:11:08 am
There is a parameter you can setup how long to process the request in php.ini (mysql.connect_timeout ). But I think you need to be the administrator to do that.
So I would suggest you to use the same server for php and mysql (your own server and you can change all the parameters as needed).

I think the second point can move in the straight line is better than your previous design: restricted to x-axis.
I would suggest move the "hint M?" lines to lower-right instead of upper-left.
And string are overlapping for other hints (you can add some constant to the y-coordinate for strings).
You are getting better and better each time. Keep up the good work.


Title: Re: Linear Equation by Wee Loo Kang
Post by: lookang on October 01, 2007, 08:46:51 pm
There is a parameter you can setup how long to process the request in php.ini (mysql.connect_timeout ). But I think you need to be the administrator to do that.
So I would suggest you to use the same server for php and mysql (your own server and you can change all the parameters as needed).

i did set it to only 120 seconds before timeout :)


I would suggest move the "hint M?" lines to lower-right instead of upper-left.
And string are overlapping for other hints (you can add some constant to the y-coordinate for strings).

Are you talking about intelligent codes to not have overlapping of the texts?
Can direct me to any xml you have that does that?  ;D




Title: Re: Linear Equation by Wee Loo Kang
Post by: Fu-Kwun Hwang on October 01, 2007, 09:23:29 pm
If you have set the string to (x,y) , then for another string you can set it to (x, y+h) where h is the height for one character in the coordinate system for the simulation.
or, You can set those string to the same (x,y) and set different alignment property for those strings (lower right, upper right,lower left, upper left;  4 strings maximum) .

I hope you can understand what I was talking about.
Please try to solve it by yourself first. If you really can not make it work. Post you file again and I will modify it for you!


Title: Re: Linear Equation by Wee Loo Kang
Post by: lookang on October 02, 2007, 12:47:20 pm
the y+h sounds simple enough.

i will make

y2 - y1
___________
x2 - x1

12 - [ 12 ]
-----------
0 - [ - 5 ]

thanks prof.


Title: Re: Linear Equation by Wee Loo Kang
Post by: lookang on October 09, 2007, 10:58:57 pm
http://66.7.205.91/~lookangc/index.php?topic=322.0

 <iframe src="http://66.7.205.91/~lookangc/index.php?topic=322.0 " width=800 height=600>


Title: Re: Linear Equation by Wee Loo Kang
Post by: lookang on October 09, 2007, 11:00:03 pm

http://66.7.205.91/~lookangc/forum/index.php?topic=322.0

 <iframe src="http://66.7.205.91/~lookangc/forum/index.php?topic=322.0 " width=800 height=600>

your forum editor not html enabled?  ;D




Title: Re: Linear Equation by Wee Loo Kang
Post by: lookang on October 09, 2007, 11:02:11 pm
my source code!!

please host it if suits!


Title: Re: Linear Equation by Wee Loo Kang
Post by: Fu-Kwun Hwang on October 10, 2007, 10:20:35 am
I just post it in the forum. Linear Equation created by Wee Loo Kang (Good!) (http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=546.0)
It is well done. You are creating higher quality applet. Keep up the good work.


Title: Re: Linear Equation by Wee Loo Kang
Post by: lookang on October 11, 2007, 10:23:55 pm
it means a lot hearing from you prof!!

thanks! ;D


Title: Re: Linear Equation by Wee Loo Kang
Post by: Fu-Kwun Hwang on October 11, 2007, 10:42:45 pm
It is a high quality applet. I really like it. I believe you can create more and more good quality applets for physics teaching and learning. Please check out the examples in the EJS distribution. You will learn more technique to do what you want.
You always can post questions related to EJS, and I am really happy to be able to help someone like you.
The most enjoyable thins for teachers is: s/he find her/himself really can help students learn what s/he would like them to learn.  And student  later can learn it by her/himself.   :D


Title: Re: Linear Equation by Wee Loo Kang
Post by: lookang on March 05, 2009, 03:15:20 pm
the applet is now here http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=867.msg3294#msg3294