Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

Re: Manipulate is sluggish?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83650] Re: Manipulate is sluggish?
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 27 Nov 2007 06:13:25 -0500 (EST)
  • References: <fie1e7$t9b$1@smc.vnet.net>

Hi,

you are sure that you need
RGBColor@@cmyk2rgb[c,m,y,k]

and not the build in version

ToColor[CMYKColor[c, m, y, k], RGBColor]

??

Or do you just want to show that you conversion
is wrong ?

Regards
   Jens


Tom Burton wrote:
> Forgive me if this issue has been addressed.
> 
> I'll soon need to work in CMYK colors and also will want to use the  
> new Manipulate expressions to visualize functions of 4 and 5  
> variables. I decided to try a bit of both, first defining a  
> conversion from CMYK to RGB,
> 
> cmyk2rgb[c_,m_,y_,k_]:=(1-k){1-c,1-m,1-y}
> 
> and then comparing the two color systems:
> 
> Manipulate[GraphicsGrid[Table[c=xx/12;m=yy/12;Graphics[{CMYKColor 
> [c,m,y,k],Disk[{xx,yy},1,{0,\[Pi]}],RGBColor@@cmyk2rgb[c,m,y,k],Disk 
> [{xx,yy},1,{\[Pi],2\[Pi]}]},ContentSelectable->False],{xx,0,12,2},{yy, 
> 0,12,2}]],{y,0.0,1,1/6},{k,0.0,1,1/6}]
> 
> The expression above lays out a grid in cyan and magenta, with yellow  
> and black controlled by sliders.  If my conversion algorithm is  
> wrong, corrections are welcome but beside the point I'm trying to  
> make, which is that the resulting dynamic graphic is sluggish and shy  
> on both my G4 dual 1G and my MacBookPro dual 2.3G.  Response is so  
> slow that animation is always out of sync. After I manually move a  
> slider, sometimes I need to scroll the graphic completely off the  
> page and/or (???) focus on another cell in order for the graphic to  
> update. In other words, it won't update while I look at it (shy!).  
> The kernel will toil away at 90+% of one CPU indefinitely until I  
> scroll away and do something else. This behavior makes the graphic  
> nearly useless. It seems not to matter whether I use continuous  
> sliders, discrete sliders, or drop-down lists of fixed values.
> 
> It's annoying to compare this sluggishness with the speed of the  
> corresponding movie in version 5.2:
> 
> Flatten[Table[
>      Show@GraphicsArray[
>          Table[c=xx/12;m=yy/12;
>            Graphics[{CMYKColor[c,m,y,k],Disk[{xx,yy},1,{0,\[Pi]}],
>                RGBColor@@cmyk2rgb[c,m,y,k],Disk[{xx,yy},1,{\[Pi],2\ 
> [Pi]}]},
>              AspectRatio\[Rule]1],{xx,0,12,2},{yy,0,12,2}],ImageSize\ 
> [Rule]500,
>          PlotLabel\[Rule]ToString[{y,k}]],{y,0.,1.01,1/6},{k, 
> 0.,1.01,1/6}]]
> 
> This is not as slick and convenient as Manipulate in version 6, but  
> it's so much faster!  Does anyone else see this sluggishness and  
> shyness? More importantly, can I work around it somehow?  By the way,  
> the speed of graphics itself seems not to be the issue. The following  
> composite graphic of all slider settings is computed and displayed a  
> few seconds:
> 
> GraphicsGrid[Table[GraphicsGrid[Table[c=xx/12;m=yy/12;Graphics 
> [{CMYKColor[c,m,y,k],Disk[{xx,yy},1,{0,\[Pi]}],RGBColor@@cmyk2rgb 
> [c,m,y,k],Disk[{xx,yy},1,{\[Pi],2\[Pi]}]}],{xx,0,12,2},{yy,0,12,2}]], 
> {y,0.,1.01,1/6},{k,0.,1.01,1/6}],ImageSize->800]
> 
> Thanks in advance,
> 
> Tom
> 
> When responding, please replace news with my first initial and full  
> last name, as one word.
> 
> Tom Burton
> 
> 
> 
> 


  • Prev by Date: Re: FindInstance puzzler
  • Next by Date: Re: FindInstance puzzler
  • Previous by thread: Manipulate is sluggish?
  • Next by thread: Re: Manipulate is sluggish?