ExamplesThe topic of this page is to present the 2D module with simple and different examples : the first one about the use of the API in a java program; the second about data file and its interpretation; and the last, a good example to display differential equation solution solved by the module ODE. 1. Function displayHere is an example which displays functions in a window. These functions are defined in a direct rectangular coordinate system and are :
Look at the source ex1.java. After compiling, you will see : 2. Data fileThis example presents the minimal java program to load and display the content of a data file. It describes 2D object like a conic, points, a vector .. all defined in a no-rectangular coordinate system in this example. In the other hand, the display is automaticaly done in a rectangular one.
3. PendulumAt last, a concrete and interesting example : concrete because it talks about differential equation solving involved a deadened pendulum ; interesting because it uses both ODE module for the solving and 2D module for the display.
The program try to solve the no-linear system of deadened pendulum with 15 different initial conditions.
Opale Team : January 31 2004 23:14:10. |