Assignment three sample output

Here are some sample plots. This is a copy of an actual session with my draft solution; the commands are interspersed with the output. Please ask if you're not clear on why any of the particular plots look the way they do.

Of course, your program needs to work for all inputs, not just the several below. Please only use the following example to check your program or your understanding of the assignment, not as a basis for writing it.

I might have made a mistake. If you think your program is right but its output differs from the following, let's talk about it!

Note that the text items below are not captions! They are the commands I typed. Thus, they refer to the graph which follows them, not the one above!


identity
                    |                   *
                    |                 *  
                    |               *    
                    |             *      
                    |           *        
                    |         *          
                    |       *            
                    |     *              
                    |   *                
                    | *                  
--------------------*--------------------
                  * |                    
                *   |                    
              *     |                    
            *       |                    
          *         |                    
        *           |                    
      *             |                    
    *               |                    
  *                 |                    
*                   |                    
identity 100
                    |                   *
                    |                 *  
                    |               *    
                    |             *      
                    |           *        
                    |         *          
                    |       *            
                    |     *              
                    |   *                
                    | *                  
--------------------*--------------------
                  * |                    
                *   |                    
              *     |                    
            *       |                    
          *         |                    
        *           |                    
      *             |                    
    *               |                    
  *                 |                    
*                   |                    
sine 4
         *          |                    
             *      |                    
                   *|                    
                    |    *               
                    |         *          
                    |             *      
                    |              *     
                    |             *      
                    |          *         
                    |     *              
--------------------*--------------------
              *     |                    
         *          |                    
      *             |                    
     *              |                    
      *             |                    
          *         |                    
               *    |                    
                    |*                   
                    |      *             
                    |          *         
sine 5
        *           |                    
        *           |                    
           *        |                    
                *   |                    
                    | *                  
                    |      *             
                    |          *         
                    |           *        
                    |         *          
                    |     *              
--------------------*--------------------
              *     |                    
          *         |                    
        *           |                    
         *          |                    
             *      |                    
                  * |                    
                    |   *                
                    |        *           
                    |           *        
                    |           *        
sine 6
                 *  |                    
            *       |                    
          *         |                    
           *        |                    
                *   |                    
                    |*                   
                    |      *             
                    |         *          
                    |        *           
                    |     *              
--------------------*--------------------
              *     |                    
           *        |                    
          *         |                    
             *      |                    
                   *|                    
                    |   *                
                    |        *           
                    |         *          
                    |       *            
                    |  *                 
sine 10
                 *  |                    
                    | *                  
                    |     *              
                    |   *                
                  * |                    
              *     |                    
               *    |                    
                    |*                   
                    |    *               
                    |    *               
--------------------*--------------------
               *    |                    
               *    |                    
                   *|                    
                    |    *               
                    |     *              
                    | *                  
                *   |                    
              *     |                    
                  * |                    
                    |  *                 
sine 100
                    *                    
                    |*                   
                   *|                    
                    *                    
                    *                    
                    *                    
                    *                    
                   *|                    
                    |*                   
                    *                    
--------------------*--------------------
                    *                    
                   *|                    
                    |*                   
                    *                    
                    *                    
                    *                    
                    *                    
                    |*                   
                   *|                    
                    *                    
sine 1000
                    *                    
                    *                    
                    *                    
                    *                    
                    *                    
                    *                    
                    *                    
                    *                    
                    *                    
                    *                    
--------------------*--------------------
                    *                    
                    *                    
                    *                    
                    *                    
                    *                    
                    *                    
                    *                    
                    *                    
                    *                    
                    *                    
cubic
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |         *          
                    *                    
--------------------+-*------------------
                    |   *                
              *     |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
cubic 5
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                   *
                    |     *              
                    *                    
                    |*                   
--------------------+---*----------------
                    |       *            
                    |       *            
                    |  *                 
        *           |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
cubic 3
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |        *           
                    | *                  
                    *                    
                    *                    
                    |  *                 
--------------------+------*-------------
                    |         *          
                    |            *       
                    |             *      
                    |          *         
                    |   *                
            *       |                    
                    |                    
                    |                    
                    |                    
                    |                    
cubic 2
                    |                    
                    |                    
                    |                  * 
                    |        *           
                    |  *                 
                    *                    
                   *|                    
                    *                    
                    |  *                 
                    |     *              
--------------------+---------*----------
                    |             *      
                    |                *   
                    |                   *
                    |                    
                    |                   *
                    |                *   
                    |          *         
                    |*                   
        *           |                    
                    |                    
cubic 2.5
                    |                    
                    |                    
                    |                    
                    |                    
                    |          *         
                    |   *                
                    *                    
                   *|                    
                    |*                   
                    |   *                
--------------------+-------*------------
                    |           *        
                    |              *     
                    |                *   
                    |               *    
                    |           *        
                    |    *               
             *      |                    
                    |                    
                    |                    
                    |                    
identity
                    |                   *
                    |                 *  
                    |               *    
                    |             *      
                    |           *        
                    |         *          
                    |       *            
                    |     *              
                    |   *                
                    | *                  
--------------------*--------------------
                  * |                    
                *   |                    
              *     |                    
            *       |                    
          *         |                    
        *           |                    
      *             |                    
    *               |                    
  *                 |                    
*                   |                    
odd
                    |                    
                    |                 *  
                    |                    
                    |             *      
                    |                    
                    |         *          
                    |                    
                    |     *              
                    |                    
                    | *                  
--------------------+--------------------
                  * |                    
                    |                    
              *     |                    
                    |                    
          *         |                    
                    |                    
      *             |                    
                    |                    
  *                 |                    
                    |                    
odd 100
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
--------------------+--------------------
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
                    |                    
quit


[back to q&a page] [main course page]