Re: Strain Ellipsoids
- To: mathgroup at smc.vnet.net
- Subject: [mg17928] Re: Strain Ellipsoids
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Sat, 5 Jun 1999 02:56:01 -0400
- Organization: Universitaet Leipzig
- References: <7j5alm$g48@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, You havt to transform the *points* not the polygons The following works: strain=DiagonalMatrix[{2,3,4}]; Show[ Graphics3D[ Sphere[]/. Polygon[p_]:> Polygon[Dot[strain,#] & /@ p] ] ]; Hope that helps Jens Mark Lawrence Storch wrote: > > Hi, > I am trying to write a code that will draw the strain ellipsoid for > a given strain tensor. I was starting with the `Graphics`Shapes package > to get the Sphere[] function. I want a function that will return a list > that I can use with Show[]. Sphere gives me polygons and I have tried > the following: > > StrainEllipsoid[m_?MatrixQ]:=(m.#)&/@Sphere[] > > but I keep getting an error that reads > > Show::gcomb : An error was encountered in combining the graphics objects > in Show[{<<1>>}] > > I am new to using # and /@ so any help here would be appreciated. > > Thank you, > Mark Storch > Carnegie Mellon University