This may be of interest:
I modified that example for P3D, added a z and created a textured shape in setup() and changed vertices in draw().
:)