Re: Rotable Graphics and ViewPoint
- To: mathgroup at smc.vnet.net
- Subject: [mg78615] Re: Rotable Graphics and ViewPoint
- From: Januk <ggroup at sarj.ca>
- Date: Thu, 5 Jul 2007 04:09:42 -0400 (EDT)
- References: <f67mco$2vu$1@smc.vnet.net><f6d5jp$i8p$1@smc.vnet.net>
Hi Murray, Well, I suppose it depends how you introduce such things. On one hand, the example I posted doesn't do everything for them, they still need to figure out how to *make* the graphic. So it doesn't need to be any more complicated than using a Show command to combine graphics. On the other hand, such examples can be used to teach what can be done. Clearly the students are familiar with pretty well every part of manipulating their graphics (Helen doesn't seem adverse to them using the ViewPoint and ViewVertical options). So have them build their own functions that do the job. If you strip it down, the idea is pretty simple: Use some sort of dynamic object to allow a couple of symbols to be set remotely that will update the graphic. In fact, this particular example becomes almost trivially simple with Dynamic objects; Albert's suggestion works even outside of any "gray box". vp = {1.3, -2.4, 2} vw = Automatic; Plot3D[ somefunction[x,y], {x, xmin, xmax}, {y, ymin, ymax}, ViewVertical->Dynamic[vv], ViewPoint->Dynamic[vp]] Then the students can simply look at vv and vp anywhere in their code: {Dynamic[vp], Dynamic[vv]} Actually, for Helen's case, it would probably better to simply use: {vp, vv} since then the output will remain visible across sessions until that cell is re-evaluated. No need for AbsoluteOptions or FullOptions, and no using graphics as input. Januk PS: Since I tend to like these types of things to be a bit more graphical, I'd probably suggest using a button to do the job: Plot3D[ somefunction[x,y], {x, xmin, xmax}, {y, ymin, ymax}, ViewVertical->Dynamic[vv], ViewPoint->Dynamic[vp]] Button["Print ViewPoint and ViewVertical", Print[{vp, vv}] ] Plot3D[ On Jul 4, 5:34 am, Murray Eisenberg <mur... at math.umass.edu> wrote: > Yes, that's the whole point! It simply will not do to provide > frighteningly complicated extra code to the novice who is still trying > to cope with the basic syntax of Plot3D, say. > > (One could argue that Plot3D is itself a "black box", so why not provide > the "gray box" of extra code to change the viewpoint. But students > don't typically see it that way. If they see the complicated code early > on, it seems to convince most that Mathematica is just too hard to > fathom and so they'll just copy and paste from examples as templates > rather than attempt to learn the basics themselves.)