NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
October 18, 2017, 07:46:25 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
"That their main business was not put into the mind knowledge which was not there before, but to turn the mind's eye towards light so that it might see for itself." ...Plato's advice to educators(429-347BC)
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: help in programming  (Read 14608 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
kahhean
Newbie
*
Offline Offline

Posts: 2

«
Embed this message
on: April 01, 2006, 04:11:48 pm »

Hi,

I have been experimenting with EJS and it has been quite exciting. However, when I run into problems I do not have any one in the office to turn to. :-(

My two big problems are :

1) I wrote a program where I could set the initial trajectory of a body which is subject to gravitational pull towards a fixed point in the centre. So I hope to simulate the different outcomes when the initial velocity is changed (like the newton's cannon). So I set up the acceleration, and use the ODE to work out the velocity and position vector for me. (dvx/dt=ax and dx/dt=vx and so on). However, the outcome has a little error which accumulates after every round. If I changed the time step to a very small number I can eliminate this error but the simulation becomes painfully slow. I tried changing the method used for solving the ODE and none worked. Can anyone tell me how to solve this problem?

2) One thing I commonly want to do is to have two objects in one drawing canvas. Each object has all sorts of arrows associated with it. I find it a chore when making another copy of the same object. I have to copy and paste every arrow. Is there any better way?

Thanks in advance.

Regards
kahhean
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #1 on: April 03, 2006, 02:50:02 pm »

You can always post your question here (this forum).

I need to have your ejs source code in order to know your problem better and help you more!
Please send email to hwang@phy,ntnu.edu.tw and attach you ejs source.

The best ODE solver is Runge-Kutta 4th orrder methos. There are several similar example under Simulations subdirectory. Please check out those examples.

If you have several arrow, please use arrowSet instead of arrow for each object.

Fu-Kwun
Logged
Pages: [1]   Go Up
  Print  
"That their main business was not put into the mind knowledge which was not there before, but to turn the mind's eye towards light so that it might see for itself." ...Plato's advice to educators(429-347BC)
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
I need help on java programming specifically on applet devel
Information and Download
barffour 2 10650 Last post June 06, 2006, 11:19:21 pm
by rhipple
I have a problem with Programming Simultaneous Coupled Complicated ODEs
Questions related to EJS
Z-D 9 10462 Last post November 16, 2009, 10:51:18 pm
by HUMSHAPHY
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.052 seconds with 23 queries.since 2011/06/15