Пример #1
0
def plottenniscourt3D():
    x = [
        -5.49, -5.49, 5.49, 5.49, -5.49, -5.49, 5.49, 5.49, 4.12, 4.12, -4.12,
        -4.12, -4.12, 4.12, 0, 0, 4.12, -4.12
    ]
    y = [
        11.89, -11.89, -11.89, 11.89, 11.89, 0, 0, -11.89, -11.89, 11.89,
        11.89, -11.89, -6.40, -6.4, -6.4, 6.4, 6.4, 6.40
    ]
    z = [0] * len(x)
    ax.plot3D(x, y, z, 'green')
    #On fait ça pour avoir un graph à l'echelle 1:1 car set_equal marche pas en 3d
    x = [12]
    y = [12]
    z = [12]
    ax.plot3D(x, y, z)
    x = [-12]
    y = [-12]
    z = [-12]
    ax.plot3D(x, y, z)
Пример #2
0
def plotnet3D():
    z = [0, 0.91, 0.91, 0]
    y = [0, 0, 0, 0]
    x = [-5.49, -5.49, 5.49, 5.49]
    ax.plot3D(x, y, z, 'grey')
Пример #3
0
           ['-11.89', '-6.40', '0', '6.40', '11.89'])
plt.plot(x[:stop], y[:stop], '#000000')
plt.plot(x[stop - 1:], y[stop - 1:], '-.', color='#000000')
plt.scatter(x[stop],
            y[stop],
            color='yellow',
            alpha=1,
            edgecolors='black',
            zorder=10)
plt.title("Vue du dessus du terrain de la trajectoire du coup sans aléas")
plt.savefig("image/vue_dessus" + num + ".SVG")

#Plot 3D
plt.figure(figsize=(8, 8))
ax = plt.axes(projection="3d")
ax.plot3D(x[:stop], y[:stop], z[:stop], '#000000', zorder=10)
ax.plot3D(x[stop - 1:],
          y[stop - 1:],
          z[stop - 1:],
          '--',
          color='#000000',
          zorder=10)
ax.axis('off')
ax.margins(-0.49, -0.49, 0)
ax.view_init(elev=20, azim=-65)
ax.dist = 6
plottenniscourt3D()
plt.title("Plot 3D de la trajectoire du coup sans aléas")
plotnet3D()
plt.savefig("image/vue_plot_3D" + num + ".SVG")