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

RealTime3D without RealTime3D

  • To: mathgroup at smc.vnet.net
  • Subject: [mg28524] RealTime3D without RealTime3D
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 25 Apr 2001 01:30:28 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

 all. I just discovered a fancy feature of the 4.1 FontEnd.

If one wish to display a Graphics3D object as real time object in
the fontend one has nothing more to do than to create a graphics cell
with the true 3d graphics object instead of the PostScript code.

The Graphics3D[] object don't like Automatic settings in the options
and with to get a options sequence instead of a options list. The
following code should work on Unix and windows and explain the basic
steps

make some 3d graphics:

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

now we have a 3d object rendered as PostScript. To get
a RealTime3D object (without loading the RealTime3D` package)
take te list of options and paste the 3d object
verbatim into a new cell

vp = FullOptions[gg];
gg2 = gg;
(* replace the options list *)
gg2[[2]] = 
    Sequence @@ 
      Select[gg[[2]], 
        MemberQ[{Lighting, Boxed, ViewPoint, BoxRatios}, First[#]] &];

(* make the cell *)
NotebookWrite[SelectedNotebook[], Cell[BoxData[gg2], "Graphics"]]

and woops, we have a nice active movable and rotatable 3d object.

Needless to say that the next version of MathGL3d will have a
function that does it and it will correct the lighting bug in
the RealTime3D` package. :-)

Regards
  Jens


  • Prev by Date: Help with a simple problem.
  • Next by Date: Re: Echelon form of a matrix lCorrection]
  • Previous by thread: Help with a simple problem.
  • Next by thread: Re: RealTime3D without RealTime3D