MathGroup Archive 2003

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

Search the Archive

Re: Rotating a 2D graphic on screen?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43695] Re: [mg43682] Rotating a 2D graphic on screen?
  • From: Selwyn Hollis <sh2.7183 at misspelled.erthlink.net>
  • Date: Tue, 30 Sep 2003 16:42:47 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

You can use a rule to rotate all the points in the graphic; e.g.,

   rotate[q_] := {{Cos[q], -Sin[q]}, {Sin[q], Cos[q]}}

   graph = Plot[x^2, {x, -1, 1},
         PlotRange -> {{-1, 1}, {-1, 1}}, AspectRatio -> Automatic]

   Show[graph /. {x_?NumericQ, y_} -> rotate[Pi/3].{x, y},
         PlotRange -> {{-1, 1}, {-1, 1}}, AspectRatio -> Automatic]

-----
Selwyn Hollis
http://www.math.armstrong.edu/faculty/hollis


On Monday, September 29, 2003, at 01:47  AM, AES/newspost wrote:

> Any easy way to rotate a 2D graphic about it's center by an arbitrary
> number of degrees _after_ I've created it?
>
> I'd like to lay out and program the graphics in a certain set of x,y
> coordinates where the equations and formulas are simplest -- then 
> rotate
> and display it in a rotated set of x',y' = Horiz,Vert coordinates.  I
> can of course do the transformations "by hand" as I go along -- but
> it's just a messy process.
>
> Illustrator can do it, instantly, with an EPS graphic.  Sure would be
> nice if Mathematica could?
>
>


  • Prev by Date: Antw: Re: Plots -> EPS -> Corel Draw
  • Next by Date: Slope fields
  • Previous by thread: Rotating a 2D graphic on screen?
  • Next by thread: Re: Rotating a 2D graphic on screen?