# VTK Examples, changes to the Curvature examples

**URL:** https://discourse.vtk.org/t/vtk-examples-changes-to-the-curvature-examples/16473
**Category:** Development
**Created:** [June 23, 2026, 11:47pm UTC](https://discourse.vtk.org/t/vtk-examples-changes-to-the-curvature-examples/16473 "2026-06-23T23:47:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)
#### Post date: [June 23, 2026, 11:47pm UTC](https://discourse.vtk.org/t/vtk-examples-changes-to-the-curvature-examples/16473/1 "2026-06-23T23:47:06Z")

</div>

These examples have been grouped together to make it easier to find them and to showcase the different techniques.

The PythonicAPI versions have been rewritten/improved with the changes being reflected in the C++ versions.

The main changes are:

- vtkScalarBarWidget is now used, thus scalar bars can be resized/moved, they also resize with the main window.

- vtkOrientationMarkerWidget or vtkCameraOrientationWidget can be selected in most examples.

- For banded glyphs a **named tuple** or a struct **BandedGlyphs** containing everything you need for the necessary actors is used.

- With respect to glyphs, multiple color schemes are used, reflecting the number of bands used, see **get\_curvature\_glyphs(…)** or **GetCurvatureGlyphs(…)** this has necessitated adding **position\_sbw\_h(…), position\_sbw\_v(…)** used to resize the scalar bar, useful if only one band is being used e.g. in the case of planar surfaces.

The C++ version: [CurvatureBandsWithGlyphs](https://examples.vtk.org/site/Cxx/Visualization/CurvatureBandsWithGlyphs/) and the  
PythonicAPI versions: [CurvatureBandsWithGlyphs](https://examples.vtk.org/site/PythonicAPI/Visualization/CurvatureBandsWithGlyphs/) and [CurvaturesNormalsElevations](https://examples.vtk.org/site/PythonicAPI/Visualization/CurvaturesNormalsElevations/) demonstrate these features.

[CurvaturesDemo](https://examples.vtk.org/site/PythonicAPI/Visualization/CurvaturesDemo/) and the corresponding C++ version now use a **vtkDiscretizableColorTransferFunction** lookup table. Whilst the mapper can use this table adjusting for the scalar range, **SetScalarRange()** has not been implemented in this color transfer function. Thus the scalar range is labelled 0 to 1 on the salcar bar irrespective of the actual scalar range. To overcome this there is a function **rescale\_ctf(…)** or **RescaleCTF(…)**, that takes the lookup table and returns a new rescaled version. In my opinion the discrete coloring of the curvature of the parametric surface here is really good.

Whilst there is no C++ implementation of [CurvaturesNormalsElevations](https://examples.vtk.org/site/PythonicAPI/Visualization/CurvaturesNormalsElevations/) it is easy to do. I could create one if people feel a need for it.

Of course, [ElevationBandsWithGlyphs](https://examples.vtk.org/site/Cxx/Visualization/ElevationBandsWithGlyphs/) has also been updated reflecting these changes.

With the C++ versions, please try the interactive versions.
