Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

RE: 2D to 3D graphics? and Thickness of Lines and Arcs

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31367] RE: [mg31284] 2D to 3D graphics? and [mg31288] Thickness of Lines and Arcs
  • From: "Ingolf Dahl" <f9aid at fy.chalmers.se>
  • Date: Wed, 31 Oct 2001 03:30:57 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Comment to the answers I have got about how to convert 2D graphics to 3D
graphics:
The reason why I wrote the question was that I became a bit frustrated when
I found that some of the 2D graphic primitives (Rectangle, Circle, Disk,
Raster, RasterArray, PostScript) lack a direct three-dimensional
counterpart. In most parts, Mathematica is created with quite a good
internal consistency and agreement, but evidently that has been difficult to
achieve here.
Mark Westwood, Allan Hayes and David Park (private communication) has all
suggested simple replacement rules to replace the two dimensional
coordinates in the primitives by three dimensional coordinates, and that can
work for the primitives that are common for 2D and 3D coordinates, namely
Point, Line, Polygon and Text, but not for the other.
For Rectangle, Circle and Disk it should be quite easy to write functions,
that build up the 3D counterparts from the 3D primitives. For Raster and
RasterArray it should be more difficult, but maybe the result would be fun
to play with. For PostScript code it might be possible to add extra
Postscript commands to perform the 3D-projection. Maybe something for David
Park to include in his DrawGraphics package (see
http://home.earthlink.net/~djmp/)? (To me it seems as David Park have
thought a bit deeper about these things than Wolfram.)
In version 4.1 of Mathematica, the routine StackGraphics is able to
transform a 2D circle to a 3D object (built by lines), normal to the y-axis,
but the same routine does not seem to be able to handle 2D rectangles.
Consistent? I would prefer to have available a 2D-to-3D routine that is more
primitive and more well-defined for the user than StackGraphics.
On a wishing list for a more user-friendly Mathematica I would also like to
add more user-friendly versions of Rotate3D, RotationMatrix3D, and
RotateShape. These routines use Euler angles as arguments. How many of us
have a clear understanding of the ad hoc definition of the Euler angles? I
suggest modifications of these routines, where the rotation axis and angle
could be inserted directly as arguments.
Also Will Self in message 31288 asks for the possibility to specify the
thickness of lines and arcs in the units he is using. I want to add a wish
for the same possibility with font sizes. Then text and thicknesses will be
resized in the same way as the figure. I agree with Will Self that this is
very basic.

Ingolf Dahl
Chalmers University


-----Original Message-----
From: Ingolf Dahl [mailto:f9aid at fy.chalmers.se]
To: mathgroup at smc.vnet.net
Subject: [mg31367] [mg31284] 2D to 3D graphics?


Dear Mathgroup,
Is there any way to transform a general (2D) Graphics objects to a
Graphics3D object (with zero z coordinates)? I have a feeling that it is
either very simple or very complicated. Have I missed something in the Book?

Then I of course also want to be able to rotate the graphics in three
dimensions, by RotateShape, but that is maybe to ask too much.

I have experimented a bit with StackGraphics, since it seems to take 2D
graphics as input, and 3D as output, but have not yet managed to manipulate
the output of StackGraphics in any way.

Ingolf Dahl
Chalmers University





  • Prev by Date: Re: Zero does not equal Zero
  • Next by Date: Mathematica in Classroom
  • Previous by thread: Balls2
  • Next by thread: Mathematica in Classroom