Index: /trunk/sources/HeuristicLab.Problems.TestFunctions.Views/3.3/SingleObjectiveTestFunctionSolutionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions.Views/3.3/SingleObjectiveTestFunctionSolutionView.cs	(revision 3664)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions.Views/3.3/SingleObjectiveTestFunctionSolutionView.cs	(revision 3665)
@@ -24,8 +24,7 @@
 using System.Windows.Forms;
 using HeuristicLab.Core.Views;
+using HeuristicLab.Data;
 using HeuristicLab.MainForm;
-using HeuristicLab.Problems.TestFunctions;
-using HeuristicLab.Data;
-using System.Collections.Generic;
+using HeuristicLab.Encodings.RealVectorEncoding;
 
 namespace HeuristicLab.Problems.TestFunctions.Views {
@@ -35,5 +34,7 @@
   [View("Single Objective Test Functions View")]
   [Content(typeof(SingleObjectiveTestFunctionSolution), true)]
-  public partial class SingleObjectiveTestFunctionSolutionView : HeuristicLab.Core.Views.ItemView {
+  public partial class SingleObjectiveTestFunctionSolutionView : ItemView {
+    private Bitmap backgroundImage;
+
     public new SingleObjectiveTestFunctionSolution Content {
       get { return (SingleObjectiveTestFunctionSolution)base.Content; }
@@ -43,30 +44,34 @@
     public SingleObjectiveTestFunctionSolutionView() {
       InitializeComponent();
-
+      pictureBox.SizeChanged += new EventHandler(pictureBox_SizeChanged);
       qualityView.ReadOnly = true;
       realVectorView.ReadOnly = true;
+      backgroundImage = null;
     }
 
     protected override void DeregisterContentEvents() {
-      Content.RealVectorChanged -= new EventHandler(Content_RealVectorChanged);
+      Content.BestKnownRealVectorChanged -= new EventHandler(Content_BestKnownRealVectorChanged);
+      Content.BestRealVectorChanged -= new EventHandler(Content_BestRealVectorChanged);
       Content.QualityChanged -= new EventHandler(Content_QualityChanged);
+      Content.PopulationChanged -= new EventHandler(Content_PopulationChanged);
       base.DeregisterContentEvents();
     }
     protected override void RegisterContentEvents() {
       base.RegisterContentEvents();
-      Content.RealVectorChanged += new EventHandler(Content_RealVectorChanged);
+      Content.BestKnownRealVectorChanged += new EventHandler(Content_BestKnownRealVectorChanged);
+      Content.BestRealVectorChanged += new EventHandler(Content_BestRealVectorChanged);
       Content.QualityChanged += new EventHandler(Content_QualityChanged);
-    }
-
-    void Content_QualityChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_QualityChanged), sender, e);
-      else {
-        qualityView.ViewType = null;
-        qualityView.Content = Content.BestQuality;
-      }
-    }
-
-    void Content_RealVectorChanged(object sender, EventArgs e) {
+      Content.PopulationChanged += new EventHandler(Content_PopulationChanged);
+    }
+
+    private void Content_BestKnownRealVectorChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_BestKnownRealVectorChanged), sender, e);
+      else {
+        GenerateImage();
+      }
+    }
+
+    private void Content_BestRealVectorChanged(object sender, EventArgs e) {
       if (InvokeRequired)
         Invoke(new EventHandler(Content_QualityChanged), sender, e);
@@ -75,4 +80,24 @@
         realVectorView.Content = Content.BestRealVector;
         pictureBox.Visible = Content.BestRealVector.Length == 2;
+        GenerateImage();
+      }
+    }
+
+    private void Content_QualityChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_QualityChanged), sender, e);
+      else {
+        qualityView.ViewType = null;
+        qualityView.Content = Content.BestQuality;
+        pictureBox.Visible = Content.BestRealVector.Length == 2;
+        GenerateImage();
+      }
+    }
+
+    private void Content_PopulationChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_PopulationChanged), sender, e);
+      else {
+        GenerateImage();
       }
     }
@@ -92,4 +117,5 @@
 
         pictureBox.Visible = Content.BestRealVector.Length == 2;
+        GenerateImage();
       }
 
@@ -101,4 +127,76 @@
       realVectorView.Enabled = Content != null;
     }
