File:Envelope astroid.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 600 × 480 pixels, file size: 264 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: Svg version of Astroid_as_envelope.png
    Date
    Source Own work
    Author IkamusumeFan
    Other versions [1]
    SVG development
    InfoField
     The SVG code is valid.
     This diagram was created with gnuplot.
    Source code
    InfoField

    Gnuplot code

    #!/usr/bin/gnuplot
    # Author: Ika
    # Date: 11/20/2014
    
    # last changes:
    # 2018-01-28 10h00: (by JoKalliauer) instead of 50 plots with one line each, over each other, changed to 1 plot with 50 lines
    # 2018-01-28 10h07: (by JoKalliauer) changed 'Times' to 'Liberation Serif'
    
    set term svg font 'Liberation Serif, 24'
    set output 'envelope_astroid.svg'
    
    # This program gives the envelope of the family of lines connecting points (s,0), (0,t) with s^2 + t^2 = 1.
    g = 10;
    v = 10;
    # n is the number of the trajectories
    n = 51;
    
    set multiplot
    set samples 1000
    
    set xrange [-1:1]
    set yrange [-1:1]
    set xtics 1
    set ytics 1
    set xzeroaxis lt -1 lc rgb "black" lw 1
    set yzeroaxis lt -1 lc rgb "black" lw 1
    
    unset label
    
    set key off
    
    #t = (1.0*i)/n;
    #s = sqrt(1-t*t)
    # The following draws the lines. 0 will be used to cut the lines.
    
    plot for [i=1-n:n-1] x>0 ? (x<sqrt(1-((1.0*i)/n)*((1.0*i)/n)) ? ((1.0*i)/n) - x*((1.0*i)/n)/sqrt(1-((1.0*i)/n)*((1.0*i)/n)) : 0) : (x>-sqrt(1-((1.0*i)/n)*((1.0*i)/n)) ? ((1.0*i)/n) + x*((1.0*i)/n)/sqrt(1-((1.0*i)/n)*((1.0*i)/n)) : 0) 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

    270,054 byte

    image/svg+xml

    ef89eac8601e3c57c0d8d13e9ac1458935397e8d

    File history

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

    Date/TimeThumbnailDimensionsUserComment
    current12:47, 28 January 2018Thumbnail for version as of 12:47, 28 January 2018600 × 480 (264 KB)wikimediacommons>JoKalliauerCommons:Graphics_village_pump#File:Envelope_cast.svg

    There are no pages that use this file.