private void DrawAngleArc(Saccade saccade) { // Want to draw the angle arc at the beginning of the saccade (?) System.Windows.Point arcCentre = new System.Windows.Point(saccade.From.x, saccade.From.y); System.Windows.Point arcCentreCanvas = ScreenToCanvas(arcCentre); arcCentreCanvas.X += fixationCircleSize / 2; arcCentreCanvas.Y += fixationCircleSize / 2; Double angle = saccade.Direction; // Create a path to draw a geometry with. Path arcPath = CreateArcPath(arcCentreCanvas, angle, saccadeAngleRadius); canvas.Children.Add(arcPath); saccadeAnglePaths.Add(arcPath); }
// TODO: possible feature: "longest follow streak, mean/median follow streak" // "longest opposite streak, mean/meadian opposite streak" private double CountRelation(Saccade.Relation relation, List <Saccade> saccades) { int count = 0; int numberOfSaccades = saccades.Count; // Compare each pair of saccades. for (int i = 1; i < numberOfSaccades; i++) { Saccade previous = saccades[i - 1]; Saccade next = saccades[i]; if (Saccade.Compare(next, previous) == relation) { count++; } } return(count); }
public List <Saccade> getSaccades(List <Fixation> fixations) { List <Saccade> saccades = new List <Saccade>(); Saccade s = new Saccade(); int i = 0; foreach (Fixation f in fixations) { if (s.start == null) { s.start = f; } else { s.finish = f; s.completeSaccade(i); saccades.Add(s); s = new Saccade(); s.start = f; i++; } } return(saccades); }