home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-06-22 | 2.3 KB | 52 lines | [TEXT/X_#9] |
- ; Tutorial 1: Basic Concepts
- ;
- ; In xModelx-2D and xModels-3D, you create a "scene description"
- ; in a special language. The scene description is a kind of
- ; program for a scene. A scene can be a single image or an
- ; animation consisting of a sequence of images.
- ;
- ; Anything on a line after a ";" is considered a comment, not part
- ; of the scene description.
- ;
- ; An object can be added to a scene by giving the name of that
- ; object. There are some standard objects:
-
- square ; a one-by-one square, centered at the point (0,0)
- circle ; a circle of radius 1, with center at (0,0)
- line ; a horizontal line, length 1, center at (0,0)
-
- ; After the name of the object, you can list "transformations"
- ; to be applied to the object. These transformations affect
- ; the object's size, orientation, and position, BEFORE it is
- ; actually drawn in the image. For example, the transformation
- ; "scale 5" magnifies the size of the object by a factor of 5.
- ; You would apply this to the basic "square" object like this:
-
- square scale 5 ; a 5-by-5 square, centered at (0,0)
-
- ; Other important transformations include "rotate" and "translate".
- ; Several transformations can be applied to the same object. They
- ; are performed in the order listed:
-
- circle translate 4,7 ; circle of radius 1, displced by 4
- ; units horizontally and 7 units
- ; vertically, so its center is
- ; now at the point (4,7)
-
- line scale 10 rotate 45 translate -3,0
- ; a line of length 10 (because of the scaling),
- ; at an angle of 45 degrees from horizontal,
- ; shoved 3 units to the left, so its center is (-3,0)
-
- ; The parts of this file that are not comments define a scene
- ; containing 6 objects. To see that scene, choose the "Render"
- ; command from the "Control" Menu. The objects are displayed
- ; in a square window whose horizontal coordinates extend from -10
- ; on the left to +10 on the right, and whose vertical coordinates
- ; extend from -10 at the bottom to +10 at the top. The point
- ; (0,0) is the center of the square.
- ;
- ; When you render this file, you will see the basic square, line,
- ; and circle as three small objects at the center of the screen.
- ; You'll also see three transformed objects.
-