10

I use two different radii in a Tube expression to draw a cone. I know for a fact that this worked in Mathematica 8, but when I reevaluated my code in versio 9.0.1

Graphics3D[{CapForm["Butt"], Tube[{{0, 0, 2}, {0, 0, 4}}, {2, 4}]}]

which looks like this I get a tube

"Butt" gives no cone.

while

Graphics3D[{CapForm[None], Tube[{{0, 0, 2}, {0, 0, 4}}, {2, 4}]}]

returns open cones, which is not what I want

None gives a cone but is open

The Help does not indicate that any changes have been applied in version 9.

EDIT

Thanks for the comments. The error has been reported. Below a summary of Mathematica's behavior.

Graphics3D[{Opacity[0.6], CapForm["Square"], #, CapForm[None], #,
CapForm["Butt"], #}] & @ Tube[{{0, 0, 2}, {0, 0, 4}}, {2, 4}]

Summary of CapForm error.

Ernst Stelzer
  • 2,055
  • 12
  • 24
  • 2
    The problem only exists for CapForm["Butt"]--the other CapForms work correctly. Also, pasting the graphic generated in version 8 into version 9 yields the same result that version 9 produces on its own--that is, the expression is identical; it's just that its interpretation for display appears to differ between them. – Oleksandr R. Feb 13 '13 at 17:39
  • 1
    Thanks for the comments and the workaround, I came up with another solution, but I have to admitt that 'Disk3D' had eluded me. I will reprot this as an error to Wolfram. – Ernst Stelzer Feb 14 '13 at 07:13

1 Answers1

3

Workaround until bug is fixed:

pts = {{0, 0, 2}, {0, 0, 4}};
r = {2, 4};
Disk3D[c_, d_, r_: 1] := Cylinder[{c, c + 10^-4 (c-d)}, r]
Graphics3D[{
  CapForm[None],EdgeForm[None],
  Disk3D[First@pts, pts[[2]], First@r],
  Disk3D[Last@pts, pts[[-2]], Last@r],
  Tube[pts, r]}]

(Is there a more pure way to make a disk in 3D that doesn't rely on fixed constant like 10^-4 that might be way too big at times?)

ssch
  • 16,590
  • 2
  • 53
  • 88