def moment_ss_shear_bending(L, Pin, ain):
    """
    Shear Bending plot of moment loads of a simply supported beam
    L = 4 # total length of beam
    Pin = [5]  # point moment load
    ain = [2]  # location of point load

    # or more multiple point moments
    L = 10
    Pin = [3,-15]
    ain = [2,6]
    """
    import numpy as np
    import matplotlib.pyplot as plt
    x = np.arange(0, L, L * 0.02)
    V = np.zeros(len(x))
    M = np.zeros(len(x))
    for a, P in zip(ain, Pin):
        V += -P / L
        M[x <= a] += -P * x[x <= a] / L
        M[x > a] += P * (1 - x[x > a] / L)
    plt.figure()
    plt.title('Point Moment Loads')
    plt.subplot(2, 1, 1)
    plt.stem(x, V)
    plt.ylabel('V,shear')
    plt.subplot(2, 1, 2)
    plt.stem(x, M)
    plt.ylabel('M,moment')
