MathGroup Archive 2010

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

Search the Archive

Re: Why are my 3D plots blue?

  • To: mathgroup at
  • Subject: [mg114321] Re: Why are my 3D plots blue?
  • From: Joseph Gwinn <joegwinn at>
  • Date: Wed, 1 Dec 2010 02:10:11 -0500 (EST)
  • References: <id2eko$d5t$>

In article <id2eko$d5t$1 at>, John Fultz <jfultz at> 

> On Mon, 29 Nov 2010 06:07:39 -0500 (EST), Joseph Gwinn wrote:
> > In article <ictfvj$mi6$1 at>, John Fultz <jfultz at>
> > wrote:
> >
> >> If you can move the Dynamic inside of the Graphics3D[], you'll have a
> >> much
> >> better experience.  I.e., instead of...
> >>
> >> Dynamic[stuff; Graphics3D[{dirs}, opts]]
> >>
> >> do this...
> >>
> >> Graphics3D[Dynamic[stuff; {dirs}], opts]
> >>
> > I will try this.
> >
> > Will something like:
> >
> > DynamicModule[{local variables},
> > Dynamic[stuff];
> > Graphics3D[ Dynamic[graphic directives], opts]
> > ]
> >
> > also work?  I've tried some similar approaches, but the graphics didn't
> > respond to mouse motion, don't know exactly why.  I would have thought
> > that a local variable x would be linked by the Dynamic functions.  I
> > assume I didn't quite do it right.
> No, that won't work.  To understand why, read through my post here...
> For a further library of stuff that I've written about Dynamic, see here...

Thanks.  I'll study these.  I've read all the relevant documentation, 
and still don't really have a complete grasp of Dynamic and its friends.

> >> and if the options should be dynamically updated, put individual
> >> Dynamics in the option values.
> >>
> > Will this allow me to track the current value of for instance
> > ViewMatrix?  I have tried Dynamic[ViewMatrix] to no effect, getting an
> > unchanging empty list {} in response.
> Alas, there's a bug here.  You're the first to uncover this, it appears.  
> I've made a report to the appropriate developers.

Ahh.  Thanks. I would guess that you were already able to reproduce the 
problem, but here are some miscreants I tried:




> >> The basic problem here is that the Graphics3D is being recreated over
> >> and over again and Mathematica is getting confused about what exactly
> >> should be selected.  In typical examples, this kind of thing works fine,
> >> but your code, for reasons I haven't investigated, stresses this enough
> >> to expose the problem.  By preventing the Graphics3D wrapper from being
> >> recreated, you can avoid the problem entirely.
> >>
> > OK.  Sounds like it will be faster too.
> Yes, but probably only marginally so.

One thing I have been doing is to generate 3D plots in two pieces, with 
the unchanging background done once (with no Dynamic calls), the 
changing stuff generated in another Graphics3D, then using Show to merge 
things.  The pattern is something like:

staticplot=Graphics3d[<background scenery>];  (* No Dynamic stuff *)

DynamicModule[{local vars},
dynamicplot=Graphics3D[Dynamic[<stuff that moves>]];
Show[staticplot,dynamicplot]  ]

Comments?  It this complication worthwhile?

> > Another perhaps related effect discovered by accident is that moving the
> > 3D mouse while Mathematica is doing the initial evaluation of the
> > notebook can cause Mathematica to crash with a SEGFAULT error.  This
> > happened a few days ago, and I allowed MacOS to send the crash report to
> > Apple.
> This might require further investigation of the specific notebook you're 
> working with.   I suggest starting a dialog with technical support about this.

OK.  If I can reproduce the problem.  I assume that Tech Support can 
access Mathematica crash logs sent to Apple.  I bet the logs are under a 
rock somewhere on my machine somewhere as well.


Joe Gwinn

  • Prev by Date: Re: Pass by reference for compiled functions
  • Next by Date: Re: Difficulty in obtaining a numerical solution for a partial
  • Previous by thread: Re: Pass by reference for compiled functions
  • Next by thread: Re: Why are my 3D plots blue?