Matrix operations are slow

May 29, 2009 at 11:58am

Matrix operations are slow

I have performed following matrix operation to scroll an image

for (int i=0;i

I found the operation to be very slow. I have seen jitter examples doing far complex operations running very fast. Is there a way to speed things up?
What I wanted to do is to change pixel values. I have seen "op" operation performed on matrix.
Can anyone give a small sample code on this?

#44145
May 29, 2009 at 2:18pm

jit.op, jit.rota, jit.xfade, dim/srcdim/dstdim messages…

Is there a reason you need to do these things using code? Most matrix operations you can do with jitter objects, and a lot of them could be a pain to do otherwise. If you have really code-specific questions, those forums will probably be better.

#158653
May 29, 2009 at 2:36pm

I have written my application as a java external. So I have to do it in code.
I tried to use jit.op but couldn’t figure out how to do it in code. What I really wanted to do is to create water ripple effect. I am not sure jit.op is the correct way of doing something like this…

#158654
May 30, 2009 at 9:45pm

iterating over a matrix like that in JAVA is going to be slow-ish. Definitely slower than in C, which is what all of the Jitter externals are written in. If you want a water ripple effect, have a look at xray.jit.water:

http://mat.ucsb.edu/whsmith/xray.html

wes

#158655

You must be logged in to reply to this topic.