MathGroup Archive 2001

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

Search the Archive

Re: Questions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27282] Re: [mg27267] Questions
  • From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
  • Date: Sun, 18 Feb 2001 02:52:15 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

I am not sure what you mean by "reflections rotations". Do you mean
reflections and rotations or just reflections? For rotations you can use the
Geometry`Rotations` package or for thre dimensional objects the RotateShape
function from the Graphics`Shapes` package. Reflections you have to program
yourself, but it is pretty easy. For example, here is a function that will
reflect the vector p in the line through the origin determined by the vector
v:

reflect[p_, v_] := 2(v.p)v/v.v - p

Now, suppose yo want to reflect polygons. You can then define:

reflectPolygon[p_Polygon, v_] := Map[reflect[#, v] &, p, {2}]

Let's see how this works. for example, consider the triangle

t1 = Polygon[{{1, 2}, {3, 4}, {4, 1}}];

Now reflect it about the vector {1,1}:

t2 = reflectPolygon[p1, {1, 1}]

Now you can display them together:

Show[Graphics[{t1, t2}], AspectRatio -> Automatic]

You can use a similar method to define relections with respect to planes
through the orign in three dimensions (given by specifying a normal vector).

(Another and equivalent approach is based on defining a reflection matrix,
with respect to the standard basis in the 2 or 3 dimensional euclidean
space. )

-- 
Andrzej Kozlowski
Toyama International University
JAPAN

http://platon.c.u-tokyo.ac.jp/andrzej/


on 01.2.16 5:58 PM, Tony at tony at magic101.freeserve.co.uk wrote:

> Does mathematica do reflections rotations of a given shape.
> I mean if I plot a triangle if I had a fuction such as
> 
> f: R2 --> R2
> (x,y) I--->(y,x)
> 
> Would mathematica do this and would it carry out composite function such as
> GoF   and FoG etc
> 
> Oh so many questions to ask and so little time to .........
> 
> Tony
> 
> 
> 
> 




  • Prev by Date: Re: two y-axis
  • Next by Date: Out of Memory. Exiting.
  • Previous by thread: RE: Questions
  • Next by thread: Re: Questions