Rem Wasserwelle, Bereich 204.8 m FullW # 1 FontSize = 16 FontName = "Courier" Local Double welle(512), wella(512), om(128), k(128), t, a(128) Local Double wellxa, x Local Int i, it, ix, ixa, ixs, up, upa For i = 1 To 48 k(i) = i * 2 * PI / 204.8 om(i) = Sqrt(63 * k(i)) a(i) = 6 * Exp(-((i - 20) / 8) ^ 2) Next i ixs = 87 DefLine 0, 3 FontSize = 12 Print AT(6, 5); "For it = 1 to 2500" Print AT(8, 6); "For ix = 0 To 480" Print AT(10, 7); "For i = 1 To 48" Print AT(12, 8); "welle(ix) = welle(ix) + a(i) * Cos(k(i) * x - om(i) * t)" Print AT(10, 9); "Next i" Print AT(8, 10); "Next ix" Print AT(8, 11); "(Plot welle)" Print AT(6, 12); "next it" FontSize = 16 Pause 5 For it = 0 To 2500 t = it / 100. For ix = 0 To 480 x = ix / 2.5 welle(ix) = 0. For i = 1 To 48 welle(ix) = welle(ix) + a(i) * Cos(k(i) * x - om(i) * t) Next i Next ix For ix = 1 To 480 QBColor 15 Line 2 * ix + 38, 400 - wella(ix - 1), 2 * ix + 40, 400 - wella(ix) QBColor 9 Line 2 * ix + 38, 400 - welle(ix - 1), 2 * ix + 40, 400 - welle(ix) Next ix For ix = 0 To 480 wella(ix) = welle(ix) Next ix If t > 10 And t < 20 QBColor 15 up = 1 ' PCircle 2 * ixa + 41, 400 - wellxa, 5 man(2 * ixa + 41, 400 - wellxa, upa) If welle(ixs) > 0 Then Inc ixs '##B# EndIf QBColor 12 ' PCircle 2 * ixs + 41, 400, 5 man(2 * ixs + 41, 400, up) ixa = ixs upa = up wellxa = 0. Else QBColor 15 up = 0 ' PCircle 2 * ixa + 41, 400 - wellxa, 5 man(2 * ixa + 41, 400 - wellxa, upa) QBColor 12 ' PCircle 2 * ixs + 41, 400 - welle(ixs + 1), 5 man(2 * ixs + 41, 400 - welle(ixs + 1), up) ixa = ixs '##E# upa = up wellxa = welle(ixs + 1) EndIf If it Mod 5 = 0 Then Print AT(5, 2); "maxdist = 192 m dist = "; Str(ixs / 2.5, 5, 1); " m t = "; Str(t, 4, 1); " s " EndIf Exit If MouseK ' Pause 1 Next it Print Print " Exit with mouse click" Repeat Until MouseK Procedure man(xm, ym, up) If up = 1 Line xm - 6, ym + 1, xm + 8, ym + 5 Line xm + 1, ym + 3, xm + 1, ym - 9 Line xm - 3, ym - 5, xm + 4, ym - 4 Line xm + 4, ym - 4, xm + 6, ym - 6 PCircle xm, ym - 11, 2 Else Line xm - 6, ym , xm + 8, ym PCircle xm + 1, ym - 3, 2 EndIf EndProc $DatFile $ExeName = C:\Dokumente und Einstellungen\Erhard\Desktop\KANDILLI\math-c\demos\surfer2.Exe $FileDescription = Beschreibung $Comments = Autor: Nicht registriert $CompanyName = Nicht registriert $LegalCopyright = © 2007 Nicht registriert $LanguageId = 0407 $FileVersion = %d.%d.%d.%d $ProductVersion = %d.%d.%d.%d $DatFile