This file has a brief outline of the plane design files. ( ex glider.dat ). Let's make a design of a flying wing. The plane is designed on a coordinate system as if we were looking directly down on the plane with the plane pointing in the direction of the Y axis. The wings will be along the X axis. Any depth of the plane will be on the Z axis. In our example we will sweep back the wings and also add a bit of dihedral( Z axis ). | | Y front | |0 /| \ / | \ / | \ 4 / | \ 2 X ---/-----------------+----------------\----- | /| \ | | / |1 \ | | / | \ | | / | \ | | \ 5 | 3 | This plane can be defined with 6 points and 2 polygons. The indexes of the six points are shown in the diagram, but do not appear in the .dat file. ( it may appear we could have one polygon of 6 points, but one should use polygons such that if you draw a line through the polygon, it will intersect at only two points ) The first entry in the .dat file is the number of points, the second entry is the scale factor. We can design the plane with any numbers we want, and use the scale factor to enlarge or shrink it when it appears on the screen. Our .dat file now looks like this: 6 we have 6 points. 3 we can use any number here for scale. The points consist of X Y Z values. There can be no comments mixed with the point data. The first two points in our example are on the X axis, so X is zero. The next two points have a positive X value, and the last two points have a -X value. Point number 1 appears to be at the origin. Our point data will look something like: 0 1 0 0 0 0 3 0 0.2 3 -1 0.2 -3 0 0.2 -3 -1 0.2 The 0.2 values at the wing tips will add the dihedral. The next part of the file defines the polygons that define the plane. The polygons are defined in terms of the indexes of the points that appear in the diagram, but are not listed in the file( the order of the points determine their indexes ). We require two polygons, but we probably want a shadow so we will define 4 polygons. The next part of the file looks like: 4 number of polygons We must now list the polygon data. The first entry is the color and can have 3 values- 1 is a shadow 2 is yellow 3 is red . The 2nd entry defines the number of points in the polygon. In our example, all the polygons will have 4 points, but one can use triangles,pentagons, etc. The right wing( using red ) 3 color of right wing 4 points in poly - follows list of indexes, no comments allowed 0 2 3 1 The left wing 3 color of left wing 4 points in poly 4 0 1 5 We want shadows so define them again with the shadow color 1 4 0 2 3 1 1 4 4 0 1 5 That's it, put it together and it looks like this: -------------- cut for wing.dat -------------- 6 we have 6 points. 3 we can use any scale. 0 1 0 0 0 0 3 0 0.2 3 -1 0.2 -3 0 0.2 -3 -1 0.2 4 number of polygons 3 color of right wing 4 points in poly - follows list of indexes, no comments allowed 0 2 3 1 3 color of left wing 4 points in poly 4 0 1 5 1 shadow right wing 4 0 2 3 1 1 shadow left wing 4 4 0 1 5