Skip to content

A python script built using numpy that displays a wave effect in your cmd w unicode characters. It was mainly built so i could mess around with numpy math & matrixes

Notifications You must be signed in to change notification settings

GRA5S/python-cmd-clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-cmd-clock

A python script built using numpy that displays a wave effect in your cmd w unicode characters and has a clock on top

was mainly built so i could mess around with numpy math & matrixes

how it works:

the wave is build using the equation

wave = (

        (np.cos(np.sqrt(xx^2 + yy^2) + self.time))+
        
        (np.cos(self.time) * np.sqrt(xx^2 + yy^2))+
        
        np.sin((xx + yy) * 1.5 + self.time * 0.7)+
        
        np.sin((xx * yy) * -1.5 + self.time * -0.7)+
        
        np.sin((xx * yy) * 8 + self.time * -0.9) 
        
)

xx & yy are matrixes with 120x50 weights in floats from 0-7 that determine the character that gets printed ( from ·:-=+*#%@&▓█▄▀▌■ )

xx stores x axis data while y holds y axis data

example xx matrix:
[
      [0.         0.05882353 0.11764706 ...skip 114... 6.88235294 6.94117647 7.        ]
      [0.         0.05882353 0.11764706 ...skip 114... 6.88235294 6.94117647 7.        ]
      [0.         0.05882353 0.11764706 ...skip 114... 6.88235294 6.94117647 7.        ]
      ...skip 44...
      [0.         0.05882353 0.11764706 ...skip 114... 6.88235294 6.94117647 7.        ]
      [0.         0.05882353 0.11764706 ...skip 114... 6.88235294 6.94117647 7.        ]
      [0.         0.05882353 0.11764706 ...skip 114... 6.88235294 6.94117647 7.        ]
]

after that it just puts a clock on top made out of █s that have the layout defined by digits.py

To run:

First,

python -m pip install -r /requirements.txt

Once done, run

python -m reflex run

in the command line

Demo:

2025-01-31.21-40-53.mp4
This script was built for Hack Club High Seas

About

A python script built using numpy that displays a wave effect in your cmd w unicode characters. It was mainly built so i could mess around with numpy math & matrixes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages