Message Boards Message Boards

2
|
9867 Views
|
4 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Make a proper Classic Klein Bottle in version 11.20 of Mathematica?

Posted 6 years ago

Everything works fine in version 10, but in Version 11.20 there is a slice taken out of the Klein Bottle image...It does this no matter what version of the code I use in Version 11.2. It also does it while making a stylized Klein Bottle described here...

http://members.wolfram.com/jeffb/visualization/klein.shtml

Here is an example of code that makes a faulty output...Can someone come up with code that makes a proper Klein Bottle without a slice taken out out it in Version 11.20?

klein[u_, v_] := Module[{
   bx = 6 Cos[u] (1 + Sin[u]),
   by = 16 Sin[u],
   rad = 4 (1 - Cos[u]/2),
   X, Y, Z},
  X = If[Pi < u <= 2 Pi, bx + rad Cos[v + Pi], bx + rad Cos[u] Cos[v]];
  Y = If[Pi < u <= 2 Pi, by, by + rad Sin[u] Cos[v]];
  Z = rad Sin[v];
  {X, Y, Z}
  ]

ParametricPlot3D[klein[u, v], {u, 0, 2 Pi}, {v, 0, 2 Pi}, 
 Axes -> False, Boxed -> False, ViewPoint -> {1.4, -2.6, -1.7}]

enter image description here

Attachments:
POSTED BY: Roy Scott
4 Replies
Posted 6 years ago

Make a proper Classic Klein Bottle in version 11.20 of Mathematica?

Surely a true Klein bottle would not have a surface blocking the "hole" as seen in the sectioned view below?

ParametricPlot3D[klein[u, v], {u, Pi, 2 Pi}, {v, Pi, 2 Pi}, 
 Axes -> False, Boxed -> False, ViewPoint -> {1.4, -2.6, -1.7}]

enter image description here

Here is an image from the web that is accurate I believe:

https://www.shapeways.com/product/MCBKAVKA4/half-klein-bottle

enter image description here

POSTED BY: Syd Geraghty

Support may have said it's a regression, but really, I believe it is an advance: The exclusions-processing capabilities now recognize the switch between formulas at u == Pi. (The next step in exclusion-processing will be, or at least could be, recognizing when such a switch is a true discontinuity or not. That's my opinion, by the way. There may be no intention at WRI to develop in that direction.)

Another workaround is to hide the symbolic parametrization with _?NumericQ:

klein[u_?NumericQ, v_?NumericQ] := 
 Module[{bx = 6 Cos[u] (1 + Sin[u]), by = 16 Sin[u], 
   rad = 4 (1 - Cos[u]/2), X, Y, Z}, 
  X = If[Pi < u <= 2 Pi, bx + rad Cos[v + Pi], bx + rad Cos[u] Cos[v]];
  Y = If[Pi < u <= 2 Pi, by, by + rad Sin[u] Cos[v]];
  Z = rad Sin[v];
  {X, Y, Z}]

ParametricPlot3D[klein[u, v], {u, 0, 2 Pi}, {v, 0, 2 Pi}, 
 Axes -> False, Boxed -> False, ViewPoint -> {1.4, -2.6, -1.7}]
POSTED BY: Michael Rogers

This could make a nice 3D printing model:

ParametricPlot3D[klein[u, v], {u, 0, 2 Pi}, {v, 0, Pi}, Axes -> False,
  Boxed -> False, ViewPoint -> {1.4, -2.6, -1.7}, Exclusions -> None, 
 PlotTheme -> "ThickSurface"]

enter image description here

POSTED BY: Vitaliy Kaurov
Posted 6 years ago

For those interested, Wolfram tech support got back to me and gave the solution...In version 11 one must add... "Exclusions->None" to the ParemetricPlot3D command...Tech Support said..."Exclusions were re-worked internally in Version 11, and this seems to be a regression from doing so."

POSTED BY: Roy Scott
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract