diff options
author | Karl Berry <karl@freefriends.org> | 2014-08-16 21:45:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-08-16 21:45:29 +0000 |
commit | 555761b02e9d39a42e9a72dc9f90955c65036740 (patch) | |
tree | e4d97a65928f81d51ee21b70dcb104095c0ba85d /Master/texmf-dist/tex/latex | |
parent | 9caacf53d7d2a1620a603aa644617293a60183e2 (diff) |
hobby (16aug14)
git-svn-id: svn://tug.org/texlive/trunk@34953 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
4 files changed, 56 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/latex/hobby/hobby.code.tex b/Master/texmf-dist/tex/latex/hobby/hobby.code.tex index 0e567fcc528..1d13c52a384 100644 --- a/Master/texmf-dist/tex/latex/hobby/hobby.code.tex +++ b/Master/texmf-dist/tex/latex/hobby/hobby.code.tex @@ -8,7 +8,7 @@ %% ---------------------------------------------------------------- %% hobby --- a TikZ/PGF library for drawing smooth(ish) curves using %% Hobby's algorithm (implemented in LaTeX3) -%% E-mail: stacey@math.ntnu.no +%% E-mail: loopspace@mathforge.org %% Released under the LaTeX Project Public License v1.3c or later %% See http://www.latex-project.org/lppl.txt %% ---------------------------------------------------------------- @@ -33,8 +33,8 @@ \tl_new:N \g__hobby_version \tl_new:N \g__hobby_date -\tl_set:Nn \g__hobby_version {1.4} -\tl_set:Nn \g__hobby_date {2014-01-21} +\tl_set:Nn \g__hobby_version {1.6} +\tl_set:Nn \g__hobby_date {2014-08-11} \DeclareDocumentCommand \hobbyVersion {} { \tl_use:N \g__hobby_version @@ -89,9 +89,9 @@ \fp_new:N \l_hobby_out_curl_fp \fp_set:Nn \l_hobby_out_curl_fp {1} \fp_new:N \l_hobby_in_angle_fp -\fp_set_eq:NN \l_hobby_in_angle_fp \c_undefined_fp +\fp_set_eq:NN \l_hobby_in_angle_fp \c_inf_fp \fp_new:N \l_hobby_out_angle_fp -\fp_set_eq:NN \l_hobby_out_angle_fp \c_undefined_fp +\fp_set_eq:NN \l_hobby_out_angle_fp \c_inf_fp \int_new:N \l_hobby_npoints_int \int_new:N \l_hobby_draw_int \keys_define:nn {hobby / read in all} { @@ -233,7 +233,7 @@ { \int_compare:nNnTF {\l_hobby_npoints_int} = {1} { \hobby_distangle:n {0} -\fp_if_undefined:NF \l_hobby_out_angle_fp +\fp_compare:nF { \l_hobby_out_angle_fp == \c_inf_fp } { \fp_set:Nn \l_hobby_tempa_fp { \l_hobby_out_angle_fp - \array_get:Nn \l_hobby_angles_array {0}} @@ -246,14 +246,14 @@ \fp_add:Nn \l_hobby_tempa_fp {2 * \c_pi_fp} } \array_put:Nnx \l_hobby_theta_array {0} {\fp_to_tl:N \l_hobby_tempa_fp} - \fp_if_undefined:NT \l_hobby_in_angle_fp + \fp_compare:nT { \l_hobby_in_angle_fp == \c_inf_fp } { \array_put:Nnx \l_hobby_phi_array {1}{ \fp_to_tl:N \l_hobby_tempa_fp} } } -\fp_if_undefined:NTF \l_hobby_in_angle_fp +\fp_compare:nTF { \l_hobby_in_angle_fp == \c_inf_fp } { - \fp_if_undefined:NT \l_hobby_out_angle_fp + \fp_compare:nT { \l_hobby_out_angle_fp == \c_inf_fp } { \array_put:Nnx \l_hobby_phi_array {1} {0} \array_put:Nnx \l_hobby_theta_array {0} {0} @@ -273,7 +273,7 @@ \array_put:Nnx \l_hobby_phi_array {1} {\fp_to_tl:N \l_hobby_tempa_fp} - \fp_if_undefined:NT \l_hobby_out_angle_fp + \fp_compare:nT { \l_hobby_out_angle_fp == \c_inf_fp } { \array_put:Nnx \l_hobby_theta_array {0}{ \fp_to_tl:N \l_hobby_tempa_fp} } @@ -393,7 +393,7 @@ } } { -\fp_if_undefined:NTF \l_hobby_out_angle_fp +\fp_compare:nTF { \l_hobby_out_angle_fp == \c_inf_fp } { \array_put:Nnx \l_hobby_matrix_b_array {0} {\fp_to_tl:n { (\array_get:Nn \l_hobby_tension_in_array {1})^3 @@ -436,7 +436,7 @@ } \array_put:Nnx \l_hobby_matrix_d_array {0} {\fp_to_tl:N \l_hobby_tempa_fp} } -\fp_if_undefined:NTF \l_hobby_in_angle_fp +\fp_compare:nTF { \l_hobby_in_angle_fp == \c_inf_fp } { \array_put:Nnx \l_hobby_matrix_b_array {\l_hobby_npoints_int - 1} {\fp_to_tl:n { @@ -589,7 +589,7 @@ \bool_if:NTF \l_hobby_closed_bool { \int_gdecr:N \l_hobby_npoints_int }{ -\fp_if_undefined:NT \l_hobby_in_angle_fp +\fp_compare:nT { \l_hobby_in_angle_fp == \c_inf_fp } { \array_put:Nnx \l_hobby_phi_array {\l_hobby_npoints_int} {\fp_to_tl:n { ((3 * (\array_get:Nn \l_hobby_tension_in_array {\l_hobby_npoints_int}) - 1) @@ -897,14 +897,14 @@ sin ( (\array_get:Nn \l_hobby_angles_array {##1}) \int_gset:Nn \l_hobby_npoints_int {-1} \int_gset:Nn \l_hobby_draw_int {1} - \fp_gset_eq:NN \l_hobby_in_angle_fp \c_undefined_fp - \fp_gset_eq:NN \l_hobby_out_angle_fp \c_undefined_fp + \fp_gset_eq:NN \l_hobby_in_angle_fp \c_inf_fp + \fp_gset_eq:NN \l_hobby_out_angle_fp \c_inf_fp \fp_gset_eq:NN \l_hobby_in_curl_fp \c_one_fp \fp_gset_eq:NN \l_hobby_out_curl_fp \c_one_fp } \ExplSyntaxOff %% -%% Copyright (C) 2012 by Andrew Stacey <stacey@math.ntnu.no> +%% Copyright (C) 2012 by Andrew Stacey <loopspace@mathforge.org> %% %% This file may be distributed and/or modified under the conditions %% of the LaTeX Project Public License, either version 1.3 of this diff --git a/Master/texmf-dist/tex/latex/hobby/pgflibraryhobby.code.tex b/Master/texmf-dist/tex/latex/hobby/pgflibraryhobby.code.tex index 37d6a70a6ed..8653c635ea2 100644 --- a/Master/texmf-dist/tex/latex/hobby/pgflibraryhobby.code.tex +++ b/Master/texmf-dist/tex/latex/hobby/pgflibraryhobby.code.tex @@ -8,7 +8,7 @@ %% ---------------------------------------------------------------- %% hobby --- a TikZ/PGF library for drawing smooth(ish) curves using %% Hobby's algorithm (implemented in LaTeX3) -%% E-mail: stacey@math.ntnu.no +%% E-mail: loopspace@mathforge.org %% Released under the LaTeX Project Public License v1.3c or later %% See http://www.latex-project.org/lppl.txt %% ---------------------------------------------------------------- @@ -43,6 +43,40 @@ \def\hobby@close#1{% \pgfpathclose } +\def\pgfpathhobby{% + \pgfutil@ifnextchar\bgroup{\pgfpath@hobby}{\pgfpath@hobby{}}} +\def\pgfpath@hobby#1{% + \hobbyinit\hobby@moveto\hobby@curveto\hobby@close + \hobbysetparams{#1}% + \pgfmathsetmacro\hobby@x{\the\pgf@path@lastx/1cm}% + \pgfmathsetmacro\hobby@y{\the\pgf@path@lasty/1cm}% + \hobbyaddpoint{x = \hobby@x, y = \hobby@y}% +} +\def\pgfpathhobbypt#1{% + #1% + \pgfmathsetmacro\hobby@x{\the\pgf@x/1cm}% + \pgfmathsetmacro\hobby@y{\the\pgf@y/1cm}% + \pgfutil@ifnextchar\bgroup{\pgfpathhobbyptparams}{\pgfpathhobbyptparams{}}% +} +\def\pgfpathhobbyptparams#1{% + \hobbyaddpoint{#1,x = \hobby@x, y = \hobby@y}% +} +\def\pgfpathhobbyend{% + \ifhobby@externalise + \ifx\hobby@path@name\pgfutil@empty + \hobbygenusepath + \else + \hobbygenuseifnecpath{\hobby@path@name}% + \fi + \else + \hobbygenusepath + \fi + \ifx\hobby@path@name\pgfutil@empty + \else + \hobbysavepath{\hobby@path@name}% + \fi + \global\let\hobby@path@name=\pgfutil@empty +} \def\pgfplothandlerhobby{% \def\pgf@plotstreamstart{% \hobbyinit\hobby@moveto\hobby@curveto\hobby@close @@ -221,7 +255,7 @@ #4% } %% -%% Copyright (C) 2012 by Andrew Stacey <stacey@math.ntnu.no> +%% Copyright (C) 2012 by Andrew Stacey <loopspace@mathforge.org> %% %% This file may be distributed and/or modified under the conditions %% of the LaTeX Project Public License, either version 1.3 of this diff --git a/Master/texmf-dist/tex/latex/hobby/pml3array.sty b/Master/texmf-dist/tex/latex/hobby/pml3array.sty index 3aeb1e6849b..d8722d9f75d 100644 --- a/Master/texmf-dist/tex/latex/hobby/pml3array.sty +++ b/Master/texmf-dist/tex/latex/hobby/pml3array.sty @@ -8,7 +8,7 @@ %% ---------------------------------------------------------------- %% hobby --- a TikZ/PGF library for drawing smooth(ish) curves using %% Hobby's algorithm (implemented in LaTeX3) -%% E-mail: stacey@math.ntnu.no +%% E-mail: loopspace@mathforge.org %% Released under the LaTeX Project Public License v1.3c or later %% See http://www.latex-project.org/lppl.txt %% ---------------------------------------------------------------- @@ -382,7 +382,7 @@ } \ExplSyntaxOff %% -%% Copyright (C) 2012 by Andrew Stacey <stacey@math.ntnu.no> +%% Copyright (C) 2012 by Andrew Stacey <loopspace@mathforge.org> %% %% This file may be distributed and/or modified under the conditions %% of the LaTeX Project Public License, either version 1.3 of this diff --git a/Master/texmf-dist/tex/latex/hobby/tikzlibraryhobby.code.tex b/Master/texmf-dist/tex/latex/hobby/tikzlibraryhobby.code.tex index ced64271e8b..8fde56abd6e 100644 --- a/Master/texmf-dist/tex/latex/hobby/tikzlibraryhobby.code.tex +++ b/Master/texmf-dist/tex/latex/hobby/tikzlibraryhobby.code.tex @@ -8,7 +8,7 @@ %% ---------------------------------------------------------------- %% hobby --- a TikZ/PGF library for drawing smooth(ish) curves using %% Hobby's algorithm (implemented in LaTeX3) -%% E-mail: stacey@math.ntnu.no +%% E-mail: loopspace@mathforge.org %% Released under the LaTeX Project Public License v1.3c or later %% See http://www.latex-project.org/lppl.txt %% ---------------------------------------------------------------- @@ -581,7 +581,7 @@ } %% -%% Copyright (C) 2012 by Andrew Stacey <stacey@math.ntnu.no> +%% Copyright (C) 2012 by Andrew Stacey <loopspace@mathforge.org> %% %% This file may be distributed and/or modified under the conditions %% of the LaTeX Project Public License, either version 1.3 of this |