All Packages Class Hierarchy This Package Previous Next Index
Class berkeley.cs.dmc.makeRoller.Main
java.lang.Object
|
+----berkeley.cs.dmc.makeRoller.Main
- public class Main
- extends Object
An application that takes a track description and generates a VRML and Java
roller coaster.
-
Main()
-
-
main(String[])
- Given a track description, generate a VRML and Java roller coaster.
-
writeRoller(float[][], float[][], float[][])
- Generate a roller coaster given the control points and lifter
information.
Main
public Main()
writeRoller
public static void writeRoller(float t_control_pts[][],
float n_control_pts[][],
float lifters[][])
- Generate a roller coaster given the control points and lifter
information.
If there are to be n control points for the track, t_control_pts
is an (n+3) by 3 array of the track location controls, and
n_control_pts is an (n+3) by 3 array of the normal control points.
The last 3 entries of each array need not be set. They are copied
from the first 3 to loop the track.
Lifters is a k by 3 array of lifter data. See main() for
information on the files generated.
- Parameters:
- t_control_pts - The track position controls.
- n_control_pts - The track normal controls.
- lifters - The lifter data.
main
public static void main(String args[])
- Given a track description, generate a VRML and Java roller coaster.
The track description consists of a number, the number of control
points, followed by that many 6-vectors, where the first 3 number
give a position control point, and the next 3 numbers give a normal
control point. Then comes another number giving the number of lifters
defined, and that many 3-vectors, where each vector gives the start
and stop parameter values for the lifter, and the minimum speed
for the car while on that lifter.
For example, the simplest track (circular with upright normals) and
a lifter to keep the car speed above 1.0 between parameter values 1
and 2, is:
4
10 1 10 0 1 0
-10 1 10 0 1 0
-10 1 -10 0 1 0
10 1 -10 0 1 0
1
1 2 1
Two files are output. Track.wrl is a VRML file containing the track
geometry. It references a prototype Car.wrl, which should be made
available in the same directory.
RollerSystem.java is a java file conforming to the
dmc.system.DynamicsSystem interface. It should be processed by
dynamid.periodic.Main() to generate a file suitable for use with
dmc.dmod.Main() or dmc.tovrml.Main().
Read the complete documentation for a full description of how to
make roller coasters with this and other utilities.
- Parameters:
- args - A single element array containing the track file name.
All Packages Class Hierarchy This Package Previous Next Index