Deprecated: Function set_magic_quotes_runtime() is deprecated in /var/www/frischzelle/textpattern/lib/txplib_db.php on line 14
Warning: Cannot modify header information - headers already sent by (output started at /var/www/frischzelle/textpattern/lib/txplib_db.php:14) in /var/www/frischzelle/textpattern/lib/txplib_misc.php on line 1548
<txp:posted/> -> Warning: getdate() [function.getdate]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1067
<txp:posted/> -> Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1068
<txp:posted/> -> Warning: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1104
<txp:comment_time/> -> Warning: getdate() [function.getdate]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1067
<txp:comment_time/> -> Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1068
<txp:comment_time/> -> Warning: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1104
<txp:comment_time/> -> Warning: getdate() [function.getdate]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1067
<txp:comment_time/> -> Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1068
<txp:comment_time/> -> Warning: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1104
<txp:comment_time/> -> Warning: getdate() [function.getdate]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1067
<txp:comment_time/> -> Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1068
<txp:comment_time/> -> Warning: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1104
<txp:comment_time/> -> Warning: getdate() [function.getdate]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1067
<txp:comment_time/> -> Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1068
<txp:comment_time/> -> Warning: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1104
<txp:comment_time/> -> Warning: getdate() [function.getdate]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1067
<txp:comment_time/> -> Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1068
<txp:comment_time/> -> Warning: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1104
<txp:comments_error wraptag="ul" break="li" /> -> Warning: getdate() [function.getdate]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1067
<txp:comments_error wraptag="ul" break="li" /> -> Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1068
<txp:comments_error wraptag="ul" break="li" /> -> Warning: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead on line 1104
Warning: Cannot modify header information - headers already sent by (output started at /var/www/frischzelle/textpattern/lib/txplib_db.php:14) in /var/www/frischzelle/textpattern/publish.php on line 467 Frischzelle: Processing: Kann jemand helfen?
Wir wollen anhand eines 2D-Mappings von Musik-Analyse-Daten, Pfade (am liebsten Kurvenverläufe und unsichtbar) in Processing zeichnen, die dann von Partikeln verfolgt werden können.
Sven H. hat uns schon beim Mapping geholfen. Wir haben hier
ein Sketch, das eben aus jeweils vier über OSC empfangenen Punkten Kurven zeichnet.
Die Frage, die sich mir jetzt stellt ist:
Was ist die sinnvollste Methode um einzelne Partikel entlang der Pfade/Punkte zu bewegen?
Idee 1:
Ich nehme immer den über OSC empfangenen Punkt als neuen Zielpunkt für einen Partikel.
Das Prinzip sieht man in vereinfachter Form und ohne OSC in dem Sketch walking_2.pde
Problem: Keine Kurven.
Ich kann natürlich auch exponentielle Verläufe zwischen 2 Punkten machen, aber dann habe ich ja immer noch Ecken an den Stellen, wo ein Partikel einen neuen Zielpunkt bekommt und eine neue Richtung einschlägt.
Da könnte interpolieren helfen (lerp() vielleicht?).
Idee 2:
Nehmen wir an, ich zeichne wie oben erklärt anhand von 4 Punkten und der funktion curve() Kurven. Die Kurve sei weiß auf schwarzem Hintergrund. Dann könnte ich einem Partikel sagen:
Überprüfe die Farbe des vor dir liegenden Pixels! Ist sie weiß, gehe einen Pixel nach vorne. Ist sie schwarz, dreh’ dich und überprüfe den nächsten Pixel.
Problem: Was passiert wenn z.B. eine Kurve überschrieben wird, weil der Array voll ist? Also der Partikel plötzlich auf schwarzer Fläche liegt.
Vielleicht gibt es auch eine weitere Methode, die einfacher/schöner ist!?
Es wäre schön, wenn uns jemand sagen könnte, welchen Ansatz wir weiter verfolgen sollten. Nur damit wir nicht Tage lang die eine Methode versuchen, um dann zu erkennen, dass es uns nicht weiter bringt.
— Jonas Förster
Kommentare
das billigste, was mir einfällt, wäre, eine fensterfunktion über eure bewegungsphase zu legen. so:
float wpct = sin(pct*PI-HALF_PI)/2+.5;
x = beginX + (wpct * distX);
y = beginY + (wpct * distY);
dann bremst euer partikel immerhin bei jedem eckpunkt ab und zeigt ein eher natürliches beschleunigungsverhalten.
(sorry, fehlende zeilenumbrüche im obigen codebeispiel)
desweiteren käme für euch vielleicht in frage, die zielpunkte als statische magneten zu modellieren, von denen das partikel angezogen wird. auch nicht weiter schwierig, ihr müsst dann nur
a) pro partikel position und geschwindigkeit merken + deren veränderungen errechnen (3 zeilen code)
b) damit rechnen, dass die zielpunkte nie genau getroffen werden, sondern das partikel den zielpunkt in der regel verfehlt, über ihn hinausschießt, um ihn orbitiert/oszilliert.
ihr könnt die magneten auch dynamisch machen, z.b. die magnetstärke dem geschwindigkeitsvektor des partikels anpassen – damit kann man noch ein bisschen biegen.
mit magneten kriegt ihr auf jeden fall schöne flugbahnen – auf kosten der zielsicherheit.
wenn ihr auf beides angewiesen seid: punkte treffen UND dabei smoothe kurven – dann ist vorausschauendes fahrverhalten angesagt. nämlich wollt ihr dann spline-interpolation haben, vermutlich NATÜRLICHE KUBISCHE splines. siehe wikipedia. die in processing zu implementieren (für mein letztes videostück) hab ich damals nur mit code klauen geschafft, die mathe war mir zu hoch, um im detail durchzusteigen. jedenfalls sei gesagt, dass ihr für eine spline-interpolation jeweils 4 punkte kennen müsst. also entweder in die zukunft schauen oder mit delay leben :)
btw, hier
http://www.cse.unsw.edu.au/~lambert/splines/
kann man schön einige spline-typen vergleichen. davon gibt es auch den java-sourcecode
http://www.cse.unsw.edu.au/~lambert/splines/source.html
den ausschlachten geht relativ easy.
Verstehe ich nicht ganz!
Wie kann ein Magnet eine Kurve verursachen in einem “System”, in dem es keine Kraft gibt, die gegen die des Magneten wirkt? Durch die Form des Magnetfeldes? Das ist einfach zu implementieren?
das billigste, was mir einfällt, wäre, eine fensterfunktion über eure bewegungsphase zu legen. so:
float wpct = sin(pct*PI-HALF_PI)/2+.5; x = beginX + (wpct * distX); y = beginY + (wpct * distY);dann bremst euer partikel immerhin bei jedem eckpunkt ab und zeigt ein eher natürliches beschleunigungsverhalten.
— stefan · Mai 26, 10:59 pm · #
(sorry, fehlende zeilenumbrüche im obigen codebeispiel)
desweiteren käme für euch vielleicht in frage, die zielpunkte als statische magneten zu modellieren, von denen das partikel angezogen wird. auch nicht weiter schwierig, ihr müsst dann nur
a) pro partikel position und geschwindigkeit merken + deren veränderungen errechnen (3 zeilen code)
b) damit rechnen, dass die zielpunkte nie genau getroffen werden, sondern das partikel den zielpunkt in der regel verfehlt, über ihn hinausschießt, um ihn orbitiert/oszilliert.
ihr könnt die magneten auch dynamisch machen, z.b. die magnetstärke dem geschwindigkeitsvektor des partikels anpassen – damit kann man noch ein bisschen biegen.
mit magneten kriegt ihr auf jeden fall schöne flugbahnen – auf kosten der zielsicherheit.
— stefan · Mai 26, 11:16 pm · #
wenn ihr auf beides angewiesen seid: punkte treffen UND dabei smoothe kurven – dann ist vorausschauendes fahrverhalten angesagt. nämlich wollt ihr dann spline-interpolation haben, vermutlich NATÜRLICHE KUBISCHE splines. siehe wikipedia. die in processing zu implementieren (für mein letztes videostück) hab ich damals nur mit code klauen geschafft, die mathe war mir zu hoch, um im detail durchzusteigen. jedenfalls sei gesagt, dass ihr für eine spline-interpolation jeweils 4 punkte kennen müsst. also entweder in die zukunft schauen oder mit delay leben :)
— stefan · Mai 26, 11:24 pm · #
btw, hier
http://www.cse.unsw.edu.au/~lambert/splines/
kann man schön einige spline-typen vergleichen. davon gibt es auch den java-sourcecode
http://www.cse.unsw.edu.au/~lambert/splines/source.html
den ausschlachten geht relativ easy.
— stefan · Mai 26, 11:32 pm · #
Zum Thema Magnete:
Verstehe ich nicht ganz!
Wie kann ein Magnet eine Kurve verursachen in einem “System”, in dem es keine Kraft gibt, die gegen die des Magneten wirkt? Durch die Form des Magnetfeldes? Das ist einfach zu implementieren?
— foerster · Mai 27, 02:47 am · #