+
+    private void GenerateImage() {
+      if (pictureBox.Enabled && pictureBox.Width > 0 && pictureBox.Height > 0) {
+        if (Content == null) {
+          pictureBox.Image = null;
+        } else {
+          if (backgroundImage == null) {
+            GenerateBackgroundImage();
+            pictureBox.Image = backgroundImage;
+          }
+          pictureBox.Refresh();
+          DoubleMatrix bounds = Content.Evaluator.Bounds;
+          double xMin = bounds[0, 0], xMax = bounds[0, 1], yMin = bounds[1 % bounds.Rows, 0], yMax = bounds[1 % bounds.Rows, 1];
+          double xStep = backgroundImage.Width / (xMax - xMin), yStep = backgroundImage.Height / (yMax - yMin);
+          using (Graphics graphics = pictureBox.CreateGraphics()) {
+            if (Content.BestKnownRealVector != null) {
+              Pen cross = new Pen(Brushes.Red, 2.0f);
+              float a = (float)((Content.BestKnownRealVector[0] - xMin) * xStep);
+              float b = (float)((Content.BestKnownRealVector[1] - yMin) * yStep);
+              graphics.DrawLine(cross, a - 4, b - 4, a + 4, b + 4);
+              graphics.DrawLine(cross, a - 4, b + 4, a + 4, b - 4);
+            }
+            foreach (RealVector vector in Content.Population)
+              graphics.FillEllipse(Brushes.Blue, (float)((vector[0] - xMin) * xStep - 4), (float)((vector[1] - yMin) * yStep - 4), 8.0f, 8.0f);
+            if (Content.BestRealVector != null) {
+              graphics.FillEllipse(Brushes.Green, (float)((Content.BestRealVector[0] - xMin) * xStep - 5), (float)((Content.BestRealVector[1] - yMin) * yStep - 5), 10.0f, 10.0f);
+            }
+          }
+        }
+      }
+    }
+
+    private void GenerateBackgroundImage() {
+      if (backgroundImage != null)
+        backgroundImage.Dispose();
+      backgroundImage = new Bitmap(pictureBox.Width, pictureBox.Height);
+      DoubleMatrix bounds = Content.Evaluator.Bounds;
+      double xMin = bounds[0, 0], xMax = bounds[0, 1], yMin = bounds[1 % bounds.Rows, 0], yMax = bounds[1 % bounds.Rows, 1];
+      double xStep = (xMax - xMin) / backgroundImage.Width, yStep = (yMax - yMin) / backgroundImage.Height;
+      double minPoint = Double.MaxValue, maxPoint = Double.MinValue;
+      DoubleMatrix points = new DoubleMatrix(backgroundImage.Height, backgroundImage.Width);
+      for (int i = 0; i < backgroundImage.Width; i++)
+        for (int j = 0; j < backgroundImage.Height; j++) {
+          points[j, i] = Content.Evaluator.Evaluate2D(xMin + i * xStep, yMin + j * yStep);
+          if (points[j, i] < minPoint) minPoint = points[j, i];
+          if (points[j, i] > maxPoint) maxPoint = points[j, i];
+        }
+      double grayStep;
+      if (maxPoint == minPoint) grayStep = -1;
+      else grayStep = 100 / (maxPoint - minPoint);
+
+      for (int i = 0; i < backgroundImage.Width; i++)
+        for (int j = 0; j < backgroundImage.Height; j++) {
+          int luminosity = (grayStep > 0) ? (int)Math.Round((points[j, i] - minPoint) * grayStep) : (128);
+          backgroundImage.SetPixel(i, j, Color.FromArgb(255 - luminosity, 255 - luminosity, 255 - luminosity));
+        }
+    }
+
+    private void pictureBox_SizeChanged(object sender, EventArgs e) {
+      if (backgroundImage != null) backgroundImage.Dispose();
+      backgroundImage = null;
+      pictureBox.Image = null;
+ 	    GenerateImage();
+    }
+
+    protected override void OnClosing(FormClosingEventArgs e) {
+      pictureBox.Enabled = false;
+      if (backgroundImage != null) backgroundImage.Dispose();
+      backgroundImage = null;
+      pictureBox.Image = null;
+      base.OnClosing(e);
+    }
   }
 }
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SingleObjectiveTestFunctionProblemEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SingleObjectiveTestFunctionProblemEvaluator.cs	(revision 3664)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SingleObjectiveTestFunctionProblemEvaluator.cs	(revision 3665)
@@ -84,4 +84,8 @@
     }
 
