Imaginary numbers and fractals.
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
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
>
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.)
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.
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.
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
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?
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:
>