Compare commits

..

No commits in common. "818c88e050c4b9acc56cb3c02a70a83c5f3cd67f" and "e41552291689aa02ba0d23774fd4d9055940b1e7" have entirely different histories.

View file

@ -17,17 +17,15 @@ def berechneflugbahn(cow, xmin, xmax, ymin, ymax, startwinkel, startgeschwindigk
jupiter = 24
gravitation = erde
startwinkel = startwinkel * deg2rad
if cow.isascii():
cowlength = 1
else:
cowlength = 1
cowlength = len(cow) + 1
# Calculate time of flight, actually not used
# Calculate time of flight
flugdauer = startgeschwindigkeit * sin(startwinkel) / gravitation
schlafdauer = flugdauer / xmax
# Calculate maximum height
hoehe = 0.5 * gravitation * flugdauer**2 + starthoehe
# calculate length of flight, actually not used
# calculate length of flight
wurfweite = (
startgeschwindigkeit
* cos(startwinkel)
@ -54,8 +52,6 @@ def berechneflugbahn(cow, xmin, xmax, ymin, ymax, startwinkel, startgeschwindigk
#############################################################################################
# berechneflugbahn(cow, xmin, xmax, ymin, ymax, startwinkel, startgeschwindigkeit, starthoehe):
# some useful control
clear, home, curoff, curon = "'\x1b[2J\x1b[H", "\x1b[H", "\x1b[?25l", "\x1b[?25h"
# set position of cursor
def curpos(x, y):
print("\033[%d;%dH" % (ymax - y, x), end="", flush=True)
@ -83,7 +79,6 @@ xmin = 0
startwinkel = 34
startgeschwindigkeit = 31
starthoehe = 0
schlafzeit = 0.05
###
# needed for erasing ol position
@ -94,16 +89,13 @@ y = xmin
# Call the function, which calculates the coordinates)
ergebnis = berechneflugbahn(cow, xmin, xmax, ymin, ymax, startwinkel, startgeschwindigkeit, starthoehe)
print(curoff)
# here we draw the cow
for count in range(xmin, len(ergebnis), 2):
xold, yold = x, y
x, y = ergebnis[count], ergebnis[count + 1]
curpos(x, y)
print(cow, end="")
sleep(schlafzeit)
curpos(xold, yold)
print("☁️ ", end="")
sys.exit(home + cow + curon)
print(".",end="")
bla = input("CR please...")