修改Python项目并补充Readme.md
@@ -1,8 +1,9 @@
|
||||
# 执行
|
||||
|
||||
```shell
|
||||
$ cd Awesome-Love-Code/Python/001
|
||||
$ python3 -m venv ./venv && source venv/bin/activate
|
||||
$ python3 -m pip install pygame
|
||||
$ cd be_my_girlfriend
|
||||
$ python3 love.py
|
||||
```
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
fig = plt.figure()
|
||||
ax = fig.gca(projection='3d')
|
||||
ax = fig.add_subplot(projection = '3d')
|
||||
[x, t] = np.meshgrid(
|
||||
np.array(range(25)) / 24.0,
|
||||
np.arange(0, 575.5, 0.5) / 575 * 30 * np.pi - 4 * np.pi)
|
||||
|
||||
@@ -3,7 +3,7 @@ import matplotlib.pyplot as plt
|
||||
from matplotlib import cm
|
||||
|
||||
fig = plt.figure()
|
||||
ax = fig.gca(projection='3d')
|
||||
ax = fig.add_subplot(projection = '3d')
|
||||
[x, t] = np.meshgrid(
|
||||
np.array(range(25)) / 24.0,
|
||||
np.arange(0, 575.5, 0.5) / 575 * 17 * np.pi - 2 * np.pi)
|
||||
|
||||
@@ -3,7 +3,7 @@ import matplotlib.pyplot as plt
|
||||
from matplotlib import cm
|
||||
|
||||
fig = plt.figure()
|
||||
ax = fig.gca(projection='3d')
|
||||
ax = fig.add_subplot(projection = '3d')
|
||||
[x, t] = np.meshgrid(
|
||||
np.array(range(25)) / 24.0,
|
||||
np.arange(0, 575.5, 0.5) / 575 * 17 * np.pi - 2 * np.pi)
|
||||
|
||||
@@ -2,7 +2,7 @@ import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
fig = plt.figure()
|
||||
ax = fig.gca(projection='3d')
|
||||
ax = fig.add_subplot(projection = '3d')
|
||||
# 将相位向后移动了6*pi
|
||||
[x, t] = np.meshgrid(
|
||||
np.array(range(25)) / 24.0,
|
||||
|
||||
@@ -2,7 +2,7 @@ import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
fig = plt.figure()
|
||||
ax = fig.gca(projection='3d')
|
||||
ax = fig.add_subplot(projection = '3d')
|
||||
[x, t] = np.meshgrid(
|
||||
np.array(range(25)) / 24.0,
|
||||
np.arange(0, 575.5, 0.5) / 575 * 6 * np.pi - 4 * np.pi)
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
# 安装所需库
|
||||
|
||||
```
|
||||
pip install pillow
|
||||
pip install matplotlib
|
||||
pip install numpy
|
||||
python3 -m venv venv && source venv/bin/activate
|
||||
pip3 install pillow matplotlib numpy
|
||||
```
|
||||
|
||||
# 运行
|
||||
|
||||
```
|
||||
python 文件名.py
|
||||
python code/flower_{x}.py.py
|
||||
```
|
||||
> 上面命令中的{x}表示可以替换为1-6的数值
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -1,22 +1,16 @@
|
||||
# 安装所需库
|
||||
|
||||
```
|
||||
pip install matplotlib
|
||||
pip install numpy
|
||||
python3 -m venv venv && source venv/bin/activate
|
||||
pip3 install matplotlib numpy
|
||||
```
|
||||
|
||||
# 运行
|
||||
|
||||
```
|
||||
python 文件名.py
|
||||
python3 love.py
|
||||
```
|
||||
|
||||

|
||||
|
||||
# 运行
|
||||
|
||||
```
|
||||
python 文件名.py
|
||||
```
|
||||
|
||||

|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
# 安装依赖
|
||||
|
||||
```
|
||||
pip install turtle
|
||||
python3 -m venv venv && source venv/bin/activate
|
||||
pip3 install turtle
|
||||
```
|
||||
|
||||
# 运行
|
||||
|
||||
```
|
||||
python 文件名.py
|
||||
python index.py
|
||||
```
|
||||
|
||||
# 效果
|
||||
|
||||
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
@@ -0,0 +1,16 @@
|
||||
# 安装依赖
|
||||
|
||||
```
|
||||
python3 -m venv venv && source venv/bin/activate
|
||||
pip3 install opencv-python scipy
|
||||
```
|
||||
|
||||
# 运行
|
||||
|
||||
```
|
||||
python3 main.py
|
||||
```
|
||||
|
||||
# 效果
|
||||
|
||||

|
||||
|
After Width: | Height: | Size: 630 KiB |