File:Inclinedthrow.gif
Aus Wikimedia Commons, dem freien Medienarchiv
Zur Navigation springen
Zur Suche springen
Inclinedthrow.gif (400 × 288 Pixel, Dateigröße: 374 KB, MIME-Typ: image/gif, Endlosschleife, 102 Bilder, 10 s)
Dateiinformationen
Strukturierte Daten
Bildtexte
Kurzbeschreibungen
Ergänze eine einzeilige Erklärung, was diese Datei darstellt.
Beschreibung
[Bearbeiten]BeschreibungInclinedthrow.gif |
English: Trajectories of three objects thrown at the same angle (70°). The black object doesn't experience any form of drag and moves along a parabola. The blue object experiences Stokes' drag, and the green object Newton drag. |
Datum | |
Quelle | Eigenes Werk |
Urheber | AllenMcC. |
Andere Versionen | Inclinedthrow2.gif |
GIF‑Erstellung InfoField | ![]() Dieser Plot wurde mit Matplotlib erstellt. |
Quelltext InfoField | Python code#!/usr/bin/python3
# -*- coding: utf8 -*-
import os
import inspect
from math import *
import numpy as np
from scipy.integrate import odeint
from scipy.optimize import newton
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib import animation
# settings
mpl.rcParams['path.snap'] = False
fname = 'inclinedthrow'
size = 400, 288
l, w, b, h = 22.5/size[0], 1-23/size[0], 22.5/size[1], 1-23/size[1]
nframes = 102
delay = 8
lw = 1.
ms = 6
c1, c2, c3 = "#000000", "#0000ff", "#007100"
def projectile_motion(g, mu, pot, xy0, vxy0, tt):
# use a four-dimensional vector function vec = [x, y, vx, vy]
def dif(vec, t):
# time derivative of the whole vector vec
v = hypot(vec[2], vec[3])
vxrel, vyrel = vec[2] / v, vec[3] / v
return [vec[2], vec[3], -mu * v**pot * vxrel, -g - mu * v**pot * vyrel]
# solve the differential equation numerically
vec = odeint(dif, [xy0[0], xy0[1], vxy0[0], vxy0[1]], tt)
return vec[:, 0], vec[:, 1], vec[:, 2], vec[:, 3] # return x, y, vx, vy
g = 1.
theta = radians(70)
v0 = sqrt(g/sin(2*theta))
vinf = 2.1
# use identical terminal velocity vinf for both types of friction
mu_stokes = g / vinf**1
mu_newton = g / vinf**2
x0, y0 = 0.0, 0.0
vx0, vy0 = v0 * cos(theta), v0 * sin(theta)
T = newton(lambda t: projectile_motion(g, 0, 0, (x0, y0), (vx0, vy0), [0, t])[1][1], 2*vy0/g)
nsub = 10
tt = np.linspace(0, T * nframes / (nframes - 1), (nframes - 1) * nsub + 1)
traj_free = projectile_motion(g, 0, 0, (x0, y0), (vx0, vy0), tt)
traj_stokes = projectile_motion(g, mu_stokes, 1, (x0, y0), (vx0, vy0), tt)
traj_newton = projectile_motion(g, mu_newton, 2, (x0, y0), (vx0, vy0), tt)
def animate(nframe, saveframes=False):
print(nframe, '/', nframes)
t = T * float(nframe) / nframes
plt.clf()
fig.gca().set_position((l, b, w, h))
fig.gca().set_aspect("equal")
plt.xlim(0, 1)
plt.ylim(0, (h*size[1]) / (w*size[0]))
plt.xticks([]), plt.yticks([])
plt.xlabel('Distance', size=12)
plt.ylabel('Height', size=12)
plt.plot(traj_free[0][:nframe*nsub+1], traj_free[1][:nframe*nsub+1],
'-', lw=lw, color=c1)
plt.plot(traj_free[0][nframe*nsub], traj_free[1][nframe*nsub],
'ok', color=c1, markersize=ms, markeredgewidth=0)
plt.plot(traj_stokes[0][:nframe*nsub+1], traj_stokes[1][:nframe*nsub+1],
'-', lw=lw, color=c2)
plt.plot(traj_stokes[0][nframe*nsub], traj_stokes[1][nframe*nsub],
'ok', color=c2, markersize=ms, markeredgewidth=0)
plt.plot(traj_newton[0][:nframe*nsub+1], traj_newton[1][:nframe*nsub+1],
'-', lw=lw, color=c3)
plt.plot(traj_newton[0][nframe*nsub], traj_newton[1][nframe*nsub],
'ok', color=c3, markersize=ms, markeredgewidth=0)
if saveframes:
# export frame
dig = int(ceil(log10(nframes)))
fsavename = ('frame{:0' + str(dig) + '}.svg').format(nframe)
fig.savefig(fsavename)
with open(fsavename) as f: content = f.read()
content = content.replace('pt"', 'px"').replace('pt"', 'px"')
with open(fsavename, 'w') as f: f.write(content)
fig = plt.figure(figsize=(size[0]/72., size[1]/72.))
os.chdir(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))))
for i in range(nframes):
animate(i, True)
os.system('convert -loop 0 -delay ' + str(delay) + ' frame*.svg +dither ' + fname + '.gif')
# keep last frame for two seconds
os.system('gifsicle -k32 --color-method blend-diversity -b ' + fname + '.gif -d' + str(delay) + ' "#0-' + str(nframes-2) + '" -d200 "#' + str(nframes-1) + '"')
for i in os.listdir('.'):
if i.startswith('frame') and i.endswith('.svg'):
os.remove(i)
|
Lizenz
[Bearbeiten]Ich, der Urheber dieses Werkes, veröffentliche es unter der folgenden Lizenz:
![w:de:Creative Commons](https://upload.wikimedia.org/wikipedia/commons/thumb/7/79/CC_some_rights_reserved.svg/90px-CC_some_rights_reserved.svg.png)
![Namensnennung](https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Cc-by_new_white.svg/24px-Cc-by_new_white.svg.png)
![Weitergabe unter gleichen Bedingungen](https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Cc-sa_white.svg/24px-Cc-sa_white.svg.png)
Diese Datei ist unter der Creative-Commons-Lizenz „Namensnennung – Weitergabe unter gleichen Bedingungen 3.0 nicht portiert“ lizenziert.
- Dieses Werk darf von dir
- verbreitet werden – vervielfältigt, verbreitet und öffentlich zugänglich gemacht werden
- neu zusammengestellt werden – abgewandelt und bearbeitet werden
- Zu den folgenden Bedingungen:
- Namensnennung – Du musst angemessene Urheber- und Rechteangaben machen, einen Link zur Lizenz beifügen und angeben, ob Änderungen vorgenommen wurden. Diese Angaben dürfen in jeder angemessenen Art und Weise gemacht werden, allerdings nicht so, dass der Eindruck entsteht, der Lizenzgeber unterstütze gerade dich oder deine Nutzung besonders.
- Weitergabe unter gleichen Bedingungen – Wenn du das Material wiedermischst, transformierst oder darauf aufbaust, musst du deine Beiträge unter der gleichen oder einer kompatiblen Lizenz wie das Original verbreiten.
Dateiversionen
Klicke auf einen Zeitpunkt, um diese Version zu laden.
Version vom | Vorschaubild | Maße | Benutzer | Kommentar | |
---|---|---|---|---|---|
aktuell | 16:10, 21. Okt. 2020 | ![]() | 400 × 288 (374 KB) | Geek3 (Diskussion | Beiträge) | adjusted friction coefficients such to make terminal velocity of both trajectories equal. In this case, the Newton projectile moves further. |
12:57, 21. Okt. 2009 | ![]() | 400 × 288 (453 KB) | AllenMcC. (Diskussion | Beiträge) | added Newton drag | |
00:40, 22. Dez. 2008 | ![]() | 400 × 299 (393 KB) | AllenMcC. (Diskussion | Beiträge) | == Summary == {{Information |Description={{en|1=Trajectories of two objects thrown at the same angle. The blue object doesn't experience any drag and moves along a parabola. The black object experiences Stokes' drag.}} |Source=Own work by uploader |Author | |
20:12, 18. Dez. 2008 | ![]() | 400 × 299 (393 KB) | AllenMcC. (Diskussion | Beiträge) | == Summary == {{Information |Description={{en|1=Trajectories of two objects thrown at the same angle. The blue object doesn't experience any drag and moves along a parabola. The black object experiences Stokes' drag.}} |Source=Own work by uploader |Author | |
04:07, 15. Dez. 2008 | ![]() | 700 × 519 (636 KB) | AllenMcC. (Diskussion | Beiträge) | {{Information |Description={{en|1=Trajectories of two objects thrown at the same angle. The blue object doesn't experience friction and moves along a parabola. The black object experiences Stokes friction.}} |Source=Own work by uploader |Author=[[User:All |
Du kannst diese Datei nicht überschreiben.
Dateiverwendung
Keine Seiten verwenden diese Datei.
Globale Dateiverwendung
Die nachfolgenden anderen Wikis verwenden diese Datei:
- Verwendung auf af.wikipedia.org
- Verwendung auf ar.wikipedia.org
- Verwendung auf be.wikipedia.org
- Verwendung auf bg.wikipedia.org
- Verwendung auf bn.wikipedia.org
- Verwendung auf bs.wikipedia.org
- Verwendung auf ca.wikipedia.org
- Verwendung auf cv.wikipedia.org
- Verwendung auf da.wikipedia.org
- Verwendung auf de.wikipedia.org
- Verwendung auf el.wikipedia.org
- Verwendung auf en.wikipedia.org
- Wave–particle duality
- Trajectory
- Ballistics
- Drag (physics)
- Talk:Field line
- Wikipedia talk:Requests for arbitration/Tang Dynasty
- Wikipedia:Requests for arbitration/Tang Dynasty/Workshop
- User:Enkyo2/Sandbox-L
- Talk:Senkaku Islands/Archive 5
- Bouncing ball
- Wikipedia:Arbitration/Requests/Clarification and Amendment/Archive 34
- User:Ldm1954/Sandbox/Duality
- User:Eelaraa/Drag (physics)
- Verwendung auf eo.wikipedia.org
- Verwendung auf es.wikipedia.org
- Verwendung auf eu.wikipedia.org
- Verwendung auf fa.wikipedia.org
- Verwendung auf fi.wikipedia.org
- Verwendung auf ga.wikipedia.org
- Verwendung auf he.wikipedia.org
- Verwendung auf hi.wikipedia.org
- Verwendung auf hr.wikipedia.org
- Verwendung auf ht.wikipedia.org
- Verwendung auf hu.wikipedia.org
Weitere globale Verwendungen dieser Datei anschauen.