Giter Club home page Giter Club logo

unimation's Introduction

Those are some unicode animations, donut2.c is for Windows and donut.c is for Linux, they are not the same (and not completely my work)

When compiling the c files use the -lm flag

The cpp file is for Windows, after compiling (g++ doublePendulum.cpp -o main) use it like so:

rem To simply see one double pendulum
main
rem To see n double pendulums
main n

The python file is compatible with python3 and python2 but you have to maximize to terminal when running it.

If you get _curses.error: addwstr() returned ERR try decreasing the font size.

To create the badapple.txt for player.py I used this script:

try: from PIL.Image import open
except: from Image import open
from sys import stdout
from cv2 import VideoCapture, imwrite, resize
th = 127
def I2T(File):
	im = open(File)
	(w, h) = im.size
	mim = im.convert("1")
	data = list(mim.getdata())
	counter = 0
	field = True
	for pixel in data:
		if field:
			if pixel > th: stdout.write("*")
			else: stdout.write(" ")
		counter = counter + 1
		if counter >= w:
			counter = 0
			if field: stdout.write("\n")
			field = not field
vidcap = VideoCapture('./video.mp4') # This is the video shown
success, image = vidcap.read()
while success:
	imwrite(".jpg", resize(image, (144, 108), interpolation = 3))
	I2T(".jpg")
	success, image = vidcap.read()
	print("R")

(You need to pip3 install opencv-python Pillow in order to do that)

(on Linux you may need to run sudo apt-get install ffmpeg libsm6 libxext6 -y to use opencv)

I used this script like so:

python3 main.py > badapple.txt

unimation's People

Contributors

donno2048 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.