[x3d-public] example python code using numpy library

vmarchetti at kshell.com vmarchetti at kshell.com
Fri Feb 25 03:49:31 PST 2022


Attached is a Python script that defines the coordinates, colors, and face indices for a tetrahedron as numpy rank-2 arrays, then
converts those values in order to initialize the field values for an x3d IndexedTriangleSet node.

This may serve as a demonstration example for using numpy together with the x3d package.

This script runs with the pip installation of x3d and was tested at version 4.0.51

Vince Marchetti
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NumpyExample.py
Type: text/x-python-script
Size: 2739 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220225/3db17ba6/attachment.bin>


More information about the x3d-public mailing list