# How to create these famous surfaces in topology with the desired color effects?

It was said such real objects of famous topological surfaces were plotted by the cooperation between mathematician Richard Palais and artist Luc Benard, and published as the cover page of Science magazine (issue on Sept 22 in 2006):

The cover page of Science, Sept 22, 2006

How to create such surfaces with the same color, rendering, lighting and opacity effects via Mathematica?

(answers with only similar rendering results for these surfaces one by one are also acceptable if the same rendering effects as the samples are too difficult to realize)

Another similar question with anwser can be seen from this link: another topological surface example with answer

Surface information are : Klein bottle; symmetric 4-noid; breather surface; Boy surface; Sievert-Enneper surface.

It was said these surfaces in the figure were created via 3D-XplorMath software.

EDITS:

unfortunately it is voted as on hold; but I personally believe Mathematica's rendering should be powerful enough to realize such effects( at least more powerful than the open source 3D-XplorMath The author on MathOverflow); Here I add two of the surfaces obtained and rendered which are already good enough;

There are documents on these surfaces from this link: documents on surfaces

There are five different surfaces; I have found four of them; but only three as below look beautiful; so I will not post others here;

Clear["Global*"]; (* Sievert-Enneper surface *)
ϕ := -u/Sqrt[c + 1] + ArcTan[Tan[u] Sqrt[c + 1]]
a := 2/(c + 1 - c Sin[v]^2 Cos[u])
r := a Sqrt[(c + 1) (1 + c Sin[u]^2)] Sin[v]/Sqrt[c]
Clear[x, y, z, p]; p =
ParametricPlot3D[{x = r Cos[ϕ] - 2, y = r Sin[ϕ],
z = ((Log[Tan[v/2]] + a (c + 1) Cos[v])/Sqrt[
c])} /. {c -> .4}, {u, -Pi/2, Pi/2}, {v, 0, Pi},
PlotPoints -> {30, 30},
PlotStyle ->
Directive[Opacity[0.65], LightPurple, Specularity[White, 20]],
Mesh -> None, RegionFunction -> Function[{x, y, z}, Abs[z] < 2.2],
Axes -> False, Boxed -> False]


• This question is way too broad IMO. I don't think you can get any answer if you don't provide more information or if you don't try it yourself first.
– Öskå
Jun 16, 2014 at 23:43
• The reflection effects require either ray tracing or, for a cheaper approximation, environment mapping. As far as I know, Mathematica supports neither out of the box; all you get in Graphics3D rendering is Gouraud shading.
– user484
Jun 16, 2014 at 23:48
• There is this question about ray tracing.
– Öskå
Jun 17, 2014 at 0:02
• Regardless of what you personally believe, Mathematica simply is not capable (within itself) of producing a result with "the same color, rendering, lighting and opacity effects" as you ask for. I think the question can perhaps be re-opened or at least the downvotes reversed if you remove the requirement for something that is definitively impossible. @mfvonh's suggestion to export the surfaces to a ray tracing program is a good one. (There is a possibility that one could call e.g. OpenGL directly from Mathematica, but I doubt anyone would attempt this in practice.) Jun 17, 2014 at 12:22
• Do you really expect people to go through a zip file containing dozens of PDFs to find the definitions of the surfaces needed to answer your question?
– user484
Jun 18, 2014 at 0:56

Concerning the comment about creating the surfaces, sure: Mathematica is one of the best tools available for that. Here's the Klein bottle, for example.

