Skip to content

Commit

Permalink
small formating changes
Browse files Browse the repository at this point in the history
  • Loading branch information
goldbattle committed Jan 16, 2024
1 parent edbe492 commit a27ac69
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions Schweizer-Messer/sm_python/python/sm/plotCoordinateFrame.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,14 @@ def plotCoordinateFrame(axis, T_0f, size=1, linewidth=3, name=None):

p_f = numpy.array([ [ 0,0,0,1], [size,0,0,1], [0,size,0,1], [0,0,size,1]]).T;
p_0 = numpy.dot(T_0f,p_f)
# X-axis

X = numpy.append( [p_0[:,0].T] , [p_0[:,1].T], axis=0 )
Y = numpy.append( [p_0[:,0].T] , [p_0[:,2].T], axis=0 )
Z = numpy.append( [p_0[:,0].T] , [p_0[:,3].T], axis=0 )
axis.plot3D(X[:,0],X[:,1],X[:,2],'r-', linewidth=linewidth)
axis.plot3D(Y[:,0],Y[:,1],Y[:,2],'g-', linewidth=linewidth)
axis.plot3D(Z[:,0],Z[:,1],Z[:,2],'b-', linewidth=linewidth)


X = numpy.append([p_0[:,0].T], [p_0[:,1].T], axis=0 )
Y = numpy.append([p_0[:,0].T], [p_0[:,2].T], axis=0 )
Z = numpy.append([p_0[:,0].T], [p_0[:,3].T], axis=0 )
axis.plot3D(X[:,0],X[:,1],X[:,2], 'r-', linewidth=linewidth)
axis.plot3D(Y[:,0],Y[:,1],Y[:,2], 'g-', linewidth=linewidth)
axis.plot3D(Z[:,0],Z[:,1],Z[:,2], 'b-', linewidth=linewidth)

if name is not None:
axis.text(X[0,0],X[0,1],X[0,2],name, zdir='x')
axis.text(X[0,0],X[0,1],X[0,2], name, zdir='x')

0 comments on commit a27ac69

Please sign in to comment.