g = C.initVars(g,
               '{F}={CoordinateX}*{CoordinateX}+{CoordinateY}*{CoordinateY}')
g = C.node2Center(g, 'F')
g = CPlot.addRender2Zone(g, material='Solid', color='Iso:F')

h = T.translate(a, (0, 2.5, -5.))
h = C.initVars(h,
               '{F}={CoordinateX}*{CoordinateX}+{CoordinateY}*{CoordinateY}')
h = C.node2Center(h, 'F')
h = C.rmVars(h, ['F'])
h = T.translate(h, (0, 2.5, 0))
h = CPlot.addRender2Zone(h, material='Solid', color='Iso:centers:F')

t = C.newPyTree(['Base', a, b, c, d, e, f, g, h, i])

# Tests des shaders
CPlot.display(t, mode=2)  # mode=2 active les shaders
time.sleep(2)

# Ajout du overlay mesh
CPlot._addRender2Zone(t, meshOverlay=1)
CPlot.display(t, mode=2)
time.sleep(2)

# Ajout du blending
CPlot._addRender2Zone(t, meshOverlay=0)
for i in range(30):
    CPlot._addRender2Zone(t, blending=1. - i * 1. / 30.)
    CPlot.display(t, mode=2)
    time.sleep(0.1)
# - display (pyTree) -
# Affichage du shader sphere
import Geom.PyTree as D
import CPlot.PyTree as CPlot
import Converter.PyTree as C
import time

a = D.sphere((0, 0, 0), 1., N=5)
a = C.convertArray2Hexa(a)

for i in range(10):
    print(i * 2. / 5.)
    CPlot._addRender2Zone(a,
                          material='Sphere',
                          color='White',
                          shaderParameters=[1.5, i * 2. / 5.])

    CPlot.display(a, mode='render', bgColor=1)
    time.sleep(1.)