## Imaginary numbers and fractals.

Nov 06 2007 | 10:37 pm
Is it possible to use complex and imaginary numbers within Max MSP or Jitter so that they can be used in equations to draw fractals and the like?
I've tried the expr object with functions that include sqrt(-1) and the lcd object but I'm not getting very far.
Thanks
Rhys

• Nov 06 2007 | 10:56 pm
You have to represent complex numbers as a pair of numbers and accordingly adjust the various basic operators to operate in a complex manner.
wes
On 11/6/07, Rhys Perkins wrote: > > Is it possible to use complex and imaginary numbers within Max MSP or Jitter so that they can be used in equations to draw fractals and the like? > > I've tried the expr object with functions that include sqrt(-1) and the lcd object but I'm not getting very far. > > Thanks > > Rhys >
• Nov 07 2007 | 11:00 am
I had once considered building a set of math objects for handling complex arithmetic. There was a start with the lp.c2p~ and lp.p2c~ objects I built back in the days before cartopol~ and poltocar~ existed. But the project that I would have needed complex math for never got beyond the drawing board and I didn't see a dire need for the objects.
It wouldn't be hard at all to write a set of complex math objects in C. Or Java. For that matter, it wouldn't be that hard to patch together a set of objects. Here's an example of complex square. Comments, error checking, handling async input, etc. left to the reader. (It is admittedly these tedious details that I tend to find more convenient to handle in C, but some people like patching this stuff, too.)
• Nov 07 2007 | 1:15 pm
Indeed, they would be easy to create in Java.
What would an addition/multiplication object take? Perhaps four inlets, real-1, imag-1 real-2, imag-2?
then output real(1*2), imag(1*2)
Actually, looking at it, its easy to see how you could adapt the existing max objects - you just have real(1*2) = (real-1*real-2) - (imag-1*imag-2) etc..
I guess the more complex fractal program might be worth coding in Java. You could have the kind of recursive functions easily defined there with an array for the pixels.
• Nov 07 2007 | 4:50 pm
• Nov 07 2007 | 5:28 pm
it's harmless. an opendialog bug
Matthias Schneider-Hollek wrote: ever had that ?
from my max window
was in timer proc was in timer proc was in timer proc was in timer proc was in timer proc was in timer proc was in timer proc
--------------------------------- Yahoo! Answers - Get better answers from someone who knows. Tryit now.
• Nov 07 2007 | 5:30 pm
On 7 nov. 07, at 17:50, Matthias Schneider-Hollek wrote:
> was in timer proc
It's an harmless debug post:
https://cycling74.com/forums/index.php? t=msg&goto=105563&rid=0&S=fb7ca98dd5732ae37cae8053572a48ff&srch=was+in +timer+proc#msg_105563
ej
• Nov 07 2007 | 8:03 pm
Alternately, you might want to pass each complex value as a duple (2-item list). The convention would halve the number of inlets/outlets. OTOH, you have to pack/unpack inside each abstraction. Trade-offs, trade-offs...
How did the "timer proc" thread get in here?
• Nov 08 2007 | 1:26 pm
merci
thanks
Am 07.11.2007 um 18:30 schrieb Emmanuel Jourdan:
> On 7 nov. 07, at 17:50, Matthias Schneider-Hollek wrote: > >> was in timer proc > > It's an harmless debug post: >