+    public virtual double Evaluate2D(double x, double y) {
+      return EvaluateFunction(new RealVector(new double[] { x, y }));
+    }
+
     /// <summary>
     /// Evaluates the test function for a specific <paramref name="point"/>.
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/ISingleObjectiveTestFunctionProblemEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/ISingleObjectiveTestFunctionProblemEvaluator.cs	(revision 3664)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/ISingleObjectiveTestFunctionProblemEvaluator.cs	(revision 3665)
@@ -38,4 +38,6 @@
 
     ILookupParameter<RealVector> PointParameter { get; }
+
+    double Evaluate2D(double x, double y);
   }
 }
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/SingleObjectiveTestFunctionSolution.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/SingleObjectiveTestFunctionSolution.cs	(revision 3664)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/SingleObjectiveTestFunctionSolution.cs	(revision 3665)
@@ -60,8 +60,8 @@
       set {
         if (bestRealVector != value) {
-          if (bestRealVector != null) DeregisterRealVectorEvents();
+          if (bestRealVector != null) DeregisterBestRealVectorEvents();
           bestRealVector = value;
-          if (bestRealVector != null) RegisterRealVectorEvents();
-          OnRealVectorChanged();
+          if (bestRealVector != null) RegisterBestRealVectorEvents();
+          OnBestRealVectorChanged();
         }
       }
@@ -106,10 +106,4 @@
         }
       }
-    }
-
-    private Image fitnessLandscape;
-    public Image FitnessLandscape {
-      get { return fitnessLandscape; }
-      set { fitnessLandscape = value; }
     }
 
@@ -128,5 +122,5 @@
     private void Initialize() {
       if (bestKnownRealVector != null) RegisterBestKnownRealVectorEvents();
-      if (bestRealVector != null) RegisterRealVectorEvents();
+      if (bestRealVector != null) RegisterBestRealVectorEvents();
       if (bestQuality != null) RegisterQualityEvents();
       if (population != null) RegisterPopulationEvents();
@@ -141,5 +135,4 @@
       clone.population = (ItemArray<RealVector>)cloner.Clone(population);
       clone.evaluator = (ISingleObjectiveTestFunctionProblemEvaluator)cloner.Clone(evaluator);
-      clone.fitnessLandscape = null;
       clone.Initialize();
       return clone;
@@ -154,7 +147,7 @@
     }
 
-    public event EventHandler RealVectorChanged;
-    private void OnRealVectorChanged() {
-      var changed = RealVectorChanged;
+    public event EventHandler BestRealVectorChanged;
+    private void OnBestRealVectorChanged() {
+      var changed = BestRealVectorChanged;
       if (changed != null)
         changed(this, EventArgs.Empty);
@@ -190,11 +183,11 @@
       BestKnownRealVector.Reset -= new EventHandler(BestKnownRealVector_Reset);
     }
-    private void RegisterRealVectorEvents() {
-      BestRealVector.ItemChanged += new EventHandler<EventArgs<int>>(RealVector_ItemChanged);
-      BestRealVector.Reset += new EventHandler(RealVector_Reset);
-    }
-    private void DeregisterRealVectorEvents() {
-      BestRealVector.ItemChanged -= new EventHandler<EventArgs<int>>(RealVector_ItemChanged);
-      BestRealVector.Reset -= new EventHandler(RealVector_Reset);
+    private void RegisterBestRealVectorEvents() {
+      BestRealVector.ItemChanged += new EventHandler<EventArgs<int>>(BestRealVector_ItemChanged);
+      BestRealVector.Reset += new EventHandler(BestRealVector_Reset);
+    }
+    private void DeregisterBestRealVectorEvents() {
+      BestRealVector.ItemChanged -= new EventHandler<EventArgs<int>>(BestRealVector_ItemChanged);
+      BestRealVector.Reset -= new EventHandler(BestRealVector_Reset);
     }
     private void RegisterQualityEvents() {
@@ -221,9 +214,9 @@
       OnBestKnownRealVectorChanged();
     }
-    private void RealVector_ItemChanged(object sender, EventArgs<int> e) {
-      OnRealVectorChanged();
-    }
-    private void RealVector_Reset(object sender, EventArgs e) {
-      OnRealVectorChanged();
+    private void BestRealVector_ItemChanged(object sender, EventArgs<int> e) {
+      OnBestRealVectorChanged();
+    }
+    private void BestRealVector_Reset(object sender, EventArgs e) {
+      OnBestRealVectorChanged();
     }
     private void Quality_ValueChanged(object sender, EventArgs e) {
