#!/usr/local/bin/ised --f @1[0 pi/100 2*pi];#! parameter range #! to make lines shorter, store every column in the memory @100{@2{2+@3cos{3*$1}}:*@4cos{2*$1}};#! x component @101{$2:*@5sin{2*$1}};#! y component @102{@6sin{3*$1}};#! z component @103{-2*$2:*$5:-3*$6:*$4};#! dx/dt @104{2*$2:*$4:-3*$6:*$5};#! dy/dt @105{3*$3};#! dz/dt @106{-9*$3:*$4:+12*$6:*$5:-4*$2:*$5};#! d^2 x/dt^2 @107{-9*$3:*$5:-12*$6:*$4:-4*$2:*$5};#! d^2 y/dt^2 @108{-9*$6};#! d^2 z/dt^2 #! output to a temporary file --o 'curve.tmp' --t '$100;$101;$102;$103;$104;$105;$106;$107;$108' #! output in columns --o 'curve2.tmp' #! select another output file --l 'curve.tmp' #! load the previous file --p #! trick to make blank lines between full lines $1<<3 @4@!{@2{$1_[3 5]}@^{$1_[6 8]}} @!{$4@^$2};{}#! normalization and calculation of binormal and normal --n #! restore the semicolon behaviour @10[0 pi/6 2*pi+0.01];#! the parameter running around the cross section --o 'trefoil_surface.dat' #! output file #! the final step: add an appropriate mixture of the normal and binormal to the middle curve --l 'curve2.tmp' #! load the binormals and normals --t '$1_0 + 0.15*{$1_3*cos$10:+$1_6*sin$10};$1_1 + 0.15*{$1_4*cos$10:+$1_7*sin$10};$1_2 + 0.15*{$1_5*cos$10:+$1_8*sin$10}'