       Re: From 3D to 2D

• To: mathgroup at smc.vnet.net
• Subject: [mg84135] Re: From 3D to 2D
• From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
• Date: Tue, 11 Dec 2007 06:08:20 -0500 (EST)
• Organization: Uni Leipzig
• References: <fjkvmo\$pes\$1@smc.vnet.net>

```Hi,

in older Mathematica versions the simple
call of Graphics[your3dGraphicsObject]
would generate the 2d version. This
usefull feature is gone with version 6
but you cann still export the 3d graphics to
a 2d vector format and obtain the same effect, i.e.

gg = Plot3D[Sin[x*y], {x, 0, Pi}, {y, 0, Pi}]

test = ImportString[ExportString[gg, "PDF"], "PDF"]

and test is the 2d graphics you want.

Regards
Jens

giovanni resta wrote:
> Probably this will seem a stupid question...
>
> I wonder if there is a way to do the following:
>
> create a simple 3D graphics  made of
> lines and points, maybe rotate it to
> choose a good point of view, then:
>
> generate the 2D directives that will produce
> a 2D graphic that mimic the given 3D graphic,
> or even better, obtain, for each line or point
> in 3D the corresponding "visual" coordinates
> in 2D.
>
> I don't know if I have been clear enough.
> I explain what I'm doing.
>
> For what I need currently,
> I use Mathematica not to produce the final images, but to obtain
> in a fast and nice way the set of coordinates for my figures.
> For example, if I want to draw a Graph, say
> GraphPlot[Table[k -> Mod[Prime[k], k], {k, 20}]]
> I exploit the very nice GraphPlot, then the
> capability of editing in a visual way the graph,
> and then when I'm satisfied with the obtained layout,
> by using some simple custom functions,
> I convert the graph in simple primitives for
> the very good pgf Latex package.
> This machinery may seem complicated (since Mathematica
> can indeed produce wonderful pictures) but I
> like to be able to modify my simple b&w drawings later,
> on a machine where Mathematica is not available,
> for example to fine-tuning the line width depending on the
> printer, or the apparence of the nodes of the graph and so on...
>
> Now I wonder if I can do something similar
> in 3D. For example:  issue to Mathematica some
> Line[] or Cuboid[] commands to draw a cube in 3D and then
> obtain back in some way the 2D lines that when
> plotted in 2D will create the same scene. All I probably
> need is wireframe, but some hidden edge removal will
> be nice...
>
> I apologize for the verbosity,
> thanks
> giovanni.
>

```

• Prev by Date: efficient programming problem
• Next by Date: Re: Mathematical expectation
• Previous by thread: From 3D to 2D
• Next by thread: efficient programming problem