From d04e8f0c72f23631f586a0b8bf4158adfc86536b Mon Sep 17 00:00:00 2001
From: Sven Buijssen <sven.buijssen@tu-dortmund.de>
Date: Tue, 14 Sep 2010 12:27:57 +0200
Subject: [PATCH 2/3] ENH: Provide code for aligned of axis along the global y-axis.

---
 Graphics/vtkSuperquadricSource.cxx |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/Graphics/vtkSuperquadricSource.cxx b/Graphics/vtkSuperquadricSource.cxx
index 43388b2..c834cba 100644
--- a/Graphics/vtkSuperquadricSource.cxx
+++ b/Graphics/vtkSuperquadricSource.cxx
@@ -294,9 +294,16 @@ int vtkSuperquadricSource::RequestData(
               nv[1] = -nv[1];
               break;
             case 1:
-              //y-axis
-              //PENDING
+              // y-axis
+              tmp   = pt[1];
+              pt[1] = pt[2];
+              pt[2] = tmp;
+              pt[0] = -pt[0];
 
+              tmp   = nv[1];
+              nv[1] = nv[2];
+              nv[2] = tmp;
+              nv[0] = -nv[0];
               break;
           }
 
@@ -321,6 +328,11 @@ int vtkSuperquadricSource::RequestData(
                 pt[1] = pt[2] = 0.0;
                 break;
 
+              case 1:
+                // y-axis
+                pt[0] = pt[2] = 0.0;
+                break;
+
               case 2:
                 // z-axis
                 pt[0] = pt[1] = 0.0;
-- 
1.7.2.2

