[vtkusers] RE: vtkusers digest, Vol 1 #2511 - 9 msgs

Goodwin Lawlor goodwin.lawlor at ucd.ie
Tue Mar 23 13:47:03 EST 2004


Hi David,

Flipping any single axis will convert from one coord system to the
other. The example below flips the x axis... See which "axis flipping"
works best for you.

Here's a tcl example of what you what:

vtkMatrix4x4 matrix
	matrix Identity
	#Flip the x-axis
	matrix SetElement 0 0 -1.0
	#Flip the y-axis
	#matrix SetElement 1 1 -1.0
	#Flip the z-axis
	#matrix SetElement 2 2 -1.0

vtkTransform trans
	trans SetMatrix matrix

vtkTransformFilter transFilter
	transFilter SetInput RectilinearGrid
	transFilter SetTransform trans
	
--__--__--

Message: 4
Date: Tue, 23 Mar 2004 14:35:57 +0100
From: Vetsch David <vetsch at vaw.baug.ethz.ch>
Reply-To: vetsch at vaw.baug.ethz.ch
Organization: VAW ETHZ
To: vtkusers at vtk.org
Subject: [vtkusers] how to change coordinate system from right to
left-handed

Hi,
I got RectilinearGrid data from a CFD solver with a left-handed 
coordinate system. I tried out a lot of things in VTK but didn't manage 
to change the data or the basic coordinate system to a right-handed one 
(it needs mirroring). Does anybody know how to do that (..in a simple
way)?

-- 
 David Vetsch
 Applied Numerics Division
 Laboratory of Hydraulics, Hydrology and Glaciology
 ETH-Zentrum
 CH-8092 Zurich 
 Switzerland

 phone:    +41 1 632 41 04
 fax:      +41 1 632 11 92
 email:    vetsch at vaw.baug.ethz.ch




More information about the vtkusers mailing list