ParametricPlot3D[{
(3 + Cos[v/2]*Sin[u] - Sin[v/2]*Sin[2 u])*Cos[v],
(3 + Cos[v/2]*Sin[u] - Sin[v/2]*Sin[2 u])*Sin[v],
Sin[v/2]*Sin[u] + Cos[v/2]*Sin[2 u]},
{u, -Pi, Pi}, {v, 0, 2 Pi},
Axes -> None,
ColorFunction -> (Blend[{Purple, Pink, Lighter@Orange},
Mean[{#1, #2, #3}]] &),
Boxed -> False,
Mesh -> None,
PlotStyle -> Directive[Specularity[1, 20], [email protected]]]


Rendering is not Mathematica's strong suit, though. Sure, you could make it do whatever you want if you are willing to write enough code and wait long enough for it to compute, but it would make a lot more sense to model these in Mathematica and then export them in your favorite 3D format for rendering in more appropriate software. My personal preference is Rhino3D.

Edits

Breather surface

From here:

r := 1 - b^2;
w := Sqrt[r];
denom := b*((w*Cosh[b*u])^2 + (b*Sin[w*v])^2)
breather = {-u + (2*r*Cosh[b*u]*Sinh[b*u])/
denom, (2*w*Cosh[b*u]*(-(w*Cos[v]*Cos[w*v]) - Sin[v]*Sin[w*v]))/
denom, (2*w*Cosh[b*u]*(-(w*Sin[v]*Cos[w*v]) + Cos[v]*Sin[w*v]))/
denom}

ParametricPlot3D[
Evaluate[breather /. b -> 0.4], {u, -13.2, 13.2}, {v, -37.4, 37.4},
PlotRange -> All, PlotPoints -> {60, 150}]


• Thank you very much; I believe answers like this are what I am expecting. Any suggestions on other surfaces? Jun 17, 2014 at 1:09
• I happened to remember the Klein bottle from analysis but I don't have the faintest idea how to express the other surfaces. Once you figure out the formulas it should be quite easy. But that's probably going to require digging through academic papers unless you can find it somewhere on the internet. A quick Google brought up several links to this paper, for example. Jun 17, 2014 at 1:17
• thank you very much! I will try it myself and wait to see whether there is any complete version answers. Or I will mark your answer as accepted. Thank you! Jun 17, 2014 at 1:19
• Definitely leave it open for a while. I'm by no means a pro in this area and there are some real badasses on this forum :) Jun 17, 2014 at 1:23
• 3D-XplorMath-J (= Java) is open source. The code is here. I took a quick glance and it is clearly written; you should be able to work through it and implement the formulas in MMA without much difficulty. Jun 17, 2014 at 7:19

I just finished blog post about the creation of nice graphics from Mathematica Graphics3D using the Blender render framework:

Maybe you can find some inspiration there for your own graphics. I managed to generate a reasonable Klein bottle with glass shading:

Note: the picture shown here is NOT output created directly with Mathematica, but the result of post-processing with 3D-Studio and afterwards with Blender. The Mathematica code can be found in my blogpost linked above.

If you read through my blog post, you will read as well about the problems I had to get the Klein bottle into Blender. If the readers of this forum have ideas how to overcome these problems I'd be more than happy to get to know about them.

• thanks. Can you please also paste the Mathematica` code ? I am very interested in how you obtain such rendering effects. The code in your blog link does not seem to create the picture you pasted here. Apr 9, 2015 at 1:43
• Hi LCFactorization, as I wrote above, the Mathematica code I posted in my blog does NOT create the picture above, but only a 3D-mesh object which needs to be exported from Mathematica to some 3D-Graphics format (3DS, OBJ, PLY) which has to be post-processed in Blender or some other 3D rendering engine. I did not manage to create reasonable/beautiful output with Mathematica directly. However, if you are interested in the final result rather than a pure Mathematica solution, I can only advice to go via a rendering engine. I strongly believe the image in your initial post was created like this. Jul 13, 2015 at 6:02

The first picture is the Barth Sextic created in Mathematica with the PlotTheme -> "ThickSurface", the second picture is a "tree" created with the use of AnglePath function

• I apologize for not being coherent enough (I suffer from a neurodegenerative disorder and English is not my native language). I suppose you all are much more intelligent than me and you can create these 3d models and even much better in Mathematica yourselves. I surmise the main essence of the question is the rendering. As far as I found so far, the best way is to export the models in VRML format and render them with the V-ray pluggin in Maxon Cinema 4D. Nov 2, 2016 at 12:11

And yes I forgot back to the original question how to make the objects look glass-like. It is also possible in Cinema 4D. It is not perfect as you can see, since it C4D cannot properly render the Tubes, Spheres and the like. It is always better to plot the sphere by ParametricPlot3D or to form a tube around a curve by the use of Frenet frame and "draw" a circle around the curve, as is known from the elementary differential geometry.