Working model as in Matlab except for stability. 2dViewer working but not in RealTime