GRAPHICS\3DROTATE.DOC  ·  DOC  ·  15.3 KB  ·  1989-04-30  ·  from PCPlus_Issue-41_Feb-1990_FluxEngine-360Kb
                3D Rotate V (1.0)  IAN MACPHERSON  MAY 1989
               =============================================


  Here is a description of the many functions in this program used to create
  and modify 3D shapes.

     This Program only works on a machine capable of displaying the full
     640 by 350 pixels EGA standard and possessing a Microsoft Compatible
     mouse.
       At least 256k of main memory must be available, 256k on the ega card
     is also necessary for full colour.

     It has been tested and is guaranteed to work on an Amstrad PC1640 ECD.

     Program written in Turbo Pascal Version 5.


  OVERVIEW
  ========

        The main screen is the graphic drawing area. This is where a shape
     can be viewed, rotated about the 3 axes, shifted relative to the rotation
     centre (R.C.), shifted with the R.C. , scaled and drawn.
        Functions are chosen by moving the pointer with the mouse and
     clicking the left button over the desired function name.
     The top 9 functions have a plus or minus aspect to their function, click
     on the correct sign to use these.
     The next 8 functions can be activated by clicking anywhere in the red
     box associated with the name.
       The top blue strip is a read out area only , it has two pages of
     information , toggle between them by clicking on the red circle.

        The Menu screen is accessed through the MOD (modification) box.
     This leads to a menu system where there are a number of functions for
     creating, modifying, copying, and rotating objects .




  GRAPHIC SCREEN COMMANDS
  =======================

     These are the commands in the viewing screen.

     x     : Changes the X angle by the value set in STEP on the blue strip.
     y     : Same for the Y angle.
     z     : Same for the Z angle.
     xrc   : Moves all the lines drawn ( the complete shape ) Step pixels
             from the rotation centre ( White Dot ).
     yrc   : Same for the Y dimension.
     zrc   : Same for the Z dimension.
             These last 3 commands perform an action similar to moving a
             planet out from the sun into a wider orbit.

     size  : Changes the size of the shape in steps of 0.5.
     movx  : Moves the entire shape including the rotation centre Step pixels
             along the x axis.
     movy  : Same for the Y dimension.

     The above functions all move the number of degrees/pixels set in the STEP
     variable. This can be changed in the editing screen under 'DATA'.
     Clicking on the + sign increases, - sign decreases ; (obviously).









     Below these + / - Commands are six fixed Views Boxes , with Blue = x axis ,
     Red = Y axis and light blue = Z axis.

            ┌───────────┐                    ┌──────────┐
            │     │     │                    │    │     │
            │   ──┼──   │ : Elevation  XY    │  ──┼──   │ : End Elevation ZY
            │     │     │                    │    │     │
            └───────────┘                    └──────────┘
            ┌───────────┐                    ┌──────────┐
            │     │     │                    │    │     │
            │   ──┼──   │                    │  ──┼──   │
            │     │     │ : Plan             │    │     │ : Plan Rotated  ZX
            └───────────┘                    └──────────┘
            ┌───────────┐                    ┌──────────┐
            │     │     │                    │  \ │ /   │
            │   ──┼──   │                    │    X     │
            │     │     │ : End Elev Rotated │  / │ \   │ : Oblique view
            └───────────┘                    └──────────┘

     CLR   : Clears and redraws the current shape.
     WIPE  : This is a toggle, Wipe ON or OFF, as shown in the top strip
             as W ON or W OFF. this toggles between clearing the screen after
             every move/rotate command or not.
     AXES  : Toggle a set of 3d axes on the current shape . This Command is
             duplicated in the menu screen.
     MOD   : Takes you to the editing menus.
     LOAD  : Loads the current filename.
     SAVE  : Saves the current filename ( Caution will not prompt for name ).
     QUIT  : Quits program immediately.

     In addition to the red command selection strip there is a blue read out
     strip along the top. This shows the Step , current X,Y,Z angles ,
     filename , whether wiping is on or off , Pixels coordinates of the
     mouse, The current drawing plane ( XY , ZX , ZY ).
       There are two lines of information , accessed by pressing the left mouse
     button on the red circle at top right.
       The second line has the current size, which lines are shown and the
     last line Found ( if this has been used ).

     Line drawing : Outwith the command (red) strip , Press the left mouse
                    button. This gives a yellow line which can be moved
                    about , press a second time to place the end of the line,
                    the line will now start from this point. The line(s)
                    will not be kept until the right mouse button is pressed.
                      While drawing , the colour of the line can be cycled
                    through 15 colours by pressing 'C' ,similarly , the
                    Line style can be cycled by pressing 'S'.
                      You can chose which plane : XY plane or ZY plane to
                    draw on by pressing 'P'. The indicator at top right will
                    change to indicate this.
                      To draw on the XY plane , choose the first fixed view
                    ( top left in the group of six views ) , this gives
                    X horizontally and Y vertically , Ensure the plane
                    indicator is XY and draw the lines. The Z dimension
                    can be changed at this time by pressing the '+' and '-'
                    keys , Z will change by the value set in STEP.






                      To draw on the ZY plane , Choose the second fixed view
                    ( top right view ) , change the plane indicator to ZY
                    with the 'P' key and draw the lines , the Z axis is
                    now horizontal with the Y axis as it was , The X,Y,Z
                    readouts will change to reflect the current drawing plane.
                    The '+' and '-' keys now affect the X dimension.
                      And the same for the ZX plane , choose middle right,
                    + and - affect the Y dimension.


  MENU SCREEN
  ===========

     MENUS
     =====

     There are three windows in this screen, Left is the Editing screen
     where the current coordinates of the shape can be changed.Top right
     is the menu system and bottom right is the read out area.

     Using the menus : Move the highlighted bar with the arrow keys. Press
     Enter on the desired item, this may lead to a further set of choices
     ( Copy , Delete etc ) or it may activate some function ( Axes , Edit etc).
     Press the Esc key to go back to the Top level menu from any submenu or
     the editing screen.
       The 'Q' key will Quit the program immediately in the graphic screen or
     will ask you if your sure in the menu screen.
       The 'X' key will Exit back to the graphic screen from the menus ( same
     as using the GRAPHIC menu item ).

     MENU    : SUBMENU
     =================

     HELP    : This is a condensed version of this file.

     FILES   : This leads to the Files submenu :

               LOAD    : Prompts for a filename  ( don't use an extension).

               SAVE    : Same as above.

               SAVEDIR : Change the directory to Save / Load to. ( defaults
                         can be changed by editing the Batch file : %1 is
                         the Save Directory, %2 is the filename.

     GRAPHIC : Return to the drawing screen ( All data is preserved ).

     QUIT    : Quit the program

     COPY    : This leads to the Copy submenu :

               TARGET  : Specify a line number where the copied files will
                         start at.

               RANGE   : Specify an inclusive set of line numbers to be copied.

     DELETE  : Delete a range of lines.

     ROTATE  : This leads to the Rotate submenu :

               ANGLES  : Choose a set of angles which the shape will be
                         rotated in. A difference of 360 Degrees gives a
                         full, circle ( as in the defaults ).

               RANGE   : Choose a range of lines to be rotated.







               STEP    : Choose a step between rotated lines.

               GO      : Activate.

     COLOURS : This leads to the colours submenu;

               CHOOSE  : Select a colour to change from / to.

               RANGE   : Specify the range of lines to be included.

               GO      : Activate

     EDIT    : This puts a red cursor over the top left numeral in the Edit
               window.The following keys are used:

               +        : Adds a line to end of list.
               l        : Subtracts a line from end of list.
               Ins      : Inserts a line in list at current cursor position.
               Del      : Deletes a line in list at current cursor position.
               Arrow    : Moves the cursor one place in direction shown on key.
               PgUp/Dn  : Moves the cursor Up/Down 10 places.
               Home/End : Move to the Start / End of the list.
               Esc      : Exit the Editing window.

     The X , Y , Z columns are the number of pixels away from the rotation
     centre a line starts or finishes.

     The Draw column specifies which type of line it is :

        0   : Draw line from last Absolute Move (1) to here.
        1   : Move to these coordinates
        2   : Draw from end of last line to here.
        3   : Same as 2 but dotted.
        4   : Same as 2 but a centre line.
        5   : Same as 2 but a dashed line.

     The colour column sets the colour for any draw (0,2,3,4,5 in draw column),
     there are examples in the COLOUR submenu.

     SHOW    : This leads to the Show submenu:

               SELECT  : Select which of the eight sets of lines is shown.

               EDIT    : Edit a particular data set : N.B. Set one will
                         always show from line one to the Last line number.

                 When selcting a range to show, be sure to include the draw
               ( 1 in the Draw column ) in a particular line or set of lines
               or that line may start anywhere.

     DATA    : This leads to the Data submenu:

               TOTAL   : Enter the total number of lines, within the range 1 -
                         5100. If you select a number lower than the previous
                         total , the lines above the new total are lost.

               SIZE    : Enter the Size scaling factor. 1 gives a direct
                         relationship between coordinates and pixels.This is
                         the only number which can be fractional.




               STEP    : Enter a step which will be used in the graphic screen
                         when any of the movement commands are selected.

               XSHIFT  : Enter a value which will shift the shape and Rotation
                         Centre R.C. together along the X axis.

               YSHIFT  : Same for the Y axis.

               X.R.C   : Shift the shape relative to the Rotation Centre ,
                         along the X axis ; this is the white dot on the
                         graphic screen.

               Y.R.C   : Same for the Y axis.

               Z.R.C   : Same for the Z axis.

     AXES    : This is a toggle which inserts nine lines into whatever
               is currently in the list. These make up a 3d set of axes
               100 * 100 * 100. The X axis is Blue , Y axis Red and Z
               Axis White.

  EXAMPLE
  =======

       With a blank screen ( just started the program ) move the pointer over
     MOD. Press the left mouse button. You are now in the Menu screen.From
     here you can Load , Save or enter direct coordinates to make a shape.
     Move the highlight bar over AXES, Press enter. A set of nine lines will
     appear in the editing screen to the left.These are the X, Y , Z coords
     which make up a 3d set of axes. Return to the drawing screen by pressing
     on GRAPHIC.

       A cross is now shown : Blue horizontally , Red vertically. Press the
     bottom right representaion of a set of axes and the set on screen will
     now look like 3D. The small tags on the end of each line show direction.
       Experiment with the X,Y,Z, + and - commands to rotate the axes about.
     The angles will also be shown in the blue strip.
     The amount the shape rotates is set by STEP in the DATA menu.
     Press on AXES, this will kill the set onscreen, press again to restore.
       Put WIPE off ( shown in the blue strip ) and rotate the shape, this
     does not clear after each move.
       Press the Red circle at top right , This gives the second page of
     information.
       Put the Mouse cursor over any end of line ( or corner between two
     lines ) and press the right mouse button, This will ( Usually ) give
     that lines number ( as FOUND : ) which can be checked in the editing
     screen.

       To draw a shape : press on the top left view box to give an XY drawing
     plane. Move the mouse cursor to the desired area ( start in the upper
     left quadrant of the axes ).
       Press the left mouse button, this gives a yellow line which rubber
     bands as you move it. Press the 'C' key to cycle through the 15 colours
     and the 'S' key to cycle the line styles , 'P' will toggle which drawing
     plane to write to : but if an XY ( for example ) plane is selected
     with a view box and you select another plane with the P key, the lines
     will be drawn on the newly selected plane. The result of this when next
     redrawn or CLR'd they won't appear on screen until you rotate or select
     the plane that you drew on.
     Press the left mouse button to start another line and so on ( keep all
     lines above the x axis for now ). Once you have say 6 lines press the
     Right mouse button. this finishes drawing. Try rotating the shape with
     the X, Y ,Z commands ( and size, xrc etc).
     Now go into the Menu screen , The six lines should show up in the editing
     window. Go into ROTATE, choose RANGE , enter 2 to 7 ( or 1 to 6 if you've
     removed the initial line ). Press Go.






       Return to the GRAPHIC screen , your shape should now have a sort of
     cylindrical shape.
     To create a circle ( on its own or added to a current shape ) enter
     coordinates of one point ( the distance above the x axis will be its
     radius), with a Draw value of 2 and a colour other than 0 (black)
     Set RANGE in ROTATE both to this ones line number , Press GO.
       There will be one rogue line, from the last Draw point to the start
     of the circle,modify this to by setting the original line to have a
     Draw type of 1 and add a line to the end of the circle with the same
     coordinates as the original line but a Draw type of 2.

     END