2023-10-20 20:24:20 +02:00
# Cowyeet
2023-10-20 20:27:04 +02:00
Throw the cow as far as you can!
2023-12-30 20:12:46 +01:00
![A cow with a parachute. ](https://teapot.informationsanarchistik.de/Wobbl/Cowyeet/raw/branch/main/textures/cow_with%20parachute_.png )
2023-10-20 20:27:04 +02:00
Install the Modules with the following command:
```
pip install pynput
2023-11-04 12:56:33 +01:00
```
In versions after 1.0, it will require
2023-11-18 02:26:05 +01:00
[Wobbl Tools. ](https://teapot.informationsanarchistik.de/Wobbl/wobbl_tools )
The parabelfunc.py is used to calculate a ballistical curve with parameters for angle, speed, gravity to create a realistic flight.
2023-11-18 02:34:38 +01:00
It returns its coordinates depending on the resolution (xmax-xmin) * (ymax-ymin). So you probably want to keep xmin and ymin at 0.
0/0 is in mathematical representation left/down corner.
The function is called
2023-11-18 02:26:05 +01:00
```
berechneflugbahn(cow, xmin, xmax, ymin, ymax, startwinkel, startgeschwindigkeit, starthoehe)
```
2023-11-18 02:38:18 +01:00
and returns a list of x and y coordinates: [x1,y1,x2,y2....] like the following example for a display with a width of 10 points/pixel/char/weltraumgnietschies starting with x=0
2023-11-18 02:26:05 +01:00
```
2023-11-18 02:38:18 +01:00
[0, 0, 1, 1.1, 2, 1.7, 3, 2.4, 4, 2.9, 5, 3.5, 6, 4.0, 7, 4.5, 8, 5.0, 9, 5.4]
2023-11-18 02:26:05 +01:00
```
2023-11-18 02:34:38 +01:00
2023-11-18 02:35:58 +01:00
The parameter cow is not useless, it can be set to any singlebyte ASCII string like "*" or some doublespaced UTF8 char like "🐄". If it is a singlechar in ASCII, which is the default, the curve will be calculated with singlesteps, if ist is a UTF8-String, each step will be 2 points, because we now know, we have a textmode display and doublewidth chars.
2023-11-18 02:26:05 +01:00
2023-11-19 17:59:57 +01:00
```
# X-Resolution of the display
2023-11-19 18:25:08 +01:00
cow="🐫"
2023-11-19 17:59:57 +01:00
xmax = 100
ymax = 40
ymin = 0
xmin = 0
startwinkel = 34
startgeschwindigkeit = 31
starthoehe = 0
ergebnis = berechneflugbahn(cow, xmin, xmax, ymin, ymax, startwinkel, startgeschwindigkeit, starthoehe)
for count in range(xmin, len(ergebnis), 2):
x, y = ergebnis[count], ergebnis[count + 1]
curpos(x, y)
print(cow, end="")
```
2023-11-18 02:26:05 +01:00