View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011231VTK(No Category)public2010-09-14 06:552013-04-05 20:35
ReporterSven Buijssen 
Assigned ToSebastien Jourdain 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0011231: Superquadric source has y axis orientation but claims to provide z axis orientation. Patches included
DescriptionFrom the source code documentation:

* vtkCylinderSource.h states in line 18 that the
  axis of the cylinder is aligned along the global y-axis.

* vtkSuperquadricSource.cxx states in line 50 and 277 that the default
  axis of symmetry is aligned along the global z-axis.

Different axes. Please consider the python code attached. It renders a cylinder and a superquadric source next to each other. Clearly, both sources have the same axis of symmetry.

The attached GNU Octave code - copy and pasted into GNU Octave shell - renders
superquadrics with three different axes of symmetry.
The definition of the superquadrics are taken from the paper
      Gordon Kindlmann. Superquadric Tensor Glyphs.
      In Proceedings IEEE TVCG/EG Symposium on Visualization 2004,
        pages 147-154, May 2004, http://www.cs.utah.edu/~gk/papers/vissym04/ [^]
Formulas (3) and (5) in
http://www.cs.utah.edu/~gk/papers/vissym04/vissym04kindlmann.pdf [^]

In the paper the definition range for phi is [0,pi] and for theta [0,2pi].
The present implementation in VTK uses different ranges: phi in [-pi/2,pi], theta in [-pi,pi]
The formulas have been adapted accordingly.

Please find attached a patch that sets the axis of superquadric aligned to the global z-axis as claimed.

The remaining patches provide the pending code for alignment along the global y-axis as well as a method to set the desired axis of alignment.
TagsNo tags attached.
Project
Type
Attached Files? file icon vtk_create_sources_cylinder_along_with_superquadric.py [^] (1,306 bytes) 2010-09-14 06:55
? file icon octave_superquadric.source.m [^] (2,905 bytes) 2010-09-14 06:56
patch file icon 0001-BUG-Axis-of-symmetry-claimed-to-be-the-global-z-axis.patch [^] (3,188 bytes) 2010-09-14 06:56 [Show Content]
patch file icon 0002-ENH-Provide-code-for-aligned-of-axis-along-the-globa.patch [^] (1,051 bytes) 2010-09-14 06:56 [Show Content]
patch file icon 0003-ENH-Provide-a-method-to-set-axis-of-symmetry.patch [^] (1,750 bytes) 2010-09-14 06:56 [Show Content]
patch file icon 0001-BUG-Axis-of-symmetry-claimed-to-be-the-global-z-axis.updated.patch [^] (3,974 bytes) 2010-09-23 17:04 [Show Content]
patch file icon 0002-ENH-Provide-code-for-aligned-of-axis-along-the-globa.updated.patch [^] (1,384 bytes) 2010-09-23 17:04 [Show Content]
png file icon newSource.png [^] (21,692 bytes) 2012-11-16 17:04


png file icon oldSource.png [^] (21,084 bytes) 2012-11-16 17:04

 Relationships

  Notes
(0022338)
Sven Buijssen (reporter)
2010-09-23 17:04

I've identified an additional problem with the original implementation: the location of poles of a superquadric was assumed to be independent of the axis of symmetry. The problem merely became evident for the parameter subspace with toroidal = 0, theta = 1, phi < 1 and a superquadric symmetric to the x-axis: the poles got positioned at the center of gravity of the superquadric. A planar capping is intended, though.
I'll upload again the first two patch files that have been updated accordingly.
(0029744)
Sebastien Jourdain (developer)
2012-11-16 17:10

I've reverted to patch as they were backward incompatible regarding the angle management.
Therefore, to move forward, either the generated source should remain identical as before or discuss the reason of the changes on the mailing list and managed to be approved by the ARB.

I've created a gerrit topic that could be apply if we want to move forward.

http://review.source.kitware.com/#/t/1745/ [^]

I've attached some image of a ParaView test that illustrate the change in the Source generation. (pv.ColorEditor2)

I'll let you take over Sven... Once the community and the ARB approve I'll be able to integrate it, but for now, I can not do it as it might brake some existing code.
(0029745)
Sebastien Jourdain (developer)
2012-11-18 18:09

Merged into master
(0029746)
Sebastien Jourdain (developer)
2012-11-18 18:11

commit 2e6bb23adac980e866fd248bdecd1974e68a97ad
Merge: c550908 8d0ada1
Author: Sebastien Jourdain <sebastien.jourdain@kitware.com>
Date: Sun Nov 18 17:59:53 2012 -0500

    Merge topic 'proposition_of_improvement_of_super_quadric_source' into master
    
    8d0ada17 Bring back the old behavior
    56140286 Revert "Revert "Add code to support 'invalid' symmetric axis value""
    1c5e87c2 Revert "Revert "ENH: Provide a method to set axis of symmetry.""
    d96193b5 Revert "Revert "ENH: Provide code for aligned of axis along the global y-axis.""
    3afab72c Revert "Revert "BUG: Axis of symmetry claimed to be the global z axis, but was the y-axis.""

 Issue History
Date Modified Username Field Change
2010-09-14 06:55 Sven Buijssen New Issue
2010-09-14 06:55 Sven Buijssen File Added: vtk_create_sources_cylinder_along_with_superquadric.py
2010-09-14 06:56 Sven Buijssen File Added: octave_superquadric.source.m
2010-09-14 06:56 Sven Buijssen File Added: 0001-BUG-Axis-of-symmetry-claimed-to-be-the-global-z-axis.patch
2010-09-14 06:56 Sven Buijssen File Added: 0002-ENH-Provide-code-for-aligned-of-axis-along-the-globa.patch
2010-09-14 06:56 Sven Buijssen File Added: 0003-ENH-Provide-a-method-to-set-axis-of-symmetry.patch
2010-09-23 17:04 Sven Buijssen Note Added: 0022338
2010-09-23 17:04 Sven Buijssen File Added: 0001-BUG-Axis-of-symmetry-claimed-to-be-the-global-z-axis.updated.patch
2010-09-23 17:04 Sven Buijssen File Added: 0002-ENH-Provide-code-for-aligned-of-axis-along-the-globa.updated.patch
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2012-11-12 11:13 guest Status expired => tabled
2012-11-12 11:18 guest Status tabled => todo
2012-11-12 11:19 guest Status todo => active development
2012-11-16 17:04 Sebastien Jourdain File Added: newSource.png
2012-11-16 17:04 Sebastien Jourdain File Added: oldSource.png
2012-11-16 17:10 Sebastien Jourdain Note Added: 0029744
2012-11-16 17:13 Sebastien Jourdain Assigned To => Sebastien Jourdain
2012-11-16 17:13 Sebastien Jourdain Status active development => todo
2012-11-16 17:13 Sebastien Jourdain Resolution open => fixed
2012-11-16 17:14 Sebastien Jourdain Status todo => backlog
2012-11-16 17:14 Sebastien Jourdain Resolution fixed => reopened
2012-11-18 18:08 Sebastien Jourdain Status backlog => todo
2012-11-18 18:08 Sebastien Jourdain Resolution reopened => fixed
2012-11-18 18:08 Sebastien Jourdain Status todo => active development
2012-11-18 18:09 Sebastien Jourdain Status active development => gatekeeper review
2012-11-18 18:09 Sebastien Jourdain Note Added: 0029745
2012-11-18 18:09 Sebastien Jourdain Status gatekeeper review => customer review
2012-11-18 18:11 Sebastien Jourdain Note Added: 0029746
2013-04-05 20:35 Berk Geveci Status customer review => closed


Copyright © 2000 - 2018 MantisBT Team