Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Texture in version 8, fine, but don't export...?

  • To: mathgroup at
  • Subject: [mg121476] Re: Texture in version 8, fine, but don't export...?
  • From: "Hans Michel" <hmichel at>
  • Date: Fri, 16 Sep 2011 05:49:25 -0400 (EDT)
  • Delivered-to:
  • References: <j44jpj$8vb$> <>

Clear[x1, y1, z1, g1, g, ga, gb, t, p, d, a, surface]
x1 = Sin[t]*(2 + Exp[1 - Sin[p]]/Exp[2])*(6.75/5)
y1 = Cos[t]*(2 + Exp[1 - Sin[p]]/Exp[2])*(6.75/5)
z1 = Cos[p]
w1 = {x1, z1, y1};
g = Flatten[Table[w1, {t, -Pi, Pi, 2*Pi/50}, {p, -Pi, Pi, 2*Pi/50}], 
d = 0.05;
a[0] = {d, d, d}
a[2] = {d, d, -d}
a[3] = {d, -d, d}
a[4] = {-d, d, d}
a[5] = {-d, d, -d}
a[6] = {-d, -d, d}
a[7] = {-d, d, -d}
a[8] = {-d, -d, -d}
a[1] = {d, -d, -d}
g1 = Table[g[[n]] + a[Mod[n, 8]], {n, 1, Length[g]}];


surface = TetGenConvexHull[g1];

ga = Graphics3D[GraphicsComplex[g1, Polygon[surface]]]

(* Export["D:\\rootstuff\\Sinoidring.3ds", ga] *)

Imported the surface into a Carrara 8. The surface has more bumps. 

The point of the exercise is to point you towards TetGenLink (TetGen) in

I don't know what types of 3D objects you are trying to build. TetGen and
triangulation of the surface may help.

Another poster Yves Klett pointed to Luc Barthelet work. I saw slides and
images but very little code on process. But one piece of advice that I
thought worth repeating "Graphic Complex and pay attention to the way the
model is constructed". Slide 8 of Luc Barthelet's presentation is probably
more what you are looking for. A 2D image as texture applied to a 3D
surface. No code that I could see in the NB as to how the final images were
produced. But he may have used TetGenLink.

Good Luck


-----Original Message-----
From: Roger Bagula [mailto:roger.bagula at] 
Sent: Wednesday, September 07, 2011 4:41 AM
To: mathgroup at
Subject: [mg121476] Re: Texture in version 8, fine, but don't export...?

So how to get real textures into Mathematica
that show up in models?
I don't notice the guys working at Mathematica jumping in on this one, LOL.
I'm learning this stuff the hard way by doing and cr....
Here is a working "VertexData" version using ListSurfacePlot3D:
( as you can see this is my 5th experiment: the first two went very

Clear[x, y, z, w, r, g, ga, gb, gc]
x = If[Sin[t]*Cos[p] < 0, Sin[t]*Cos[p]/2, Sin[t]*Cos[p]];
y = Sin[t]*Exp[1 - Sin[p]];
z = Cos[t];
w = {-x, 2*y, z};
r = x^2 + y^2 + z^2;
g = Flatten[Table[N[w/r], {t, 0, Pi, Pi/70}, {p, -Pi, Pi, 2*Pi/70}],
ga = ListSurfacePlot3D[g, MaxPlotPoints -> 140, Lighting -> "Neutral",
   Mesh -> None, Axes -> False, Boxed -> False,
  PlotStyle -> {Pink, Specularity[White, 20]}]
gb = ParametricPlot3D[N[w/r], {t, 0, Pi}, {p, -Pi, Pi},
  PlotPoints -> 100,
  PlotStyle -> Directive[Purple, Specularity[White, 50]],
  Axes -> False, Mesh -> None, Boxed -> False]
gc = Show[{ga, gb}, PlotRange -> All]
Export["AlienSpaceshipListSurfacePlot5.3ds", gc]
Export["AlienSpaceshipListSurfacePlot5.obj", gc]
Export["AlienSpaceshipListSurfacePlot5.stl", gc]

The obj takes forever and ever..

  • Prev by Date: Interactive settings for ParamPlot3D. Mesh not quite working.
  • Next by Date: Re: How create new style sheet- Mathematica 8
  • Previous by thread: Re: Texture in version 8, fine, but don't export...?
  • Next by thread: Re: Texture in version 8, fine, but don't export...?