파일:Mplwp skydive trajectory.svg

testwiki
둘러보기로 이동 검색으로 이동
    원본 파일 (SVG 파일, 실제 크기 480 × 500 픽셀, 파일 크기: 44 KB)

    이 파일은 위키미디어 공용에 있으며, 다른 프로젝트에서 사용하고 있을 가능성이 있습니다. 해당 파일에 대한 설명이 아래에 나와 있습니다.

    파일 설명

    설명
    English: Plot of a ballistic trajectory with air resistance for a typical skydive from an airplane. The trajectory follows the differential equation r→¨(t)=−μ|v|⋅v→−g⋅y→̂ with initial conditions r→(0)=0→,r→˙(0)=v0x→̂.

    The parameters are:

    • g=9.81m/s2, vmax=50m/s, μ=k/m=g/vmax2
    • The horizontal starting velocity takes the values v0=0m/s, v0=17m/s, v0=33m/s, v0=50m/s
    The second-order ordinary differential equation system is reduced to a first-order system, using velocity components as independent variables. The system is then solved numerically using Scipy odeint.
    날짜
    출처 자작
    저자 Geek3
    SVG 발전
    InfoField
     이 SVG 파일의 소스 코드 문법이 올바릅니다.
     이 벡터 그림은 mplwp(으)로 제작되었습니다.
    소스 코드
    InfoField

    mplwp source code

    The plot was generated with mplwp 1.8
    #!/usr/bin/python
    # -*- coding: utf8 -*-
    
    import matplotlib.pyplot as plt
    import matplotlib as mpl
    import numpy as np
    from math import *
    
    code_website = 'http://commons.wikimedia.org/wiki/User:Geek3/mplwp'
    try:
        import mplwp
    except ImportError, er:
        print 'ImportError:', er
        print 'You need to download mplwp.py from', code_website
        exit(1)
    
    name = 'mplwp_skydive_trajectory.svg'
    fig = mplwp.fig_standard(mpl)
    fig.set_size_inches(480. / fig.dpi, 500. / fig.dpi)
    mplwp.move_axes(fig, 24, 6)
    
    xlim = -10,320; fig.gca().set_xlim(xlim)
    ylim = -340,20; fig.gca().set_ylim(ylim)
    fig.gca().set_aspect('equal')
    fig.gca().xaxis.set_major_locator(mpl.ticker.MultipleLocator(100))
    fig.gca().yaxis.set_major_locator(mpl.ticker.MultipleLocator(100))
    
    from scipy.integrate import odeint
    from scipy.optimize import brentq
    def ballistic(g, mu, xy0, v0, alpha0, tt):
        # use a four-dimensional vector function vec = [x, y, vx, vy]
        def dif(vec, t):
            v = sqrt(vec[2]**2 + vec[3]**2)
            return [vec[2], vec[3], -mu*v*vec[2], -g -mu*v*vec[3]]
        
        # solve the differenctial equation numerically
        vec = odeint(dif, [xy0[0], xy0[1], v0*cos(alpha0), v0*sin(alpha0)], tt)
        return vec[:,0], vec[:,1] # return x(tt) and y(tt)
    
    g = 9.81
    vmax = 50.
    mu = g / vmax**2
    alpha0 = 0.
    
    for iv, v0 in enumerate((0, 17, 33, 50)):
        t1 = brentq(lambda t: ballistic(g,mu,[0,0],v0,alpha0,[0,t])[1][1]-ylim[0],0,20)
        t = np.linspace(0, t1, 5001)
        x, y = ballistic(g, mu, [0, 0], v0, alpha0, t)
        plt.plot(x, y, label='$v_0 = {:.0f}\,m/s$'.format(v0), zorder=-iv)
        col = fig.gca().lines[-1].get_color()
        xmax = ballistic(g, mu, [0, 0], v0, alpha0, [0, 100*vmax/g])[0][-1]
        plt.axvline(xmax, 0, 0.33, linestyle='--', dashes=[10,10],
            color=col, zorder=-5, lw=1.5)
        times = np.arange(t1)
        xt, yt = ballistic(g, mu, [0, 0], v0, alpha0, times)
        plt.plot(xt, yt, '.', color=col, label=None, zorder=-iv-0.5)
        
        if v0 == 50.:
            for ti, xi, yi in zip(times, xt, yt):
                plt.text(xi+8*sin(pi/2*ti/10), yi+8*cos(pi/2*ti/10),
                    '{:.0f}s'.format(ti), ha='left', va='center', fontsize=10)
    
    plt.xlabel('x [m]')
    plt.ylabel('y [m]')
    fig.gca().xaxis.labelpad = 0
    fig.gca().yaxis.set_label_coords(-0.08, 0.95)
    mpl.rc('legend', borderaxespad=0.4)
    plt.legend(loc='upper right')
    
    plt.savefig(name)
    mplwp.postprocess(name)
    

    라이선스

    나는 아래 작품의 저작권자로서, 이 저작물을 다음과 같은 라이선스로 배포합니다:
    w:ko:크리에이티브 커먼즈
    저작자표시 동일조건변경허락
    이용자는 다음의 권리를 갖습니다:
    • 공유 및 이용 – 저작물의 복제, 배포, 전시, 공연 및 공중송신
    • 개작 – 저작물의 개작, 수정, 2차적저작물 창작
    다음과 같은 조건을 따라야 합니다:
    • 저작자표시 – 적절한 저작자 표시를 제공하고, 라이선스에 대한 링크를 제공하고, 변경사항이 있는지를 표시해야 합니다. 당신은 합리적인 방식으로 표시할 수 있지만, 어떤 방식으로든 사용권 허가자가 당신 또는 당신의 사용을 지지하는 방식으로 표시할 수 없습니다.
    • 동일조건변경허락 – 만약 당신이 이 저작물을 개작 또는 변형하거나 이 저작물을 기반으로 제작하는 경우, 당신은 당신의 기여물을 원저작물과 동일하거나 호환 가능한 라이선스에 따라 배포하여야 합니다.

    설명

    이 파일이 나타내는 바에 대한 한 줄 설명을 추가합니다
    Computed trajectories of a skydiver

    이 파일에 묘사된 항목

    다음을 묘사함

    image/svg+xml

    파일 역사

    날짜/시간 링크를 클릭하면 해당 시간의 파일을 볼 수 있습니다.

    날짜/시간섬네일크기사용자설명
    현재2020년 9월 8일 (화) 19:312020년 9월 8일 (화) 19:31 판의 섬네일480 × 500 (44 KB)wikimediacommons>Geek3time markers

    이 파일을 사용하는 문서가 없습니다.