Bin irgendwie am Verzweifeln:
- Xneu = Xalt + ( distortion * sin ( Pi * Yalt / 64 ))
- Yneu = Yalt + ( distortion * cos ( Pi * Xalt / 64 ))
Schritt : - ( distortion * sin ( Pi * Yalt / 64 ))
Vertauschen links und rechts
Xalt = Xneu - ( distortion * sin ( Pi * Yalt / 64 ))
Yalt = Yneu + ( distortion * cos ( Pi * Xalt / 64 ))
Schritt :2. in 1. Einsetzen
Yalt = Yneu + ( distortion * cos ( Pi * Xalt / 64 ))
Xalt = Xneu - ( distortion * sin ( Pi * Yalt / 64 ))
Xalt = Xneu - ( distortion * sin ( Pi * (Yneu + ( distortion * cos ( Pi * Xalt / 64 ))) / 64 ))
Schritt ? Wie kriege ich das Xalt von der rechten auf die linke Seite der Gleichung?
Es handelt sich um wellenförmige Verzerrung von Grafik
Die Punkte ( Xalt,Yalt) werden nach (Yneu,Yneu) verschoben
distortion ist eine Konstante (z.B 10) genauso 64, die die Höhe der Welle bestimmt ( 180 ergäbe Halbkreise)
Sie soll zurückgebracht werden auf den alten Inhalt. Es gibt natürlich 2 Werte für Xalt, je nach Quadrant (aufsteigend oder absteigend) .
Die Punkte Xneu, Yneu sind jetzt also die bekannten aus { (0,0) bis (300,100} = Bitmap 300*100 Pixel
Also: welchen (2) Wert(e) hat Xalt ?
Vielen Dank für jegliche Hilfe.
Marco