Exemplo n.º 1
0
    public void GenerateEquations(EquationSystem sys)
    {
        sys.AddParameters(parameters);

        sys.AddEquation(u.Magnitude() - 1.0);
        sys.AddEquation(v.Magnitude() - 1.0);

        var cross = ExpVector.Cross(u, v);
        var dot   = ExpVector.Dot(u, v);

        sys.AddEquation(Exp.Atan2(cross.Magnitude(), dot) - Math.PI / 2);
        sys.AddEquation(n - ExpVector.Cross(u, v));
    }
Exemplo n.º 2
0
 public void AddDrag(Exp drag)
 {
     sys.AddEquation(drag);
 }