fork download
  1. import math
  2. A=40
  3. f=.2
  4. l=100
  5. t=2
  6. rng = range(-A,A+1)
  7. rng.reverse()
  8. for i in rng:
  9. phrase=''
  10. for ii in range(l):
  11. if int(A*math.cos(f*ii))-t<i<int(A*math.cos(f*ii))+t:
  12. phrase+='~'
  13. else:
  14. phrase+=' '
  15. print(phrase)
Success #stdin #stdout 0.02s 9016KB
stdin
Standard input is empty
stdout
~~                             ~~                             ~~                              ~~    
~~                            ~~~~                            ~~~                            ~~~    
 ~                            ~~~~                           ~~~~                            ~~~~   
  ~                           ~  ~                           ~  ~~                          ~~  ~   
  ~                          ~                               ~   ~                          ~   ~   
  ~                          ~    ~                              ~                          ~    ~  
   ~                         ~    ~                         ~                                    ~  
   ~                              ~                         ~     ~                              ~  
   ~                        ~                               ~     ~                        ~        
                            ~      ~                              ~                        ~        
                            ~      ~                                                       ~      ~ 
                                   ~                       ~                                      ~ 
    ~                                                      ~                                      ~ 
    ~                                                      ~       ~                      ~         
    ~                      ~                                       ~                      ~         
                           ~        ~                              ~                      ~         
                           ~        ~                                                              ~
                                    ~                     ~                                        ~
     ~                                                    ~                                        ~
     ~                                                    ~         ~                               
     ~                                                              ~                    ~          
                          ~                                         ~                    ~          
                          ~          ~                                                   ~          
                          ~          ~                                                              
                                     ~                   ~                                          
      ~                                                  ~                                          
      ~                                                  ~           ~                              
      ~                                                              ~                  ~           
                         ~                                           ~                  ~           
                         ~            ~                                                 ~           
                         ~            ~                                                             
                                      ~                 ~                                           
                                                        ~                                           
       ~                                                ~                                           
       ~                                                              ~                             
       ~                                                              ~                ~            
                        ~                                             ~                ~            
                        ~              ~                                               ~            
                        ~              ~                                                            
                                       ~               ~                                            
        ~                                              ~                                            
        ~                                              ~               ~                            
        ~                                                              ~              ~             
                       ~                                               ~              ~             
                       ~                ~                                             ~             
                       ~                ~                                                           
                                        ~             ~                                             
                                                      ~                                             
         ~                                            ~                                             
         ~                                                              ~                           
         ~                                                              ~            ~              
                      ~                                                 ~            ~              
                      ~                  ~                                           ~              
                      ~                  ~                                                          
                                         ~           ~                                              
          ~                                          ~                                              
          ~                                          ~                   ~                          
          ~                                                              ~          ~               
                     ~                                                   ~          ~               
                     ~                    ~                                         ~               
                     ~                    ~                                                         
                                          ~         ~                                               
           ~                                        ~                                               
           ~                                        ~                     ~                         
           ~                                                              ~        ~                
                    ~                                                     ~        ~                
                    ~                      ~                                       ~                
                    ~                      ~       ~                                                
            ~                              ~       ~                                                
            ~                                      ~                       ~      ~                 
            ~      ~                                                       ~      ~                 
                   ~                        ~                              ~      ~                 
                   ~                        ~     ~                                                 
             ~                              ~     ~                         ~                       
             ~    ~                               ~                         ~    ~                  
             ~    ~                          ~                              ~    ~                  
              ~   ~                          ~   ~                               ~                  
              ~  ~                           ~~  ~                           ~  ~                   
              ~~~~                            ~~~~                           ~~~~                   
               ~~~                            ~~~                            ~~~~                   
               ~~                              ~~                             ~~