Skip to content

Commit 6ea1e00

Browse files
committed
track recent changes to anaglyph code
1 parent 52c763e commit 6ea1e00

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

spatialmath/base/transforms3d.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2589,18 +2589,21 @@ def trplot(
25892589

25902590
# collect all the arguments to use for left and right views
25912591
args = {
2592-
"axes": ax,
2592+
"ax": ax,
25932593
"frame": frame,
25942594
"length": length,
25952595
"style": style,
25962596
"wtl": wtl,
2597-
"d1": d1,
2597+
"flo": flo,
25982598
"d2": d2,
25992599
}
26002600
args = {**args, **kwargs}
26012601

26022602
# unpack the anaglyph parameters
2603-
if isinstance(anaglyph, tuple):
2603+
if anaglyph is True:
2604+
colors = 'rc'
2605+
shift = 0.1
2606+
elif isinstance(anaglyph, tuple):
26042607
colors = anaglyph[0]
26052608
shift = anaglyph[1]
26062609
else:
@@ -2611,6 +2614,8 @@ def trplot(
26112614
trplot(T, color=colors[0], **args)
26122615

26132616
# the right eye sees a from a viewpoint in shifted in the X direction
2617+
if base.isrot(T):
2618+
T = base.r2t(T)
26142619
trplot(transl(shift, 0, 0) @ T, color=colors[1], **args)
26152620

26162621
return
@@ -2639,7 +2644,7 @@ def trplot(
26392644
for Tk in T:
26402645
trplot(
26412646
Tk,
2642-
axes=ax,
2647+
ax=ax,
26432648
block=block,
26442649
dims=dims,
26452650
color=color,

0 commit comments

Comments
 (0)