changeset 25156:c578827b2eaf stable

Update reference values for cam* functions (bug #53435). * camlookat.m, camorbit.m, camroll.m, camzoom.m, camlight.m: Update reference values in tests to values with maximum numeric precision from Matlab R2016a on Windows.
author Markus Mützel <markus.muetzel@gmx.de>
date Tue, 03 Apr 2018 18:40:29 +0200
parents 17387d4edd1d
children fbcb1b7e3eb7
files scripts/plot/appearance/camlookat.m scripts/plot/appearance/camorbit.m scripts/plot/appearance/camroll.m scripts/plot/appearance/camzoom.m scripts/plot/draw/camlight.m
diffstat 5 files changed, 30 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/appearance/camlookat.m	Thu Apr 05 11:35:58 2018 -0500
+++ b/scripts/plot/appearance/camlookat.m	Tue Apr 03 18:40:29 2018 +0200
@@ -277,7 +277,7 @@
 %!   close (hf);
 %! end_unwind_protect
 
-## compare to matlab2014a output
+## compare to Matlab R2016a output
 %!test
 %! hf = figure ("visible", "off");
 %! unwind_protect
@@ -291,16 +291,16 @@
 %!   axis tight
 %!   camlookat (s1);
 %!   assert (camtarget (), [-4 0 -1], -eps);
-%!   assert (campos (), [-22.806319527016 -24.5088727773662 16.8359421671461], -1e-7);
+%!   assert (campos (), [-22.806319527015962 -24.508872777366225 16.835942167146133], -1e-7);
 %!   camlookat (s2);
 %!   assert (camtarget (), [0 1.5 2], -eps);
-%!   assert (campos (), [-5.82093528266174 -6.08599055403138 7.52058391388657], -1e-7);
+%!   assert (campos (), [-5.8209352826617424 -6.0859905540313779 7.5205839138865720], -1e-7);
 %!   camlookat (s3);
-%!   assert (camtarget (), [0 0 0.1528529020838], 1e-10);
-%!   assert (campos (), [-30.3728392082653 -39.5826547014375 28.9585000034444], -1e-7);
+%!   assert (camtarget (), [0 0 0.15285290208388014], 1e-10);
+%!   assert (campos (), [-30.372839208265287 -39.582654701437512 28.958500003444449], -1e-7);
 %!   camlookat ();
 %!   assert (camtarget (), [-0.75 0 0.5], -eps);
-%!   assert (campos (), [-35.7955620339723 -45.6722656481532 33.7372645671114], -1e-7);
+%!   assert (campos (), [-35.795562033972338 -45.672265648153193 33.737264567111389], -1e-7);
 %! unwind_protect_cleanup
 %!   close (hf);
 %! end_unwind_protect
--- a/scripts/plot/appearance/camorbit.m	Thu Apr 05 11:35:58 2018 -0500
+++ b/scripts/plot/appearance/camorbit.m	Tue Apr 03 18:40:29 2018 +0200
@@ -216,8 +216,8 @@
 %!   p = campos ();
 %!   u = camup ();
 %!   ## Matlab 2008a
-%!   pm = [-0.724972932190484  -9.37224596596009  14.5476946558943];
-%!   um = [0.375634339316796  0.77045096344497  0.515076844803523];
+%!   pm = [-0.72497293219048453 -9.3722459659600944 14.547694655894309];
+%!   um = [ 0.37563433931679546 0.77045096344496944 0.51507684480352300];
 %!   assert (p, pm, -5e-15);
 %!   assert (u, um, -5e-15);
 %! unwind_protect_cleanup
@@ -232,8 +232,8 @@
 %!   p = campos ();
 %!   u = camup ();
 %!   ## Matlab 2014a
-%!   pm = [-0.215772672525099  -9.04926615428815  14.7669978066852];
-%!   um = [0.413058199972826  0.773801198226611  0.48022351989284];
+%!   pm = [-0.21577267252509916 -9.0492661542881496 14.766997806685227];
+%!   um = [ 0.41305819997282633 0.77380119822661142 0.48022351989284007];
 %!   assert (p, pm, -2e-14);  # FIXME: looser tolerance needed on i386
 %!   assert (u, um, -5e-15);
 %! unwind_protect_cleanup
@@ -248,10 +248,10 @@
 %!   p = campos ();
 %!   u = camup ();
 %!   va = camva ();
-%!   ## Matlab 2014a
-%!   pm = [1.92211976102821  -6.48896756467585  15.9436117479337];
-%!   um = [-0.261437503254928  0.882598219532154  0.390731128489274];
-%!   vam = 10.1274850414735;
+%!   ## Matlab 2016a
+%!   pm = [ 1.92211976102821500 -6.48896756467585330 15.943611747933700];
+%!   um = [-0.26143750325492854  0.88259821953215356 0.39073112848927383];
+%!   vam = 10.127485041473481;
 %!   assert (p, pm, -5e-15);
 %!   assert (u, um, -5e-15);
 %!   assert (va, vam, -5e-15);
--- a/scripts/plot/appearance/camroll.m	Thu Apr 05 11:35:58 2018 -0500
+++ b/scripts/plot/appearance/camroll.m	Tue Apr 03 18:40:29 2018 +0200
@@ -123,12 +123,18 @@
 %!   p = camup ();
 %!   ## from Matlab R2014a
 %!   q = [0.826398839602911  0.255644120004753  0.50170812412194];
+%!   ## from Matlab R2016a
+%!   q = [0.33969638129660373 0.02014238382998192 0.94031944194919104];
 %!   assert (p, q, 10*eps);
 %!   camroll (-30);
 %!   ## note it does not go back to [0 0 1]: instead orthog to camera view:
 %!   p = camup ();
+%!   ## The following assert doesn't seem to have any validation in Matlab R2016a
 %!   assert (dot (p, camtarget () - campos ()), 0, 32*eps);  # FIXME: looser tolerance needed on i386
+%!   ## from Matlab R2014a
 %!   q = [0.496200420425837  0.646660977913424  0.57932264103285];
+%!   ## from Matlab R2016a
+%!   q = [0.14033891839365262 0.18289323924769943 0.97306477226420207];
 %!   assert (p, q, 10*eps);
 %! unwind_protect_cleanup
 %!   close (hf);
@@ -145,7 +151,8 @@
 %!   camroll (hax1, 30);
 %!   x = camup (hax1);
 %!   y = camup (hax2);
-%!   assert (x, [0.660278 0.039151 0.750000], -1e-5)
+%!   ## from Matlab R2016a
+%!   assert (x, [0.66027810132845211 0.03915135893036471 0.75000000000000022], -1e-5)
 %!   assert (y, [0 0 1])
 %! unwind_protect_cleanup
 %!   close (hf);
--- a/scripts/plot/appearance/camzoom.m	Thu Apr 05 11:35:58 2018 -0500
+++ b/scripts/plot/appearance/camzoom.m	Tue Apr 03 18:40:29 2018 +0200
@@ -111,9 +111,9 @@
 %!   x = camva ();
 %!   camzoom (2);
 %!   y = camva ();
-%!   ## Matlab 2014a
-%!   xm = 10.339584907202;
-%!   ym = 5.18033628450948;
+%!   ## Matlab 2016a
+%!   xm = 10.339584907201974;
+%!   ym = 5.1803362845094822;
 %!   assert (tand (x/2) / tand (y/2), tand (xm/2) / tand (ym/2), 2e-14)
 %! unwind_protect_cleanup
 %!   close (hf);
@@ -129,8 +129,8 @@
 %!   camzoom (5);
 %!   y = camva ();
 %!   ## Matlab 2014a
-%!   xm = 13.0746680295069;
-%!   ym = 2.62588066987212;
+%!   xm = 13.074668029506947;
+%!   ym = 2.6258806698721222;
 %!   assert (tand (x/2) / tand (y/2), tand (xm/2) / tand (ym/2), 2e-14)
 %! unwind_protect_cleanup
 %!   close (hf);
--- a/scripts/plot/draw/camlight.m	Thu Apr 05 11:35:58 2018 -0500
+++ b/scripts/plot/draw/camlight.m	Tue Apr 03 18:40:29 2018 +0200
@@ -250,13 +250,13 @@
 %!   set (gca (), "cameratarget", [0.5 -0.3 -0.3]);
 %!   h = camlight (45, 20);
 %!   A = get (h, "position");
-%!   ## From maillist, someone tested on Matlab R2015b for OSX:
-%!   B = [-3.301207088157029 15.474861455795917 1.115828634895176];
+%!   ## From  Matlab R2016a for Windows:
+%!   B = [-3.3012070881570281 15.474861455795915 1.1158286348951763];
 %!   assert (A, B, -20*eps);
 %!
 %!   h = camlight (300, -190);
 %!   A = get (h, "position");
-%!   B = [-11.054849015640563 2.931330143100648 -11.315623892092518];
+%!   B = [-11.054849015640565 2.9313301431006460 -11.315623892092516];
 %!   assert (A, B, -20*eps);
 %! unwind_protect_cleanup
 %!   close (hf);