home *** CD-ROM | disk | FTP | other *** search
- ;create datafiles showing all datafiles and use gnuplot
- ;to show the results
- ;
- ;Requirements: Dust 2.20 or higher
- ; gnuplot in one of your the c:-drawers
- ; normal Amiga-Shell (because of the echo-commands)
- ; a t:-assignment
-
- ;change this
- set(echo,off)
- set(splinesubdiv,10)
-
- ;create the data-file
- !echo >t:data1 -3 -2
- !echo >>t:data1 -2 -1
- !echo >>t:data1 -1 1.5
- !echo >>t:data1 0 2.8
- !echo >>t:data1 1 2.1
- !echo >>t:data1 2 2.0
- !echo >>t:data1 3 1.8
- !echo >>t:data1 4 1.2
- !echo >>t:data1 5 0.5
- !echo >>t:data1 6 -0.5
- !echo >>t:data1 7 -1.8
- !echo >>t:data1 8 -2
- !echo >>t:data1 9 -4
-
- ;create the spline-files
- ;open
- set(splineends,open)
- set(splinetype,cubicb)
- interpolatedata(t:data1,t:cubicB)
- set(splinetype,quadb)
- interpolatedata(t:data1,t:quadB)
- set(splinetype,catmullrom)
- interpolatedata(t:data1,t:catmullRom)
- set(splinetype,cubicbezier)
- interpolatedata(t:data1,t:cubicBezier)
- set(splinetype,quadbezier)
- interpolatedata(t:data1,t:quadBezier)
-
- ;closed
- set(splineends,closed)
- set(splinetype,cubicb)
- interpolatedata(t:data1,t:cubicB2)
- set(splinetype,quadb)
- interpolatedata(t:data1,t:quadB2)
- set(splinetype,catmullrom)
- interpolatedata(t:data1,t:catmullRom2)
- set(splinetype,cubicbezier)
- interpolatedata(t:data1,t:cubicBezier2)
- set(splinetype,quadbezier)
- interpolatedata(t:data1,t:quadBezier2)
-
- ;create the gnuplot-batch-file
- !echo >t:gnuplot.bat "set data style linespoints"
- !echo >>t:gnuplot.bat "plot 't:data1' title 'data','t:catmullRom2' title 'closed Catmull-Rom'",'t:catmullRom' title 'open Catmull-Rom'
- !echo >>t:gnuplot.bat "plot 't:data1' title 'data','t:cubicB2' title 'closed cubic B'",'t:cubicB' title 'open cubic B'
- !echo >>t:gnuplot.bat "plot 't:data1' title 'data','t:quadB2' title 'closed quadratic B'",'t:quadB' title 'open quadratic B'
- !echo >>t:gnuplot.bat "plot 't:data1' title 'data','t:cubicBezier2' title 'closed cubic Bezier'",'t:cubicBezier' title 'open cubic Bezier'
- !echo >>t:gnuplot.bat "plot 't:data1' title 'data','t:cubicBezier2' title 'closed quadratic Bezier'",'t:quadBezier' title 'open quadratic Bezier'
-
- !gnuplot t:gnuplot.bat
-
- !delete >NIL: t:cubicB t:quadB t:catmullRom t:cubicBezier t:quadBezier
- !delete >NIL: t:cubicB2 t:quadB2 t:catmullRom2 t:cubicBezier2 t:quadBezier2
- !delete >NIL: t:data1 t:gnuplot.bat
-
- ;request("Quit Dust ?",Yes,Yes)
-