NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
April 20, 2021, 03:01:23 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register  
Know the universe as yourself and you can live anywhere in comfort. ...Lao Tzu (570-490 BC)
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

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

Posts: 2

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


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.

Fu-Kwun Hwang
Hero Member
Offline Offline

Posts: 3086

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.

Pages: [1]   Go Up
Know the universe as yourself and you can live anywhere in comfort. ...Lao Tzu (570-490 BC)
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 11815 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 13731 Last post November 16, 2009, 10:51:18 pm
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.049 seconds with 23 queries.since 2011/06/15