I thought perhaps I could specify it orthogonally and then apply a
rotation transformation, but the only transformations available seem to
be scaling (Scaled) and translation (Offset).
Of course I could use a series of line segments, but I want this to be
smooth even when printed on a high-resolution printer. Any tips?
Thanks,
-- Joe
--
,------------------------------------------------------------------.
| Joseph J. Strout Biocomputing -- The Salk Institute |
| j...@strout.net http://www.strout.net |
`------------------------------------------------------------------'
Check out the Mac Web Directory! http://www.strout.net/macweb.cgi
Use ImplicitPlot (or implicitplot3d). Then, all that you need to do is
instead of typing Axx+Cyy==F, you'd type Axx+Bxy+Cyy+Dx+Ey==F, with A...F
being your favorite and appropriate constants.Better yet, why not just
define some g:{A,B,..,F)== k a bijective function that regulates your
parameters when you take g inverse? The analagous case would also hold for
3+ space, with a bunch of notational changes (which, I for one must admit
should be unnecesssary for mathematica standards). However, remember that
by using three space coordinates, you get to add in much more terms such as
xyz, xxy, zy, zx, etc (with each of those little terms of x and terms of y
and terms of z being such that the sum of the degree of each of x,y,z taken
seperately and then added together should each be less than 3) to eliminate
those pesky unwanted terms such as Fx that shift you to the left/right of
the axis, just set some of your values such as D, E ==0 or whatever else
you may want to fix it to). I personally find that allowing the matrix
transformation theory of coordinates is underused in Mathematica, and this
is why I'd recommend sticking with my style. From then, you might even be
able to get away with mapping single coordinate values of your matrix back
and forth to a function that would then evaluate in Implicit plot (or
....Plot3d)
For further info as to what I've been trying to do with 2&3 dim conic
sections/ quadratic surfaces, check the archives for a few of my postings.
(My concern is more about calculating the foci effeciently and other
parameters related to it.) I have yet to find any transformation theory
that covers what I am trying to indirectly possibly get to as a corolllary
(other than the fact that there exists one such (3x3) matrix whose det
gives the values of what type of conic a 2- space curve should be...
puzzling... why wouldn't the "best matrix" for this job be a 2x2 form (or
something relating the matrix dimensions to the space that the curve should
exist in)...and why the det and not the trace or some other well behaved
quadratic operator? I'd love to hear someone talk about the forthcomings of
this side of the theory (and why there hasn't been much progress on this
branch of coordinate geometry lately) a good author is Loney '50's if you
can find him.)
Joe Strout wrote:
> snip
Below is my code (Maybe not the most elegant, but it works). I
used "Evaluate" inside the plot to avoid an annoying but harmless
warning message. Also, be sure to set AspectRatio->Automatic or
Mathematica will scale the height/width in such a way that your ellipse
won't have the proper "look".
In[1]:=
ellipse = {3 *Cos[2*Pi*t],2*Sin[2*Pi*t]};
In[2]:=
ParametricPlot[ Evaluate[ellipse],{t,0,1},AspectRatio->Automatic];
In[3]:=
theta = 30*Pi/180;
rotmatrix = {{Cos[theta],-Sin[theta]},{Sin[theta],Cos[theta]}};
tiltedellipse = rotmatrix.ellipse
Clear[theta];
In[4]:=
ParametricPlot[ Evaluate[tiltedellipse],{t,0,1},AspectRatio->Automatic];
Adam Smith
In article <7v3bmr$5...@smc.vnet.net>,
Joe Strout <j...@strout.net> wrote:
> Is it possible to draw an ellipse in Mathematica that is not
orthogonal
> to the XY axes? E.g., leaning over 30 degrees?
>
> I thought perhaps I could specify it orthogonally and then apply a
> rotation transformation, but the only transformations available seem
to
> be scaling (Scaled) and translation (Offset).
>
> Of course I could use a series of line segments, but I want this to be
> smooth even when printed on a high-resolution printer. Any tips?
>
> Thanks,
> -- Joe
>
> --
> ,------------------------------------------------------------------.
> | Joseph J. Strout Biocomputing -- The Salk Institute |
> | j...@strout.net http://www.strout.net |
> `------------------------------------------------------------------'
> Check out the Mac Web Directory! http://www.strout.net/macweb.cgi
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Joe,
There's a new book just out entitled "Exploring Analytic Geometry with
Mathematica" (Academic Press, ISBN: 0127282556, Vossler). It includes
software for drawing ellipses (and other conics) at angles, plus a lot more.
You can find it at both www.amazon.com and www.barnesandnobel.com.
I am the author of the book, and would welcome any comments you might have
on it (the entire book and software packages are provided as Mathematica
notebooks on the CD-ROM that is provided with the printed version of the
book).
Don Vossler
vos...@ugsolutions.com
Other replies to this message seem to assume that Joe wants to plot an
ellipse, which effectively renders it as a series of line segments. I
interpret Joe's question as meaning he wants to find a way of rotating the
graphics primitive for an ellipse, Circle[{x, y}, {r1, r2}]. I don't know of
any way to do this -- it seems you are stuck with ellipses whose major and
minor axes are parallel to the display coordinate axes.
James Lawry.
Hello James,
that exactly seems to be the problem. The reason is, that Circle (or
Disk) is directly transformed to a corresponding PostScript primitive,
but PostScript itself is defined according to the needs *and* abilities
of printers and graphic cards and they only have (or had at the time of
defining the language) hardware-routines for drawing (filled or
unfilled) ellipses. That is, even scaling operations at the PosScript
level wouldn't do.
Kind regards, Hartmut