Color¶
Color is a series of vectors describe colors of vertices. It represent color in RGBA format. Each channel range from 0 to 1.
In [1]:
import py3d
py3d.Color()
Out[1]:
Color([0., 0., 0., 1.])
In [3]:
import numpy, py3d
py3d.Color(r=numpy.linspace(0, 1, 3))
Out[3]:
Color([[0. , 0. , 0. , 1. ], [0.5, 0. , 0. , 1. ], [1. , 0. , 0. , 1. ]])
In [4]:
import py3d
py3d.Color.standard((3,))
Out[4]:
Color([[0.5, 0.5, 0.5, 1. ], [0.5, 0.5, 1. , 1. ], [0.5, 1. , 0.5, 1. ]])
In [6]:
import py3d
py3d.Point([1,0,1]).paint(py3d.Color(r=1, g=0.5), pointsize=10)
Out[6]:
In [ ]: