Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #11297 > unrolled thread
| Started by | Roger Bagula <roger.bagula@gmail.com> |
|---|---|
| First post | 2012-08-10 06:41 +0000 |
| Last post | 2012-08-10 06:41 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
problems withn 3d models Roger Bagula <roger.bagula@gmail.com> - 2012-08-10 06:41 +0000
| From | Roger Bagula <roger.bagula@gmail.com> |
|---|---|
| Date | 2012-08-10 06:41 +0000 |
| Subject | problems withn 3d models |
| Message-ID | <k02afe$2s0$1@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]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web