debian/0000755000000000000000000000000011725156204007171 5ustar debian/rules0000755000000000000000000000147311725155754010267 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export DH_OPTIONS DB2MAN=/usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl XP=xsltproc --nonet CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif %: dh $@ override_dh_auto_configure: perl makever.pl override_dh_auto_build: $(MAKE) -f makefile cd Doc && perl make.pl linux examples $(XP) -o sketch.1 $(DB2MAN) debian/sketch-man.xml override_dh_auto_clean: $(MAKE) clean PATCH_EXPORT_SCRIPT=/usr/share/gitpkg/hooks/quilt-patches-deb-export-hook .PHONY: export-patches export-patches: [ ! -r debian/patches ] || \ grep "^\#.*$(notdir $(PATCH_EXPORT_SCRIPT))" debian/patches/series rm -rf debian/patches sh $(PATCH_EXPORT_SCRIPT) debian/patches/0000755000000000000000000000000011725155764010632 5ustar debian/patches/series0000644000000000000000000000016211725155764012046 0ustar # debian/source/git-patches exported from git by quilt-patches-deb-export-hook 0001-debian-disable-src-mods.patch debian/patches/0001-debian-disable-src-mods.patch0000644000000000000000000000241211725155764016600 0ustar From c40327378728cb41ec80fa6f11f4ea9dd7bc053a Mon Sep 17 00:00:00 2001 From: David Bremner Date: Wed, 15 Dec 2010 22:37:42 -0400 Subject: [PATCH] debian/disable-src-mods Disable several buildtime modifications of the source that complicate building the debian package, and are not needed in this context. Signed-off-by: David Bremner --- makefile | 4 ++-- makever.pl | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/makefile b/makefile index ad96ad7..b563f09 100644 --- a/makefile +++ b/makefile @@ -49,9 +49,9 @@ y.tab.c y.tab.h : sketch.y lex.yy.c : sketch.l $(LEX) $< -version.h : version.dat FORCE +version.h : version.dat #FORCE perl makever.pl -FORCE: +#FORCE: .PHONY : dist dist : clean diff --git a/makever.pl b/makever.pl index c816cf8..75bcf36 100644 --- a/makever.pl +++ b/makever.pl @@ -68,9 +68,9 @@ sub run { } # update the version header - open(F, "> version.dat") || die "can't open version.dat for output"; - print F join('', map { "$_ = $pairs{$_}\n" } keys %pairs); - close F; +# open(F, "> version.dat") || die "can't open version.dat for output"; +# print F join('', map { "$_ = $pairs{$_}\n" } keys %pairs); +# close F; } run; -- 1.7.9.1 debian/examples/0000755000000000000000000000000011725155754011020 5ustar debian/examples/km-ssbl.sk0000644000000000000000000001063611725155754012735 0ustar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Super short baseline (SSBL) illustration % % Author: Kjell Magne Fauske % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Copyright (c) 2009 Kjell Magne Fauske % This code is released under the MIT license % See http://www.opensource.org/licenses/mit-license.php for details. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Define some basic constants % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def O (0,0,0) % Origo % The ee constant is used for tweaking the hidden surface removal algorithm % in Sketch. The constant is too small to give visible results, but affects % which surfaces that are drawn. def ee 0.0001 % % Draw the axes of the current coordinate system % def sz 4 % length of each axis def axes { line [arrows=<->,draw=blue,line width=0.5pt] (sz,0,0)(O)(0,sz,0) line [arrows=->,draw=blue,line width=.5pt] (O)(0,0,sz) special |\node[above] at #1 {\scriptsize $z$};|(0,0,sz) special |\node[above] at #1 {\scriptsize $x$};|(0,sz,0) special |\node[above] at #1 {\scriptsize $y$};|(sz,0,0) } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Define some basic geometric shapes like cubes and cylinders. % All the shapes have unit sizes and are ment to be scaled when used. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def jR 1 def jR_inner 0.5/2 def jH 2/2 def cylinder put{rotate(90,[1,0,0])}{ def n 10 sweep[draw=gray, line width= 0.01pt]{n<>, rotate(360/n,[0,1,0])} line[draw=black,fill=lightgray](jR,0)(jR,jH) } % A unit cube with center (0,0,0) def box put{translate([-1.5,-0.5,0])}{ def n 1 sweep[fill=lightgray, draw=gray] {n,translate([0,n,0])} sweep[fill=lightgray, draw=gray] {n, translate([n,0,0])}line[fillcolor=gray](1,0,0)(1,0,1) } def sphere put{rotate(90,[0,1,0])}{ def n_faces 12 sweep[fill=red, line width= 0.1pt] { n_faces, rotate(360/n_faces, [1,0,0])} sweep {n_faces, rotate(360/n_faces)}(0,1) } % draw a simple beacon def beacon { put {scale(0.1)}{sphere} put {translate([0,0,-1]) then scale([0.05,0.05,0.3])}{cylinder} } % Variables def ax 30 def ay 35 def R 5 % Compute position of transponder def T (R*sin(ax),R*sin(ay),0) % Compute transducer position def P (0,0,sqrt(R^2-((T)'x^2+(T)'y^2))) def T_x ((T)'x,0) def T_y (0,(T)'y) def SSBLScene { {axes} % Draw projection of R line [line style=dashed,draw=gray] (T_x)(T) line [line style=dashed,draw=gray] (T_y)(T) line [line style=dashed,draw=gray] (T_y)(P) line [line style=dashed,draw=gray] (T_x)(P) line [draw=red] (P)(T) % draw labels special |\node[below right] at #1 {Transponder};|(T) %dots(P)(T) special |\node[right] at #1 {$\mathrm{Transducer}$};|(P) def dT unit((T)-(P)) def dT_y unit((T_y) -(P)) def dT_x unit((T_x) -(P)) % Draw angle annotations def pp (P)+[dT]*1.5 def N [dT]*[dT_y] def m rotate(ax/2,(P),[dT]*[dT_y]) def n [dT] then rotate(ax/2,(P),[dT]*[dT_y]) def nb [dT] then rotate(ax,(P),[dT]*[dT_y]) def ppm (P)+[n]*1.5 def ppb (P)+[nb]*1.5 special |\draw #1..controls #2 .. node[near end,below] {$\theta$} #3;\;|(pp)(ppm)(ppb) % \uput[-60]#2{$\theta$}|(pp)(ppm)(ppb) def nc [dT] then rotate(ay/2,(P),[dT]*[dT_x]) def nbc [dT] then rotate(ay,(P),[dT]*[dT_x]) def ppmc (P)+[nc]*1.5 def ppbc (P)+[nbc]*1.5 special |\draw #1.. controls #2.. #3;\node[below] at #2 {$\phi$};|(pp)(ppmc)(ppbc) def mT (P)+((T)-(P))/2 %special |\uput[dr]#1{$r$}|(mT) put {translate((T)-(O))} {beacon} put {translate((P)-(O))}{put {scale(0.1)}{sphere}} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Define how to look at our work of art %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %def viewpoint (-4,14,-10) def viewpoint (15,10,5) def lookat (0, 0, 0) % Set upvector along the z-axis def upvector [0,0,1] put{ view((viewpoint),(lookat), [upvector])} { %{axes} {SSBLScene} % %put {scale(1)}{fin} } global { language tikz } debian/examples/km-denavit.sk0000644000000000000000000001751311725155754013425 0ustar % % An illustration of the Denavit-Hartenberg parameters used in robotics % % Inspired by several figures in the book "Inroduction to Robotics: Mechanics % and Control" by John J. Craig (1989) % % Author: Kjell Magne Fauske % Note: This is one of the first illustration I have made with Sketch. The % code could definitely be more elgant % % Copyright (c) 2009 Kjell Magne Fauske % This code is released under the MIT license % See http://www.opensource.org/licenses/mit-license.php for details. % % % Define the Denavit-Hartenberg parameters for use in the figure % def a_im 4 % a_{i-1} def d_i 2 def alpha_im 20 % alpha_{i-1} def theta_i 30% def a_i 4 def alpha_i 20 % avstand fra ledd til koordinatsystem def dZ 4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Define some basic constants % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def O (0,0,0) % Origo % The ee constant is used for tweaking the hidden surface removal algorithm % in Sketch. The constant is too small to give visible results, but affects % which surfaces that are drawn. def ee 0.0001 % % Draw the axes of the current coordinate system % def sz 2 % length of each axis def axes { line [arrows=<->, draw=blue, line width=1.5pt] (sz,0,0)(O)(0,sz,0) line [arrows=->,draw=blue, line width=1.5pt] (O)(0,0,sz) } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Code for drawing the solid objects. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % The code for drawing the solid joints and links is not pretty. % My intention was to use the Denavit-Hartenberg transformations, but % its not 'physically' possible to translate the link along the joint axes % without changing the joint angles. % Draw a single joint def jR 1.5/2 def jR_inner 0.5/2 def jH 2/2 def joint put{rotate(90,[1,0,0])}{ def n 20 sweep[fill=lightgray, cull=false, draw=gray]{n<>, rotate(360/n,[0,1,0])} line[draw=gray](jR,-jH/2)(jR,jH/2) sweep[fill=darkgray, cull=false]{n<>, rotate(360/n,[0,1,0])} line(jR_inner,-jH/2-ee)(jR_inner,jH/2+ee) } % Draw a link def lW 1/2 def lH 0.5/2 def link put{rotate(90,[-1,0,0]) then translate([-a_im/2,jR*(2/3),0])}{ def n_segs 20 def trans rotate(180 / n_segs, [0,-1,0]) then translate(((d_i*cos(alpha_im))/n_segs)*[0,-1,0]) def dR a_im/2+lW/2 sweep[cull=false, fill=lightgray,draw=gray] { n_segs, [[trans]]} line (dR,-lH/2)(dR,lH/2) sweep[cull=false,fill=lightgray, draw=gray] { n_segs, [[trans]]} line (dR-lW,-lH/2)(dR-lW,lH/2) sweep[cull=false, fill=lightgray, draw=gray] { n_segs, [[trans]]} line[draw=red] (dR-lW,lH/2+ee)(dR,lH/2+ee) sweep[cull=false,fill=lightgray, draw=gray] { n_segs, [[trans]]} line[draw=red] (dR-lW,-lH/2-ee)(dR,-lH/2-ee) } % Combine both joints and link. % I had to do some quick hacks to make it look good. Will probably look % weird if you change the parameters or the viewpoint. def jointslink { put{rotate(alpha_im,[0,0,-1])}{{put{scale([1+(1-cos(alpha_im)),1,1])}{link}{joint}}} put{rotate(180,[0,0,1]) then translate([0,0,-dZ])}{ put {translate([a_im,0,0]) then rotate(alpha_im,[1,0,0])}{ put{ translate([0,0,d_i+dZ]) }{joint} } } } % I had to do some more cheating for the second link :( def jointslink2 { put{rotate(alpha_i+5,[0,0,-1])}{{put{scale([(1+(1-cos(alpha_i)))*1.1,1,1])}{link}{joint}}} put{rotate(180,[0,0,1]) then translate([0,0,-dZ-jH])}{ put {translate([a_i,0,0]) then rotate(alpha_i,[1,0,0])}{ put{ translate([0,0,dZ+jH+d_i+0.2]) }{joint} } } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Main drawing % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def dv 0.5 def drawillustration { % Start by drawing the first solid link shape {jointslink} % Translate -dZ along the z-axis, then rotate about the z-axis so that our % x_{i-1} axis points in the right direction put {rotate(180,[0,0,1]) then translate([0,0,-dZ])}{ % Draw the long z_{i-1}-axis with annotations line[draw=red] (0,0,6)(0,0,-4) special |\node[above] at #1{Axis $i-1$};|(0,0,6) % Draw the line connection the z_{i-1} and z_i axis line (O)(a_im,0,0) % draw a 'square' to indicate a right angle line (dv,0,0)(dv,0,-dv)(0,0,-dv) % label special |\node[below] at #1 {$a_{i-1}$};|(a_im/2,0,0) % Draw the coordinate axes of the z_{i-1} system with labels {axes} special |\path #1 node[above] {$x_{i-1}$} #2 node[above] {$y_{i-1}$} #3 node[left] {$z_{i-1}$};| (sz,0,0)(0,sz,0)(0,0,sz) special |\fill #1 circle (2pt);|(O) % Draw the alpha_{i-1} angle with label. Sketch currently does not support % curves. Use a pscurve instead, with appropiate computed startpoint midpoint % and endpoint. def dr 3 % distance to the alpha_{i-1} label special |\draw[->] #1 .. controls #2 .. #3; \path #2 node [below right] {$\alpha_{i-1}$};| (0,0,-dr) (0,dr*sin(alpha_im/2),-dr*cos(alpha_im/2)) (0,dr*sin(alpha_im),-dr*cos(alpha_im)) % We are now almost finished with the first joint axis. Translate to the z_i axis put {translate([a_im,0,0]) then rotate(alpha_im,[1,0,0]) }{ % translate back along the x_{i-1} axis to draw the dashed line % in the alpha_{i-1} annotation. put {translate([-a_im,0,0])}{line[line style=dashed] (O)(0,0,-3.5)} % Now draw the z_i joint axis line[draw=red] (0,0,10)(0,0,-5) special |\node[above] at #1 {Axis $i$};|(0,0,10) % draw a right angle line (-dv,0,0)(-dv,0,-dv)(0,0,-dv) % Draw theta_i annotations. Use the same method as above. % extend the x_{i-1} axis line[line style=dashed] (0,0,0)(3,0,0) def dr 2 special |\draw[->] #1.. controls #2 .. #3; \path #2 node[right] {$\theta_i$};| (dr,0,0) (dr*cos(theta_i/2),dr*sin(theta_i/2),0) (dr*cos(theta_i),dr*sin(theta_i),0) put{rotate(theta_i,[0,0,1])}{ % draw the final dashed line to complete the theta_i annotation line[line style=dashed] (0,0,0)(3,0,0) % draw the d_i label special |\node[left] at #1 {$d_i$};|(0,0,d_i/2) % Now its time to draw the z_i coordinate system. Translate d_i along the % z_i axis first put{translate([0,0,d_i])}{ % Draw the coordinate axes of the z_{i-1} system with labels special |\fill #1 circle (2pt);|(O) {axes} special |\path #1 node[above left] {$x_i$} #2 node[left] {$y_i$} #3 node[right] {$z_i$};| (sz,0,0)(0,sz,0)(0,0,sz) line (O)(a_i,0,0) special |\node[below] at #1{$a_{i}$};|(a_i/2,0,0) put{translate([0,0,dZ+jH]) then rotate(180,[0,0,1])}{jointslink2} % Finally we draw the i+1 joint axis put {translate([a_i,0,0]) then rotate(alpha_i,[1,0,0])}{ line[draw=red] (0,0,10)(0,0,-10) line (-dv,0,0)(-dv,0,-dv)(0,0,-dv) special |\node[above] at #1 {Axis $i+1$};|(0,0,10) } } } } } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Define how we want to look at the drawing. % % Experiment with different viewpoints. % Note: If you change the viewpoint, you may have to manipulate the location % of the labels to achieve good results. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %def viewpoint (-14,14,6) def viewpoint (-4,14,6) def lookat (0, 0, 0) % Define the global z-axis to point 'upwards'. The default z-axis points % out of the page. def upvector [0,0,1] put{ view((viewpoint),(lookat), [upvector])} { {drawillustration} } global { language tikz } debian/examples/km-puma.sk0000644000000000000000000001152011725155754012725 0ustar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Drawing of a PUMA 560 % % Inspired by Figure 4.4 in Craig (1989) % % Author: Kjell Magne Fauske % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Copyright (c) 2009 Kjell Magne Fauske % This code is released under the MIT license % See http://www.opensource.org/licenses/mit-license.php for details. % % Define some basic constants % def O (0,0,0) % Origo def I [1,0,0] % X def J [0,1,0] % Y def K [0,0,1] % Z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Define some basic geometric shapes like cubes and cylinders. % All the shapes have unit sizes and are ment to be scaled when used. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def jR 1 def jR_inner 0.5/2 def jH 2/2 def cylinder put{rotate(90,[1,0,0])}{ def n 20 sweep[fill=lightgray, draw=gray]{n<>, rotate(360/n,[0,1,0])} line[fill=gray](jR,0)(jR,jH) } % A unit cube with center (0,0,0) def box put{translate([-1.5,-0.5,0])}{ def n 1 sweep[fill=lightgray, draw=gray] {n,translate([0,n,0])} sweep[fill=lightgray, draw=gray] {n, translate([n,0,0])}line[fill=gray](1,0,0)(1,0,1) } def boxd put{translate([-1.5,-0.5,0])}{ def n 1 sweep[fill=darkgray, draw=gray] {n,translate([0,n,0])} sweep[fill=darkgray, draw=gray] {n, translate([n,0,0])}line[fill=darkgray](1,0,0)(1,0,1) } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def sz 8 % lengden av aksene def axes { line [arrows=<->, draw=blue, line width=1.5pt] (sz,0,0)(O)(0,sz,0) line [arrows=->,draw=blue, line width=1.5pt] (O)(0,0,sz) line [arrows=<->,draw=blue, line width=.5pt, line style=dotted, lay=over] (sz,0,0)(O)(0,sz,0) line [draw=blue, line width=.5pt, line style=dotted, lay=over] (O)(0,0,sz) } % % Draw a basic PUMA 560 linkshape % def linkshape { % First we draw the top plate def linkplate put{translate([1,0,0])}{ polygon[fill=lightgray](-3,0)(-3,1)(-2,2)(0,2)(4,1)(5,0.5)(5,0) (5,-0.5)(5,-0.5)(4,-1)(0,-2)(-2,-2)(-3,-1) } % Extrude along the z-azis def n 1 sweep[cull=false, fill=gray, draw=darkgray] {n,translate([0,0,n])}{linkplate} special|\fill #1 circle (2pt);|(0,0,1) } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Define size and shape of robot % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % joint 0 def j0_r 2 def j0_h 1 def j0_theta 0 % link 0 def l0_r 1 def l0_h 4 % joint 1 def j1_r 1 def j1_h 2.5 def j1_theta 45 % link 1 def l1_sx 1.5 def l1_sy 0.9 def l1_l 5*l1_sx % joint 2 def j2_r 0.7 def j2_h 2 def j2_theta -45 %link 2 def l2_sx l1_sx*0.7 def l2_sy l1_sy*0.7 def l2_l 6*l2_sx def joint0 { put {scale([j0_r, j0_r, j0_h])}{cylinder} } def link0 { put {translate([0,0,j0_h])}{ put {scale([l0_r, l0_r, l0_h])}{cylinder} } } def joint1 { put {rotate(90,[1,0,0]) then translate([0,j1_h/2,j0_h+l0_h+j1_r]) then rotate(j0_theta,[0,0,1])}{ put {scale([j1_r, j1_r, j1_h])}{cylinder} } } def T01 rotate(90,[1,0,0]) then translate([0,j1_h,j0_h+l0_h+j1_r]) then rotate(j0_theta,[0,0,1]) def T02 rotate(j1_theta,[0,0,1]) then [[T01]] def link1 { put {([[T02]])}{put{scale([l1_sx,l1_sy,1])}{linkshape}} } def T03 translate([l1_l,0,0]) then [[T02]] def joint2 { put {[[T03]]}{put {scale([j2_r, j2_r, j2_h])}{cylinder}} } def T04 translate([0,0,j2_h]) then rotate(j2_theta,[0,0,1]) then [[T03]] def link2 { put {[[T04]]}{ put{scale([l2_sx,l2_sy,1])}{linkshape} % put{translate([l2_l,0,0])}{box} } } def g_l 2 def g_w 1 def g_h 0.8 def grip { put {scale([g_l, g_w,g_h])}{box} put {translate([-g_l*4/3,0,g_h]) then scale([0.1*g_l, g_w,1])}{boxd} put {translate([g_l*4/3,0,g_h]) then scale([0.1*g_l, g_w,1])}{boxd} } def T05 translate([l2_l,0,0]) then [[T04]] def joint3 { put {[[T05]]}{ {box} put{translate([-(g_l/2)/2,0,0]) then rotate(90,[0,1,0]) then rotate(0,[1,0,0]) }{ {grip} } } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Define how to look at our work of art %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def viewpoint (4,-14,10) def lookat (0, 0, 0) % Set upvector along the z-axis def upvector [0,0,1] put{ view((viewpoint),(lookat), [upvector])} { {axes} {joint0}{link0}{joint1}{link1}{joint2}{link2}{joint3} %{grip} } %global { % set [line width=.3pt,scale=0.3] %} global { language tikz } debian/examples/sphere.sk0000644000000000000000000000115111725155754012643 0ustar # Copyright © 2009 by David Bremner # Distributed under the same terms as sketch (http://www.frontiernet.net/~eugene.ressler) def INFINITY 40 def LONGS 40 def up [0,1,0] def forward [0,0,1] def eye (2,3,4) def O (0,0,0) special|\tikzstyle{novert} = [draw=white,double=black]|[lay=under] def circ { sweep {INFINITY, rotate(360/INFINITY,(O),[forward])} (0,1,0) } def longcirc { sweep {INFINITY, rotate(360/INFINITY,(O),[up])} (0,0,1) } put { view((eye),(O),[up]) then scale(4) }{ sweep[line style=novert]{LONGS, rotate(360/LONGS,(O),[up])} {circ} } global {language tikz}debian/examples/cross.sk0000644000000000000000000000161611725155754012514 0ustar # Copyright © 2009 by David Bremner # Distributed under the same terms as sketch (http://www.frontiernet.net/~eugene.ressler) def O (0,0,0) def e1 (0,0,1) def e2 (0,1,0) def e3 (1,0,0) def n2 (0,-1,0) def n3 (-1,0,0) def J [0,1,0] def eye (-2,0.5,3) def support sweep[cull=false,fill opacity=0.25,fill=blue!20] {1, translate ([2,0,-2])} line (-0.25,-0.5,1.75)(-1.25,1.5,0.75) put { view((eye),(O),[J]) then scale(2) }{ repeat {4,rotate(90,(O),[J])} { polygon[cull=false,color=orange,draw=black,line width=1pt,fill opacity=0.75] (e1)(e3)(e2) polygon[cull=false,color=orange,draw=black,line width=1pt,fill opacity=0.75] (e1)(n2)(e3) # dots (e1)(e2)(e3)(n2) } {support} put {translate([-0.5,-1,-0.5])} {support} polygon[cull=false,color=red,draw=white,linewidth=1pt] (e1)(n3)(e2) } global{ language tikz # set [cull=false] }debian/examples/cube.sk0000644000000000000000000000217611725155754012303 0ustar # Copyright © 2009 by David Bremner # Distributed under the same terms as sketch (http://www.frontiernet.net/~eugene.ressler) def O (0,0,0) def up [0,0,1] def eye (2,3,4) def A (-1,-1,1) def B (-1,1,-1) def R 1.73205080757 def C (1,-1,-1) def D (1,1,1) def INFINITY 40 def LONGS 40 def J [1,1,0] def forward [0,0,1] special|\tikzstyle{novert} = [draw=white,double=lightgray]|[lay=under] def circ { sweep {INFINITY, rotate(360/INFINITY,(O),[forward])} (0,R,0) } put { view((eye),(O),[up]) then scale(3) }{ polygon[fill=red](A)(D)(B) # polygon[fill=lightgray](A)(B)(C) polygon[fill=red](B)(D)(C) # polygon[fill=lightgray](A)(C)(D) polygon[fill=red](A)(C)(B) # polygon[fill=lightgray](AB)(BC)(AC) # polygon[fill=lightgray](D)(BC)(AB) # polygon[fill=lightgray](D)(AB)(AC) # polygon[fill=red](D)(AC)(BC) repeat {4,rotate(90,(0,0,0),[0,1,0])} polygon[fill=blue!20,fill opacity=0.25,cull=false](-1,-1,-1)(1,-1,-1)(1,1,-1)(-1,1,-1) dots(A)(B)(C)(D) sweep[line style=novert,fill=none]{LONGS, rotate(360/LONGS,(O),[J])} {circ} } global{ language tikz # set [cull=false] } debian/examples/lift2.sk0000644000000000000000000000200211725155754012371 0ustar # Copyright © 2009 by David Bremner # Distributed under the same terms as sketch (http://www.frontiernet.net/~eugene.ressler) def diam 2.828427 def O (0,0,0) def up [0,0,1] def eye (2,3,3) def A (-1,-1,0) def B (1,1,0) def C (1,-1,0) def D (-1,1,0) def C1 (1,-1,diam) def D1 (-1,1,diam) put { view((eye),(O),[up]) then scale(2) }{ repeat {4,rotate(90,(0,0,0),[0,0,1])} polygon[fill=green!30,fill opacity=0.35,cull=false](-1,-1,0)(1,-1,0)(1,-1,diam) (-1,-1,diam) # repeat {2,rotate(180,(0,0,0),[0,0,1])} # polygon[fill=blue!20,fill opacity=0.25,cull=false](-1,-1,0)(1,-1,0)(1,-1,2) # (-1,-1,2)(-1,-1,0) polygon[fill=green,cull=false,fill opacity=0.5](A)(C)(B)(D) dots[color=red] (A)(B) dots[color=olive] (C1)(D1)(C)(D) line[arrows=->,line width=1pt](C)(C1) line[arrows=->,line width=1pt](D)(D1) %line(A)(C1) %line(B)(D1) line[color=black,arrows=<->,line width=1pt](A)(B) special |\node[right] at #1 {$\mathsf{diam}$};|(0,0,0) } global{ language tikz # set [cull=false] } debian/examples/lift.sk0000644000000000000000000000153511725155754012321 0ustar # © 2009 by David Bremner # Distributed under the same terms as sketch (http://www.frontiernet.net/~eugene.ressler) def O (0,0,0) def up [0,0,1] def eye (2,3,3) def A (-1,-1,-2) def B (1,1,-2) def C (1,-1,-2) def D (-1,1,-2) def C1 (1,-1,2) def D1 (-1,1,2) put { view((eye),(O),[up]) then scale(2) }{ repeat {4,rotate(90,(0,0,0),[0,0,1])} polygon[fill=red!30,fill opacity=0.35,cull=false](-1,-1,-1)(1,-1,-1)(1,-1,1) (-1,-1,1) repeat {2,rotate(180,(0,0,0),[0,0,1])} polygon[fill=blue!20,fill opacity=0.25,cull=false](-1,-1,-2)(1,-1,-2)(1,-1,2) (-1,-1,2)(-1,-1,-2) polygon[fill=green,cull=false](A)(C)(B)(D) dots[color=red] (A)(B) dots[color=olive] (C1)(D1)(C)(D) line[arrows=->,line width=1pt](C)(C1) line[arrows=->,line width=1pt](D)(D1) line(A)(C1) line(B)(D1) } global{ language tikz # set [cull=false] } debian/changelog0000644000000000000000000000763111725155754011063 0ustar sketch (1:0.3.7-1) unstable; urgency=low * New upstream release - new builtin functions asin and acos * Bump Standards-Version to 3.9.3, no changes. -- David Bremner Mon, 05 Mar 2012 10:08:32 -0400 sketch (1:0.3.2-1) unstable; urgency=low * New upstream release. - Allow passing 3D points into specials -- David Bremner Sun, 20 Feb 2011 09:07:58 -0400 sketch (1:0.2.187-1) experimental; urgency=low * New upstream release -- David Bremner Sun, 19 Dec 2010 09:30:21 -0400 sketch (1:0.2.183-1) experimental; urgency=low * New upstream release * Update standards version (no changes). -- David Bremner Thu, 16 Dec 2010 08:23:57 -0400 sketch (1:0.2.170-1) unstable; urgency=low * New upstream release * Disable patch debian/Doc-make-pl, portability changes to doc generation are now upstream. * Upgraded to standards version 3.9.0 (no changes). * Disable patch feature/info-dir; upstream now provides a directory entry. Info category changes from Graphics to TeX. -- David Bremner Sun, 04 Jul 2010 21:58:40 -0300 sketch (1:0.2.161-1) unstable; urgency=low * New upstream release * Update to standards version 3.8.3 (no changes required) * simplify documentation building; take advantage of patched Doc/make.pl * convert to source format 3.0 (quilt) * convert to dh7 style rules file -- David Bremner Sat, 09 Jan 2010 18:39:58 -0400 sketch (1:0.2.160-1) unstable; urgency=low * New upstream release * Move packaging to topgit (Closes: 485363). * Upgrade standards version to 3.8.1: add README.source * Set default PsTricks version to 1.15 to match texlive 2007 -- David Bremner Sun, 10 May 2009 08:17:17 -0300 sketch (1:0.2.89-1) unstable; urgency=low * New upstream release - fix for inconstent handling of input with -Tp and friends - dotsize in tikz, fix for lay=in * Convert packaging VCS to git (see debian/control) -- David Bremner Wed, 21 May 2008 10:52:09 +0200 sketch (1:0.2.75-1) unstable; urgency=low * New upstream release * Upstream now contains improved patch for extent initialization, removing debian specific patch. -- David Bremner Tue, 22 Apr 2008 07:21:31 +0200 sketch (1:0.2.60-1) unstable; urgency=low * New upstream release * Added patch for missing extent initialization (Closes: #476021) * tried to add better error messages to make.pl -- David Bremner Mon, 21 Apr 2008 15:49:23 +0200 sketch (1:0.2.59-3) unstable; urgency=low * Eliminated warning message from install-docs. * Move Build-Depends-Indep to Build-Depends (Closes: #474403). -- David Bremner Tue, 08 Apr 2008 15:21:57 +0200 sketch (1:0.2.59-2) unstable; urgency=low * Generate HTML and PDF documentation at build time. -- David Bremner Wed, 02 Apr 2008 16:22:48 +0200 sketch (1:0.2.59-1) unstable; urgency=low * New upstream release * updated standards version to 3.7.3 (no changes needed) * Added Vcs-Svn and Vcs-Browser fields * Switch from dpatch to quilt * Reorganized html documentation -- David Bremner Fri, 21 Mar 2008 23:06:52 +0100 sketch (1:0.2.27-3) unstable; urgency=low * Harmonized packaging license with upstream * Edited long description(s) * Added epoch to version -- David Bremner Tue, 09 Oct 2007 10:52:12 +0200 sketch (0.2.27-2) unstable; urgency=low * Updated short and long description. * Added GPL header to debian/copyright. * Removed autogenerated files from .diff.gz * Eliminated xlstproc warnings for manpage -- David Bremner Sat, 29 Sep 2007 08:04:47 +0200 sketch (0.2.27-1) unstable; urgency=low * Initial release (Closes: #440914 ITP) -- David Bremner Wed, 05 Sep 2007 11:23:38 +0200 debian/sketch-doc.doc-base0000644000000000000000000000061611725155754012630 0ustar Document: sketch Title: Debian sketch Manual Author: Eugene K. Ressler Jr. Abstract: This manual describes the sketch 3D line drawing system Section: Graphics Format: PDF Files: /usr/share/doc/sketch-doc/sketch.pdf.gz Format: HTML Index: /usr/share/doc/sketch-doc/sketch/index.html Files: /usr/share/doc/sketch-doc/sketch/*.html /usr/share/doc/sketch-doc/sketch/*.png debian/sketch-doc.examples0000644000000000000000000000012411725155754012763 0ustar Doc/manexamples.sk Doc/tags.sk Doc/truncatedcone.sk Data/*.sk debian/examples/*.skdebian/sketch.docs0000644000000000000000000000000711725155754011332 0ustar readme debian/sketch.info0000644000000000000000000000002111725155754011331 0ustar Doc/sketch.info debian/watch0000644000000000000000000000044711725155754010240 0ustar # Example watch control file for uscan # Rename this file to "watch" and then you can run the "uscan" command # to check for upstream updates and more. # See uscan(1) for format # Compulsory line, this is a version 3 file version=3 http://www.frontiernet.net/~eugene.ressler/sketch-(.*).tgz debian/sketch.manpages0000644000000000000000000000001111725155754012170 0ustar sketch.1 debian/sketch-doc.docs0000644000000000000000000000003311725155754012074 0ustar Doc/sketch.pdf Doc/sketch debian/README.Debian0000644000000000000000000000031011725155754011235 0ustar sketch for Debian ----------------- The PDF and HTML forms of the documentation are available in a separate sketch-doc package. -- David Bremner Wed, 05 Sep 2007 11:23:38 +0200 debian/clean0000644000000000000000000000154611725155754010215 0ustar sketch.1 version.h y.tab.c y.tab.h Doc/version.texi Doc/sketch.pdf Doc/sketch.info Doc/Thumbs.db Doc/sketch-manual.texi Doc/sketch-manual.sxs Doc/sketch-manual.toc Doc/sketch-manual.log Doc/sketch-manual.sx Doc/sketch-manual.cps Doc/sketch-manual.aux Doc/sketch-manual.cp Doc/ex000.png Doc/ex010.png Doc/ex020.png Doc/ex030.png Doc/ex040.png Doc/ex042.png Doc/ex045.png Doc/ex050-tmp.aux Doc/ex050-tmp.dvi Doc/ex050-tmp.log Doc/sketch-manual.fn Doc/sketch-manual.ky Doc/sketch-manual.op Doc/sketch-manual.pg Doc/sketch-manual.tp Doc/sketch-manual.vr debian/stamp-patched Doc/ex050.png Doc/ex060.png Doc/ex070.png Doc/ex080.png Doc/ex090.png Doc/ex100.png Doc/ex110.png Doc/ex120.png Doc/ex130.png Doc/ex140.png Doc/ex150.png Doc/ex160.png Doc/ex170.png Doc/ex180.png Doc/ex190.png Doc/ex210.png Doc/ex220.png Doc/ex230.png Doc/ex240.png Doc/ex250.png Doc/ex260.png debian/sketch.install0000644000000000000000000000001711725155754012051 0ustar sketch usr/bin debian/control0000644000000000000000000000411211725155754010603 0ustar Source: sketch Section: graphics Priority: optional Maintainer: Debian Science Maintainers Uploaders: David Bremner Build-Depends: debhelper (>= 7.0.50), xsltproc, docbook-xsl, docbook-xml, quilt (>= 0.46-7), texinfo, texlive-latex-base, texlive-base-bin, texlive-pstricks (>=2009-6), texlive-latex-recommended, latex-xcolor, ghostscript, epstool, bison Homepage: http://www.frontiernet.net/~eugene.ressler Standards-Version: 3.9.3 Vcs-Git: git://git.debian.org/git/debian-science/packages/sketch Vcs-Browser: http://git.debian.org/?p=debian-science/packages/sketch.git Package: sketch Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: pgf | texlive-pstricks Suggests: sketch-doc Description: 3D diagrams for TeX from scene description language Sketch is a simple system for producing line drawings of three-dimensional objects and scenes. Sketch is intended to produce finely wrought, mathematically-based illustrations with no extraneous detail and be able to easily overlay TeX math and text. The input language is reminiscent of PSTricks, so will be easy to learn for current PSTricks users. It generates either PSTricks or TikZ/PGF code as output. . Note that this package is not the interactive vector drawing program now known as skencil. Package: sketch-doc Architecture: all Enhances: sketch Section: doc Depends: ${misc:Depends} Description: Extra documentation for the sketch 3D line drawing system Sketch is a simple system for producing line drawings of three-dimensional objects and scenes. Sketch is intended to produce finely wrought, mathematically-based illustrations with no extraneous detail and be able to easily overlay TeX math and text. The input language is reminiscent of PSTricks, so will be easy to learn for current PSTricks users. It generates either PSTricks or TikZ/PGF code as output. . This package includes HTML and PDF versions of the user manual (an info version of the manual is part of the sketch package). Also includes some example input files. debian/compat0000644000000000000000000000000211725155754010400 0ustar 7 debian/copyright0000644000000000000000000000442211725155754011137 0ustar This package was downloaded from Files: * Copyright: © 2005-2009 Eugene K. Ressler, Jr. License: GPL3+ Sketch is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. Sketch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Sketch; see the file COPYING.txt. If not, see http://www.gnu.org/copyleft Files: debian/* Copyright: © 2007,2009 David Bremner (Debian Packaging) License: Same as upstream (GPL3+) Files: debian/examples/km-* Copyright: © 2009 Kjell Magne Fauske Downloaded from: http://www.fauskes.net/nb/introduction-to-sketch/ License: MIT This code is released under the MIT license See http://www.opensource.org/licenses/mit-license.php for details. On Debian systems, the GPL version 3 can be found as `/usr/share/common-licenses/GPL-3' The MIT License text is as follows: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.debian/sketch-man.xml0000644000000000000000000001211211725155754011753 0ustar David"> Bremner"> July 7, 2009"> 1"> bremner@unb.ca"> SKETCH"> Debian"> GNU"> GPL"> ]>
&dhemail;
2009 &dhusername; &dhdate;
&dhucpackage; &dhsection; &dhpackage; &version; User Commands &dhpackage; Produce 3D line drawings from scene description language DESCRIPTION sketch [options] file1 [-D tag] [-U tag] file2... Print a summary of options to stderr Print version info to standard output Debug parser (for developers) Use BSP rather than Painters algorithm for hidden surface removal [u|e][p[P|T]] Produce a complete LaTeX document
u U.S. paper size (8.5 x 11 inches) (default) e European A4 paper size (297 x 210 mm) p Print document template to stdout P Print PSTricks version of doc template (default) T Print TikZ version of doc template
templatefile Load user document template (any text file with escape %SKETCH_OUTPUT%) outfile Put output in outfile (default is stdout) tag Define given tag tag Undefine given tag
SEE ALSO The full documentation for sketch is maintained as a Texinfo manual. If the info and sketch programs are properly installed at your site, the command info sketch should give you access to the complete manual. AUTHOR This manual page was written by &dhusername; &dhemail; for the &debian; system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the &gnu; General Public License, Version 2 any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
debian/export-patches.sh0000644000000000000000000000436011725155754012507 0ustar #!/bin/sh # This script reads a list of revision ranges suitable for git format-patch # from the file debian/git-patches, one per line, and exports them to the # debian/patches directory in a form suitable for format 3.0(quilt) packages. # It is not required for creating such packages, but permits you to separate # out individual patches from what would otherwise be just a single blob. # # The revision ranges may include $DEB_VERSION and/or $UPSTREAM_VERSION, which # will be substituted according to the version of the package being exported. # # To enable this hook, use: # git config gitpkg.deb-export-hook /usr/share/gitpkg/hooks/quilt-patches-deb-export-hook patch_list=debian/git-patches if [ ! -r "$patch_list" ]; then echo "No $patch_list file, I guess you've pushed them all upstream." echo "Good Work!" exit 0 fi if [ -n "$REPO_DIR" ]; then git_dir="--git-dir \"$REPO_DIR/.git\"" else # support running as a free-standing script, without gitpkg DEB_VERSION="$(dpkg-parsechangelog | sed -rne 's/^Version: ([^:]+:)?//p')" fi; UPSTREAM_VERSION="${DEB_VERSION%-*}" tmpdir=$(mktemp -d patches.XXXXXXX) count=1 # counting lines relies on this one being there. echo "# Patches exported from git by gitpkg-export-patches" > $tmpdir/series do_patches (){ while read -r line do [ -n "$line" ] || continue case $line in \#*) ;; *) if PATCHES="$(git $git_dir format-patch --start-number $count -N -o $tmpdir "$line")"; then echo "$PATCHES" | sed -e "s,$tmpdir/,,g" -e 's, ,\n,g'>> $tmpdir/series count=$(wc -l $tmpdir/series | cut -f1 -d' ') else echo "git $git_dir format-patch --start-number $count -N -o $tmpdir $line" echo "failed." exit 1 fi esac done } sed -e "s/\$DEB_VERSION/$DEB_VERSION/g" \ -e "s/\${DEB_VERSION}/$DEB_VERSION/g" \ -e "s/\$UPSTREAM_VERSION/$UPSTREAM_VERSION/g" \ -e "s/\${UPSTREAM_VERSION}/$UPSTREAM_VERSION/g" \ < "$patch_list" | do_patches || exit 1 if [ $count -gt 0 ]; then rm -rf debian/patches mv $tmpdir debian/patches else echo "No patches found: debian/patches left untouched" #XXX well, except we already mashed the series file ... # so what should we do here? it's not really an error to have no patches fi debian/source/0000755000000000000000000000000011725155754010502 5ustar debian/source/git-patches0000644000000000000000000000002311725155754012630 0ustar upstream..master debian/source/format0000644000000000000000000000001411725155754011710 0ustar 3.0 (quilt)