NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
September 24, 2020, 03:10:35 pm

The most important medicine is tender love and care. ..."Mother Teresa(1910-1997, Roman Catholic Missionary, 1979 Nobel Peace Prize)"

 Pages: [1]   Go Down
 Author Topic: Linear Equation by Wee Loo Kang  (Read 23584 times) 0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message 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.

Thanks!!
 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #1 on: September 27, 2007, 09:55:21 am » posted from:Taipei,T'ai-pei,Taiwan

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).
 Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #2 on: September 27, 2007, 03:48:51 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

ok, i will debug when i reach home
 Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #3 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!!

 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #4 on: September 28, 2007, 09:45:04 am » posted from:Taipei,T'ai-pei,Taiwan

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)"?
 Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #5 on: September 28, 2007, 10:59:53 pm »

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!!
 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #6 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.
 Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #7 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?

 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #8 on: September 29, 2007, 08:11:08 am » posted from:Taipei,T'ai-pei,Taiwan

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.
 Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #9 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?

 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #10 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!
 Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #11 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.
 Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #12 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>
 « Last Edit: April 29, 2008, 01:50:41 pm by lookang » Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #13 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?

 Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #14 on: October 09, 2007, 11:02:11 pm »

my source code!!

 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #15 on: October 10, 2007, 10:20:35 am »

I just post it in the forum. Linear Equation created by Wee Loo Kang (Good!)
It is well done. You are creating higher quality applet. Keep up the good work.
 Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #16 on: October 11, 2007, 10:23:55 pm »

it means a lot hearing from you prof!!

thanks!
 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #17 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.
 Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #18 on: March 05, 2009, 03:15:20 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

the applet is now here http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=867.msg3294#msg3294
 Logged
 Pages: [1]   Go Up
The most important medicine is tender love and care. ..."Mother Teresa(1910-1997, Roman Catholic Missionary, 1979 Nobel Peace Prize)"