Question: View range fails to adjust for combined 3D plots

When composing multiple plots, plots:-display's normal behavior is to set the overall plotting region to what is necessary to accommodate the union of the individual plots.  That works correctly most of the time but not in the case shown below.  This may indicate a bug in one of plots:-shadebetween,  plots:-display,  plottools:-extrude.  I have not been able to pinpoint the problem.  Any ideas?

restart;

Make a 3D plot:

plots:-shadebetween(x^2, 2-x^2, x=-1..1, color=red, transparency=0):
p1 := plottools:-extrude(%, 0..0.3);

 

Make another 3D plot:

plottools:-sphere([1.5,0,0], 1, color="Green"):
p2 := plots:-display(%);

 

Combine the plots:

plots:-display([p1,p2], scaling=constrained, style=surface);

 

We see that most of the green sphere has been cut off.  One way to fix things is
to add a view option (see below), but that wouldn't have been necessary if things
were working properly.

plots:-display([p1,p2], scaling=constrained, style=surface,
  view=[-1..3, DEFAULT, DEFAULT]);

 

This was done in Maple 2019.

Maple 2017 behaves the same way.  I don't know whether this ever worked properly in earlier Maples.
 

Download bug-in-3D-view.mw

 

Please Wait...