diff --git a/matlab/+gtsam/plotFlyingResults.m b/matlab/+gtsam/plotFlyingResults.m index 7a0ca77c8..d09842934 100644 --- a/matlab/+gtsam/plotFlyingResults.m +++ b/matlab/+gtsam/plotFlyingResults.m @@ -19,10 +19,7 @@ end figID = 1; figure(figID); -axis equal -axis([0, options.fieldSize.x, 0, options.fieldSize.y, 0, 20]); - -view(3); +view([30, 0]); sampleDensity = 120; cylinderNum = length(cylinders); @@ -34,7 +31,7 @@ for i = 1:cylinderNum Z = Z * cylinders{i}.height; h_cylinder = surf(X,Y,Z); - set(h_cylinder, 'FaceAlpha', 0.5); + set(h_cylinder, 'FaceColor', [0 0 0.5], 'FaceAlpha', 0.2, 'EdgeColor', [0 0 1]); hold on end @@ -98,6 +95,9 @@ for i = 1:posesSize end end + axis equal + axis([0, options.fieldSize.x, 0, options.fieldSize.y, 0, 20]); + drawnow; if options.writeVideo @@ -114,6 +114,11 @@ end % wait for two seconds pause(2); +% change views +for i = 0 : 0.5 : 60 + view([i + 30, i]); +end + %% plot point covariance diff --git a/matlab/+gtsam/points2DTrackMonocular.m b/matlab/+gtsam/points2DTrackMonocular.m index 04c896188..3d552aaa2 100644 --- a/matlab/+gtsam/points2DTrackMonocular.m +++ b/matlab/+gtsam/points2DTrackMonocular.m @@ -103,7 +103,5 @@ end %plot3DPoints(initialEstimate, [], marginals); %plot3DTrajectory(initialEstimate, '*', 1, 8, marginals); -view(3); - end diff --git a/matlab/gtsam_examples/CameraFlyingExample.m b/matlab/gtsam_examples/CameraFlyingExample.m index 01e335d15..1d779b135 100644 --- a/matlab/gtsam_examples/CameraFlyingExample.m +++ b/matlab/gtsam_examples/CameraFlyingExample.m @@ -138,7 +138,7 @@ KMono = Cal3_S2(525,525,0,320,240); cameraPoses = cell(options.poseNum, 1); theta = 0; for i = 1:options.poseNum - t = Point3([(i-1)*(options.fieldSize.x - 20)/options.poseNum + 20, ... + t = Point3([(i-1)*(options.fieldSize.x - 10)/options.poseNum + 10, ... 15, 10]'); camera = SimpleCamera.Lookat(t, ... Point3(options.fieldSize.x/2, options.fieldSize.y/2, 0), ...