[Gmsh] Specicying viewport or viewpoint

Christophe Geuzaine geuzaine at acm.caltech.edu
Thu Apr 25 18:43:28 CEST 2002


"Pascal A. Dupuis" wrote:
> 
> Hello,
> 
> I would like to produce a set of views of a 2D structure together with
> various fields. I tried something like:
> 
> General.RotationZ=90;
> General.TranslationY= +.01;
> 
> But, from the docs, I didn't see anyhing permitting to specify an
> initial "pan" or viewport. Moreover, it seems that panning has
> interactions with Translation: if you load a geometry containing a
> translation, pan it, then reload it, it appears at another position???

The simplest is to use Euler angles for the rotations, and
translation+scale for the position. First, disable the trackball
rotation mode with "General.Trackball = 0;". Then specify the desired
translation and rotation (in that order: rotations are applied after
translations).

However, what I usually do is

- get the viewport I like interactively
- save the current options (File->Save as->Geometry->Gmsh complete
options)
- copy the lines defining the translations, rotations, scales, window
size in a separate file
- merge this option file each time I produce a new graph

Christophe

-- 
Christophe Geuzaine

Tel: (626) 395-4552    http://www.geuz.org
Fax: (626) 578-0124    mailto:geuzaine at acm.caltech.edu