I am using VPython to draw coordinate systems.
Since I did not find any readily avalible coordinate system object, I thus draw three mutual-perpendicular arrows to represent the coordinate system as follows:
y = arrow(pos=(0,0,0), axis=(6,6,0), shaftwidth=0.00001, color=color.red)
x = arrow(pos=(0,0,0), axis=(-6,6,0), shaftwidth=0.00001, color=color.green)
z = arrow(pos=(0,0,0), axis=(0,0,-10), shaftwidth=0.00001, color=color.blue)
Problem is that I cannot label/annotate them. I can only distinguish them by color, which is not very convenient.
How can I write a 'x'
by the side of the x object
?
You could use a
text
object to do that.For more information see the vpython reference for
text
.