                                   CLK&HAND
                                                   by Luis Zapata

    CLOCK & HANDS is a quickie WordPerfect 5.+ graphic.  


PURPOSE:    to create a clock graphic with hands that can be set to a
            specific time.  (For example, the meeting will start promptly at
            10:57, accompanied by a clock showing the time.)  

FILES:      CLK&HAND.TXT       this document
            CLK-FACE.WPG       the clock face
            CLK-HOUR.WPG       the hour hand for the clock
            CLK-MINT.WPG       the minute hand for the clock
            CLK-EXMP.WP5       WordPerfect 5.X example of the clock


    I put this together for a co-worker who was disappointed to find out
    that the WordPerfect Graphic called CLOCK.WPG is stuck at 8:37.  (He had
    intended to make a practice of inserting a time clock-display along with
    meeting announcements.)  

    Using DrawPerfect, I "stole" WP's clock face, redrew the number dots, put
    it in a square frame, and deleted the hands.  Also using DrawPerfect, I
    drew two more graphics, one for each hand -- each using the same center.


TO USE THE EASY WAY (for 45 degree, 1.5 hour increments)

    Put the three graphics in a handy subdirectory.  

    Place your cursor on the line you want the clock to appear.  

    Bring up GRAPHICS (<Alt>F9) and select Figure (or any other of the first
    four choices).  

    Select CREATE, and FILENAME, and type in CLK-FACE.WPG proceeded by the
    subdirectory you put the files in.  

    Select the horizontal position you want (left/right/center), reset the
    size if you desire (use width/auto height since it is a square) and set
    the "Wrap text around" to NO, then hit <Return> (or F7) to save.  

    Without moving the cursor, create a second graphic the same way using
    CLK-HOUR.WPG, and checking to be sure that the size is the same as for
    the FACE.  

    Without moving the cursor, create a third graphic using CLK-MINT.WPG,
    using the same steps, EXCEPT DO NOT TURN the "Wrap text around" to NO.  

    View your document (<Shift>F7, VIEW) and be sure everything lines up. 
    (The clock should read noon/midnight.)  

    Save you document (F10).  

    Set the hour hand by bringing up GRAPHICS and selecting Figure, EDIT, and
    the number 2.  

    Select Edit (edit the graphic) and use the + (or -) key to rotate the hour
    hand.  (See NOTE below.)  Hit <Return> (or F7) to accept the hour hand
    setting.  

        [NOTE: the +/- keys turn the graphic in 45 degree increments (7.5
        minutes or 1 hours on the clock).  The clock can be set exactly (see
        TO USE THE EXACT WAY below), but this will give you a quick, if not
        exactly proportional, way to set the clock to certain hours; e.g.,
        9:00, 4:30, etc.  It also yields an acceptable way to set others (e.g.,
        9:30) -- only "acceptable" because the minute hand would not reflect
        the movement of time past the hour of 9:00.]  

    Set the hour hand by bringing up GRAPHICS and selecting Figure, EDIT, and
    the number 3.  

    Again select Edit (edit the graphic) and use the + (or -) key to rotate the
    minute hand in 7.5 minute intervals.  Hit <Return> (or F7) to accept the
    minute hand setting.  

    View the graphic again to make sure it is what you wanted.  


TO USE THE EXACT WAY 

    Follow the steps above, up to but not including using +/- keys turn the
    graphic.  Select ROTATE to move the hour hand by using the formula below. 
    Hit <Return> (or F7) twice to accept the hour hand setting.  (Twice
    because you do not want a "mirror image".)  

            30.0 degrees for each hour
            00.5 for each minute after the hour
        all subtracted from 360 (this because WP rotates counterclockwise) 

            For example 4:18 would be      120.0           (4 X 30)
                                       +    09.0           (18 X .5)
                               subtotal    129.0

                                           360.0
                                       -   129.0
                set the hour hand at       231.0 degrees 


    Follow the same steps and rotate the minute hand by using the formula: 

            06.0 degrees for each minute 
        all subtracted from 360 (this because WP rotates counterclockwise) 

            For example 4:18 would be      108.0           (18 X 6)

                                           360.0
                                       -   108.0
                set the hour minute at     252.0 degrees 

BORDERS         If you do not want borders around the clock, choose the
                option EQUATION (instead of FIGURE) as the Graphic Type in
                which to put the clock.  OR use FIGURE, but first set the
                border style to off (OPTIONS -- <Alt>F9, 1, 4).  (See the
                example, CLK-EXMP.WP5, for a borders off and no space
                outside the graphic.)  


CLK-EXMP.WP5    A WordPerfect 5.0 example of the clock in landscape mode (and
                using a HP with no extra fonts).  


    (NOTE:  I still haven't figured out why WordPerfect put 16 hour marks on
    their original clock.)

ADDENDUM 

I was going to write a macro that automatically brought the 3 files into a
document and set the hands by querying for the time, but I just don't have
the time.  If anybody out there does write such a macro, I would appreciate
getting a copy.  (I also never have time to check the boards I use for
messages.)  

I hope this is of use to somebody out there besides my co-worker.  


Luis Zapata
1340 Valley Pl., S.E.
Washington, D.C.  20020
voice phone 202-889-0118


DATE WRITTEN:  July 27, 1991