[GRASS-SVN] r56509 - grass-addons/grass6/display/d.anaglyph
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu May 30 04:33:30 PDT 2013
Author: hamish
Date: 2013-05-30 04:33:30 -0700 (Thu, 30 May 2013)
New Revision: 56509
Modified:
grass-addons/grass6/display/d.anaglyph/d.anaglyph
Log:
do the twist
Modified: grass-addons/grass6/display/d.anaglyph/d.anaglyph
===================================================================
--- grass-addons/grass6/display/d.anaglyph/d.anaglyph 2013-05-30 11:18:15 UTC (rev 56508)
+++ grass-addons/grass6/display/d.anaglyph/d.anaglyph 2013-05-30 11:33:30 UTC (rev 56509)
@@ -277,7 +277,15 @@
fi
g.message "Viewing height: $height `g.proj -g | grep units | cut -f2- -d=`"
- RENDER_OPTS="resolution_fine=1 perspective=15 twist=180 \
+ # really annoying: Nviz rotates to "landscape" orientation, so we have
+ # to check the region dimensions and sometimes rotate it back.
+ TWIST=180
+ LARGER=`echo "$ew_extent $ns_extent" | awk '{if ($1 > $2) { print "ew" } else { print "ns" }}'`
+ if [ "ns" = "$LARGER" ] ; then
+ TWIST=90
+ fi
+
+ RENDER_OPTS="resolution_fine=1 perspective=15 twist=$TWIST \
position=0.5,0.5 bgcolor=black $VLINES $VPOINTS"
g.message "Rendering 3D scenes ..."
More information about the grass-commit
mailing list