File:Envelope cast.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 600 × 480 pixels, file size: 117 KB)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    Description
    English: Envelope of the trajectories of the cast projectiles with constant initial speed
    Date
    Source Own work
    Author IkamusumeFan (slightly fix by JoKalliauer)
    SVG development
    InfoField
     The SVG code is valid.
     This plot was created with gnuplot.
    Source code
    InfoField

    Gnuplot code

    #!/usr/bin/gnuplot
    #Gnuplot 5.0+
    
    set term svg font 'Helvetica, 24'
    set output 'envelope_cast.svg'
    
    # In this program, the envelope equation is y = (v^2)/(2g) - (ĝ^2)/(2v^2). We take g = 10, v = 10.
    # The cast trajectory curve family is y = x tan \theta -(ĝ^2)/(2v^2 cos^2\theta)
    g = 10;
    v = 10;
    # n is the number of the trajectories
    n = 101;
    
    set multiplot
    set samples 1000
    
    set xrange [-11:11]
    set yrange [0:5]
    set xtics 2
    set ytics 1
    set xzeroaxis lt -1 lc rgb "black" lw 1
    set yzeroaxis lt -1 lc rgb "black" lw 1
    
    unset label
    
    # Draw the trajectories of the cast objects.
    set key off
    
    #theta = pi/n*i;
    # The following uses the fact 1/cos^2(theta) = tan(theta)*tan(theta)+1.
    
    plot for [i=1:n-1] x*tan(pi/n*i)-(g*x*x)*(tan(pi/n*i)*tan(pi/n*i)+1)/(2*v*v) lc rgb "red" lw 1;
    
    unset multiplot
    
    set term x11
    set output
    

    Licensing

    I, the copyright holder of this work, hereby publish it under the following license:
    w:en:Creative Commons
    attribution share alike
    This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
    You are free:
    • to share – to copy, distribute and transmit the work
    • to remix – to adapt the work
    Under the following conditions:
    • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
    • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    20 November 2014

    120,311 byte

    image/svg+xml

    197ce5f6012ec61237b38d55841be0d82ef4834b

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current01:08, 28 January 2018Thumbnail for version as of 01:08, 28 January 2018600 × 480 (117 KB)wikimediacommons>Perhelion+ again middle line // Editing SVG source code using User:Rillke/SVGedit.js; upload handled by User:Rillke/MwJSBot.js

    There are no pages that use this file.