#!/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'settermsvgfont'Liberation Serif, 24'setoutput'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 trajectoriesn=51;setmultiplotsetsamples1000setxrange[-1:1]setyrange[-1:1]setxtics1setytics1setxzeroaxislt-1lcrgb"black"lw1setyzeroaxislt-1lcrgb"black"lw1unsetlabelsetkeyoff#t = (1.0*i)/n;#s = sqrt(1-t*t)# The following draws the lines. 0 will be used to cut the lines.plotfor[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)lcrgb"red"lw1;unsetmultiplotsettermx11setoutput
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
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.