public HarmonicOscillatorModelingResultViewModel(Tuple <List <double>, List <double>, List <double>, List <double> > numeric) { for (var i = 0; i < numeric.Item1.Count; ++i) { Xt.Add(new ObservablePoint(numeric.Item1[i], numeric.Item2[i])); Vt.Add(new ObservablePoint(numeric.Item1[i], numeric.Item3[i])); E.Add(new ObservablePoint(numeric.Item1[i], numeric.Item4[i])); Vx.Add(new ObservablePoint(numeric.Item2[i], numeric.Item3[i])); } Collection.Add(new LineSeries() { Values = Xt }); }
public HorizontalThrowModelingResultViewModel( Tuple <List <double>, List <Tuple <double, double> >, List <Tuple <double, double> > > numericValues) { List <double> ts = numericValues.Item1; List <Tuple <double, double> > xy = numericValues.Item2, vs = numericValues.Item3; for (int i = 0; i < ts.Count; ++i) { Yt.Add(new ObservablePoint(ts[i], xy[i].Item2)); Xt.Add(new ObservablePoint(ts[i], xy[i].Item1)); Yx.Add(new ObservablePoint(xy[i].Item1, xy[i].Item2)); Vxt.Add(new ObservablePoint(ts[i], vs[i].Item1)); Vyt.Add(new ObservablePoint(ts[i], vs[i].Item2)); } Collection.Add(new LineSeries() { Values = Yx }); }