Re: Getting 3d printable models out of 3d graphics in Mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg121003] Re: Getting 3d printable models out of 3d graphics in Mathematica
- From: Yves Klett <yves.klett at googlemail.com>
- Date: Sun, 21 Aug 2011 05:32:33 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <j2o22h$50p$1@smc.vnet.net>
Complex topic. For one, your face normals are not directed uniformly. Try a := 10; b = 2; c = 3; Clear[f, g] f[t_] = Cos[t]; g[t_] = Sin[t]; gr = ParametricPlot3D[{f[t] f[p/b] - (a + g[t])* g[p/c], ((a + g[t])*f[p/c] + f[t] g[p/b]) f[ p/b], ((a + g[t])*f[p/c] + f[t] g[p/b]) g[p/b]}, {t, 0, 2 Pi}, {p, 0, 12 Pi}, PlotPoints -> 100, Axes -> None, Mesh -> None, Boxed -> False]; Graphics3D[{FaceForm[Blue, Yellow], gr[[1]]}] which shows by means of FaceForm the normal direction of the polygons. If they face the wrong way, they are ignored by some interpreters and this messes up your file. I had also an instance where non-convex polygons were not triangulated as expected by Export, although this would probably not happen with standard 3D plots and convex polygons. Regards, Yves Am 20.08.2011 12:25, schrieb Roger Bagula: > Surfaces that appear fine in Mathematica aren't accepted > to be printed by: ( *.obj,*.dxf,*.stl,...others) > http://www.shapeways.com/ > or need to be repaired at: > http://www.sculpteo.com/ > http://www.sculpteo.com/en/gallery/public/user/rlbagulatftn/ > I give an example of one that Mathematica 8 failed on yesterday > from my old work TFTN: > (* b=c=1 torus cycloid*) > (* b=2,c=1 baseball seam *) > (* by R. L. BAGULA 10 JULY 1997=A9 *) > > a:=10; > b=2; > c=3; > Clear[f,g ] > f[t_]=Cos[t]; > g[t_]=Sin[t] ; > gr=ParametricPlot3D[{f[t] f[p/b]-(a+g[t])*g[p/c], > ((a+g[t])*f[p/c]+f[t] g[p/b]) f[p/b], > ((a+g[t])*f[p/c]+f[t] g[p/b]) g[p/b]}, > {t,0,2Pi}, > {p,0,12 Pi}, > PlotPoints->100,PlotStyle->{Orange,Specularity[White,10]},Axes- >> None,Mesh->None,Boxed->False] > Export["kleinbottle_angcycloid_2_3.stl", gr] > But I have many examples. > I want to know if there is some test I can do on a model using > Mathematica? Brice and other ray tracing programs which don't have > "physical" requirements have no trouble with Mathematica model. > One well known artist has a whole series of work based on one of my > model fractals. > (* 128*6128*128 CUBE OF xy,yz,zx beta triangle 3D *) > (* BY R. L. BAGULA 30 May 2004=A9*) > a=64; > b1 = Beta[Abs[a - Abs[a - x]], Abs[a - Abs[a - y]]] > b2 = Beta[Abs[a - Abs[a - y]], Abs[a - Abs[a - z]]] > b3 = Beta[Abs[a - Abs[a - x]], Abs[a - Abs[a - z]]] > g=Flatten[Table[If[Mod[1/(b1*b2*b3),2]==1, > Cuboid[0.5*{x,y,z}],{}], > {x,0,2*a},{y,0,2*a},{z,0,2*a}]]; > gg=Show[Graphics3D[g,Boxed->False,ViewPoint->{-3.059, 8.168, 2.221}]] > Export["betaholeycube.stl", %] > And after repair this was accepted for printing at: > http://www.sculpteo.com/ > > Roger Bagula >