Flashexempel för undervisning: Två bollar: Skillnad mellan sidversioner

Från Wikiskola
Hoppa till navigering Hoppa till sök
(Skapade sidan med ''''Två bollar''' Här använde jag en fri fil från [http://flashsourcecodes.com/Physics/19/gravity/ Flashsourcecodes] tillverkad av [http://flashsourcecodes.com/profile/51/...')
 
Rad 34: Rad 34:
På nästa rad låter jag yvelocity+gravity från raden ovan gå in som nytt yvelocity. På samma sätt hämtas this._y från this._y+yvelocity på raden ovanför. Detta visar en accelererande ökning på this._y.
På nästa rad låter jag yvelocity+gravity från raden ovan gå in som nytt yvelocity. På samma sätt hämtas this._y från this._y+yvelocity på raden ovanför. Detta visar en accelererande ökning på this._y.


Sedan skapar jag en lista med talpar av time och this._y+yvelocity. Därefter anpassar jag ett polynom till punkterna med kommandot RegressionPoly[Lista1, 2]. Det blir en andragradsfunktion. Funktionen blir f(x) = 4.91x<sup>2</sup>+4.91x+0 vilket stämmer precis med fysikformeln s = at<sup>2</sup>/2 (v<sub>0</sub>=0)+v<sub>0</sub>t  (formeln ovan men omvänd ordning på termerna).
Sedan skapar jag en lista med talpar av time och this._y+yvelocity. Därefter anpassar jag ett polynom till punkterna med kommandot RegressionPoly[Lista1, 2]. Det blir en andragradsfunktion. Funktionen blir f(x) = 4.91x<sup>2</sup>+4.91x+0 vilket stämmer precis med fysikformeln s = at<sup>2</sup>/2+v<sub>0</sub>t  (formeln ovan men omvänd ordning på termerna).


<ggb_applet width="1127" height="506"  version="4.0" ggbBase64="UEsDBBQACAgIALy6bkAAAAAAAAAAAAAAAAAWAAAAZ2VvZ2VicmFfamF2YXNjcmlwdC5qc0srzUsuyczPU0hPT/LP88zLLNHQVKiuBQBQSwcI1je9uRkAAAAXAAAAUEsDBBQACAgIALy6bkAAAAAAAAAAAAAAAAAMAAAAZ2VvZ2VicmEueG1s7Z3rkqM2Fsc/J0+h8oet3YqHRtzJupOyAc1MMrdMz6a29ssWbdPdpLFxDO5LNvs4+yT7YnskkIxHpCPvxMK7lal0MHCQfufPORLCAk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QvpajuNoRYRWPmjlH6oVORmt3Far5pUKxxHruRArALGCQ8V6fjJiebzJkp+AP45yL4RyISgXHqrci5NRzufKyY8sH0e5l0I5bIJ02DxUu5cno13QatfzSOlxtPtmpx2m2uFDtfvmZLQLW+16nvI7jnbf7rSjl/344Ov+b09GO8wv/JunsI6j16udXvTaHx988f/qdPTiV//tQzLHEez1TjA6AMAHjwBen45gfAjQPsNwHMHe7ASjgwB88CjgzekIxocB7RTz4wj2dicYHQjgg0cCb09HMD4UaGcAH0ewdzvB6GgAHzwceHc6gonxgDwp8zjifbcTj44O8MHDg+9ORzw+PuiZJ3cc8d7vxKMDBHzwCOH96YjHhwg9U5eOI97F7gYtHSJYBw8RLk5HPD5G6Jk1daTrtryqU/6d7j+mYzQbo2iM4jFKQMsxej5GL8bo5Rh9M0bfjtGrMXo9Rm/G6O0YvRuj78bo/Rhd/LNP4wJKHn1UzdM6Pzk3CZufOLOq+6OX9U0+v12BEuzXFsXEJPrhRb5YZCsxo0lN6Gf4Y6Xn5XKZrhZoxX76l+T1u7J4ZP43P0abmjvtUyx+JLDc1nzvVVNkW5Ak79V2xX6nb6fep6g7gLZdtc66vzxI1/mPqn/1H1BLBwgfe4J41A4AAPF9AABQSwECFAAUAAgICAC8um5A1je9uRkAAAAXAAAAFgAAAAAAAAAAAAAAAAAAAAAAZ2VvZ2VicmFfamF2YXNjcmlwdC5qc1BLAQIUABQACAgIALy6bkAfe4J41A4AAPF9AAAMAAAAAAAAAAAAAAAAAF0AAABnZW9nZWJyYS54bWxQSwUGAAAAAAIAAgB+AAAAaw8AAAAA" showResetIcon = "false" showAnimationButton = "true" enableRightClick = "true" errorDialogsActive = "true" enableLabelDrags = "false" showMenuBar = "false" showToolBar = "false" showToolBarHelp = "false" showAlgebraInput = "false" useBrowserForJS = "true" allowRescaling = "true" />
<ggb_applet width="1127" height="506"  version="4.0" ggbBase64="UEsDBBQACAgIALy6bkAAAAAAAAAAAAAAAAAWAAAAZ2VvZ2VicmFfamF2YX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AAAA" showResetIcon = "false" showAnimationButton = "true" enableRightClick = "true" errorDialogsActive = "true" enableLabelDrags = "false" showMenuBar = "false" showToolBar = "false" showToolBarHelp = "false" showAlgebraInput = "false" useBrowserForJS = "true" allowRescaling = "true" />

Versionen från 2 mars 2012 kl. 23.41

Två bollar

Här använde jag en fri fil från Flashsourcecodes tillverkad av Wolfos

Den visar dels att bollarna landar samtidigt trots att den ena bollen haren en hastighet i x-led. Öppnar man .fla-filen och högerkickar på den blå bollen ser man denna kod på rad 33-40:

//sets the yspeed to equal the yvelocity.
this._y = this._y + yvelocity;
this._x = this._x + xvelocity;

//if the yvelocity < maxvelocity then increase gravity pull.
if (yvelocity < maxvelocity){
yvelocity += gravity;
}

Man ser tydligt hur hastigheten ökar med accelerationen i varje loop. Acceleration är ju hastighetsökning per tidsenhet, vanligen m/s / s.

yvelocity += gravity; betyder att hastigheten ökas med värdet på gravity. Man kan läsa om javascript i denna fina tutorial på javaScript.

Filerna är Physics_2_bollar.swf och Physics.fla men tyvärr är det en körbar fil av sådan typ som inte går att ladda upp på MediaWiki.

Visa med Geogebra

En fysiktolkning skulle vara att:

I första delen har vi en st-kurva, dvs sträckan som tillryggaläggs i ett tidsintervall men en hastighet. Motsvarande st-kurva är en parabel. Jämför med att s = v0t + at2/2 (v0=0)

I programmets andra del har vi en hastighetsökning på grund av tyngdaccelerationen (gravity). Detta är ju en vt-kurva som är linjär.

En förklaring av programmet:

I gGeoGebran nedan har jag lagt in värden i kalkylarket. Här jobbar jag baklänges mot programmet. Först får hastigheten yvelocity ökas med tyngdaccelerationen gravity. Sedan ökas positionen this._y med hastigheten yvelocity.

På nästa rad låter jag yvelocity+gravity från raden ovan gå in som nytt yvelocity. På samma sätt hämtas this._y från this._y+yvelocity på raden ovanför. Detta visar en accelererande ökning på this._y.

Sedan skapar jag en lista med talpar av time och this._y+yvelocity. Därefter anpassar jag ett polynom till punkterna med kommandot RegressionPoly[Lista1, 2]. Det blir en andragradsfunktion. Funktionen blir f(x) = 4.91x2+4.91x+0 vilket stämmer precis med fysikformeln s = at2/2+v0t (formeln ovan men omvänd ordning på termerna).

<ggb_applet width="1127" height="506" version="4.0" ggbBase64="UEsDBBQACAgIALy6bkAAAAAAAAAAAAAAAAAWAAAAZ2VvZ2VicmFfamF2YXNjcmlwdC5qc0srzUsuyczPU0hPT/LP88zLLNHQVKiuBQBQSwcI1je9uRkAAAAXAAAAUEsDBBQACAgIALy6bkAAAAAAAAAAAAAAAAAMAAAAZ2VvZ2VicmEueG1s7Z3rkqM2Fsc/J0+h8oet3YqHRtzJupOyAc1MMrdMz6a29ssWbdPdpLFxDO5LNvs4+yT7YnskkIxHpCPvxMK7lal0MHCQfufPORLCAk++flgW6C7bVHm5Oh9hwxyhbDUvF/nq+ny0ra+eBaOvv/p8cp2V19nlJkVX5WaZ1ucjh1rmi/ORZy/mziKYP3NsK3vmXM29Z2lgB88c1zMXl3aQzm2wRA9V/uWqfJMus2qdzrOL+U22TF+V87RmFd/U9frLs7P7+3uDV2WUm+uz6+tL46FajBBgrqrzUfvhSyhu76B7m5lbponP/vr6VVP8s3xV1elqno0QdWGbf/X5Z5P7fLUo79F9vqhvwGFsuyN0k+XXN+CU5+AROqNWa1Bknc3r/C6r4NjOKnO6Xq5HzCxd0f2fNZ9QIfwZoUV+ly+yzfnINCzTD63Qxa6DA9e0LKik3OTZqm6N20qlQvB+KWHouqHjY9tzPTvwvf5SJmccanKXZ/cNHf3EwMHoLq/yyyIDJzZbUCZfXW3grJyPrtKigvWqfiyyy3QjNnR4xjbsz38CY9uBk9pICdtNc0z/PPhzTJN7Iyp1Rqguy4IVaqKff0aWaZloTBe4WViw8Lxml9lsM+1mYTULp1m4jY3THO40pk5j4zQ2jv1pPmLuo0ujQdVH61MqFbJatidXabn9VWKvU2dbpqi0YXjKUV4ndjunEqpi/7E/qUbbOqDGZv3XKrQDWqEfOL0Veo4WFydnPFUmbaCi6obatmeyzpYVDV07RG5IIxAjF8LU8yHgXIRDWPgWgsBE2EWOC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AAAAAAAAAAAAAAAAAAAAAZ2VvZ2VicmFfamF2YXNjcmlwdC5qc1BLAQIUABQACAgIALy6bkAfe4J41A4AAPF9AAAMAAAAAAAAAAAAAAAAAF0AAABnZW9nZWJyYS54bWxQSwUGAAAAAAIAAgB+AAAAaw8AAAAA" showResetIcon = "false" showAnimationButton = "true" enableRightClick = "true" errorDialogsActive = "true" enableLabelDrags = "false" showMenuBar = "false" showToolBar = "false" showToolBarHelp = "false" showAlgebraInput = "false" useBrowserForJS = "true" allowRescaling = "true" />