Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

Re: Speeding Up Realtime Visualization

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84273] Re: Speeding Up Realtime Visualization
  • From: Will <secandum.oculi at gmail.com>
  • Date: Mon, 17 Dec 2007 03:03:35 -0500 (EST)

Ok, great! It has sped it up a bit. Thanks.

I think my problem is actually *how* I'm forming the matrix which I'm viewing, not actually visualizing the thing.

Here's the code where I think I'm going wrong:

(this is a double buffer setup)

While[True, 
     For[i = 2, i < length, i++, 
        For[j = 2, j < length, j++, 

      x[[c,i,j]] = (functions of x[[p,i,j]] & y[[p,i,j]]);

      y[[c,i,j]] = (functions of x[[p,i,j]] & y[[p,i,j]]);

        ]
     ]
    If[p == 1, c = 1; p = 2, c = 2; p = 1]; (c/p inverter)
] 

Note that for each definition of x[[c,1,2]] and y[[c,1,2]], the functions call 5-6 values from x[[p]] and/or y[[p]]. So I suspect it's this array setup I have that's slowing down the execution. 

I've also tried setting up the definitions of the arrays via a Compile function. Although this speeds it up a little more, it's still no where near what I need/want it to be. Of course, I can turn down my integrator step intervals to get the speed I want, but the drop in quality is way too much.

Any ideas?

Thanks again.


  • Prev by Date: Re: quadratic multiplication
  • Next by Date: .NET/Link Licence
  • Previous by thread: Re: Speeding Up Realtime Visualization
  • Next by thread: Re: Re: Speeding Up Realtime Visualization