Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: 3d model failure with Cylinders
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Roger Bagula

Posts: 101
Registered: 7/12/09
3d model failure with Cylinders
Posted: Nov 18, 2012 4:02 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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.




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.