Пример #1
0
    private float SpeedRightSquare(float k)
    {
        Accelaration acc        = GetComponent <Accelaration>();
        float        topside    = (acc.t3 - acc.t2) + (acc.t4 - acc.t3 + acc.t2 - acc.t1) * (1 - k);
        float        bottomside = acc.t4 - acc.t1;

        return((topside + bottomside) / 2 * k);
    }
Пример #2
0
    private float SpeedLeftSquare(float k)
    {
        Accelaration acc        = GetComponent <Accelaration>();
        float        topside    = (acc.z3 - acc.z2) + (acc.z4 - acc.z3 + acc.z2 - acc.z1) * (1 - k);
        float        bottomside = acc.z4 - acc.z1;

        return((topside + bottomside) / 2 * k);
    }
Пример #3
0
    private float SpeedMiddleSquare(float k)
    {
        Accelaration acc        = GetComponent <Accelaration>();
        float        topside    = (acc.o3 - acc.o2) + (acc.o4 - acc.o3 + acc.o2 - acc.o1) * (1 - k);
        float        bottomside = acc.o4 - acc.o1;

        return((topside + bottomside) / 2 * k);
    }
Пример #4
0
    private float SpeedRightCenter(float k)
    {
        Accelaration acc        = GetComponent <Accelaration>();
        float        topside    = (acc.t3 - acc.t2) + (acc.t4 - acc.t3 + acc.t2 - acc.t1) * (1 - k);;
        float        bottomside = acc.t4 - acc.t1;
        float        leftside   = (acc.t2 - acc.t1) * k * (acc.t2 - acc.t1) * k + k * k;
        float        rightside  = (acc.t4 - acc.t3) * k * (acc.t4 - acc.t3) * k + k * k;

        return(bottomside / 2 + (2 * topside + bottomside) * (leftside - rightside) / (6 * (bottomside * bottomside - topside * topside)) + acc.t1);
    }