MathGroup Archive 2012

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

Search the Archive

problems withn 3d models

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127639] problems withn 3d models
  • From: Roger Bagula <roger.bagula at gmail.com>
  • Date: Fri, 10 Aug 2012 02:41:40 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net

The first problem is the 3ds files comes out invalid.
The second problem is that in obj files a phantom triangle
shows up.
And lastly the stl file appears to be empty.
It might just be my machine with an over worked
version 8 Mathematica, 
but it might also be something wrong with my code?


Clear[x, y, z, f, g]
f[t_] = Sqrt[Abs[Sin[t]]]*Cos[t]^2;
g[t_] = Sqrt[Abs[Sin[t]]]*Sin[t]*Cos[t];
x = (1 - f[t]^2)/(1 + f[t]^2);
y = 2 f[t]/(1 + f[t]^2);
z = 2 g[t]/(1 + f[t]^2);
w = {x*(10 + Cos[p]), y*(10 + Cos[p + 2*Pi/3]), 
  z*(10 + Cos[p + 2*Pi/3])}
g1 = ParametricPlot3D[w, {t, 0, 2*Pi}, {p, 0, 2*Pi}, Axes -> None, 
  Boxed -> False, ViewPoint -> {10, 0, 0}, PlotPoints -> {64, 16}, 
  Mesh -> False, ColorFunction -> "Rainbow"]
g2 = ParametricPlot3D[{-w[[1]], w[[2]], -w[[3]]} + {20, 0, 0}, {t, 0, 
   2*Pi}, {p, 0, 2*Pi}, Axes -> None, Boxed -> False, 
  ViewPoint -> {10, 0, 0}, PlotPoints -> {64, 16}, Mesh -> False, 
  ColorFunction -> "Rainbow", PlotRange -> All]
Show[{g1, g2}, PlotRange -> All]
b = Reverse[
   Union[Flatten[
     Table[{Blue, 
       Cylinder[{10*{x, y, z} /. 
          t -> 2*Pi*n/128, (10*{-x, y, -z} + {20, 0, 0}) /. 
          t -> 2*Pi*n/128}, 1/40]}, {n, 0, 127}]]]];
g3 = Show[Graphics3D[b], Boxed -> False, PlotRange -> All]
gw = Show[{g1, g2, g3}, PlotRange -> All]
Export["BB_strings.3ds", gw]
Export["BB_strings.obj", gw]
Export["BB_strings.stl", gw]



  • Prev by Date: Re: Trying to quickly split lists at the point of
  • Next by Date: Re: Trying to quickly split lists at the point of
  • Previous by thread: Re: Trying to quickly split lists at the point of
  • Next by thread: VectorPlot3D