Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Sierpinski-carpet/Gnuplot/sierpinski-carpet-1.gnuplot
Normal file
11
Task/Sierpinski-carpet/Gnuplot/sierpinski-carpet-1.gnuplot
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
## SCff.gp 1/14/17 aev
|
||||
## Plotting Sierpinski carpet fractal.
|
||||
## dat-files are PARI/GP generated output files:
|
||||
## http://rosettacode.org/wiki/Sierpinski_carpet#PARI.2FGP
|
||||
#cd 'C:\gnupData'
|
||||
|
||||
##SC5
|
||||
clr = '"green"'
|
||||
filename = "SC5gp1"
|
||||
ttl = "Sierpinski carpet fractal, v.#1"
|
||||
load "plotff.gp"
|
||||
20
Task/Sierpinski-carpet/Gnuplot/sierpinski-carpet-2.gnuplot
Normal file
20
Task/Sierpinski-carpet/Gnuplot/sierpinski-carpet-2.gnuplot
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
## plotscf.gp 12/7/16 aev
|
||||
## Plotting a Sierpinski carpet fractal to the png-file.
|
||||
## Note: assign variables: ord (order), clr (color), filename and ttl (before using load command).
|
||||
## ord (order) # a.k.a. level - defines size of fractal (also number of dots).
|
||||
reset
|
||||
set terminal png font arial 12 size 640,640
|
||||
ofn=filename.".png"
|
||||
set output ofn
|
||||
unset border; unset xtics; unset ytics; unset key;
|
||||
set title ttl font "Arial:Bold,12"
|
||||
set xrange [0:1]; set yrange [0:1];
|
||||
sc(n, x, y, d) = n >= ord ? \
|
||||
sprintf('set object rect from %f,%f to %f,%f fc rgb @clr fs solid;', x, y, x+d, y+d) : \
|
||||
sc(n+1, x, y, d/3) . sc(n+1, x+d/3, y, d/3) . \
|
||||
sc(n+1, x+2*d/3, y, d/3) . sc(n+1, x, y+d/3, d/3) . \
|
||||
sc(n+1, x+2*d/3, y+d/3, d/3) . sc(n+1, x, y+2*d/3, d/3) . \
|
||||
sc(n+1, x+d/3, y+2*d/3, d/3) . sc(n+1, x+2*d/3, y+2*d /3, d/3);
|
||||
eval(sc(0, 0.0, 0.0, 1.0))
|
||||
plot -100
|
||||
set output
|
||||
27
Task/Sierpinski-carpet/Gnuplot/sierpinski-carpet-3.gnuplot
Normal file
27
Task/Sierpinski-carpet/Gnuplot/sierpinski-carpet-3.gnuplot
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
## plotscf1.gp 12/7/16 aev
|
||||
## Plotting a Sierpinski carpet fractal to the png-file.
|
||||
## Note: assign variables: ord (order, just for title), clr (color), filename and ttl (before using load command).
|
||||
## In this version order is always 5.
|
||||
reset
|
||||
set terminal png font arial 12 size 640,640
|
||||
ofn=filename.".png"
|
||||
set output ofn
|
||||
unset border; unset xtics; unset ytics; unset key;
|
||||
set title ttl font "Arial:Bold,12"
|
||||
o=3
|
||||
sqr(x,y) = abs(x + y) + abs(x - y) - o
|
||||
f(x) = o*abs(x) - o
|
||||
c0(x,y) = abs(x + y) + abs(x - y) - 1
|
||||
c1(x,y) = c0(o*x,f(y)) * c0(f(x),o*y) * c0(f(x),f(y))
|
||||
c2(x,y) = c1(o*x,f(y)) * c1(f(x),o*y) * c1(f(x),f(y))
|
||||
c3(x,y) = c2(o*x,f(y)) * c2(f(x),o*y) * c2(f(x),f(y))
|
||||
c4(x,y) = c3(o*x,f(y)) * c3(f(x),o*y) * c3(f(x),f(y))
|
||||
sc(x,y) = sqr(x,y)>0 || c0(x,y)*c1(x,y)*c2(x,y)*c3(x,y)*c4(x,y)<0 ? 0:1
|
||||
set xrange [-1.5:1.5]; set yrange [-1.5:1.5];
|
||||
set pm3d map;
|
||||
set palette model RGB defined (0 "white", 1 @clr);
|
||||
set size ratio -1
|
||||
smp=640; set samples smp; set isosamples smp;
|
||||
unset colorbox
|
||||
splot sc(x,y)
|
||||
set output
|
||||
20
Task/Sierpinski-carpet/Gnuplot/sierpinski-carpet-4.gnuplot
Normal file
20
Task/Sierpinski-carpet/Gnuplot/sierpinski-carpet-4.gnuplot
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
## pSCF.gp 12/7/16 aev
|
||||
## Plotting Sierpinski carpet fractals.
|
||||
## Note: assign variables: ord (order), clr (color), filename and ttl (before using load command).
|
||||
## ord (order) # a.k.a. level - defines size of fractal (also number of dots).
|
||||
#cd 'C:\gnupData'
|
||||
|
||||
##SCF21
|
||||
ord=3; clr = '"red"';
|
||||
filename = "SCF21gp"; ttl = "Sierpinski carpet fractal #21, ord ".ord;
|
||||
load "plotscf.gp"
|
||||
|
||||
##SCF22
|
||||
ord=5; clr = '"brown"';
|
||||
filename = "SCF22gp"; ttl = "Sierpinski carpet fractal #22, ord ".ord;
|
||||
load "plotscf.gp"
|
||||
|
||||
##SCF31
|
||||
ord=5; clr = '"navy"';
|
||||
filename = "SCF31gp"; ttl = "Sierpinski carpet fractal #31, ord ".ord;
|
||||
load "plotscf1.gp"
|
||||
Loading…
Add table
Add a link
Reference in a new issue