Cover
 This is the archive Discourse for the Processing (ALPHA) software. Please visit the new Processing forum for current information.
 Processing 1.0 _ALPHA_    Topics & Contributions    Simulation, Artificial Life (Moderator: REAS)    attractors: peter de jong "dead spots"? « Previous topic | Next topic »

 Pages: 1
lunetta

 attractors: peter de jong "dead spots"? « on: Mar 8th, 2005, 4:21pm »

Hello all

Yes, yes, I know: I don't know a thing about attractors.
Anyway, is so easy to make a good looking animation that I can't help not doing it.

My question is: I'm building this peter de jong attractor animation, but the "dead spots" keep haunting me:
I'm increasing one parameter(or more) per frame, creating a smooth change in the plotted formula; but there are oscillations - a certain form becomes a dot and then returns to the form again.

These attractors are surely "strange", but is there any trick that I could do to avoid the sudden oscillation, leaving the change smooth?

example here:
Quote:
 float x, y, xn, yn; float a, b, c, d; color bla; float timer;   void setup() {   background(255);   framerate(60);   bla = color(0,0,0);   size (640, 480);   x = 0;   y = 0;   b = -2.3; } void loop() { timer+=0.01;   background(255);   c = 3*cos(timer);   d = 3*sin(timer);   a = 3*cos(timer);   for(int i=0; i<30000; i++) {     xn = x;     yn = y;     x = sin(a*yn) - cos(b*xn);     y = sin(c*xn) - cos(d*yn);     set(int(width/2+100*x),int(height/2+100*y), bla);   } }
Sjeiti

 Re: attractors: peter de jong "dead spots"? « Reply #1 on: Mar 8th, 2005, 5:05pm »

There's probably not much you can do about that. Attractors just have these kinds of glitches where very small changes can make them suddenly converge into one or more points or diverge to infinity.

If you really want to maybe you could just filter out the 'bad' frames by some sort of maximum amount of change calculation.

Or if a certain amount of points is in the same spot discard the current iteration and go on to the next.
 « Last Edit: Mar 8th, 2005, 5:08pm by Sjeiti »

http://www.sjeiti.com/
lunetta

 Re: attractors: peter de jong "dead spots"? « Reply #2 on: Mar 8th, 2005, 6:48pm »

yep, that's what I thought. I'm just now figuring out the best way to do it - without a great penalty to speed...

thanks
lunetta

 Re: attractors: peter de jong "dead spots"? « Reply #3 on: Mar 9th, 2005, 7:37am »

here's my friend Peter:
http://www.lunetta.com.br/jong.mov
macavity13

 Re: attractors: peter de jong "dead spots"? « Reply #4 on: Mar 22nd, 2005, 8:25pm »

Nice

You should try the same thing but using color to show the change in velocity between points, might have a nice effect.
 Pages: 1

 Forum Jump: ----------------------------- Discussion -----------------------------  - Community, Collaboration, Status   - Events, Publications, Propaganda   - General Processing Discussion ----------------------------- Programming Questions & Help -----------------------------  - Syntax   - Programs   - Integration ----------------------------- Topics & Contributions -----------------------------  - Tools   - Responsive Form, Games   - Information Visualization => Simulation, Artificial Life   - Tangible Computing   - Automated Systems   - Sound   - Video, Camera   - Beyond Categories ----------------------------- Suggestions -----------------------------  - Software Suggestions   - Website, Reference, Example Suggestions ----------------------------- Bugs -----------------------------  - Software Bugs   - Website, Reference, Example Bugs   - Bug Fixes, Implemented Suggestions ----------------------------- Teaching -----------------------------  - Course Blueprints   - Theory and Practice « Previous topic | Next topic »