Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #5133
| From | Roger Bagula <roger.bagula@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Problem in "block cutting" |
| Date | 2011-09-22 11:27 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j5f62t$q5q$1@smc.vnet.net> (permalink) |
| References | <201109201008.GAA00710@smc.vnet.net> <j5cbas$d0c$1@smc.vnet.net> |
Stacking the blocks:
( probably look better with a two layer and a one layer
on top of these... )
Clear[x, y, z, g, g1]
g = Module[{x, y, z},
Show[RegionPlot3D[(((y + 0.075) 1.25 + 3)/2)^2 - (x 1.25 1.2)^2 <=
1, ##, Boxed -> False, Axes -> True,
TextureCoordinateFunction -> ({2 #1 + #2, #2 + #3} &),
Mesh -> None,
PlotStyle -> Directive[Brown, Specularity[White, 50]
, Texture[ExampleData[{"ColorTexture", "WhiteMarble"}]]],
Lighting -> "Neutral",
AxesLabel -> {"x", "y", "z"}]
& @@@ {{{x, 0, 1}, {y, -1, 0}, {z, 0, 1}}, {{x, 0, 1}, {y, -1,
0}, {z, -1, 0}}, {{x, -1, 0}, {y, -1, 0}, {z, 0, 1}}, {{x, -1,
0}, {y, -1, 0}, {z, -1, 0}}},
PlotRange -> All, Axes -> False, BoxRatios -> {2, 1, 2}]]
g1 = Module[{x, y, z},
Show[RegionPlot3D[(((y + 0.075) 1.25 + 3)/
2)^2 - ((x - 2) 1.25 1.2)^2 <= 1, ##, Boxed -> False,
Axes -> True,
TextureCoordinateFunction -> ({2 #1 + #2, #2 + #3} &),
Mesh -> None,
PlotStyle -> Directive[Brown, Specularity[White, 50]
, Texture[ExampleData[{"ColorTexture", "WhiteMarble"}]]],
Lighting -> "Neutral",
AxesLabel -> {"x", "y", "z"}]
& @@@ {{{x, 2, 3}, {y, -1, 0}, {z, 0, 1}}, {{x, 2, 3}, {y, -1,
0}, {z, -1, 0}}, {{x, 1, 2}, {y, -1, 0}, {z, 0, 1}}, {{x, 1,
2}, {y, -1, 0}, {z, -1, 0}}},
PlotRange -> All, Axes -> False, BoxRatios -> {2, 1, 2}]]
g2 = Module[{x, y, z},
Show[RegionPlot3D[(((y + 0.075) 1.25 + 3)/
2)^2 - ((x - 4)*1.25 1.2)^2 <= 1, ##, Boxed -> False,
Axes -> True,
TextureCoordinateFunction -> ({2 #1 + #2, #2 + #3} &),
Mesh -> None,
PlotStyle -> Directive[Brown, Specularity[White, 50]
, Texture[ExampleData[{"ColorTexture", "WhiteMarble"}]]],
Lighting -> "Neutral",
AxesLabel -> {"x", "y", "z"}]
& @@@ {{{x, 4, 5}, {y, -1, 0}, {z, 0, 1}}, {{x, 4, 5}, {y, -1,
0}, {z, -1, 0}}, {{x, 3, 4}, {y, -1, 0}, {z, 0, 1}}, {{x, 3,
4}, {y, -1, 0}, {z, -1, 0}}},
PlotRange -> All, Axes -> False, BoxRatios -> {2, 1, 2}]]
g3 = Module[{x, y, z},
Show[RegionPlot3D[((((y - 1) + 0.075) 1.25 + 3)/
2)^2 - ((x - 1) 1.25 1.2)^2 <= 1, ##, Boxed -> False,
Axes -> True,
TextureCoordinateFunction -> ({2 #1 + #2, #2 + #3} &),
Mesh -> None,
PlotStyle -> Directive[Brown, Specularity[White, 50]
, Texture[ExampleData[{"ColorTexture", "WhiteMarble"}]]],
Lighting -> "Neutral",
AxesLabel -> {"x", "y", "z"}]
& @@@ {{{x, 1, 2}, {y, 0, 1}, {z, 0, 1}}, {{x, 1, 2}, {y, 0,
1}, {z, -1, 0}}, {{x, 0, 1}, {y, 0, 1}, {z, 0, 1}}, {{x, 0,
1}, {y, 0, 1}, {z, -1, 0}}},
PlotRange -> All, Axes -> False, BoxRatios -> {2, 1, 2}]]
g4 = Module[{x, y, z},
Show[RegionPlot3D[((((y - 1) + 0.075) 1.25 + 3)/
2)^2 - ((x - 3) 1.25 1.2)^2 <= 1, ##, Boxed -> False,
Axes -> True,
TextureCoordinateFunction -> ({2 #1 + #2, #2 + #3} &),
Mesh -> None,
PlotStyle -> Directive[Brown, Specularity[White, 50]
, Texture[ExampleData[{"ColorTexture", "WhiteMarble"}]]],
Lighting -> "Neutral",
AxesLabel -> {"x", "y", "z"}]
& @@@ {{{x, 3, 4}, {y, 0, 1}, {z, 0, 1}}, {{x, 3, 4}, {y, 0,
1}, {z, -1, 0}}, {{x, 2, 3}, {y, 0, 1}, {z, 0, 1}}, {{x, 2,
3}, {y, 0, 1}, {z, -1, 0}}},
PlotRange -> All, Axes -> False, BoxRatios -> {2, 1, 2}]]
g6 = Module[{x, y, z},
Show[RegionPlot3D[((((y - 1) + 0.075) 1.25 + 3)/
2)^2 - ((x - 5) 1.25 1.2)^2 <= 1, ##, Boxed -> False,
Axes -> True,
TextureCoordinateFunction -> ({2 #1 + #2, #2 + #3} &),
Mesh -> None,
PlotStyle -> Directive[Brown, Specularity[White, 50]
, Texture[ExampleData[{"ColorTexture", "WhiteMarble"}]]],
Lighting -> "Neutral",
AxesLabel -> {"x", "y", "z"}]
& @@@ {{{x, 5, 6}, {y, 0, 1}, {z, 0, 1}}, {{x, 5, 6}, {y, 0,
1}, {z, -1, 0}}, {{x, 4, 5}, {y, 0, 1}, {z, 0, 1}}, {{x, 4,
5}, {y, 0, 1}, {z, -1, 0}}},
PlotRange -> All, Axes -> False, BoxRatios -> {2, 1, 2}]]
gw = Show[{g, g1, g2, g3, g4, g5, g6}, PlotRange -> All]
(*Export["ChainArch.3ds",gw]
Export["ChainArch.obj",gw]
Export["ChainArch.stl",gw]*)
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Problem in "block cutting" Heike Gramberg <heike.gramberg@gmail.com> - 2011-09-21 09:38 +0000 Re: Problem in "block cutting" Roger Bagula <roger.bagula@gmail.com> - 2011-09-22 11:26 +0000 Re: Problem in "block cutting" Roger Bagula <roger.bagula@gmail.com> - 2011-09-22 11:27 +0000
csiph-web