Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Re: Problem:a texture on only one face of a Polyhedron

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122897] Re: Problem:a texture on only one face of a Polyhedron
  • From: Roger Bagula <roger.bagula at gmail.com>
  • Date: Mon, 14 Nov 2011 07:09:50 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <j9irn2$8f1$1@smc.vnet.net> <j9j4s5$a8e$1@smc.vnet.net>

I got my texture onto the icosahedron by shifting the stuff
around until it worked, LOL.
Gets my own texture on it and different views,
still no texture output to 3ds, but it is progress...
It would be really nice
 if somebody  documented
how these "macros" work
( at least in the help file)?
Roger Bagula

gm = ExampleData[{"ColorTexture", "WhiteMarble"}];
v = {{0, 0, -(5/Sqrt[50 - 10 Sqrt[5]])}, {0, 0,
    5/Sqrt[50 - 10 Sqrt[5]]}, {-Sqrt[(2/(5 - Sqrt[5]))],
    0, -(1/Sqrt[10 - 2 Sqrt[5]])}, {Sqrt[2/(5 - Sqrt[5])], 0,
    1/Sqrt[10 - 2 Sqrt[5]]}, {(1 +
       Sqrt[5])/(2 Sqrt[10 - 2 Sqrt[5]]), -(1/2), -(1/
       Sqrt[10 - 2 Sqrt[5]])}, {(1 +
       Sqrt[5])/(2 Sqrt[10 - 2 Sqrt[5]]),
    1/2, -(1/
       Sqrt[10 - 2 Sqrt[5]])}, {-((1 +
         Sqrt[5])/(2 Sqrt[10 - 2 Sqrt[5]])), -(1/2),
    1/Sqrt[10 -
       2 Sqrt[5]]}, {-((1 + Sqrt[5])/(2 Sqrt[10 - 2 Sqrt[5]])), 1/2,
    1/Sqrt[10 -
       2 Sqrt[5]]}, {-((-1 + Sqrt[5])/(2 Sqrt[10 - 2 Sqrt[5]])), -(1/
        2) Sqrt[(5 + Sqrt[5])/(5 - Sqrt[5])], -(1/
       Sqrt[10 - 2 Sqrt[5]])}, {-((-1 +
         Sqrt[5])/(2 Sqrt[10 - 2 Sqrt[5]])),
    1/2 Sqrt[(5 + Sqrt[5])/(5 - Sqrt[5])], -(1/
       Sqrt[10 - 2 Sqrt[5]])}, {(-1 +
       Sqrt[5])/(2 Sqrt[10 - 2 Sqrt[5]]), -(1/
        2) Sqrt[(5 + Sqrt[5])/(5 - Sqrt[5])],
    1/Sqrt[10 - 2 Sqrt[5]]}, {(-1 + Sqrt[5])/(2 Sqrt[10 - 2 Sqrt[5]]),
     1/2 Sqrt[(5 + Sqrt[5])/(5 - Sqrt[5])], 1/Sqrt[10 - 2 Sqrt[5]]}};
i = {{2, 12, 8}, {2, 8, 7}, {2, 7, 11}, {2, 11, 4}, {2, 4, 12}, {5, 9,
     1}, {6, 5, 1}, {10, 6, 1}, {3, 10, 1}, {9, 3, 1}, {12, 10,
    8}, {8, 3, 7}, {7, 9, 11}, {11, 5, 4}, {4, 6, 12}, {5, 11, 9}, {6,
     4, 5}, {10, 12, 6}, {3, 8, 10}, {9, 7, 3}};
g5 = Graphics3D[{Blue, Opacity[0.5], Specularity[White, 20],
   Texture[gm],
   GraphicsComplex[v,
    Polygon[i]], (Append[#1, {VertexTextureCoordinates ->
         With[{n = Length[First[#1]]},
          Table[1/2 {Cos[2 \[Pi] i/n], Sin[2 \[Pi] i/n]} + {1/2,
             1/2}, {i, 0, n - 1}]]}] &) /@
    Flatten[Normal[PolyhedronData["Icosahedron", "Faces"]]]},
  Boxed -> False]




  • Prev by Date: Re: Replace in an elegant way
  • Next by Date: Re: how to plot new data points to pre-existing figure
  • Previous by thread: Re: Problem:a texture on only one face of a Polyhedron
  • Next by thread: Manipulate variables not getting evaluated