Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

3d model failure with Cylinders

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128691] 3d model failure with Cylinders
  • From: Roger Bagula <roger.bagula at gmail.com>
  • Date: Sun, 18 Nov 2012 03:56:18 -0500 (EST)
  • 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

I don't get a 3d model out of this for some reason:
only the rim torus outputs as a 3d model.

Clear[n, m, gw, g2, R]
n = 7; m = 3; dt = 2 Pi/n; dtm = 2 Pi/m; r = 
 1.0/(1 - Sin[dt/2]/Cos[dtm/2]); R = r Cos[(dt + dtm)/2]/Cos[dtm/2];
ToMatrix[z_, 
   r_] := (I/r) {{z, r^2 - z Conjugate[z]}, {1, -Conjugate[z]}};
alist := Table[
  ToMatrix[r Exp[I t], r - 1], {t, dt/2, 2 Pi, dt}]; Tlist := 
 Join[{IdentityMatrix[2]}, alist];
homography[{{a_, b_}, {c_, d_}}, z_] := (a z + b)/(c z + d);
FindT[T0_, Tlist_] := 
  MemberQ[Tlist, 
   T_ /; Abs[homography[T, 0] - homography[T0, 0]] < 1.0*^-3];
i2 = 1; Do[i1 = i2 + 1; i2 = Length[Tlist]; 
 Do[Scan[(T = Tlist[[i]].#; 
     If[! FindT[T, Tlist], Tlist = Append[Tlist, T]]) &, alist], {i, 
   i1, i2}], {3}];
R0 = {{Cos[2*Pi/n], Sin[2*Pi/n], 0}, {-Sin[2*Pi/n], Cos[2*Pi/n], 
    0}, {0, 0, 1}};
Clear[g2, g3, g4]
g2 = ParametricPlot3D[{(37 + Cos[\[Alpha]])*Cos[\[Beta]],
                                         (37 + Cos[\[Alpha]])*
       Sin[\[Beta]] ,
                                                 Sin[\[Alpha]] }/
     10 + {0, 0, (6.5/2)*R},
                                         {\[Alpha], 0, 
    2*\[Pi]}, {\[Beta], 0, 2*\[Pi]}, Boxed -> False, Axes -> False, 
   PlotRange -> All, ColorFunction -> "Pastel", 
   MeshFunctions -> {#1 &}];
g3 = Graphics3D[{ColorData["LightTemperatureMap"][0.75], 
   Table[Map[
     Cylinder[
       Table[z = homography[#, R Exp[I t]]; 
        MatrixPower[R0, l].{Re[z], Im[z], Abs[z]}, {t, 0, 2 Pi, dt}], 
       1/(10 + Abs[z])] &, Tlist], {l, 0, 7}]}, Boxed -> False]
g4 = Graphics3D[{ColorData["LightTemperatureMap"][0.75], 
   Table[Map[
     Cylinder[
       Table[z = homography[#, R Exp[I t]]; 
        MatrixPower[R0, l].{Re[z], Im[z], 6.5*R - Abs[z]}, {t, 0, 
         2 Pi, dt}], 1/(10 + Abs[z])] &, Tlist], {l, 0, 7}]}, 
  Boxed -> False]
gw = Show[{g2, g3, g4}, Boxed -> False, ImageSize -> 1000, 
  ViewPoint -> {5, 5, 5}]
Export["hyperbolic8_cage.3ds", gw]
Export["hyperbolic8_cage.obj", gw]
Export["hyperbolic8_cage.stl", gw]

I expected a cage type 3d model.
I've also had large triangle output in cylinders as 3d models
that have to be removed.



  • Prev by Date: Re: Euclidean distance of all pairwise combinations (redundants)
  • Next by Date: correlation function
  • Previous by thread: Re: Plotting a series of Roots
  • Next by thread: correlation function