diff options
180 files changed, 11895 insertions, 8522 deletions
diff --git a/Master/texmf-dist/doc/support/ketcindy/README b/Master/texmf-dist/doc/support/ketcindy/README index 920b02ab19b..3fa9e656c92 100644 --- a/Master/texmf-dist/doc/support/ketcindy/README +++ b/Master/texmf-dist/doc/support/ketcindy/README @@ -1,7 +1,7 @@ KeTCindy ======== -Version: 20190320.0 +Version: 20190624.0 KeTCindy combines a plugin to Cinderella with free mathematical software (R, Maxima, ...) to produce high-quality LaTeX graphics. diff --git a/Master/texmf-dist/doc/support/ketcindy/forLinux/ReadmeLinuxE.pdf b/Master/texmf-dist/doc/support/ketcindy/forLinux/ReadmeLinuxE.pdf Binary files differindex 833008329da..d5a0c04e7f4 100644 --- a/Master/texmf-dist/doc/support/ketcindy/forLinux/ReadmeLinuxE.pdf +++ b/Master/texmf-dist/doc/support/ketcindy/forLinux/ReadmeLinuxE.pdf diff --git a/Master/texmf-dist/doc/support/ketcindy/forLinux/ReadmeLinuxJ.pdf b/Master/texmf-dist/doc/support/ketcindy/forLinux/ReadmeLinuxJ.pdf Binary files differindex d862929646c..88698bc8bda 100644 --- a/Master/texmf-dist/doc/support/ketcindy/forLinux/ReadmeLinuxJ.pdf +++ b/Master/texmf-dist/doc/support/ketcindy/forLinux/ReadmeLinuxJ.pdf diff --git a/Master/texmf-dist/doc/support/ketcindy/forLinux/setketcindy.sh b/Master/texmf-dist/doc/support/ketcindy/forLinux/setketcindy.sh index a7f42a76713..79cc1e491da 100644 --- a/Master/texmf-dist/doc/support/ketcindy/forLinux/setketcindy.sh +++ b/Master/texmf-dist/doc/support/ketcindy/forLinux/setketcindy.sh @@ -1,5 +1,5 @@ #!/bin/sh -# 20180310 +# 20180616 # Edit and uncomment the following lines if necessary texpath=/usr/share/texlive @@ -60,19 +60,65 @@ else fi cd ${cindyplug} if [ -e KetCindyPlugin.jar ]; then - sudo rm ${cindyplug}/KetCindyPlugin.jar -fi -if [ -e ketcindy.ini ]; then - sudo rm ${cindyplug}/ketcindy.ini + sudo rm KetCindyPlugin.jar fi cd ${ketcindyscripts} cp -p ketjava/KetCindyPlugin.jar ${cindyplug} -echo "PathThead=\"${texbinpath}/\";" > ${cindyplug}/ketcindy.ini -echo "Dirhead=\"${ketcindyscripts}\";" >> ${cindyplug}/ketcindy.ini -echo "Homehead=\"${homehead}\";" >> ${cindyplug}/ketcindy.ini -echo "setdirectory(Dirhead);" >> ${cindyplug}/ketcindy.ini -echo "import(\"setketcindy.txt\");" >> ${cindyplug}/ketcindy.ini -echo "import(\"ketoutset.txt\");" >> ${cindyplug}/ketcindy.ini -echo "KetCindyPlugin and others copied to Cinderella" +echo "KetCindyPlugin.jar copied to Cinderella" + +# 20190616from +cd ${cindyplug} +remake="y" +if [ -e ketcindy.ini ]; then + echo "Contentes of ketcindy.ini : " + echo "" + cat ketcindy.ini + echo "" + read -p 'Do you want to remake ketcindy.ini? (y/n) : ' remake +fi +if [ ${remake} = "y" ]; then + echo "ketcindy.ini will be made" +else + echo "finished" + sleep 1 + exit 0 +fi +# 20190616to + +if [ -e ketcindy.ini ]; then + sudo rm ketcindy.ini +fi +echo "PathThead=\"${texbinpath}/\";" > ketcindy.ini +echo "Dirhead=\"${ketcindyscripts}\";" >> ketcindy.ini +echo "Homehead=\"${homehead}\";" >> ketcindy.ini +echo "setdirectory(Dirhead);" >> ketcindy.ini +echo "import(\"setketcindy.txt\");" >> ketcindy.ini +echo "import(\"ketoutset.txt\");" >> ketcindy.ini + +echo "Choose TeX with the 1st(+2nd) character" +read -p 'p=platex, u=uplatex, l=latex, x=xelatex, pd=pdflatex, lu=lualatex:' tex +if [ ${tex} = "p" ]; then + tex="platex" +fi +if [ ${tex} = "u" ]; then + tex="uplatex" +fi +if [ ${tex} = "l" ]; then + tex="latex" +fi +if [ ${tex} = "x" ]; then + tex="xelatex" +fi +if [ ${tex} = "pd" ]; then + tex="pdflatex" +fi +if [ ${tex} = "lu" ]; then + tex="lualatex" +fi +echo "PathT=PathThead+\"${tex}\";" >> ketcindy.ini +echo "Pathpdf=\"${pathpdf}\";" >> ketcindy.ini +echo "Mackc=\"bash\";" >> ketcindy.ini + +echo "ketcindy.ini generated(updated)" sleep 1 exit 0 diff --git a/Master/texmf-dist/doc/support/ketcindy/forLinux/setwork.sh b/Master/texmf-dist/doc/support/ketcindy/forLinux/setwork.sh index 9dd91b533c3..276da924eb2 100755 --- a/Master/texmf-dist/doc/support/ketcindy/forLinux/setwork.sh +++ b/Master/texmf-dist/doc/support/ketcindy/forLinux/setwork.sh @@ -1,5 +1,5 @@ #!/bin/sh -# 20190223 +# 20190614 # Edit and uncomment the following line if necessary pathpdf=evince @@ -20,44 +20,18 @@ else echo Workfolder has been generated as ${dist} echo "This folder can be moved to any place" ##180913 fi +read -p 'Language (j/e) : ' lang cd doc/ketmanual -read -p 'Choose platex(p),uplatex(u),latex(l),xelatex(x),pdflatex(pd),lualatex(lu):' tex -if [ ${tex} = "p" ]; then - tex="platex" - cp -p KeTCindyReferenceJ.pdf ${dist} - cp -p KeTCindyGuideJ.pdf ${dist} - cp -p KeTPicStyleJ.pdf ${dist} -fi -if [ ${tex} = "u" ]; then - tex="uplatex" - cp -p KeTCindyReferenceJ.pdf ${dist} - cp -p KeTCindyGuideJ.pdf ${dist} - cp -p KeTPicStyleJ.pdf ${dist} -fi -if [ ${tex} = "l" ]; then - tex="latex" +if [ ${lang} = "e" ]; then cp -p KeTCindyReferenceE.pdf ${dist} cp -p KeTCindyGuideE.pdf ${dist} - cp -p KeTPicStyleE.pdf ${dist} -fi -if [ ${tex} = "x" ]; then - tex="xelatex" - cp -p KeTCindyReferenceE.pdf ${dist} - cp -p KeTCindyGuideE.pdf ${dist} - cp -p KeTPicStyleE.pdf ${dist} -fi -if [ ${tex} = "pd" ]; then - tex="pdflatex" - cp -p KeTCindyReferenceE.pdf ${dist} - cp -p KeTCindyGuideE.pdf ${dist} - cp -p KeTPicStyleE.pdf ${dist} -fi -if [ ${tex} = "lu" ]; then - tex="lualatex" - cp -p KeTCindyReferenceE.pdf ${dist} - cp -p KeTCindyGuideE.pdf ${dist} - cp -p KeTPicStyleE.pdf ${dist} + cp -p KeTpicStyleE.pdf ${dist} +else + cp -p KeTCindyReferenceJ.pdf ${dist} + cp -p KeTCindyGuideJ.pdf ${dist} + cp -p KeTpicStyleJ.pdf ${dist} fi + echo generating ${home}/${changesetting} echo // Re-setting PathT,PathR,Pathpdf,PathM,PathAd >${home}${changesetting} echo "PathT=PathThead+\"${tex}\";" >>${home}${changesetting} diff --git a/Master/texmf-dist/doc/support/ketcindy/forMac/ReadmeMacE.pdf b/Master/texmf-dist/doc/support/ketcindy/forMac/ReadmeMacE.pdf Binary files differindex 7c5d7188785..52c5a551998 100644 --- a/Master/texmf-dist/doc/support/ketcindy/forMac/ReadmeMacE.pdf +++ b/Master/texmf-dist/doc/support/ketcindy/forMac/ReadmeMacE.pdf diff --git a/Master/texmf-dist/doc/support/ketcindy/forMac/ReadmeMacJ.pdf b/Master/texmf-dist/doc/support/ketcindy/forMac/ReadmeMacJ.pdf Binary files differindex af7810ee309..a2079e6e4b6 100644 --- a/Master/texmf-dist/doc/support/ketcindy/forMac/ReadmeMacJ.pdf +++ b/Master/texmf-dist/doc/support/ketcindy/forMac/ReadmeMacJ.pdf diff --git a/Master/texmf-dist/doc/support/ketcindy/forMac/setketcindy.command b/Master/texmf-dist/doc/support/ketcindy/forMac/setketcindy.command index 174300cf88d..469553fb25f 100755 --- a/Master/texmf-dist/doc/support/ketcindy/forMac/setketcindy.command +++ b/Master/texmf-dist/doc/support/ketcindy/forMac/setketcindy.command @@ -1,5 +1,5 @@ #!/bin/sh -# 20181207 +# 20190616 # Edit and uncomment the following lines if necessary #texpath=/Applications/kettex/texlive @@ -82,12 +82,66 @@ fi cd ${ketcindyscripts} cp -p ketjava/KetCindyPlugin.jar ${cindyplug} -echo "PathThead=\"${texbinpath}/\";" > ${cindyplug}/ketcindy.ini -echo "Dirhead=\"${ketcindyscripts}\";" >> ${cindyplug}/ketcindy.ini -echo "Homehead=\"${homehead}\";" >> ${cindyplug}/ketcindy.ini -echo "setdirectory(Dirhead);" >> ${cindyplug}/ketcindy.ini -echo "import(\"setketcindy.txt\");" >> ${cindyplug}/ketcindy.ini -echo "import(\"ketoutset.txt\");" >> ${cindyplug}/ketcindy.ini -echo "KetCindyPlugin and others copied to Cinderella" + +# 20190616from +cd ${cindyplug} +remake="y" +if [ -e ketcindy.ini ]; then + echo "Contentes of ketcindy.ini : " + echo "" + cat ketcindy.ini + echo "" + read -p 'Do you want to remake ketcindy.ini? (y/n) : ' remake +fi +if [ ${remake} = "y" ]; then + echo "ketcindy.ini will be made" +else + echo "finished" + sleep 1 + exit 0 +fi +# 20190616to + +echo "PathThead=\"${texbinpath}/\";" > ketcindy.ini +echo "Dirhead=\"${ketcindyscripts}\";" >> ketcindy.ini +echo "Homehead=\"${homehead}\";" >> ketcindy.ini +echo "setdirectory(Dirhead);" >> ketcindy.ini +echo "import(\"setketcindy.txt\");" >> ketcindy.ini +echo "import(\"ketoutset.txt\");" >> ketcindy.ini + +echo "Choose TeX with the 1st(+2nd) character" +read -p 'p=platex, u=uplatex, l=latex, x=xelatex, pd=pdflatex, lu=lualatex:' tex +if [ ${tex} = "p" ]; then + tex="platex" +fi +if [ ${tex} = "u" ]; then + tex="uplatex" +fi +if [ ${tex} = "l" ]; then + tex="latex" +fi +if [ ${tex} = "x" ]; then + tex="xelatex" +fi +if [ ${tex} = "pd" ]; then + tex="pdflatex" +fi +if [ ${tex} = "lu" ]; then + tex="lualatex" +fi +echo "PathT=PathThead+\"${tex}\";" >> ketcindy.ini +echo "Pathpdf=\"preview\";" >> ketcindy.ini + +pathM="/Applications/Maxima.app/Contents/Resources/maxima.sh" +pathMn="/Applications/Maxima.app/Contents/Resources/opt/bin/maxima" +find -f ${pathM} +if [ $? -gt 0 ]; then + echo "PathM=\"${pathMn}\";" >> ketcindy.ini +else + echo "PathM=\"${pathM}\";" >> ketcindy.ini +fi +echo "Mackc=\"open\";" >> ketcindy.ini + +echo "ketcindy.ini generated(updated)" sleep 1 exit 0
\ No newline at end of file diff --git a/Master/texmf-dist/doc/support/ketcindy/forMac/setwork.command b/Master/texmf-dist/doc/support/ketcindy/forMac/setwork.command index b664316cda6..674c4237166 100755 --- a/Master/texmf-dist/doc/support/ketcindy/forMac/setwork.command +++ b/Master/texmf-dist/doc/support/ketcindy/forMac/setwork.command @@ -1,9 +1,5 @@ #!/bin/sh -# 20190217 -# 190217from -pathM="/Applications/Maxima.app/Contents/Resources/maxima.sh" -pathMn="/Applications/Maxima.app/Contents/Resources/opt/bin/maxima" -# 109217to +# 20190614 cd `dirname $0` if [ -e ../ketcindyfolder ]; then cd ../ketcindyfolder @@ -11,7 +7,8 @@ fi echo Files will be copied from echo " "`pwd`/work changesetting=/.ketcindy.conf #181017 -dist=~/ketcindy #180913 +home=~ +dist=${home}/ketcindy #180913 cp -r -p work/ ${dist}/ if [ $? -gt 0 ]; then echo Error:$? @@ -20,66 +17,27 @@ else echo Workfolder has been generated as ${dist} echo " "This folder can be moved to any place ##180913 fi -echo "Choose TeX with the 1st(+2nd) character" -read -p 'p=platex, u=uplatex, l=latex, x=xelatex, pd=pdflatex, lu=lualatex:' tex -if [ ${tex} = "p" ]; then - tex="platex" - cd doc/ketmanual - cp -p KeTCindyReferenceJ.pdf ${dist} - cp -p KeTCindyGuideJ.pdf ${dist} - cp -p KeTpicStyleJ.pdf ${dist} -fi -if [ ${tex} = "u" ]; then - tex="uplatex" - cd doc/ketmanual - cp -p KeTCindyReferenceJ.pdf ${dist} - cp -p KeTCindyGuideJ.pdf ${dist} - cp -p KeTpicStyleJ.pdf ${dist} -fi -if [ ${tex} = "l" ]; then - tex="latex" - cd doc/ketmanual - cp -p KeTCindyReferenceE.pdf ${dist} - cp -p KeTCindyGuideE.pdf ${dist} - cp -p KeTpicStyleE.pdf ${dist} -fi -if [ ${tex} = "x" ]; then - tex="xelatex" - cd ketmanual - cp -p KeTCindyReferenceE.pdf ${dist} - cp -p KeTCindyGuideE.pdf ${dist} - cp -p KeTpicStyleE.pdf ${dist} -fi -if [ ${tex} = "pd" ]; then - tex="pdflatex" - cd doc/ketmanual - cp -p KeTCindyReferenceE.pdf ${dist} - cp -p KeTCindyGuideE.pdf ${dist} - cp -p KeTpicStyleE.pdf ${dist} -fi -if [ ${tex} = "lu" ]; then - tex="lualatex" - cd doc/ketmanual +read -p 'Language (j/e) : ' lang +cd doc/ketmanual +if [ ${lang} = "e" ]; then cp -p KeTCindyReferenceE.pdf ${dist} cp -p KeTCindyGuideE.pdf ${dist} cp -p KeTpicStyleE.pdf ${dist} -fi -dist=~ #180913 -echo generating ${dist}/${changesetting} -echo // Re-setting PathT,PathR,Pathpdf,PathM,PathAd,Mackc >${dist}${changesetting} -echo "PathT=PathThead+\"${tex}\";" >>${dist}${changesetting} -read -p 'Choose pdfviewer from preview(p),skim(s): ' ans -if [ ${ans} = "s" ]; then - echo "Pathpdf=\"skim\";" >> ${dist}${changesetting} else - echo "Pathpdf=\"preview\";" >> ${dist}${changesetting} -fi -# 190217from -find -f ${pathM} -if [ $? -gt 0 ]; then - echo "PathM=\"${pathMn}\";" >> ${dist}${changesetting} + cp -p KeTCindyReferenceJ.pdf ${dist} + cp -p KeTCindyGuideJ.pdf ${dist} + cp -p KeTpicStyleJ.pdf ${dist} fi -# 190217to -echo "Mackc=\"open\";" >>${dist}${changesetting} + +echo Generating ${home}/${changesetting} +echo // Re-setting PathT,PathR,Pathpdf,PathM,PathAd,Mackc >${home}${changesetting} +echo "// PathT=PathThead+\"platex\";" >>${home}${changesetting} +echo "// Pathpdf=\"skim\";" >> ${home}${changesetting} +pathM="/Applications/Maxima.app/Contents/Resources/maxima.sh" +pathMn="/Applications/Maxima.app/Contents/Resources/opt/bin/maxima" +echo "// PathM=\"${pathM}\";" >> ${home}${changesetting} +echo "// PathM=\"${pathMn}\";" >> ${home}${changesetting} +echo "// Mackc=\"open\";" >>${home}${changesetting} + sleep 1 exit 0
\ No newline at end of file diff --git a/Master/texmf-dist/doc/support/ketcindy/forWindows/ReadmeWinE.pdf b/Master/texmf-dist/doc/support/ketcindy/forWindows/ReadmeWinE.pdf Binary files differindex 92eac65ecb0..29fadf12df0 100644 --- a/Master/texmf-dist/doc/support/ketcindy/forWindows/ReadmeWinE.pdf +++ b/Master/texmf-dist/doc/support/ketcindy/forWindows/ReadmeWinE.pdf diff --git a/Master/texmf-dist/doc/support/ketcindy/forWindows/ReadmeWinJ.pdf b/Master/texmf-dist/doc/support/ketcindy/forWindows/ReadmeWinJ.pdf Binary files differindex 6697753dce0..261ebf0a724 100644 --- a/Master/texmf-dist/doc/support/ketcindy/forWindows/ReadmeWinJ.pdf +++ b/Master/texmf-dist/doc/support/ketcindy/forWindows/ReadmeWinJ.pdf diff --git a/Master/texmf-dist/doc/support/ketcindy/forWindows/setketcindy.bat b/Master/texmf-dist/doc/support/ketcindy/forWindows/setketcindykettex.bat index d4bec341469..e00927639d8 100755 --- a/Master/texmf-dist/doc/support/ketcindy/forWindows/setketcindy.bat +++ b/Master/texmf-dist/doc/support/ketcindy/forWindows/setketcindykettex.bat @@ -1,4 +1,4 @@ -REM 20181207 +REM 20190616 echo off rem Edit the followings if necessary @@ -72,11 +72,90 @@ echo Setting of "%cindyplug%\" cd "%pathT%%scripts%" copy /Y "ketjava\KetCindyPlugin.jar" "%cindyplug%\" cd "%cindyplug%" + +rem 20190616from +set newfile=y +if exist ketcindy.ini ( + set newfile=n + echo Contentes of ketcindy.ini : + echo. + type ketcindy.ini + echo. + set /P remake="Do you want to remake ketindy.ini? (y/n): " +) +if "%newfile%"=="y" ( + set remake=y +) +if "%remake%"=="y" ( + echo ketcindy.ini will be made/remade +) else ( + echo "Finished" + pause + exit +) +rem 20190616to + echo PathThead="%pathT%%bin%\"; > ketcindy.ini echo Homehead="%homehead%"; >> ketcindy.ini echo Dirhead="%pathT%%scripts%"; >> ketcindy.ini echo setdirectory(Dirhead); >> ketcindy.ini echo import("setketcindy.txt"); >> ketcindy.ini echo import("ketoutset.txt"); >> ketcindy.ini + +echo Setting of TeX, R, Maxima +echo p=platex u=uplatex l=latex x=xelatex pd=pdflatex lu=lualatex +set /P STR_INPUT="---- Choose TeX from above with 1st(+2nd) character :" +if "%STR_INPUT%" == "p" ( + set tex=platex +) +if "%STR_INPUT%" == "u" ( + set tex=uplatex +) +if "%STR_INPUT%" == "l" ( + set tex=latex +) +if "%STR_INPUT%" == "x" ( + set tex=xelatex +) +if "%STR_INPUT%" == "pd" ( + set tex=pdflatex +) +if "%STR_INPUT%" == "lu" ( + set tex=lualatex +) +echo PathT=PathThead+"%tex%"; >> ketcindy.ini + +set prgSm=C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe +if not exist "%prgSm%" ( + set prgSm=C:\Program Files\SumatraPDF\SumatraPDF.exe +) +echo Pathpdf="%prgSm%"; >> ketcindy.ini + +set /P STR_INPUT="Input version of R (ex)3.5.0 :" +set verR=%STR_INPUT% +set prg=C:\Program Files +if exist "%prg%\R\R-%verR%\bin\" ( + echo PathR="%prg%\R\R-%verR%\bin"; >> ketcindy.ini +) else ( + if exist "%prg% (x86)\R\R-%verR%\bin\" ( + echo "%prg% (x86)\R\R-%verR%\bin"; >> ketcindy.ini + ) else ( + echo "R-%verR% not found" + ) +) + +set /P STR_INPUT="Input version of Maxima (ex)5.39.0 :" +set verM=%STR_INPUT% +echo %verM% +set prg=C:\maxima-%verM%\bin\maxima.bat +if exist "%prg%" ( + echo PathM="%prg%"; >> ketcindy.ini +) else ( + echo "Maxima-%verM% not found" + set prg=C:\maxima-x.xx.x\bin\maxima.bat + echo // PathM="%prg%"; >> ketcindy.ini + ) +) + echo "Plugins of Cindy has been set" pause diff --git a/Master/texmf-dist/doc/support/ketcindy/forWindows/setketcindytexlive.bat b/Master/texmf-dist/doc/support/ketcindy/forWindows/setketcindytexlive.bat index 5e8039cba81..9dd1ce8c64c 100755 --- a/Master/texmf-dist/doc/support/ketcindy/forWindows/setketcindytexlive.bat +++ b/Master/texmf-dist/doc/support/ketcindy/forWindows/setketcindytexlive.bat @@ -1,4 +1,4 @@ -REM 20181222 +REM 20190616 echo off rem Edit the followings if necessary @@ -75,11 +75,90 @@ echo Setting of "%cindyplug%\" cd "%pathT%\%year%%scripts%" copy /Y "ketjava\KetCindyPlugin.jar" "%cindyplug%\" cd "%cindyplug%" + +rem 20190616from +set newfile=y +if exist ketcindy.ini ( + set newfile=n + echo Contentes of ketcindy.ini : + echo. + type ketcindy.ini + echo. + set /P remake="Do you want to remake ketindy.ini? (y/n): " +) +if "%newfile%"=="y" ( + set remake=y +) +if "%remake%"=="y" ( + echo ketcindy.ini will be made/remade +) else ( + echo "Finished" + pause + exit +) +rem 20190616to + echo PathThead="%pathT%\%year%%bin%\"; > ketcindy.ini echo Homehead="%homehead%"; >> ketcindy.ini echo Dirhead="%pathT%\%year%%scripts%"; >> ketcindy.ini echo setdirectory(Dirhead); >> ketcindy.ini echo import("setketcindy.txt"); >> ketcindy.ini echo import("ketoutset.txt"); >> ketcindy.ini + +echo Setting of TeX, R, Maxima +echo p=platex u=uplatex l=latex x=xelatex pd=pdflatex lu=lualatex +set /P STR_INPUT="---- Choose TeX from above with 1st(+2nd) character :" +if "%STR_INPUT%" == "p" ( + set tex=platex +) +if "%STR_INPUT%" == "u" ( + set tex=uplatex +) +if "%STR_INPUT%" == "l" ( + set tex=latex +) +if "%STR_INPUT%" == "x" ( + set tex=xelatex +) +if "%STR_INPUT%" == "pd" ( + set tex=pdflatex +) +if "%STR_INPUT%" == "lu" ( + set tex=lualatex +) +echo PathT=PathThead+"%tex%"; >> ketcindy.ini + +set prgSm=C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe +if not exist "%prgSm%" ( + set prgSm=C:\Program Files\SumatraPDF\SumatraPDF.exe +) +echo Pathpdf="%prgSm%"; >> ketcindy.ini + +set /P STR_INPUT="Input version of R (ex)3.5.0 :" +set verR=%STR_INPUT% +set prg=C:\Program Files +if exist "%prg%\R\R-%verR%\bin\" ( + echo PathR="%prg%\R\R-%verR%\bin"; >> ketcindy.ini +) else ( + if exist "%prg% (x86)\R\R-%verR%\bin\" ( + echo "%prg% (x86)\R\R-%verR%\bin"; >> ketcindy.ini + ) else ( + echo "R-%verR% not found" + ) +) + +set /P STR_INPUT="Input version of Maxima (ex)5.39.0 :" +set verM=%STR_INPUT% +echo %verM% +set prg=C:\maxima-%verM%\bin\maxima.bat +if exist "%prg%" ( + echo PathM="%prg%"; >> ketcindy.ini +) else ( + echo "Maxima-%verM% not found" + set prg=C:\maxima-x.xx.x\bin\maxima.bat + echo // PathM="%prg%"; >> ketcindy.ini + ) +) + echo "Plugins of Cindy has been set" pause diff --git a/Master/texmf-dist/doc/support/ketcindy/forWindows/setketcindyw32J.bat b/Master/texmf-dist/doc/support/ketcindy/forWindows/setketcindyw32J.bat index f385abcc0a3..719ae186e2b 100755 --- a/Master/texmf-dist/doc/support/ketcindy/forWindows/setketcindyw32J.bat +++ b/Master/texmf-dist/doc/support/ketcindy/forWindows/setketcindyw32J.bat @@ -1,4 +1,4 @@ -REM 20181222 +REM 20190616 echo off rem Edit the followings if necessary @@ -63,14 +63,6 @@ if exist "%pathT%%style%\." ( rd /s "%pathT%%style%" ) -rem For kettexbasic 181222 -set scriptsold=\share\texmf-dist\tex\platex\ketcindy -if exist "%pathT%%scriptsold%\." ( - echo Deleting "%pathT%%scriptsold%" - rd /s "%pathT%%scriptsold%" -) -rem For kettexbasic end - echo Copying ketcindy styles to "%pathT%%style%" set stylesrc=style %xcp% /Y /Q /S /E /R "%stylesrc%\*.*" "%pathT%%style%\" @@ -81,11 +73,90 @@ echo Setting of "%cindyplug%\" cd "%pathT%%scripts%" copy /Y "ketjava\KetCindyPlugin.jar" "%cindyplug%\" cd "%cindyplug%" + +rem 20190616from +set newfile=y +if exist ketcindy.ini ( + set newfile=n + echo Contentes of ketcindy.ini : + echo. + type ketcindy.ini + echo. + set /P remake="Do you want to remake ketindy.ini? (y/n): " +) +if "%newfile%"=="y" ( + set remake=y +) +if "%remake%"=="y" ( + echo ketcindy.ini will be made/remade +) else ( + echo "Finished" + pause + exit +) +rem 20190616to + echo PathThead="%pathT%%bin%\"; > ketcindy.ini echo Homehead="%homehead%"; >> ketcindy.ini echo Dirhead="%pathT%%scripts%"; >> ketcindy.ini echo setdirectory(Dirhead); >> ketcindy.ini echo import("setketcindy.txt"); >> ketcindy.ini echo import("ketoutset.txt"); >> ketcindy.ini + +echo Setting of TeX, R, Maxima +echo p=platex u=uplatex l=latex x=xelatex pd=pdflatex lu=lualatex +set /P STR_INPUT="---- Choose TeX from above with 1st(+2nd) character :" +if "%STR_INPUT%" == "p" ( + set tex=platex +) +if "%STR_INPUT%" == "u" ( + set tex=uplatex +) +if "%STR_INPUT%" == "l" ( + set tex=latex +) +if "%STR_INPUT%" == "x" ( + set tex=xelatex +) +if "%STR_INPUT%" == "pd" ( + set tex=pdflatex +) +if "%STR_INPUT%" == "lu" ( + set tex=lualatex +) +echo PathT=PathThead+"%tex%"; >> ketcindy.ini + +set prgSm=C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe +if not exist "%prgSm%" ( + set prgSm=C:\Program Files\SumatraPDF\SumatraPDF.exe +) +echo Pathpdf="%prgSm%"; >> ketcindy.ini + +set /P STR_INPUT="Input version of R (ex)3.5.0 :" +set verR=%STR_INPUT% +set prg=C:\Program Files +if exist "%prg%\R\R-%verR%\bin\" ( + echo PathR="%prg%\R\R-%verR%\bin"; >> ketcindy.ini +) else ( + if exist "%prg% (x86)\R\R-%verR%\bin\" ( + echo "%prg% (x86)\R\R-%verR%\bin"; >> ketcindy.ini + ) else ( + echo "R-%verR% not found" + ) +) + +set /P STR_INPUT="Input version of Maxima (ex)5.39.0 :" +set verM=%STR_INPUT% +echo %verM% +set prg=C:\maxima-%verM%\bin\maxima.bat +if exist "%prg%" ( + echo PathM="%prg%"; >> ketcindy.ini +) else ( + echo "Maxima-%verM% not found" + set prg=C:\maxima-x.xx.x\bin\maxima.bat + echo // PathM="%prg%"; >> ketcindy.ini + ) +) + echo "Plugins of Cindy has been set" pause diff --git a/Master/texmf-dist/doc/support/ketcindy/forWindows/setwork.bat b/Master/texmf-dist/doc/support/ketcindy/forWindows/setwork.bat index 9ea13564669..d920e31c039 100755 --- a/Master/texmf-dist/doc/support/ketcindy/forWindows/setwork.bat +++ b/Master/texmf-dist/doc/support/ketcindy/forWindows/setwork.bat @@ -1,4 +1,4 @@ -REM 20181212 +REM 20190413 echo off REM Edit the followings if necessary. @@ -23,77 +23,25 @@ if exist "%dist%\." ( %xcp% /Y /Q /S /E /R "work\*.*" "%dist%\" echo Workfolder has been generated as %dist% echo This folder can be moved to any place -echo p=platex u=uplatex l=latex x=xelatex pd=pdflatex lu=lualatex -set /P STR_INPUT="---- Choose TeX from above with 1st(+2nd) character :" -if "%STR_INPUT%" == "p" ( - set tex=platex - copy /Y "doc\ketmanual\KeTCindyReferenceJ.pdf" "%dist%\" - copy /Y "doc\ketmanual\KeTCindyGuideJ.pdf" "%dist%\" - copy /Y "doc\ketmanual\KeTpicStyleJ.pdf" "%dist%\" -) -if "%STR_INPUT%" == "u" ( - set tex=uplatex - copy /Y "doc\ketmanual\KeTCindyReferenceJ.pdf" "%dist%\" - copy /Y "doc\ketmanual\KeTCindyGuideJ.pdf" "%dist%\" - copy /Y "doc\ketmanual\KeTpicStyleJ.pdf" "%dist%\" -) -if "%STR_INPUT%" == "l" ( - set tex=latex - copy /Y "doc\ketmanual\KeTCindyReferenceE.pdf" "%dist%\" - copy /Y "doc\ketmanual\KeTCindyGuideE.pdf" "%dist%\" - copy /Y "doc\ketmanual\KeTpicStyleE.pdf" "%dist%\" -) -if "%STR_INPUT%" == "x" ( - set tex=xelatex - copy /Y "doc\ketmanual\KeTCindyReferenceE.pdf" "%dist%\" - copy /Y "doc\ketmanual\KeTCindyGuideE.pdf" "%dist%\" - copy /Y "doc\ketmanual\KeTpicStyleE.pdf" "%dist%\" -) -if "%STR_INPUT%" == "pd" ( - set tex=pdflatex - copy /Y "doc\ketmanual\KeTCindyReferenceE.pdf" "%dist%\" - copy /Y "doc\ketmanual\KeTCindyGuideE.pdf" "%dist%\" - copy /Y "doc\ketmanual\KeTpicStyleE.pdf" "%dist%\" -) -if "%STR_INPUT%" == "lu" ( - set tex=lualatex + +set /P STR_INPUT="Language (j/e) :" +if("%STR_INPUT%" == "e" ( copy /Y "doc\ketmanual\KeTCindyReferenceE.pdf" "%dist%\" copy /Y "doc\ketmanual\KeTCindyGuideE.pdf" "%dist%\" copy /Y "doc\ketmanual\KeTpicStyleE.pdf" "%dist%\" +) else ( + copy /Y "doc\ketmanual\KeTCindyReferenceJ.pdf" "%dist%\" + copy /Y "doc\ketmanual\KeTCindyGuideJ.pdf" "%dist%\" + copy /Y "doc\ketmanual\KeTpicStyleJ.pdf" "%dist%\" ) + set dist=%HOMEPATH% -echo generating %dist%\%changesetting% -echo // Re-setting PathT,Pathpdf,PathAd > "%dist%%change%" -echo PathT=PathThead+"%tex%"; >> "%dist%%change%" -set prgSm=C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe -if not exist "%prgSm%" ( - set prgSm=C:\Program Files\SumatraPDF\SumatraPDF.exe -) -echo Pathpdf="%prgSm%"; >> "%dist%%change%" -set /P STR_INPUT="Input version of R (ex)%verR% :" -if not "%STR_INPUT:~0,1%" == "d" ( - set verR=%STR_INPUT% -) set prg=C:\Program Files -if exist "%prg%\R\R-%verR%\bin\" ( - echo PathR="%prg%\R\R-%verR%\bin"; >> "%dist%%change%" -) else ( - if exist "%prg% (x86)\R\R-%verR%\bin\" ( - echo "%prg% (x86)\R\R-%verR%\bin"; >> "%dist%%change%" - ) else ( - echo "R-%verR% not found" - ) -) -set /P STR_INPUT="Input version of Maxima (ex)%verM% :" -if not "%STR_INPUT:~0,1%" == "d" ( - set verM=%STR_INPUT% -) -echo %verM% -set prg=C:\maxima-%verM%\bin\maxima.bat -if exist "%prg%" ( - echo PathM="%prg%"; >> "%dist%%change%" -) else ( - echo "Maxima-%verM% not found" - ) -) +echo generating %dist%\%changesetting% +echo // Re-setting PathT,Pathpdf,PathAd > "%dist%%change%" +echo //PathT=PathThead+"uplatex"; >> "%dist%%change%" +echo //Pathpdf="%prg%\SumatraPDF\SumatraPDF.exe"; >> "%dist%%change%" +echo //PathR="%prg%\R\R-xxxx\bin"; >> "%dist%%change%" +echo //PathM="C:\maxima-x.xx.x\bin\maxima.bat"; >> "%dist%%change%" + pause diff --git a/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/3dlist.txt b/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/3dlist.txt index 417623d8882..340efcf9f04 100644 --- a/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/3dlist.txt +++ b/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/3dlist.txt @@ -1,83 +1,84 @@ -Ketinit3d,3d,22,81,Setwindow,Listplot,PutonCurve,Sprintf,Setangle,Addax -Start3d,3d,85,164,Setfiles,Setwindow,Slider,Sprintf,Setangle,Ptseg3data -Setangle,3d,168,239,Parapt,Xyzcoord,Defvar,Datalist3d,Projpara,textformat,Ptseg3data -Getangle,3d,243,261,getangle,divoptions,Strsplit,181111,Toupper,textformat -Angleselected,3d,265,266,IsAngle -Isangle,3d,270,270 -Changestyle3d,3d,274,293,Changestyle -Dist3d,3d,297,316 -Findangle,3d,320,337 -Cancoordpara,3d,341,349 -Zparapt,3d,353,357 -Projcoordpara,3d,361,366,Parapt,Zparapt -Parapt,3d,370,376 -Parasubpt,3d,380,386 -Parasubptlog,3d,390,395 -Mainsubpt3d,3d,399,417 -ProjCurve,3d,421,471,Measuredepth -Projpara,3d,475,544,Divoptions,Strsplit,Toupper,Projcurve,textformat,Com2nd,Setcolor,GetLinestyle,Texcom -InvparaptPp,3d,548,603,textformat,Projpara,Nearestpt,Crossprod,Dotprod,Ptend,Numptcrv,Ptcrv -Invparapt,3d,607,611,InvparaptPp -Subgraph,3d,615,632,Measuredepth,Parasubpt,Textformat -Spaceline,3d,636,728,Divoptions,Toupper,textformat,Projpara,Com2nd,Setcolor,GetLinestyle,Texcom,Subgraph -Spacecurve,3d,732,898,Divoptions,Toupper,tmpfn,textformat,Assign,Projpara,Com2nd,Setcolor,GetLinestyle,Texcom,Subgraph -Partcrv3d,3d,902,938,parapt,partcrv,Xyzcoord,Spaceline -Joincrvs3d(,3d,942,1037,Joincrvs3d,Divoptions,Norm,textformat,Joincrvs,Projpara,Com2nd,Setcolor,GetLinestyle,Texcom,Subgraph -Xyzax3data,3d,1041,1145,Divoptions,Toupper,Xyzaxparaname,textformat,Projpara,Com2nd,Setcolor,GetLinestyle,Texcom,Arrowhead,Letter,Parapt,Subgraph -Xyzax3paraname,3d,1149,1191,Xyzaxparaname,Strsplit,Dqq,Parapt,Expr -Datalist3d,3d,1195,1203 -Datalist2d,3d,1207,1215 -Embed,3d,1219,1307,Measuredepth,Divoptions,Assign,textformat,list,Projpara,Com2nd,Setcolor,GetLinestyle,Texcom,Subgraph -Rotatepoint3d,3d,1311,1397,Rotate3pt,Measuredepth -Rotatedata3d,3d,1401,1471,Divoptions,Rotatepoint3d,Flattenlist,textformat,RSform,Rotate3data,Textformat,Projpara,Com2nd,Setcolor,GetLinestyle,Texcom,Subgraph -Translatepoint3d,3d,1475,1502,Translate3pt,Measuredepth -Translatedata3d,3d,1506,1568,Divoptions,Measuredepth,Translatepoint3d,Flattenlist,RSform,Translate3data,textformat,Projpara,Com2nd,Setcolor,GetLinestyle,Texcom,Subgraph -Reflectpoint3d,3d,1572,1596,Reflect3pt,Crossprod,Dotprod -Reflectdata3d,3d,1600,1665,Divoptions,Reflectpoint3d,Flattenlist,textformat,Reflect3data,RSform,Textformat,Projpara,Com2nd,Setcolor,GetLinestyle,Texcom,Subgraph -Scalepoint3d,3d,1670,1687,Scale3pt -Scaledata3d,3d,1692,1761,Divoptions,Scalepoint3d,Flattenlist,textformat,RSform,Scale3data,Textformat,Projpara,Com2nd,Setcolor,GetLinestyle,Texcom,Subgraph -Xyzcoord,3d,1765,1771,Mainsubpt3d -PutonCurve3d,3d,1775,1791,PutonCurve,Nearestpt,Paramoncurve,PointonCurve,Xyzcoord,textformat,Defvar -Mkpointlist,3d,1795,1912,Workprocess,Finddef,Norm,Parapt,Parasubpt,Putpoint,Mainsubpt3d,Defvar -Mkseg3d,3d,1916,1958,list,Divoptions,Finddef,Spaceline -Ptseg3data,3d,1962,1996,Parapt,Textformat,Parasubpt,Mainsubpt3d,Defvar,Mkpointlist,Mkseg3d -Putonseg3d,3d,2000,2052,divoptions,Putonseg,Putpoint,Parapt,Norm,Textformat,Parasubpt,Xyzcoord,Defvar -Putpoint3d,3d,2056,2114,Toupper,Xyzcoord,Defvar,Parapt,Putpoint,Parasubpt,Fixpoint3d -Fixpoint3d,3d,2118,2135,Defvar,Parapt,textformat -Letter3d,3d,2139,2159,Parapt,Letter -Expr3d,3d,2163,2183,Parapt,Expr -Perppt,3d,2187,2243,Putperp,Crossprod,IntersectsgpL,Dotprod,Defvar,Putpoint3d,Fixpoint3d,Drawpoint3d -Perpplane,3d,2247,2288,findangle,Cancoordpara,Toupper,Putpoint3d,Defvar,Drawpoint3d -Drawpoint3d,3d,2292,2308,Divoptions,Measuredepth,Parapt,Textformat,Parasubpt -Pointdata3d,3d,2312,2321,Measuredepth,Parapt,Pointdata -Putaxes3d,3d,2325,2336,Putpoint3d -IntersectsgpL,3d,2340,2452,Divoptions,Strsplit,Toupper,Crossprod,Reflectpoint3d,Dotprod,Putpoint3d,Drawpoint3d -Bezier3d,3d,2456,2553,Measuredepth,Bezier3,Divoptions,Toupper,Bezierpt,Assign,Spacecurve,textformat,RSform,Bezier,Projpara,GetLinestyle,Com2nd,Setcolor,Subgraph -Putbezier3data,3d,2557,2595,Divoptions,Putpoint3d -Mkbezierptcrv3d,3d,2599,2619,Mkbezierptcrv3,Putbezier3data,Bezier3 -Readobj,3d,2657,2759,Divoptions,Toupper,Removespace -Concatobj,3d,2763,2833,divoptions,Toupper,dist3d -VertexEdgeFace,3d,2870,3041,Divoptions,Strsplit,Toupper,Putpoint3d,Parapt,Defvar,Changestyle3d,Spaceline,list -Phparadata,3d,3045,3147,Divoptions,list,PhHiddenData,Projpara,GetLinestyle,Com2nd,Setcolor,Changestyle3d,Drawlinetype,Toupper -Nohiddenseg,3d,3151,3280,Parapt,Dotprod,Cancoordpara,IntersectsgpL,Projcoordpara,IntersectcrvsPp,Crossprod -Nohiddensegs,3d,3284,3321,Nohiddenseg -Nohiddenbyfaces,3d,3325,3495,Datalist3d,Changestyle3d,Flattenlist,Divoptions,Strsplit,Toupper,Nohiddensegs,Spaceline -Faceremovaldata,3d,3499,3582,Divoptions,list,PhHiddenData,Projpara,GetLinestyle,Com2nd,Setcolor,Measuredepth,Changestyle3d,Drawlinetype,Toupper -Fullformfunc,3d,3586,3668,Removespace -Surffun,3d,3672,3688,Fullformfunc,Deffun -Sf3data,3d,3692,3776,Surffun,Divoptions,Toupper,textformat,Spacecurve -SfbdparadataR,3d,3780,3866,ConvertFdtoC,Divoptions,Toupper,Select,MkprecommandR,textformat,RSform,Dqq,CalcbyR,ReadOutData,Extractdata,Projpara -Addpoints,3d,3870,3885,list,RSform,textformat -CrvsfparadataR,3d,3889,3991,Changestyle,Divoptions,Toupper,RSform,Select,MkprecommandR,Addpoints,textformat,Rsform,Dqq,CalcbyR,ReadOutData,Extractdata,Projpara -Crv3onsfparadataR,3d,3995,4095,Crvs3onfparadataR,Changestyle3d,Changestyle,Divoptions,Toupper,RSform,Select,MkprecommandR,textformat,Rsform,Dqq,Addpoints,CalcbyR,ReadOutData,Extractdata,Projpara -Crv2onsfparadataR,3d,4099,4200,Crvs2onfparadataR,Changestyle,Divoptions,Toupper,RSform,Select,MkprecommandR,textformat,Rsform,Dqq,Addpoints,CalcbyR,ReadOutData,Extractdata,Projpara -WireparadataR,3d,4204,4305,Divoptions,Toupper,Select,MkprecommandR,RSform,textformat,Rsform,Dqq,Addpoints,CalcbyR,ReadOutData,Extractdata,Projpara -IntersectcrvsfR,3d,4309,4397,Divoptions,Toupper,RSform,textformat,Rsform,Dqq,Intersectcrvsf,c,for,Looprange,Appendrow,CalcbyR,ReadOutData -SfcutparadataR,3d,4401,4498,Strsplit,Changestyle,Divoptions,Toupper,RSform,Select,MkprecommandR,textformat,Rsform,Dqq,CalcbyR,ReadOutData,Extractdata,Projpara -Skeletonparadata,3d,4502,4506,Skeletondatacindy -Skeletonparadata,3d,4711,4898,Datalist3d,Skeletondatacindy,Divoptions,Strsplit,Toupper,Anyselected,Flattenlist,isexists,Textformat,ProjcoordCurve,Makeskeletondata,Norm,Ptcrv,Invparapt,textformat,Projcurve,Changestyle3d,list,Skeletonpara3data,Projpara,ReadOutData,GetLinestyle,Com2nd,Setcolor,Subgraph,WriteOutData -Makeskeletondata,3d,4902,5103,Columnlist,IntersectcrvsPp,Op,column,Dotprod,Norm,Kukannozoku,PointonCurve,Listplot -Kukannozoku,3d,5107,5158 -ProjcoordCurve,3d,5164,5178 -Divnohidhid,3d,5182,5245,Divoptions,Toupper,assign,Dotprod,Changestyle3d,Spaceline,textformat -Beziersurf,3d,5249,5304,factorial,Comb,Deffun,Op,Bterm,Defvar,Ball +Ketinit3d,3d,22,50,Setwindow,Addax +Start3d,3d,54,162,Strsplit,Toupper,Setfiles,Setwindow,Slider,Sprintf,Ptselected,Ptseg3data +Setangle,3d,166,237,Parapt,Ptselected,Xyzcoord,Defvar,Datalist3d,Projpara,textformat,Ptseg3data +Getangle,3d,241,259,getangle,divoptions,Strsplit,181111,Toupper,textformat +Angleselected,3d,263,264,IsAngle +Isangle,3d,268,268,Ptselected +Changestyle3d,3d,272,291,Changestyle +Dist3d,3d,295,314 +Findangle,3d,318,335 +Cancoordpara,3d,339,347 +Zparapt,3d,351,355 +Projcoordpara,3d,359,364,Parapt,Zparapt +Parapt,3d,368,374 +Parasubpt,3d,378,384 +Parasubptlog,3d,388,393 +Mainsubpt3d,3d,397,415 +Projcurve,3d,419,469,Measuredepth +Projpara,3d,473,542,Divoptions,Strsplit,Toupper,Projcurve,textformat,Com2nd,Getlinestyle,Texcom +Invparaptpp,3d,546,601,textformat,Projpara,Nearestpt,Crossprod,Dotprod,Ptend,Numptcrv,Ptcrv +Invparapt,3d,605,609,Invparaptpp +Subgraph,3d,613,630,Measuredepth,Parasubpt,Textformat +Spaceline,3d,634,727,Divoptions,Toupper,Projpara,Textformat,Com2nd,Getlinestyle,Texcom,Subgraph +Spacecurve,3d,731,897,Divoptions,Toupper,tmpfn,Projpara,textformat,Com2nd,Getlinestyle,Texcom,Subgraph +Partcrv3d,3d,901,937,parapt,partcrv,Xyzcoord,Spaceline +Joincrvs3d(,3d,941,1036,Joincrvs3d,Divoptions,Norm,Projpara,textformat,Com2nd,Getlinestyle,Texcom,Subgraph +Xyzax3data,3d,1040,1166,Divoptions,Strsplit,Toupper,Spaceline,Xyzaxparaname,Projpara,textformat,Com2nd,Getlinestyle,Texcom,Lightarrowdata,Letter,Parapt,Subgraph +Xyzaxparaname,3d,1170,1212,Strsplit,Dqq,Parapt,Expr +Datalist3d,3d,1216,1224 +Datalist2d,3d,1228,1236 +Embed,3d,1240,1328,Measuredepth,Divoptions,Assign,Projpara,textformat,Com2nd,Getlinestyle,Texcom,Subgraph +Rotatepoint3d,3d,1332,1418,Rotate3pt,Measuredepth +Rotatedata3d,3d,1422,1492,Divoptions,Rotatepoint3d,Flattenlist,Projpara,textformat,RSform,Textformat,Com2nd,Getlinestyle,Texcom,Subgraph +Translatepoint3d,3d,1496,1523,Translate3pt,Measuredepth +Translatedata3d,3d,1527,1589,Divoptions,Measuredepth,Translatepoint3d,Flattenlist,Projpara,RSform,textformat,Com2nd,Getlinestyle,Texcom,Subgraph +Reflectpoint3d,3d,1593,1617,Reflect3pt,Crossprod,Dotprod +Reflectdata3d,3d,1621,1686,Divoptions,Reflectpoint3d,Flattenlist,textformat,Projpara,RSform,Textformat,Com2nd,Getlinestyle,Texcom,Subgraph +Scalepoint3d,3d,1691,1708,Scale3pt +Scaledata3d,3d,1713,1782,Divoptions,Scalepoint3d,Flattenlist,textformat,Projpara,RSform,Textformat,Com2nd,Getlinestyle,Texcom,Subgraph +Xyzcoord,3d,1786,1792,Mainsubpt3d +Putoncurve3d,3d,1796,1812,PutonCurve,Nearestpt,Paramoncurve,Pointoncurve,Xyzcoord,textformat,Defvar +Mkpointlist,3d,1816,1933,Workprocess,Finddef,Norm,Parapt,Parasubpt,Putpoint,Mainsubpt3d,Defvar,Ptselected +Mkseg3d,3d,1937,1981,Divoptions,Finddef,Spaceline +Ptseg3data,3d,1985,2020,Ptselected,Parapt,Parasubpt,Mainsubpt3d,Defvar,Mkpointlist,Mkseg3d +Putonseg3d,3d,2024,2076,divoptions,Putonseg,Putpoint,Parapt,Textformat,Parasubpt,Xyzcoord,Defvar +Putpoint3d,3d,2080,2138,Toupper,Xyzcoord,Defvar,Parapt,Putpoint,Parasubpt,Fixpoint3d +Fixpoint3d,3d,2142,2159,Defvar,Parapt,textformat +Letter3d,3d,2163,2183,Parapt,Letter +Expr3d,3d,2187,2207,Parapt,Expr +Perppt,3d,2211,2267,Putperp,Crossprod,IntersectsgpL,Dotprod,Defvar,Putpoint3d,Fixpoint3d,Drawpoint3d +Perpplane,3d,2271,2312,findangle,Cancoordpara,Toupper,Putpoint3d,Defvar,Drawpoint3d +Drawpoint3d,3d,2316,2332,Divoptions,Measuredepth,Parapt,Textformat,Parasubpt +Pointdata3d,3d,2336,2345,Measuredepth,Parapt,Pointdata +Putaxes3d,3d,2349,2360,Putpoint3d +IntersectsgpL,3d,2364,2481,Divoptions,Strsplit,Toupper,Crossprod,Reflectpoint3d,Dotprod,Putpoint3d,Drawpoint3d,Textformat +Bezier3d,3d,2485,2582,Measuredepth,Bezier3,Divoptions,Toupper,Assign,Spacecurve,Projpara,textformat,RSform,Getlinestyle,Com2nd,Subgraph +Putbezier3data,3d,2586,2624,Divoptions,Putpoint3d +Mkbezierptcrv3d,3d,2628,2648,Mkbezierptcrv3,Putbezier3data,Bezier3 +Readobj,3d,2686,2788,Divoptions,Toupper,Removespace +Concatobj,3d,2792,2862,divoptions,Toupper,dist3d +VertexEdgeFace,3d,2899,2862 +Vertexedgeface,3d,2904,3085,Divoptions,Strsplit,Toupper,Parapt,Putpoint3d,Defvar,Dqq,Changestyle3d,Spaceline,Textformat +Phparadata,3d,3089,3191,Divoptions,Getlinestyle,Com2nd,Changestyle3d,Drawlinetype,Toupper +Nohiddenseg,3d,3195,3324,Parapt,Dotprod,Cancoordpara,IntersectsgpL,Projcoordpara,Intersectcrvspp,Crossprod +Nohiddensegs,3d,3328,3363,Nohiddenseg +Nohiddenbyfaces,3d,3367,3516,Datalist3d,Divoptions,Strsplit,Toupper,Changestyle3d,MeasureDepth,Nohiddensegs,Spaceline +Faceremovaldata,3d,3520,3603,Divoptions,Getlinestyle,Com2nd,Measuredepth,Changestyle3d,Drawlinetype,Toupper +Fullformfunc,3d,3607,3689,Removespace +Surffun,3d,3693,3709,Fullformfunc,Deffun +Sf3data,3d,3713,3797,Surffun,Divoptions,Toupper,textformat,Spacecurve +SfbdparadataR,3d,3801,3887,ConvertFdtoC,Divoptions,Toupper,Select,MkprecommandR,textformat,RSform,Dqq,CalcbyR,ReadOutData,Extractdata,Projpara +Addpoints,3d,3891,3906,RSform,textformat +CrvsfparadataR,3d,3910,4012,Changestyle,Divoptions,Toupper,RSform,Select,MkprecommandR,Addpoints,textformat,Rsform,Dqq,CalcbyR,ReadOutData,Extractdata,Projpara +Crv3onsfparadataR,3d,4016,4116,Crvs3onfparadataR,Changestyle3d,Changestyle,Divoptions,Toupper,RSform,Select,MkprecommandR,textformat,Rsform,Dqq,Addpoints,CalcbyR,ReadOutData,Extractdata,Projpara +Crv2onsfparadataR,3d,4120,4221,Crvs2onfparadataR,Changestyle,Divoptions,Toupper,RSform,Select,MkprecommandR,textformat,Rsform,Dqq,Addpoints,CalcbyR,ReadOutData,Extractdata,Projpara +WireparadataR,3d,4225,4326,Divoptions,Toupper,Select,MkprecommandR,RSform,textformat,Rsform,Dqq,Addpoints,CalcbyR,ReadOutData,Extractdata,Projpara +IntersectcrvsfR,3d,4330,4418,Intersectcrvsf,Divoptions,Toupper,RSform,textformat,Rsform,Dqq,CalcbyR,ReadOutData +SfcutparadataR,3d,4422,4519,Strsplit,Changestyle,Divoptions,Toupper,RSform,Select,MkprecommandR,textformat,Rsform,Dqq,CalcbyR,ReadOutData,Extractdata,Projpara +Skeletonparadata,3d,4525,4529,Skeletondatacindy +Skeletondatacindy,3d,4533,4722,Datalist3d,Divoptions,Strsplit,Toupper,Anyselected,Flattenlist,isexists,ReadOutData,Textformat,Projcoordcurve,Makeskeletondata,Norm,Ptcrv,Invparapt,Projcurve,textformat,Changestyle3d,Getlinestyle,Com2nd,Subgraph,WriteOutData +Makeskeletondata,3d,4726,4928,Columnlist,Intersectcrvspp,Op,column,Dotprod,Norm,Kukannozoku,Pointoncurve,Listplot +Kukannozoku,3d,4932,4983 +Projcoordcurve,3d,4989,5003 +Divnohidhid,3d,5007,5070,Divoptions,Toupper,assign,Dotprod,Changestyle3d,Spaceline,textformat +Beziersurf,3d,5074,5129,factorial,Deffun,Op,Bterm,Defvar diff --git a/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/basic1list.txt b/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/basic1list.txt index efbab6fcf3a..20063af4614 100644 --- a/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/basic1list.txt +++ b/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/basic1list.txt @@ -1,164 +1,149 @@ -Ketinit,basic1,41,170,Fillstore,Cindyname,Indexall,getname,iswindows,ismacosx,Changesetting,Changework,pathsep,Setwindow -Fillstore,basic1,174,204 -Fillblack,basic1,208,222,Fillstore -Fillrestore,basic1,226,238 -Readlines,basic1,242,253,readfile2str -Changesetting,basic1,257,272,pathsep,getname,isexists -Cindyname,basic1,276,283,Cdyname,Getcdyname -Setwindow,basic1,287,324,Toupper,Lcrd,Pcrd,Putpoint -Setfiles,basic1,328,341,Dqq -Setparent,basic1,345,357,Dqq -Dqq,basic1,361,361,DqDq -DqDq,basic1,364,367 -PPa,basic1,371,372 -PaO,basic1,376,388 -PaC,basic1,392,404 -PPa,basic1,408,408 -Tab2list,basic1,412,474,Divoptions,Toupper,Indexall -Columnlist,basic1,478,481 -Dispmat,basic1,485,507 -Sep1000,basic1,511,529 -Acos,basic1,533,536 -Asin,basic1,540,543 -Atan,basic1,547,550 -Sqr,basic1,554,557 -Factorial,basic1,561,569 -Norm,basic1,573,585 -Removespace,basic1,590,615 -Indexall,basic1,619,637 -Strsplit,basic1,641,652,Indexall -Parlevel,basic1,656,656,Bracket -Bracket,basic1,659,681,Indexall -Pardiagram,basic1,685,781,Divoptions,Toupper,Bracket,Listplot,Letter,Expr -Changework,basic1,785,843,Divoptions,Strsplit,Toupper,Indexall,isexists,Dqq,makedir,pathsep,iswindows,iskcexists,setexec -Changestyle,basic1,847,879,Divoptions,Com2nd,Setcolor,GetLinestyle,Texcom -Op,basic1,883,895 -Ptselected,basic1,899,913,Isptselected -Finddef,basic1,917,936 -Findgeoinfo,basic1,940,965,Finddef -Dependgeo,basic1,969,989,Finddef -Workprocess,basic1,993,997,Drawprocess -Drawprocess,basic1,1000,1045,Divoptions,Strsplit,Toupper,Dependgeo -Sortpointlist,basic1,1049,1081 -Toupper,basic1,1085,1100 -Textformat,basic1,1104,1128 -Sprintf,basic1,1132,1149,Textformat -Assign,basic1,1153,1210,Textformat -Measuredepth,basic1,1214,1239 -Flattenlist,basic1,1243,1263,Measuredepth -Divoptions,basic1,1267,1370,Strsplit,Toupper,Colorcmyk2rgb,Colorname2rgb -Dotprod,basic1,1374,1380 -Crossprod,basic1,1384,1396 -Mvprod,basic1,1400,1418,Measuredepth -Ptstart,basic1,1422,1427 -Ptend,basic1,1431,1436 -Numptcrv,basic1,1440,1445 -Ptcrv,basic1,1449,1454 -Invert,basic1,1458,1471,Listplot -Paramoncrv,basic1,1475,1475,Paramoncurve -Paramoncurve,basic1,1478,1504,Nearestpt,LLcrd -Pointoncrv,basic1,1508,1508,Pointoncurve -Pointoncurve,basic1,1511,1529 -Koutenseg,basic1,1533,1641 -IntersectcrvsPp,basic1,1647,1790,Divoptions,Measuredepth,LLcrd,Koutenseg -Intersectcrvs,basic1,1794,1800,IntersectcrvsPp -Intersectline,basic1,1808,1830,Dotprod,Crossprod -Intersectseg,basic1,1834,1934,Op,Intersectline,Nearestpt -Osplineseg,basic1,1938,1955,Dotprod,Bezier -Intersectpartseg,basic1,1959,2061,Crossprod,Norm,Reflectpoint,Osplineseg,Intersectseg,Op,Intersectline -Collectsameseg,basic1,2065,2107 -IntersectcurvesPp,basic1,2111,2217,LLcrd,Intersectpartseg,Collectsameseg,Nearestpt -Intersectcurves,basic1,2221,2228,IntersectcurvesPp -NearestptcrvPhy,basic1,2234,2243,Pcrd,Measuredepth,Nearestpt -Nearestptcrv,basic1,2247,2253,Nearestpt -Nearestpt,basic1,2257,2310,Measuredepth,Paramoncurve -Derivative,basic1,2314,2405,Strsplit,Lineplot,IntersectcurvesPp,Pointoncurve,Dotprod,Divoptions,Toupper,PaO,Pcrd,Assign -Tangentplot,basic1,2409,2456,Divoptions,Strsplit,Toupper,IntersectcurvesPp,Derivative,Lineplot -Integrate,basic1,2460,2473,Integratefn,Integratedt -Integratedt,basic1,2477,2509,Divoptions,Toupper,IntegrateO,Measuredepth,MeetCurve,LLcrd -Integratefn,basic1,2513,2573,Divoptions,Toupper,Strsplit,Assign,IntegrateO,Textformat -IntegrateO,basic1,2577,2656,Measuredepth,MeetCurve,LLcrd,Dotprod -FindareaP,basic1,2660,2673,Lcrd -FindareaO,basic1,2677,2698,Dist,IntegrateO -Findarea,basic1,2702,2728,Divoptions,Strsplit,Toupper,FindareaO,FindareaP -Findlength,basic1,2732,2744,Lcrd -Inversefun,basic1,2748,2771,Textformat -Com0th,basic1,2775,2779 -Com1st,basic1,2783,2788 -Com2nd,basic1,2792,2797 -Com2ndpre,basic1,2801,2805 -Texcom,basic1,2809,2816,Com2nd -Ketcindylogo,basic1,2820,2824,Com2nd,Texcom -Drwline,basic1,2828,2831,Textformat,Com2nd -Dashline,basic1,2836,2838,Com2nd -Invdashline,basic1,2842,2844,Com2nd -Dottedline,basic1,2848,2850,Com2nd -SetEnglish,basic1,2854,2857,Com0th,setlanguage -Drawlinetype,basic1,2861,2882,Toupper,Drwline,Dashline,Invdashline,Dottedline -Setunitlen,basic1,2886,2938 -Setmarklen,basic1,2942,2946,Com2nd,Textformat -Setorigin,basic1,2950,2954,Com2nd,Textformat -Fontsize,basic1,2958,2961,Com2nd -Setpen,basic1,2965,2969,Com2nd -Setscaling,basic1,2973,2987,Com0th,Setwindow -Lcrd,basic1,2991,2999 -Pcrd,basic1,3003,3011 -LLcrd,basic1,3015,3024 -Doscaling,basic1,3028,3055,Lcrd,LLcrd -Unscaling,basic1,3059,3086,Lcrd,LLcrd -Setpt,basic1,3090,3096,Ptsize,Com2nd -Definecolor,basic1,3100,3108,Texcom -Setcolor,basic1,3112,3139,Texcom,Colorcmyk2rgb,Com2nd -Colorrgb2cmyk,basic1,3143,3155 -Colorcmyk2rgb,basic1,3159,3166 -Colorrgbhsv,basic1,3170,3202 -Colorhsvrgb,basic1,3206,3220 -Colorrgbhsl,basic1,3224,3260 -Colorhslrgb,basic1,3264,3285,Hue2rgb -Hue2rgb,basic1,3289,3307 -Colorrgbhwb,basic1,3311,3317,Colorrgbhsl,Colorcode -Colorhwbrgb,basic1,3321,3346 -Colorcode,basic1,3350,3363,Colorrgb2cmyk,Colorcmyk2rgb,Colorrgbhsv,Colorrgbhsl,Colorrgbhwb,Colorhsvrgb,Colorhslrgb,Colorhwbrgb -Colorname2rgb,basic1,3367,3415,Colorcmyk2rgb -GetLinestyle,basic1,3419,3485,Drwline,Dashline,Invdashline,Dottedline,Textformat,Drwpt -Chunderscore,basic1,3489,3524,PaO -AddGraph,basic1,3528,3628,Divoptions,Flattenlist,Pcrd,Measuredepth,PaO,Listplot,Pointdata,Textformat,Com2nd,Setcolor,GetLinestyle,Texcom -Joincrvs,basic1,3632,3728,LLcrd,Divoptions,Numptcrv,Ptstart,Ptend,Pcrd,Textformat,Com2nd,Setcolor,GetLinestyle,Texcom -Partcrv,basic1,3732,3821,Measuredepth,Divoptions,Numptcrv,Ptstart,Ptend,Joincrvs,Nearestpt,LLcrd,Pcrd,Textformat,Lcrd,Com2nd,Setcolor,GetLinestyle,Texcom -Opcrvs,basic1,3825,3833,Listplot -Pointdata,basic1,3837,3963,Divoptions,Strsplit,Colorcmyk2rgb,Colorname2rgb,Toupper,Measuredepth,Pcrd,Setcolor,PaO,Texcom,Setpen,Textformat,Com2nd,Setpt -Listplot,basic1,3967,4048,Divoptions,Strsplit,Toupper,Pcrd,Textformat,Com2nd,Setcolor,GetLinestyle,Texcom,Lcrd -Lineplot,basic1,4052,4135,Strsplit,Toupper,Divoptions,Lcrd,Pcrd,Textformat,Com2nd,Setcolor,GetLinestyle,Texcom -Plotdata,basic1,4139,4340,Divoptions,Strsplit,PaO,Dqq,Toupper,Assign,Norm,Measuredepth,Pcrd,Textformat,Com2nd,Setcolor,GetLinestyle,Texcom -Paramplot,basic1,4344,4515,Divoptions,Strsplit,PaO,Dqq,Toupper, differs from Scilab ,Assign,Measuredepth,Pcrd,Textformat,Com2nd,Setcolor,GetLinestyle,Texcom -Polarplot,basic1,4519,4528,Strsplit,Paramplot -Connectseg,basic1,4532,4594,Norm -Implicitplot,basic1,4598,4735,Divoptions,Strsplit,Toupper,Impfun,Connectseg,Measuredepth,Pcrd,Textformat,Com2nd,Setcolor,GetLinestyle,Texcom -Circledata,basic1,4739,4855,Divoptions,Strsplit,Toupper,Lcrd,Defvar,Pcrd,Textformat,Lineplot,Com2nd,Setcolor,GetLinestyle,Texcom -Framedata,basic1,4859,4984,Measuredepth,LLcrd,Toupper,Framedata2,Lcrd,Divoptions,Pcrd,Textformat,Com2nd,Setcolor,GetLinestyle,Texcom -Framedata2,basic1,4988,4995,Lcrd,Framedata -Ovaldata,basic1,4999,5069,Divoptions,Lcrd,Listplot,Circledata,Reflectdata,Joincrvs,Com2nd,Setcolor,GetLinestyle,Texcom,Pcrd,Textformat -Segmark,basic1,5073,5133,Drawsegmark,Divoptions,Toupper,Circledata,Listplot -Parabolaplot,basic1,5137,5177,Lcrd,Rotatepoint,Textformat,Plotdata,Rotatedata -Ellipseplot,basic1,5181,5224,Lcrd,Rotatepoint,Paramplot,Rotatedata -Hyperbolaplot,basic1,5228,5292,Divoptions,Toupper,Lcrd,Rotatepoint,Paramplot,Lineplot,Rotatedata -Polygonplot,basic1,5296,5342,Divoptions,Strsplit,Toupper,Lcrd,Putpoint,Listplot -Putintersect,basic1,5346,5374,Intersectcrvs,Putpoint -Setarrow,basic1,5378,5404 -Arrowheaddata,basic1,5409,5502,Divoptions,Strsplit,Toupper,Touppera,Measuredepth,Nearestpt,|Ptend,Ptstart,Numptcrv,Ptcrv,LLcrd,IntersectcrvsPp,Pcrd -Arrowhead,basic1,5506,5598,Strsplit,Toupper,Measuredepth,Pcrd,Arrowheaddata,Inwindow,Listplot,Divoptions,Dqq,Textformat,LLcrd,Setcolor,Com2nd,Texcom -Arrowdata,basic1,5602,5705,Divoptions,Strsplit,Toupper,Pcrd,Textformat,Listplot,LLcrd,Arrowhead,Lcrd -Anglemark,basic1,5709,5823,Divoptions,Strsplit,Letter,Expr,Toupper,Lcrd,Defvar,Pcrd,Textformat,Com2nd,Setcolor,GetLinestyle,Texcom -Paramark,basic1,5827,5913,Divoptions,Letter,Expr,Lcrd,Defvar,Pcrd,Textformat,Com2nd,Setcolor,GetLinestyle,Texcom -MakeBowdata,basic1,5917,5930,Lcrd,Rotatepoint -Bowdata,basic1,5934,6106,Divoptions,Lcrd,Strsplit,Letterrot,Letter,Exprrot,Expr,Toupper,MakeBowdata,Defvar,Norm,LLcrd,Measuredepth,Pcrd,Textformat,Com2nd,Setcolor,GetLinestyle,Texcom -Bowname,basic1,6110,6113,Expr -Bownamerot,basic1,6117,6131,Measuredepth,Ptend,Ptstart,Exprrot -Deqdata,basic1,6135,6193,funP,Lcrd,funN -Deqplot,basic1,6197,6341,Lcrd,Divoptions,Toupper,Indexall,Deqdata,Pcrd,Assign,Textformat,RSform,Com2nd,Setcolor,GetLinestyle,Texcom -Enclosing,basic1,6509,6675,Divoptions,isList,Lcrd,Listplot,IntersectcurvesPp,Prepend,Op,Length,Partcrv,Pointoncurve,Pcrd,Enclosing2,PaO,Textformat,Com2nd,Setcolor,GetLinestyle,Texcom,LLcrd -Makehatch,basic1,6683,6785,Lineplot,Intersectseg,Norm,Listplot -Anyselected,basic1,6789,6797 -Hatchdata,basic1,6801,7097,HatchdataR,Hatchdatacindy,Listplot,Joincrvs,Enclosing2,Divoptions,Strsplit,Toupper,Anyselected,Bracket,isexists,Makehatch,Textformat,PaO,ReadOutData,Com2nd,Setcolor,GetLinestyle,Texcom,WriteOutData,LLcrd -Shadein,basic1,7101,7188,Framedata,Partcrv,Paramoncrv,Listplot,IntersectcurvesPp,Pointoncrv,Joincrvs,Inwindow -Shade,basic1,7192,7320,Divoptions,Strsplit,Toupper,Colorcmyk2rgb,Enclosing,Shadein,Joincrvs,Pcrd,PaO,Listplot,Textformat,Texcom,Dqq,Setcolor +Ketinit,basic1,41,172,Fillstore,Cindyname,Indexall,getname,iswindows,ismacosx,Changesetting,Changework,pathsep,Setwindow +Initglist,basic1,176,187 +Setglist,basic1,191,197 +Addglist,basic1,201,207 +Fillstore,basic1,211,244 +Fillblack,basic1,248,262,Fillstore +Fillrestore,basic1,266,278 +Readlines,basic1,282,293,readfile2str +Changesetting,basic1,297,312,pathsep,getname,isexists +Cindyname,basic1,316,323,Cdyname,Getcdyname +Setwindow,basic1,327,364,Toupper,Lcrd,Pcrd,Putpoint +Setfiles,basic1,368,381,Dqq +Setparent,basic1,385,397,Dqq +Dqq,basic1,401,401,DqDq +DqDq,basic1,404,407 +PPa,basic1,411,412 +PaO,basic1,416,428 +PaC,basic1,432,444 +PPa,basic1,448,448 +Tab2list,basic1,452,514,Divoptions,Toupper,Indexall +Columnlist,basic1,518,521 +Dispmat,basic1,525,547 +Sep1000,basic1,551,569 +Acos,basic1,573,576 +Asin,basic1,580,583 +Atan,basic1,587,590 +Sqr,basic1,594,597 +Factorial,basic1,601,609 +Norm,basic1,613,625 +Removespace,basic1,630,655 +Indexall,basic1,659,677 +Strsplit,basic1,681,692,Indexall +Parlevel,basic1,696,696,Bracket +Bracket,basic1,699,721,Indexall +Pardiagram,basic1,725,821,Divoptions,Toupper,Bracket,Listplot,Letter,Expr +Changework,basic1,825,883,Divoptions,Strsplit,Toupper,Indexall,isexists,Dqq,makedir,pathsep,iswindows,iskcexists,setexec +Changestyle,basic1,887,919,Divoptions,Com2nd,Getlinestyle,Texcom +Op,basic1,923,935 +Ptselected,basic1,939,955,Isptselected +Finddef,basic1,959,978 +Findgeoinfo,basic1,982,1007,Finddef +Dependgeo,basic1,1011,1031,Finddef +Workprocess,basic1,1035,1039,Drawprocess +Drawprocess,basic1,1042,1087,Divoptions,Strsplit,Toupper,Dependgeo +Sortpointlist,basic1,1091,1123 +Toupper,basic1,1127,1142 +Textformat,basic1,1146,1170 +Sprintf,basic1,1174,1191,Textformat +Replaceall,basic1,1195,1205 +Assign,basic1,1209,1266,Textformat +Measuredepth,basic1,1297,1310,Indexall +Flattenlist,basic1,1314,1334,Measuredepth +Divoptions,basic1,1338,1441,Strsplit,Toupper,Colorcmyk2rgb,Colorname2rgb +Dotprod,basic1,1445,1451 +Crossprod,basic1,1455,1467 +Mvprod,basic1,1471,1489,Measuredepth +Ptstart,basic1,1493,1498 +Ptend,basic1,1502,1507 +Numptcrv,basic1,1511,1516 +Ptcrv,basic1,1520,1525 +Invert,basic1,1529,1542,Listplot +Paramoncrv,basic1,1546,1546,Paramoncurve +Paramoncurve,basic1,1549,1575,Nearestpt,LLcrd +Pointoncrv,basic1,1579,1579,Pointoncurve +Pointoncurve,basic1,1582,1600 +Koutenseg,basic1,1604,1712 +Intersectcrvspp,basic1,1718,1861,Divoptions,Measuredepth,LLcrd,Koutenseg +Intersectcrvs,basic1,1865,1871,Intersectcrvspp +Intersectline,basic1,1879,1901,Dotprod,Crossprod +Intersectseg,basic1,1905,2005,Op,Intersectline,Nearestpt +Osplineseg,basic1,2009,2026,Dotprod,Bezier +Intersectpartseg,basic1,2030,2132,Crossprod,Norm,Reflectpoint,Osplineseg,Intersectseg,Op,Intersectline +Collectsameseg,basic1,2136,2178 +Intersectcurvespp,basic1,2182,2288,LLcrd,Intersectpartseg,Collectsameseg,Nearestpt +Intersectcurves,basic1,2292,2299,Intersectcurvesop +Nearestptcrvphy,basic1,2305,2314,Pcrd,Measuredepth,Nearestpt +Nearestptcrv,basic1,2318,2324,Nearestpt +Nearestpt,basic1,2328,2381,Measuredepth,Paramoncurve +Derivative,basic1,2385,2476,Strsplit,Lineplot,Intersectcurvespp,Pointoncurve,Dotprod,Divoptions,Toupper,PaO,Pcrd,Assign +Tangentplot,basic1,2480,2527,Divoptions,Strsplit,Toupper,Intersectcurvespp,Derivative,Lineplot +Integrate,basic1,2531,2544,Integratefn,Integratedt +Integratedt,basic1,2548,2580,Divoptions,Toupper,IntegrateO,Measuredepth,MeetCurve,LLcrd +Integratefn,basic1,2584,2644,Divoptions,Toupper,Strsplit,Assign,IntegrateO,Textformat +IntegrateO,basic1,2648,2727,Measuredepth,Meetcurve,LLcrd,Dotprod +FindareaP,basic1,2731,2744,Lcrd +FindareaO,basic1,2748,2769,Dist,IntegrateO +Findarea,basic1,2773,2799,Divoptions,Strsplit,Toupper,FindareaO,FindareaP +Findlength,basic1,2803,2815,Lcrd +Inversefun,basic1,2819,2842,Textformat +Com0th,basic1,2846,2850 +Com1st,basic1,2854,2859 +Com2nd,basic1,2863,2868 +Com2ndpre,basic1,2872,2876 +Texcom,basic1,2880,2887,Com2nd +Ketcindylogo,basic1,2891,2895,Com2nd +Drwline,basic1,2899,2902,Textformat,Com2nd +Dashline,basic1,2907,2909,Com2nd +Invdashline,basic1,2913,2915,Com2nd +Dottedline,basic1,2919,2921,Com2nd +Drawlinetype,basic1,2925,2946,Toupper,Drwline,Dashline,Invdashline,Dottedline +Setunitlen,basic1,2950,3002 +Setmarklen,basic1,3006,3010,Com2nd,Textformat +Setorigin,basic1,3014,3018,Com2nd,Textformat +Fontsize,basic1,3022,3025,Com2nd +Setpen,basic1,3029,3033,Com2nd +Setscaling,basic1,3037,3051,Com0th,Setwindow +Lcrd,basic1,3055,3063 +Pcrd,basic1,3067,3075 +LLcrd,basic1,3079,3088 +Doscaling,basic1,3092,3119,Lcrd,LLcrd +Unscaling,basic1,3123,3150,Lcrd,LLcrd +Setpt,basic1,3154,3160,Ptsize,Com2nd +Definecolor,basic1,3164,3172,Texcom +Setcolor,basic1,3176,3203,Colorcmyk2rgb,Com2nd +Colorrgb2cmyk,basic1,3207,3219 +Colorcmyk2rgb,basic1,3223,3230 +Colorrgbhsv,basic1,3234,3266 +Colorhsvrgb,basic1,3270,3284 +Colorrgbhsl,basic1,3288,3324 +Colorhslrgb,basic1,3328,3349,Hue2rgb +Hue2rgb,basic1,3353,3371 +Colorrgbhwb,basic1,3375,3381,Colorrgbhsl,Colorcode +Colorhwbrgb,basic1,3385,3410 +Colorcode,basic1,3414,3427,Colorrgb2cmyk,Colorcmyk2rgb,Colorrgbhsv,Colorrgbhsl,Colorrgbhwb,Colorhsvrgb,Colorhslrgb,Colorhwbrgb +Colorname2rgb,basic1,3431,3481,Colorcmyk2rgb,Assign +Getlinestyle,basic1,3485,3551,Drwline,Dashline,Invdashline,Dottedline,Textformat,Drwpt +Chunderscore,basic1,3555,3590,PaO +AddGraph,basic1,3594,3694,Divoptions,Flattenlist,Pcrd,Measuredepth,PaO,Textformat,Com2nd,Getlinestyle,Texcom +Joincrvs,basic1,3698,3794,LLcrd,Divoptions,Numptcrv,Ptstart,Ptend,Pcrd,Textformat,Com2nd,Getlinestyle,Texcom +Partcrv,basic1,3798,3887,Measuredepth,Divoptions,Numptcrv,Ptstart,Ptend,Joincrvs,Nearestpt,LLcrd,Pcrd,Textformat,Lcrd,Com2nd,Getlinestyle,Texcom +Opcrvs,basic1,3891,3899,Listplot +Pointdata,basic1,3903,4026,Strsplit,Divoptions,Toupper,Lcrd,Measuredepth,Pcrd,PaO,Texcom,Textformat,Com2nd +Listplot,basic1,4030,4111,Divoptions,Strsplit,Toupper,Pcrd,Textformat,Com2nd,Getlinestyle,Texcom,Lcrd +Lineplot,basic1,4115,4198,Strsplit,Toupper,Divoptions,Lcrd,Pcrd,Textformat,Com2nd,Getlinestyle,Texcom +Plotdata,basic1,4202,4407,Divoptions,Strsplit,PaO,Dqq,Toupper,Assign,Norm,Measuredepth,Pcrd,Textformat,Com2nd,Getlinestyle,Texcom +Paramplot,basic1,4411,4583,Divoptions,Strsplit,PaO,Dqq,Toupper, differs from Scilab ,Assign,Measuredepth,Pcrd,Textformat,Com2nd,Getlinestyle,Texcom +Polarplot,basic1,4587,4596,Strsplit,Paramplot +Connectseg,basic1,4600,4662,Norm +Implicitplot,basic1,4666,4849,Divoptions,Strsplit,Toupper,Impfun,Connectseg,Measuredepth,Pcrd,Textformat,Com2nd,Getlinestyle,Texcom +Circledata,basic1,4853,4972,Divoptions,Strsplit,Toupper,Lcrd,Defvar,Lineplot,Pcrd,Textformat,Com2nd,Getlinestyle,Texcom +Framedata,basic1,4976,5028,Measuredepth,LLcrd,Divoptions,Lcrd,Listplot +Framedata2,basic1,5032,5039,Lcrd,Framedata +Ovaldata,basic1,5043,5113,Divoptions,Lcrd,Listplot,Circledata,Reflectdata,Joincrvs,Com2nd,Getlinestyle,Texcom,Pcrd,Textformat +Segmark,basic1,5117,5177,Drawsegmark,Divoptions,Toupper,Circledata,Listplot +Parabolaplot,basic1,5181,5221,Lcrd,Rotatepoint,Textformat,Plotdata,Rotatedata +Ellipseplot,basic1,5225,5268,Lcrd,Rotatepoint,Paramplot,Rotatedata +Hyperbolaplot,basic1,5272,5336,Divoptions,Toupper,Lcrd,Rotatepoint,Paramplot,Lineplot,Rotatedata +Polygonplot,basic1,5340,5386,Divoptions,Strsplit,Toupper,Lcrd,Putpoint,Listplot +Putintersect,basic1,5390,5418,Intersectcrvs,Putpoint diff --git a/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/basic2list.txt b/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/basic2list.txt index 8a676d6c07f..32e67feb5c2 100644 --- a/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/basic2list.txt +++ b/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/basic2list.txt @@ -1,119 +1,97 @@ -Dispchoice,basic2,22,27 -Datetime,basic2,31,42,getdatetime -Rotatepoint,basic2,46,56,Lcrd -Translatepoint,basic2,60,70,Lcrd -Scalepoint,basic2,74,84,Lcrd -Reflectpoint,basic2,88,113,Lcrd -Rotatedata,basic2,117,190,Divoptions,Lcrd,Measuredepth,LLcrd,Pcrd,Textformat,RSform,Com2nd,Setcolor,GetLinestyle,Texcom -Translatedata,basic2,194,259,Divoptions,Lcrd,Measuredepth,LLcrd,Pcrd,RSform,Textformat,Com2nd,Setcolor,GetLinestyle,Texcom -Scaledata,basic2,263,352,Divoptions,Lcrd,Measuredepth,LLcrd,Pcrd,Textformat,RSform,Com2nd,Setcolor,GetLinestyle,Texcom -Reflectdata,basic2,356,437,Divoptions,Lcrd,Measuredepth,LLcrd,Pcrd,RSform,Textformat,Com2nd,Setcolor,GetLinestyle,Texcom -Mksegments,basic2,442,457,Listplot -Mkcircles,basic2,462,482,Strsplit,Circledata -MakeRarg,basic2,486,499,RSslash,Textformat -Htickmark,basic2,503,526,Listplot,Expr -Vtickmark,basic2,530,551,Listplot,Expr,180710to// tmp=MakeRarg -Vtick,basic2,555,565,Listplot -Htick,basic2,569,581,LLcrd,Listplot -Setax,basic2,585,602 -Drwxy,basic2,606,699,Divoptions,Strsplit,Toupper,Arrowdata,Listplot,Expr,Letter,Addax -Drwpt,basic2,703,712,Pointdata -Drawpoint,basic2,715,743,Measuredepth,Textformat,Com2nd,Drwpt,Setpen -Addax,basic2,747,750 -Expr,basic2,754,768,Letter -Letter,basic2,772,867,Divoptions,Removespace,Strsplit,Toupper,RSslash,Setcolor,Com2nd,Lcrd,Texcom,Pcrd -Letterrot,basic2,871,913,Divoptions,Letter,Setcolor,Com2nd,Dqq,Texcom -Exprrot,basic2,917,960,Divoptions,Expr,Setcolor,Com2nd,Dqq,Texcom -Slider,basic2,964,1011,Toupper,Strsplit,Indexall,Putpoint,Listplot,Putonseg -Putpoint,basic2,1015,1026,Textformat,Pcrd -Putpoint,basic2,1030,1041,Textformat,Pcrd -Bezierpt,basic2,1045,1070,Lcrd -Bezier,basic2,1074,1086,BezierCurve -BezierCurve,basic2,1089,1166,Divoptions,Measuredepth,Lcrd,Bezierpt,Pcrd,Textformat,RSform,Bezier,Com2nd,Setcolor,GetLinestyle,Texcom -Readcsvsla,basic2,1170,1218,Readplotdigdata,Divoptions,Translatedata -Putbezierdata,basic2,1222,1284,Divoptions,Putpoint,Lcrd,Letter -Bezierstart,basic2,1288,1290 -Mkbezierptcrv,basic2,1294,1320,Readcsvsla,Measuredepth,Putbezierdata,Bezier -Mkbeziercrv,basic2,1324,1335,Measuredepth,Bezier -Writebezier,basic2,1339,1381,Bezier,PaO,WriteOutData -Readbezier,basic2,1385,1437,Divoptions,Toupper,ReadOutData,Measuredepth,Putpoint,Bezier -Ospline,basic2,1441,1500,Dotprod,Lcrd,Bezier -CRspline,basic2,1504,1550,Lcrd,Reflectpoint,Bezier -Beziersmooth,basic2,1554,1615,Bzspline,Putpoint,Lcrd,Bezier -Beziersym,basic2,1619,1668,Bzsspline,Lcrd,Putpoint,Bezier -Listbspline2bz,basic2,1672,1687,Lcrd -Bspline,basic2,1691,1699,Listbspline2bz,BezierCurve -MeetCurve,basic2,1703,1763,Measuredepth,LLcrd,Lcrd -Putonline,basic2,1767,1787,LLcrd,Lineplot,Putonseg -Putonseg,basic2,1791,1827,LLcrd,Divoptions,Lcrd,Putpoint,Pcrd,Textformat -Putoncurve,basic2,1831,1860,putoncurve,Putpoint,Paramoncurve,Putonseg,Textformat,Ptend -CrossPoint,basic2,1864,1882,MeetCurve,Putpoint -Periodfun,basic2,1886,1972,Toupper,Op,Plotdata,Textformat,Translatedata,Listplot -Fourierseries,basic2,1976,2001,Assign,Plotdata -Tabledatalight,basic2,2005,2086,Divoptions,Toupper,Tlistplot,Tsegrmv,Addax,Setwindow -Tabledata,basic2,2090,2220,Divoptions,Toupper,Putpoint,Tgrid,Tlistplot,Tsegrmv,Addax,Setwindow -Tseginfo,basic2,2224,2244 -Tsegrmv,basic2,2248,2290,Tseginfo,Changestyle,Tlistplot -Tgrid,basic2,2294,2308 -Tlistplot,basic2,2312,2341,divoptions,Toupper,Tgrid,Listplot -ChangeTablestyle,basic2,2345,2398,Indexall,Changestyle,Tlistplot -Findcell,basic2,2402,2428,Tgrid -Putcell,basic2,2432,2467,Findcell,Letter -Putcellexpr,basic2,2471,2483,Putcell -Putrow,basic2,2487,2502,Putcellrow,Putcell -Putrowexpr,basic2,2506,2519,Putrow -PutcoL,basic2,2523,2538,Putcellexpr,Putcell -PutcoLexpr,basic2,2542,2555,Putcellexpr,PutcoL -Setrange,basic2,2559,2565,Pcrd -RSform,basic2,2569,2603,PaO,Bracket,PPa -RSslash,basic2,2607,2612 -Rform,basic2,2616,2626,PaO -Defvar,basic2,2630,2674 -IftoR,basic2,2678,2717,PaO,Indexall,Bracket -FortoR,basic2,2721,2750,PaO,Bracket -Deffun,basic2,2754,2801,Bracket,Indexall,FortoR,IftoR,RSform,PaO -Inwindow,basic2,2805,2817 -Dashlinedata,basic2,2821,2894 -Windispg,basic2,2898,2961,Drwxy,Measuredepth,Dashlinedata,Textformat -WritetoRS,basic2,2965,3198,WritetoSci,Lcrd,c,Assignadd,Datetime,source,Setwindow,Textformat,Openfile,Cindyname,RSform,PPa,iswindows,Indexall,Dqq,PaO -Extractdata,basic2,3202,3258,Divoptions,ReadOutData,Com2nd,Setcolor,GetLinestyle,Texcom -RemoveOut,basic2,3262,3272 -ReadOutData,basic2,3276,3389,Divoptions,Strsplit,Toupper,Pcrd,Textformat -WriteOutData,basic2,3393,3455,Flattenlist,Measuredepth -Makeshell,basic2,3459,3562,kc -Convsjiswin,basic2,3566,3590,nkfwin,nkfcpdel,isexists,pathsep -Makebat,basic2,3594,3734,kc,iswindows,isincludefull,isexists,Indexall -Addpackage,basic2,3738,3756 -Usegraphics,basic2,3760,3770,Addpackage -Viewtex,basic2,3774,3847,iswindows,Makebat,kc,Makeshell,WritetoRS -Viewparent,basic2,3851,3869,isexists,iswindows,Makebat,Makeshell,WritetoRS,kc -Makecmdlist,basic2,3873,3903 -Savecmdlist,basic2,3907,3913 -Quicksort,basic2,3917,3937 -Lessstr,basic2,3941,3968 -Figpdf,basic2,3972,4089,Removespace,isexists -Makehelplist,basic2,4093,4137,PPa -Helplist,basic2,4141,4195,Makehelplist -Help,basic2,4199,4250 -Helpkey,basic2,4254,4272,Help -Slidework,basic2,4276,4295,isexists,makedir,pathsep,Changework -Setslidemargin,basic2,4299,4302 -Setslidepage,basic2,4306,4331 -Setslidemain,basic2,4335,4359 -Setslidebody,basic2,4363,4400 -Setslidehyper,basic2,4404,4482,Divoptions,Addpackage,Indexall,Toupper -Settitle,basic2,4486,4557,Toupper,Indexall -Maketitle,basic2,4561,4656,iswindows,Makebat,Makeshell,kc,Cindyname,isexists,PaO -Repeatsameslide,basic2,4660,4815,Indexall -Presentation,basic2,4819,5484,readfile2str,isexists,Removespace,fileslist,Repeatsameslide -Mkslides,basic2,5488,5552,Fillblack,Changework,Setdirectory,setexec,isexists,Presentation,iswindows,Makebat,Makeshell,kc,pathsep,Fillrestore -Mkslidesummary,basic2,5556,5621,Fillblack,pathsep,ismacosx,setexec,PPa,PaO,CalcbyR,iswindows,Makebat,Makeshell,kc,Changework,Fillstore -Example,basic2,5625,5649 -BBdata,basic2,5653,5796,Divoptions,Toupper,ismacosx,iswindows,kc,Sprintf,Removespace -Findfun,basic2,5800,5863,Removespace,Indexall -Extractfun,basic2,5867,5884,Indexall,Findfun -Extractall,basic2,5893,5920 -Copyketcindyjs,basic2,5924,5985,iswindows,Dqq,kc -Ketjsoption,basic2,5989,5990,Setketcindyjs -Setketcindyjs,basic2,5994,6011,Divoptions -Mkketcindyjs,basic2,6015,6431,Strsplit,Toupper,Copyketcindyjs,isexists,Extractfun,Extractall,pathsep,Readlines,Removespace,Dqq,Indexof,Indexall,rgb +Drwfigs,basic2,22,24,Drawfigures +Drawfigures,basic2,28,87,Divoptions,Strsplit,Toupper,Measuredepth,Pointdata,Listplot,Dqq +Setarrow,basic2,91,117 +Arrowheaddata,basic2,121,214,Divoptions,Strsplit,Toupper,Touppera,Measuredepth,Nearestpt,|Ptend,Ptstart,Numptcrv,Ptcrv,LLcrd,Intersectcrvspp,Pcrd +Arrowhead,basic2,218,310,Strsplit,Toupper,Measuredepth,Pcrd,Arrowheaddata,Inwindow,Listplot,Divoptions,Dqq,Textformat,LLcrd,Com2nd,Texcom +Arrowdata,basic2,314,428,Divoptions,Strsplit,Toupper,Pcrd,Textformat,Listplot,LLcrd,Arrowhead,Setscaling,Lcrd +Lightarrowdata,basic2,432,547,Pcrd,Divoptions,Strsplit,Toupper,Listplot,Textformat,LLcrd,Com2nd,Texcom,Setscaling,Lcrd +Anglemark,basic2,551,684,Divoptions,Indexall,Strsplit,Dqq,Toupper,Lcrd,Pcrd,Textformat,Com2nd,Getlinestyle,Texcom +Paramark,basic2,688,798,Divoptions,Indexall,Strsplit,Dqq,Toupper,Lcrd,Pcrd,Textformat,Com2nd,Getlinestyle,Texcom +Makebowdata,basic2,802,815,Lcrd,Rotatepoint +Bowdata,basic2,819,990,Divoptions,Lcrd,Strsplit,Toupper,Makebowdata,Defvar,Norm,LLcrd,Dqq,Measuredepth,Pcrd,Textformat,Com2nd,Getlinestyle,Texcom +Bowname,basic2,994,997,Expr +Bownamerot,basic2,1001,1015,Measuredepth,Ptend,Ptstart,Exprrot +Deqdata,basic2,1019,1077,funP,Lcrd,funN +Deqplot,basic2,1081,1225,Lcrd,Divoptions,Toupper,Indexall,Deqdata,Pcrd,Assign,Textformat,RSform,Com2nd,Getlinestyle,Texcom +Enclosing,basic2,1393,1559,Enclosing2,Divoptions,isList,Lcrd,Listplot,Intersectcurvespp,Prepend,Op,Length,Partcrv,Pointoncurve,Pcrd,PaO,Textformat,Com2nd,Getlinestyle,Texcom,LLcrd +Makehatch,basic2,1567,1669,Lineplot,Intersectseg,Norm,Listplot +Anyselected,basic2,1673,1681 +Hatchdata,basic2,1685,1981,HatchdataR,Hatchdatacindy,Listplot,Joincrvs,Enclosing2,Divoptions,Strsplit,Toupper,Anyselected,Bracket,isexists,ReadOutData,Makehatch,Textformat,PaO,Com2nd,Getlinestyle,Texcom,WriteOutData,LLcrd +Shadein,basic2,1985,2072,Framedata,Partcrv,Paramoncrv,Listplot,Intersectcurvespp,Pointoncrv,Joincrvs,Inwindow +Shade,basic2,2076,2204,Divoptions,Strsplit,Toupper,Colorcmyk2rgb,Enclosing,Shadein,Listplot,Joincrvs,Pcrd,PaO,Textformat,Dqq +Rotatepoint,basic2,2210,2220,Lcrd +Translatepoint,basic2,2224,2234,Lcrd +Scalepoint,basic2,2238,2248,Lcrd +Reflectpoint,basic2,2252,2277,Lcrd +Rotatedata,basic2,2281,2367,Divoptions,Lcrd,Strsplit,Toupper,Measuredepth,LLcrd,Pcrd,Textformat,RSform,Com2nd,Getlinestyle,Texcom +Translatedata,basic2,2371,2449,Divoptions,Strsplit,Toupper,Lcrd,Measuredepth,LLcrd,Pcrd,RSform,Textformat,Com2nd,Getlinestyle,Texcom +Scaledata,basic2,2453,2555,Divoptions,Lcrd,Strsplit,Toupper,Measuredepth,LLcrd,Pcrd,Textformat,RSform,Com2nd,Getlinestyle,Texcom +Reflectdata,basic2,2559,2653,Divoptions,Strsplit,Toupper,Lcrd,Measuredepth,LLcrd,Pcrd,RSform,Textformat,Com2nd,Getlinestyle,Texcom +Mksegments,basic2,2658,2673,Listplot +Mkcircles,basic2,2678,2698,Strsplit,Circledata +MakeRarg,basic2,2702,2715,RSslash,Textformat +Htickmark,basic2,2719,2742,Listplot,Expr +Vtickmark,basic2,2746,2767,Listplot,Expr,180710to// tmp=MakeRarg +Vtick,basic2,2771,2781,Listplot +Htick,basic2,2785,2797,LLcrd,Listplot +Setax,basic2,2801,2818 +Drwxy,basic2,2822,2917,Divoptions,Strsplit,Toupper,Lightarrowdata,Listplot,Expr,Letter,Addax +Drwpt,basic2,2921,2930,Pointdata +Drawpoint,basic2,2933,2961,Measuredepth,Textformat,Com2nd,Setpen +Addax,basic2,2965,2968 +Expr,basic2,2972,2987,Letter +Letter,basic2,2991,3086,Divoptions,Removespace,Strsplit,Toupper,RSslash,Com2nd,Lcrd,Texcom,Pcrd +Letterrot,basic2,3090,3132,Divoptions,Letter,Com2nd,Dqq,Texcom +Exprrot,basic2,3136,3179,Divoptions,Expr,Com2nd,Dqq,Texcom +Slider,basic2,3183,3230,Toupper,Strsplit,Indexall,Putpoint,Listplot,Putonseg +Putpoint,basic2,3234,3245,Textformat,Pcrd +Putpoint,basic2,3249,3260,Textformat,Pcrd +Bezierpt,basic2,3264,3289,Lcrd +Bezier,basic2,3293,3305,Beziercurve +Beziercurve,basic2,3309,3386,Divoptions,Measuredepth,Lcrd,Bezierpt,Pcrd,Textformat,RSform,Com2nd,Getlinestyle,Texcom +Putbezierdata,basic2,3390,3452,Divoptions,Putpoint,Lcrd,Letter +Bezierstart,basic2,3456,3458 +Mkbezierptcrv,basic2,3462,3488,Readcsvsla,Measuredepth,Putbezierdata,Bezier +Mkbeziercrv,basic2,3492,3503,Measuredepth,Bezier +Ospline,basic2,3507,3566,Dotprod,Lcrd,Bezier +CRspline,basic2,3570,3616,Lcrd,Reflectpoint,Bezier +Beziersmooth,basic2,3620,3681,Bzspline,Putpoint,Lcrd,Bezier +Beziersym,basic2,3685,3734,Bzsspline,Putpoint,Lcrd,Bezier +Listbspline2bz,basic2,3738,3753,Lcrd +Bspline,basic2,3757,3765,Listbspline2bz,BezierCurve +Meetcurve,basic2,3769,3829,Measuredepth,LLcrd,Lcrd +Putonline,basic2,3833,3853,LLcrd,Lineplot,Putonseg +Putonseg,basic2,3857,3893,LLcrd,Divoptions,Lcrd,Putpoint,Pcrd,Textformat +Putoncurve,basic2,3897,3926,putoncurve,Putpoint,Paramoncurve,Putonseg,Textformat,Ptend +Crosspoint,basic2,3930,3948,MeetCurve,Putpoint +Periodfun,basic2,3952,4085,Divoptions,Strsplit,Toupper,Plotdata,Translatedata,Setscaling,Norm,Listplot,Textformat +Mkcstable,basic2,4089,4105,Textformat +Fourierseries,basic2,4109,4179,Divoptions,Strsplit,Toupper,Plotdata,Assign,Listplot +Tabledata,basic2,4183,4205,Divoptions,Toupper,Tabledatageo,Tabledatalight +Tabledatalight,basic2,4209,4328,Divoptions,Strsplit,Toupper,Tlistplot,Changetablestyle,Addax,Setwindow +Tabledatageo,basic2,4332,4396,Divoptions,Strsplit,Toupper,Putpoint,Tabledatalight +Tgrid,basic2,4400,4415 +Tlistplot,basic2,4419,4448,divoptions,Toupper,Tgrid,Listplot +Changetablestyle,basic2,4452,4540,Indexall,Changestyle,Replaceall,Tlistplot +Findcell,basic2,4544,4570,Tgrid +Putcell,basic2,4574,4609,Findcell,Letter +Putcellexpr,basic2,4613,4625,Putcell +Putrow,basic2,4629,4644,Putcellrow,Putcell +Putrowexpr,basic2,4648,4661,Putrow +Putcol,basic2,4665,4680,Putcellexpr,Putcell +Putcolexpr,basic2,4684,4697,Putcellexpr,Putcol +Setrange,basic2,4701,4707,Pcrd +Inwindow,basic2,4711,4723 +Dashlinedata,basic2,4727,4800 +Windispg,basic2,4804,4870,Drwxy,Measuredepth,Dashlinedata,Textformat +Extractdata,basic2,4875,4931,Divoptions,Com2nd,Getlinestyle,Texcom +Removeout,basic2,4935,4945 +Makecmdlist,basic2,4949,4979 +Savecmdlist,basic2,4983,4989 +Quicksort,basic2,4993,5013 +Lessstr,basic2,5017,5044 +Makehelplist,basic2,5048,5092,PPa +Helplist,basic2,5096,5150,Makehelplist +Help,basic2,5154,5205 +Helpkey,basic2,5209,5227,Help +Example,basic2,5231,5255 diff --git a/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/basic3list.txt b/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/basic3list.txt new file mode 100644 index 00000000000..9cacb8566f9 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/basic3list.txt @@ -0,0 +1,56 @@ +Tenkeybrd,basic3,22,54,Strsplit,Toupper,Framedata2,Shade,Tabledata,Addax +Keyaction,basic3,58,83 +Dispchoice,basic3,87,92 +Datetime,basic3,96,107,getdatetime +Readcsvsla,basic3,111,159,Readplotdigdata,Divoptions,Translatedata +Writebezier,basic3,163,205,PaO,WriteOutData +Readbezier,basic3,209,261,Divoptions,Toupper,Readoutdata,Measuredepth,Putpoint,Bezier +RSform,basic3,265,299,PaO,Bracket,PPa +RSslash,basic3,303,308 +Rform,basic3,312,322,PaO +Defvar,basic3,326,370 +IftoR,basic3,374,413,PaO,Indexall,Bracket +FortoR,basic3,417,446,PaO,Bracket +Deffun,basic3,450,497,Bracket,Indexall,FortoR,IftoR,RSform,PaO +WritetoRS,basic3,501,734,WritetoSci,Lcrd,Datetime,Textformat,Cindyname,RSform,PPa,iswindows,Indexall,Dqq,PaO +Readoutdata,basic3,738,851,Divoptions,Strsplit,Toupper,Pcrd,Textformat +Writeoutdata,basic3,855,917,Flattenlist,Measuredepth +Makeshell,basic3,921,1021,kc,Indexall,Dqq +Convsjiswin,basic3,1025,1049,nkfwin,nkfcpdel,isexists,pathsep +Makebat,basic3,1053,1191,kc,iswindows,isincludefull,isexists,Indexall,Dqq +Addpackage,basic3,1195,1213 +Usegraphics,basic3,1217,1227,Addpackage +Viewtex,basic3,1231,1305,iswindows,Makebat,kc,Makeshell,WritetoRS +Viewparent,basic3,1309,1327,isexists,iswindows,Makebat,Makeshell,WritetoRS,kc +Figpdf,basic3,1331,1451,Removespace,isexists +Slidework,basic3,1455,1474,isexists,makedir,pathsep,Changework +Setslidemargin,basic3,1478,1481 +Setslidepage,basic3,1485,1510 +Setslidemain,basic3,1514,1538 +Setslidebody,basic3,1542,1579 +Setslidehyper,basic3,1583,1661,Divoptions,Addpackage,Indexall,Toupper +Settitle,basic3,1665,1736,Toupper,Indexall +Maketitle,basic3,1740,1835,iswindows,Makebat,Makeshell,kc,Cindyname,isexists,PaO +Repeatsameslide,basic3,1839,1994,Indexall +Presentation,basic3,1998,2663,readfile2str,isexists,Removespace,fileslist,Repeatsameslide +Mkslides,basic3,2667,2731,Fillblack,Changework,Setdirectory,setexec,isexists,Presentation,iswindows,Makebat,Makeshell,kc,pathsep,Fillrestore +Mkslidesummary,basic3,2735,2800,Fillblack,pathsep,ismacosx,setexec,PPa,PaO,CalcbyR,iswindows,Makebat,Makeshell,kc,Changework,Fillstore +BBdata,basic3,2804,2947,Divoptions,Toupper,ismacosx,Dqq,iswindows,kc,Sprintf,Removespace +Gcd,basic3,2951,2963 +Fracform,basic3,2967,2992 +Totexformpart,basic3,2996,3064,Bracket,Strsplit,Assign +Totexform,basic3,3068,3119,Totexformpart,Assign,Indexall,Bracket +Tocindyformpart,basic3,3123,3191,Bracket,Strsplit,Assign +Tocindyform,basic3,3195,3242,Tocindyformpart,Indexall,Bracket +Animepar,basic3,3246,3246,Animationparam +Animationparam,basic3,3250,3269,seconds,stopanimation +Copyketcindyjs,basic3,3273,3334,iswindows,Dqq,kc +Ketjsoption,basic3,3338,3339,Setketcindyjs +Setketcindyjs,basic3,3343,3352 +Ketcindyjsdata,basic3,3356,3394,Textformat,Dqq +Findfun,basic3,3398,3465,Removespace,Indexall +Extractfun,basic3,3469,3486,Indexall,Findfun +Extractall,basic3,3495,3539 +Textedit,basic3,3543,3549 +Textedit2value,basic3,3553,3595,Toupper,Textedit,Removespace,Tocindyform,Totexform,Tomaxform,Strsplit +Mkketcindyjs,basic3,3599,4158,Strsplit,Toupper,Colorcode,Colorname2rgb,Copyketcindyjs,isexists,Cdyname,Extractfun,Extractall,pathsep,Readlines,Removespace,Dqq,indexall,Indexof,Indexall diff --git a/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/commonused.txt b/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/commonused.txt deleted file mode 100644 index 81fbf2609e1..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/commonused.txt +++ /dev/null @@ -1,401 +0,0 @@ -Ketinit():=Ketinit("fig",1,[-5,5],[-5,5]); //181001 -Ketinit(Arg):=(//181001from - if(isstring(Arg), - Ketinit(Arg,1,[-5,5],[-5,5]); - , - Ketinit("fig",Arg,[-5,5],[-5,5]); - ); -); -Ketinit(work,sy,rangex,rangey):=(//181001to - regional(pt,tmp,tmp1,tmp2,letterc,boxc,shadowc,mboxc); - PenThickInit=8; - ULEN="1cm"; - MEMORI=0.05;//18.01.15from - MEMORIInit=MEMORI; - MEMORINow=MEMORI; - MARKLEN=0.05; - MARKLENInit=MARKLEN; //180504 - MARKLENNow= MARKLEN; - GENTEN=[0,0];//18.01.15until - KETPICLAYER=20; - MilliIn=1/2.54*1000; - PenThick=round(MilliIn*0.02); - PenThickInit=PenThick; - TenSizeInit=0.02; - TenSize=TenSizeInit; - YaSize=1; YaAngle=18; YaPosition=1; - YaCut=0; YasenStyle="dr,1"; Yajiristyle="tf"; - KETPICCOUNT=1; - KCOLOR=[0,0,0]; - GLIST=[]; - GCLIST=[]; - GOUTLIST=[]; - POUTLIST=[]; - VLIST=[]; - FUNLIST=[]; - LETTERlist=[]; - COM0thlist=[]; - COM1stlist=[]; - COM2ndlist=[]; - ADDAXES="1"; - AXSTYLE=["l","x","e","y","n","O","sw","","",""]; //181216 - AXCOUNT=1; //181215 - SHADECTR=1; //190222 - LFmark=unicode("000a"); - CRmark=unicode("000d");//16.12.13 - Dq=unicode("0022"); - CommonMake=0;//180610 - WaitUnit=10; - CONTINUED=0; - OutComList=[]; - OutFileLIst=[]; // 15.10.22 - FigPdfList=[]; // 16.04.08 - Fillstore(); //181212 - ADDPACK=[]; // 16.05.16 - GPACK="tpic"; //180817 - ErrFlag=0; - KETJSOP=[]; //190129 - ArrowlineNumber=1; // 15.01.05 - ArrowheadNumber=1; - BezierNumber=1; //15.01.03 - SCALEX=1; - SCALEY=sy; - XMIN=rangex_1/SCALEX; - XMAX=rangex_2/SCALEX; - YMIN=rangey_1/SCALEY; - YMAX=rangey_2/SCALEY; - Setwindow("Msg=n"); // 16.05.31 -); -Fillstore():=( - regional(tmp,tmp1,out,dtL,txtL,clrL,txt,clr,nn,jj); - dtL=[ //181209from - ["Figure",[1,0.29,0.29]],["Parent",[1,1,0]], - ["ParaF",[0,1,1]],["Flip",[0,0,1]],["Anime",[0.51,0.95,1]], - ["Title",[0,1,0]],["Slide",[0.47,0,0.72]],["Digest",[1,0.74,0.47]], - ["KeTJS",[0,1,1]],["KeTJSoff",[0,1,1]], - ["Objview",[0,1,0]] - ]; - txtL=apply(dtL,#_1); - clrL=apply(dtL,#_2); - tmp1=allelements(); - tmp1=select(tmp1,indexof(#.name,"Text")>0); - out=[]; - forall(1..(length(tmp1)),nn, - tmp=tmp1_nn; - txt=tmp.text; - tmp=select(1..(length(txtL)),txtL_#==txt); - if(length(tmp)>0, - jj=tmp_1; - clr=clrL_jj; - tmp=tmp1_nn; - tmp.fillcolor=clr; - , - tmp=tmp1_nn; - clr=tmp.fillcolor; - ); - out=append(out,[tmp.name,clr,tmp.text]); - ); //181209to - out; -); -Setwindow():=Setwindow("Msg=yes"); -Setwindow(str):=( - regional(tmp,tmp1,tmp2,msg); - msg="y"; - tmp=indexof(str,"="); // 16.02.10 - tmp1=Toupper(substring(str,tmp,tmp+1)); - if(tmp1=="N",msg="n"); - if((ispoint(SW) & ispoint(NE)), - tmp1=Lcrd(SW); - tmp2=Lcrd(NE); - XMIN=tmp1_1; XMAX=tmp2_1; - YMIN=tmp1_2; YMAX=tmp2_2; - , - Putpoint("SW",Pcrd([XMIN,YMIN])); - Putpoint("NE", Pcrd([XMAX,YMAX])); - ); - if(msg=="y", - println("Setwindow(["+XMIN+","+XMAX+"],["+YMIN+","+YMAX+"])"); - ); - layer(KETPICLAYER); - autoclearlayer(KETPICLAYER,true); - drawpoly([Pcrd([XMIN,YMIN]), Pcrd([XMAX,YMIN]), - Pcrd([XMAX,YMAX]),Pcrd([XMIN,YMAX])],color->[1,1,1]); -); -Setwindow(xrange,yrange):=( - XMIN=xrange_1; - XMAX=xrange_2; - YMIN=yrange_1; - YMAX=yrange_2; - Putpoint("SW",[XMIN,YMIN]);//181016 - Putpoint("NE",[XMAX,YMAX]);//181016 -); -Textformat(value,dig):=( - regional(vv,tmp,tmp1); - if(islist(value), - tmp1="["; - forall(value, - tmp1=tmp1+Textformat(#,dig)+","; - ); - if(length(tmp1)>1, //18.01.29from - tmp1=substring(tmp1,0,length(tmp1)-1); - ); - tmp1=tmp1+"]"; //18.01.29until - , - if(ispoint(value) % isstring(value), - if(isstring(value),tmp1=Dq+value+Dq,tmp1=text(value)); // 15.10.02 - , - tmp1=format(value,dig); - ); - ); - tmp1; -); -Measuredepth(list):=( - regional(tmp,tmp1,Depth,Flg); - Flg=0; - Depth=0; - if(length(list)>0, //180501 - if(ispoint(list), - Depth=0; - Flg=1; - , - tmp1=select(1..(length(list)),length(list_#)>0);//17.05.21from - tmp=list_(tmp1_1);//17.05.21until - ); - repeat(4, - if(Flg==0, - if(islist(tmp), - tmp=tmp_1; - Depth=Depth+1; - , - if(ispoint(tmp),Depth=Depth+1); - Flg=1; - ); - ); - ); - );//180501 - Depth; -); -Drwxy():=Drwxy(0,[]); //190103from -Drwxy(Arg):=( - if(islist(Arg),Drwxy(0,Arg); Drwxy(Arg,[])); -); -Drwxy(add):=Drwxy(add,[]); -Drwxy(add,optionsorg):=( //190103to - regional(options,color,eqL,strL,org,xrng,yrng,ax,st,nn,size, - linesty,colorax,colorla,tmp,tmp1,tmp2); - options=optionsorg; - tmp=Divoptions(options); - color=tmp_(length(tmp)-2); - eqL=tmp_5; - org=GENTEN; - xrng=[XMIN,XMAX]; //190103 - yrng=[YMIN,YMAX]; //190103 - ax=AXSTYLE; - linesty=ax_8; - if(isstring(ax_9),colorax=ax_9,colorax=text(ax_9)); - if(length(colorax)>0, - colorax="Color="+colorax; - ); - if(isstring(ax_10),colorla=ax_10,colorla=text(ax_10)); - if(length(colorla)>0, //181217from - colorla="Color="+colorla; - , - if(length(colorax)>0, - colorla=colorax; - ); - ); //181217to - forall(eqL, - tmp=Strsplit(#,"="); - tmp1=Toupper(substring(tmp_1,0,1)); - if(tmp1=="O", //190103from - org=parse(tmp_2); - options=remove(options,[#]); - ); //190103to - if(tmp1=="X", - xrng=parse(tmp_2); - options=remove(options,[#]); - ); - if(tmp1=="Y", - yrng=parse(tmp_2); - options=remove(options,[#]); - ); - if(tmp1=="A", - tmp2=tokenize(tmp_2,","); - st=1; nn=1; - if(isreal(tmp2_1), - st=2; - nn=tmp2_1; - ); - forall(st..(length(tmp2)), - tmp=tmp2_#; - if(length(tmp)>0,ax_nn=tmp); - nn=nn+1; - ); - options=remove(options,[#]); - ); - ); - options=append(options,linesty); //181216 - if(substring(ax_1,0,1)=="a", - strL=select(options,isstring(#)); //181216 - tmp=select(strL,contains(["dr","da","do","id"],substring(#,0,2))); - if(length(tmp)==0,options=append(options,YasenStyle)); - tmp=substring(ax_1,1,length(ax_1)); //181216[2lines] - if(length(tmp)>0,size=parse(tmp),size=YaSize); - tmp1=concat(options,[size,YaAngle,YaPosition,YaCut,colorax]);//181216 - tmp=[[xrng_1,org_2],[xrng_2,org_2]]; - Arrowdata("axx"+text(AXCOUNT),tmp,tmp1); - tmp=[[org_1,yrng_1],[org_1,yrng_2]]; - Arrowdata("axy"+text(AXCOUNT),tmp,tmp1); - , - tmp=[[xrng_1,org_2],[xrng_2,org_2]]; - tmp1=append(options,colorax);//181216 - Listplot("axx"+text(AXCOUNT),tmp,tmp1); - tmp=[[org_1,yrng_1],[org_1,yrng_2]]; - Listplot("axy"+text(AXCOUNT),tmp,tmp1); - ); - AXCOUNT=AXCOUNT+1; - Expr([[xrng_2,org_2],ax_3,ax_2],[colorla]);//181216[3lines] - Expr([[org_1,yrng_2],ax_5,ax_4],[colorla]); - Letter([org,ax_7,ax_6],[colorla]); - if(add==0, //190103 - Addax(0); - ); -); -Dashlinedata(dataorg,sen,gap,ptn):=( - regional(data,eps,dtall,len,lenlist,ii,lenall,kari, - naga,tobi,nsen,seglist,segunit,hajime,owari,jj, - flg,tt,ptL,out,tmp,tmp1,tmp2); - eps=10.0^(-6); - if(isstring(dataorg),data=parse(dataorg),data=dataorg); - dtall=length(data); - out=[]; - len=0; lenlist=[0]; - forall(2..dtall,ii, - len=len+|data_ii-data_(ii-1)|; - lenlist=append(lenlist,len); - ); - lenall=lenlist_dtall; - if(lenall>0, - kari=(sen+gap)*0.1;naga=sen*0.1;tobi=gap*0.1; - if(|data_1-data_dtall|<eps, - nsen=max([re(ceil(lenall/kari)),3]); - segunit=lenall/nsen; - naga=segunit*sen/(sen+gap); - tobi=segunit*gap/(sen+gap); - seglist=apply(0..(nsen-1),#*segunit); - , - if(ptn==0, - nsen=max([re(ceil((lenall+tobi)/kari)),3]); - segunit=lenall*(sen+gap)/(nsen*sen+(nsen-1)*gap); - naga=segunit*sen/(sen+gap); - tobi=segunit*gap/(sen+gap); - seglist=apply(0..(nsen-1),#*segunit); - , - nsen=max([re(ceil((lenall+naga)/kari)),3]); - segunit=lenall*(sen+gap)/((nsen-1)*sen+nsen*gap); - naga=segunit*sen/(sen+gap); - tobi=segunit*gap/(sen+gap); - seglist=apply(0..(nsen-2),tobi+#*segunit); - ); - ); - hajime=1;owari=1; - forall(1..(length(seglist)),ii, - len=seglist_ii; - flg=0; - forall(owari..dtall,jj, - if(flg==0, - if(len<lenlist_jj-eps, - flg=jj; - ); - ); - ); - if(flg>0,hajime=flg-1); - flg=0; - forall(hajime..dtall,jj, - if(flg==0, - if(len+naga<lenlist_jj-eps, - flg=jj; - ); - ); - ); - if(flg>0,owari=flg-1); - tt=len-lenlist_hajime; - tt=tt/(lenlist_(hajime+1)-lenlist_hajime); - tmp=data_hajime+tt*(data_(hajime+1)-data_hajime); - ptL=[tmp]; - forall((hajime+1)..owari,jj, - ptL=append(ptL,data_jj); - ); - tt=(len+naga-lenlist_owari); - tt=tt/(lenlist_(owari+1)-lenlist_owari); - tmp=data_owari+tt*(data_(owari+1)-data_owari); - ptL=append(ptL,tmp); - out=append(out,ptL); - ); - ); - out; -); -Windispg():=( - if(ADDAXES=="1", //181215from - Drwxy(); - ADDAXES="0"; - ); //181215to - Windispg(GCLIST); //190125 -); -Windispg(gcLorg):=( //190125 - regional(gcL,Nj,Nk,Dt,Vj,tmp,tmp1,tmp2,tmp3,tmp4,opcindy); - gcL=gcLorg; //190125from - if(length(gcL)>0, - if(!islist(gcL_1),gcL=[gcL]); - ); //190125to - gsave(); - layer(KETPIClayer); - forall(gcL,Nj, - if(isstring(Nj_1),Dt=parse(Nj_1),Dt=Nj_1); // 11.17 - if(islist(Dt) & length(Dt)>0, // 12.19,12.22 - tmp=Measuredepth(Dt); - if(tmp==1,Dt=[Dt]); - opcindy=Nj_3; - tmp=Nj_2; //190119from - if(!islist(tmp),tmp=[tmp,""]); //190123 - if(tmp_1<0,tmp1=0,tmp1=tmp_1); //190119from - if(tmp1<10, - forall(Dt,Nk, - if(length(Nk)>1, - tmp3=""; - if(indexof(opcindy,"color")==0, //190122from - tmp3=tmp3+",linecolor->"+KCOLOR; - ); - tmp3=tmp3+opcindy; - if(tmp1==0, //190126from - if((length(tmp_2)>0)&(indexof(opcindy,"size")==0), - tmp3=tmp3+",size->"+tmp_2; - ); //190124to - tmp="connect("+Textformat(Nk,5)+tmp3+");";//190125 - parse(tmp); - , - if(tmp1==1, - tmp4=Dashlinedata(Nk,2.5,2.5,0); - forall(tmp4, - tmp="connect("+Textformat(#,5)+tmp3+");"; - parse(tmp); - ); - , - tmp3=",dashtype->"+text(tmp1)+tmp3; - forall(1..(length(Nk)-1), - tmp="draw("+Textformat([Nk_#,Nk_(#+1)],5)+tmp3+");"; - parse(tmp); - ); - ); - ); - , - tmp="draw("+text(Nk_1)+opcindy+");"; // 14.12.31 - parse(tmp); - ); //190126to - ); - ); - ); - ); - grestore(); - layer(0); -); diff --git a/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/ignoredfun.txt b/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/ignoredfun.txt index d8dedb061c6..5f388e67016 100644 --- a/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/ignoredfun.txt +++ b/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/ignoredfun.txt @@ -1,3 +1,4 @@ +Anyselected Changesetting Changework Cindyname @@ -6,33 +7,51 @@ Com1st Com2nd Com2ndpre Copyketcindyjs -Dashline Definecolor +//Defvar Dottedline Drwline Example +Figpdf +Fillstore Fontsize Help Helplist Invdashline +Ketcindyjsdata Ketjsoption Mkketcindyjs Presentation -Putbezierdata -Putpoint +//Putbezierdata +//Putpoint Readcsvsla RSform RSslash +Setfiles Setketcindyjs +Setparent Setslidebody Setslidehyper Texcom -Ketinit -Windispg -Fillstore -Setwindow -Drwxy -Measuredepth -Dashlinedata -Textformat +//Datalist3d +//Ptseg3data +Subgraph +//Setangle +//Mainsubpt3d +//Parasubpt +//Mkpointlist +//Workprocess +//Drawprocess +//Dependgeo +//Finddef +//Mkseg3d + +//Ketinit +//Windispg +//Fillstore +//Setwindow +//Drwxy +//Measuredepth +//Dashlinedata +//Textformat diff --git a/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/makefunlist.cdy b/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/makefunlist.cdy Binary files differindex 91cee476e8d..f7993fa39c5 100644 --- a/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/makefunlist.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/ketcindyjs/makefunlist.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/ketmanual/KeTCindyReferenceE.pdf b/Master/texmf-dist/doc/support/ketcindy/ketmanual/KeTCindyReferenceE.pdf Binary files differindex 67db48d35a8..adf119eae9b 100644 --- a/Master/texmf-dist/doc/support/ketcindy/ketmanual/KeTCindyReferenceE.pdf +++ b/Master/texmf-dist/doc/support/ketcindy/ketmanual/KeTCindyReferenceE.pdf diff --git a/Master/texmf-dist/doc/support/ketcindy/ketmanual/KeTCindyReferenceJ.pdf b/Master/texmf-dist/doc/support/ketcindy/ketmanual/KeTCindyReferenceJ.pdf Binary files differindex 3782f2cc229..a24668ebcd4 100644 --- a/Master/texmf-dist/doc/support/ketcindy/ketmanual/KeTCindyReferenceJ.pdf +++ b/Master/texmf-dist/doc/support/ketcindy/ketmanual/KeTCindyReferenceJ.pdf diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0101figure.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0101figure.cdy Binary files differindex 0142cbbc30c..34416c01195 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0101figure.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0101figure.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0101figurepdf.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0101figurepdf.cdy Binary files differindex eca8ddeb5d4..f0f502e1863 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0101figurepdf.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0101figurepdf.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0102figure2.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0102figure2.cdy Binary files differindex 9bc551492a3..acfca15fed2 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0102figure2.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0102figure2.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0103polygon.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0103polygon.cdy Binary files differindex 3d34ec1c61d..8326d296901 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0103polygon.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0103polygon.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0104shade.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0104shade.cdy Binary files differindex 0f86cb5024c..7d5cded487f 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0104shade.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0104shade.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0105vector.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0105vector.cdy Binary files differindex f62f3cfb2b0..e7ac5ea8f89 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0105vector.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0105vector.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0106bowdotfill.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0106bowdotfill.cdy Binary files differindex 25563346696..e04f43efdf0 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0106bowdotfill.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0106bowdotfill.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0106bowhatch.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0106bowhatch.cdy Binary files differindex 5f3f0287a96..c671fb83623 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0106bowhatch.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0106bowhatch.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0107hyperbolahatch.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0107hyperbolahatch.cdy Binary files differindex d42fdeb4fe8..1311dd90249 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0107hyperbolahatch.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0107hyperbolahatch.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0108cycloid.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0108cycloid.cdy Binary files differindex 7ef79152ee2..0a20515ff89 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0108cycloid.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0108cycloid.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0109epitrochoid.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0109epitrochoid.cdy Binary files differindex 163dee4322b..8bcf3f23d0c 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0109epitrochoid.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0109epitrochoid.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0110hypotrochoid.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0110hypotrochoid.cdy Binary files differindex 8ae4d4254dd..b9e5ea7cd56 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0110hypotrochoid.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s01figure/s0110hypotrochoid.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0201basic.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0201basic.cdy Binary files differindex a5ee74f1851..cde716542e9 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0201basic.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0201basic.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0202graph1.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0202graph1.cdy Binary files differindex a2abeff1ffc..e911d834fa5 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0202graph1.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0202graph1.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0203graph2.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0203graph2.cdy Binary files differindex a05118f5ab4..d7c4067c4cd 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0203graph2.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0203graph2.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0204graph3.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0204graph3.cdy Binary files differindex 7777b1d2585..68df43a92ba 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0204graph3.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0204graph3.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0205coniccurve.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0205coniccurve.cdy Binary files differindex 6943cc1d5aa..4278b2b8d0b 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0205coniccurve.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0205coniccurve.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0206defexp.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0206defexp.cdy Binary files differindex 60a13631ce8..e8768083490 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0206defexp.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0206defexp.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0207envelope.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0207envelope.cdy Binary files differindex e3b9f28ab56..abb4f493fd3 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0207envelope.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0207envelope.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0208intersecthatch.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0208intersecthatch.cdy Binary files differindex c16881d617d..608aa8bebfa 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0208intersecthatch.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0208intersecthatch.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0209diffeq.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0209diffeq.cdy Binary files differindex 2580db8eef6..12012bcb5f8 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0209diffeq.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0209diffeq.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0210diffeq2.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0210diffeq2.cdy Binary files differindex 804e0e3f1b4..a1c3742e86f 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0210diffeq2.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0210diffeq2.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0212implicit.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0212implicit.cdy Binary files differindex 8bf51f4b7b1..baa7d616ac5 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0212implicit.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0212implicit.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0213implicithatch.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0213implicithatch.cdy Binary files differindex 20ebd6cc667..99c89d7bf9c 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0213implicithatch.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0213implicithatch.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0214inputvalue.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0214inputvalue.cdy Binary files differnew file mode 100644 index 00000000000..3f14ee0499c --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0214inputvalue.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0215quacurve.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0215quacurve.cdy Binary files differnew file mode 100644 index 00000000000..6c73f3ee564 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s02graph/s0215quacurve.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0301table.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0301table.cdy Binary files differindex 29627ce4353..858334b9e4f 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0301table.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0301table.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0302table2.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0302table2.cdy Binary files differindex 5e71c30147a..d2db2b56d12 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0302table2.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0302table2.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0302table2line.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0302table2line.cdy Binary files differindex eac153cf1d7..64af43ef94b 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0302table2line.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0302table2line.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0303gridpaper.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0303gridpaper.cdy Binary files differnew file mode 100644 index 00000000000..7e7d2c580f2 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0303gridpaper.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0303gridpaper1.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0303gridpaper1.cdy Binary files differnew file mode 100644 index 00000000000..7d48ef55012 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0303gridpaper1.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0303gridpaperlog.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0303gridpaperlog.cdy Binary files differnew file mode 100644 index 00000000000..69c4125eb29 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0303gridpaperlog.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0303gridpaperloglog.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0303gridpaperloglog.cdy Binary files differnew file mode 100644 index 00000000000..75198a715cd --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0303gridpaperloglog.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0303papersquared.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0303papersquared.cdy Binary files differdeleted file mode 100644 index 68a4752f772..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0303papersquared.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0304graphforincanddec.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0304graphforincanddec.cdy Binary files differindex 07a3a6bffb3..4a32eb4d111 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0304graphforincanddec.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0304graphforincanddec.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0304multitables.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0304multitables.cdy Binary files differnew file mode 100644 index 00000000000..03b61b2fa28 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0304multitables.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0305twotables.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0305twotables.cdy Binary files differnew file mode 100644 index 00000000000..3539bea4dbd --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0305twotables.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0306tenkey.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0306tenkey.cdy Binary files differnew file mode 100644 index 00000000000..00e735df69b --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s03table/s0306tenkey.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0401bezierbasic.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0401bezierbasic.cdy Binary files differindex 8b6fd2c5665..7e57eca0830 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0401bezierbasic.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0401bezierbasic.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0402bezier2.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0402bezier2.cdy Binary files differdeleted file mode 100644 index 16add469d62..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0402bezier2.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0402ospline.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0402ospline.cdy Binary files differnew file mode 100644 index 00000000000..7ea5d4bea11 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0402ospline.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0403osplinecrspline.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0403osplinecrspline.cdy Binary files differnew file mode 100644 index 00000000000..4239f32969c --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0403osplinecrspline.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0404heart.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0404heart.cdy Binary files differindex f240769af6d..c54c2db0e45 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0404heart.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0404heart.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0405dogwalk.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0405dogwalk.cdy Binary files differindex 30cb4d37053..22ff6f32857 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0405dogwalk.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0405dogwalk.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0406mtfuji.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0406mtfuji.cdy Binary files differindex ddbbe896265..c4a8a71108b 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0406mtfuji.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s04bezier/s0406mtfuji.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/DLofPolyhedrons_objE.txt b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/DownloadPolyhedrons_objE.txt index 45e4e21f255..45e4e21f255 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/DLofPolyhedrons_objE.txt +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/DownloadPolyhedrons_objE.txt diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/DLofPolyhedrons_objJ.txt b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/DownloadPolyhedrons_objJ.txt index 7ae77d1046f..7ae77d1046f 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/DLofPolyhedrons_objJ.txt +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/DownloadPolyhedrons_objJ.txt diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0501basic.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0501basic.cdy Binary files differindex c985d4afd02..0740de5396f 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0501basic.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0501basic.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0501plane.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0501plane.cdy Binary files differindex ffddcb9e7f3..d95310883e1 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0501plane.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0501plane.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0502spacecurve.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0502spacecurve.cdy Binary files differindex fe7177eb839..e2b4e4c8e4d 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0502spacecurve.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0502spacecurve.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0503perp.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0503perp.cdy Binary files differindex 0a715038998..c901787203c 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0503perp.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0503perp.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0504embed.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0504embed.cdy Binary files differindex d265f58d2d8..ccd43bf4c27 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0504embed.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0504embed.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0507polyhedron.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0507polyhedron.cdy Binary files differindex 85df6b35cd9..ae8d089493f 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0507polyhedron.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0507polyhedron.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0508concatobj.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0508concatobj.cdy Binary files differindex 1ffcf8f0e10..658f07658fe 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0508concatobj.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0508concatobj.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0509cubiccut.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0509cubiccut.cdy Binary files differindex f4cfae93a83..9430f951c5a 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0509cubiccut.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0509cubiccut.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0510cubiccut2.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0510cubiccut2.cdy Binary files differindex 61bfb33ab30..1785b134cdd 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0510cubiccut2.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0510cubiccut2.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0511tetra.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0511tetra.cdy Binary files differindex 3c836311544..51b228bb188 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0511tetra.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s05spacefigure/s0511tetra.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0601cycloid.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0601cycloid.cdy Binary files differindex 37bc71a29a2..3bf9cecd830 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0601cycloid.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0601cycloid.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0602diffeq.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0602diffeq.cdy Binary files differindex bd8bb17841a..152cce4d6d6 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0602diffeq.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0602diffeq.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0603envelope.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0603envelope.cdy Binary files differindex d5c8689b5af..6b70a771217 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0603envelope.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0603envelope.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0604diffeq2.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0604diffeq2.cdy Binary files differindex 30f5dacf0a1..3d899205a13 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0604diffeq2.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0604diffeq2.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0605cycloid2.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0605cycloid2.cdy Binary files differindex 98b9baaf391..853c236c417 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0605cycloid2.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0605cycloid2.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0606epitrochoid.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0606epitrochoid.cdy Binary files differindex 2e819ba6f62..2de0c90fcd0 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0606epitrochoid.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0606epitrochoid.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0607hypotrochoid.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0607hypotrochoid.cdy Binary files differindex 839f079d58d..1e20d6dade5 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0607hypotrochoid.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0607hypotrochoid.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0608ellipsefocus.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0608ellipsefocus.cdy Binary files differnew file mode 100644 index 00000000000..5d75d5096c2 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0608ellipsefocus.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0609hyperbolafocus.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0609hyperbolafocus.cdy Binary files differnew file mode 100644 index 00000000000..db6d484baa3 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0609hyperbolafocus.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0610parabolafocus.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0610parabolafocus.cdy Binary files differnew file mode 100644 index 00000000000..685344d4115 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0610parabolafocus.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0611generalangle.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0611generalangle.cdy Binary files differnew file mode 100644 index 00000000000..0180b8d44a9 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s06animation/s0611generalangle.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0801plotR.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0801plotR.cdy Binary files differindex 58d04783f9d..265663ee1fb 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0801plotR.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0801plotR.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0802plotR2.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0802plotR2.cdy Binary files differindex 17ad97d581c..af93176f552 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0802plotR2.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0802plotR2.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0803boxplot.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0803boxplot.cdy Binary files differdeleted file mode 100644 index 8d1c0b6021e..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0803boxplot.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0803plotdiscR.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0803plotdiscR.cdy Binary files differnew file mode 100644 index 00000000000..ab1e2cad28c --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0803plotdiscR.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0804boxplot.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0804boxplot.cdy Binary files differnew file mode 100644 index 00000000000..0b7a5eb3b92 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0804boxplot.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0804histplot.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0804histplot.cdy Binary files differdeleted file mode 100644 index 29512325f7a..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0804histplot.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0805histplot.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0805histplot.cdy Binary files differnew file mode 100644 index 00000000000..560c8517368 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0805histplot.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0805random.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0805random.cdy Binary files differdeleted file mode 100644 index b632741c2e1..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0805random.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0806dataframe.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0806dataframe.cdy Binary files differdeleted file mode 100644 index 781d3b2f3bc..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0806dataframe.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0806random.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0806random.cdy Binary files differnew file mode 100644 index 00000000000..a5491d88e27 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0806random.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0807dataframe.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0807dataframe.cdy Binary files differnew file mode 100644 index 00000000000..beef8e15ab8 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0807dataframe.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0807timecount.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0807timecount.cdy Binary files differdeleted file mode 100644 index 7150e79e9cc..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0807timecount.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0808ttest.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0808ttest.cdy Binary files differindex 26e2be1a1a7..00f6f0ff1c5 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0808ttest.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s08R/s0808ttest.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1000list.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1000list.cdy Binary files differdeleted file mode 100644 index 6b08e8eda1b..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1000list.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1001basic.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1001basic.cdy Binary files differindex 13114909afd..40a147200ab 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1001basic.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1001basic.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1001factorial.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1001factorial.cdy Binary files differnew file mode 100644 index 00000000000..2e4e80ac826 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1001factorial.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1002equation.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1002equation.cdy Binary files differindex b37809ae5cd..e675811908d 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1002equation.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1002equation.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1003trig.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1003trig.cdy Binary files differindex 9c84f2b91c3..be719ecd771 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1003trig.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1003trig.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1004calcby.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1004calcby.cdy Binary files differindex a511ac4189f..9cab7b26467 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1004calcby.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1004calcby.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1005diffint.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1005diffint.cdy Binary files differindex 8b0cf864837..3a028e88796 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1005diffint.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1005diffint.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1005intplot.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1005intplot.cdy Binary files differnew file mode 100644 index 00000000000..1e99676e46e --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1005intplot.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1006calculus.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1006calculus.cdy Binary files differindex e65411a82e7..bb5ff4e3ced 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1006calculus.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1006calculus.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1007linalg.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1007linalg.cdy Binary files differindex 3a1cd25f7ee..0f13189ab5b 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1007linalg.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1007linalg.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1008idtable.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1008idtable.cdy Binary files differindex de3c42616e4..b8e1948fdf4 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1008idtable.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1008idtable.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1009diffeq.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1009diffeq.cdy Binary files differindex 62a2393c63c..aad6e96599a 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1009diffeq.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1009diffeq.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1010fourier.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1010fourier.cdy Binary files differindex ea45f29fbf0..124b792569e 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1010fourier.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1010fourier.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1010fourier2.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1010fourier2.cdy Binary files differdeleted file mode 100644 index fee1e309d3d..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1010fourier2.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1010fourier3.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1010fourier3.cdy Binary files differdeleted file mode 100644 index 16b1cfd2836..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1010fourier3.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1011matrixop.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1011matrixop.cdy Binary files differindex ae6eaeb6e94..725b187102d 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1011matrixop.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1011matrixop.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1011matrixop2.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1011matrixop2.cdy Binary files differdeleted file mode 100644 index 21389c5f86a..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1011matrixop2.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1012for.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1012for.cdy Binary files differnew file mode 100644 index 00000000000..233fa6371b1 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1012for.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1012fourierpw.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1012fourierpw.cdy Binary files differdeleted file mode 100644 index 3774287f6ed..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1012fourierpw.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1012odefor.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1012odefor.cdy Binary files differnew file mode 100644 index 00000000000..036677a4272 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1012odefor.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1013for.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1013for.cdy Binary files differdeleted file mode 100644 index cdedb9bc760..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1013for.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1013incdec.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1013incdec.cdy Binary files differnew file mode 100644 index 00000000000..454e45d8d5c --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1013incdec.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1014incdec2.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1014incdec2.cdy Binary files differdeleted file mode 100644 index 00af4e892ef..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1014incdec2.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1014primenumber.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1014primenumber.cdy Binary files differnew file mode 100644 index 00000000000..5adc840c28b --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1014primenumber.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1015primenumber.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1015primenumber.cdy Binary files differdeleted file mode 100644 index 54aa2697c52..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s10maxima/s1015primenumber.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/howtouseketcindyjsE.txt b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/howtouseketcindyjsE.txt index 05c14c1af19..05c14c1af19 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/howtouseketcindyjsE.txt +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/howtouseketcindyjsE.txt diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/howtouseketcindyjsJ.txt b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/howtouseketcindyjsJ.txt index 2dde5c6fa11..2dde5c6fa11 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/howtouseketcindyjsJ.txt +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/howtouseketcindyjsJ.txt diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1601basic.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1601basic.cdy Binary files differnew file mode 100644 index 00000000000..527b7bc3926 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1601basic.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1602diffeq2.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1602diffeq2.cdy Binary files differnew file mode 100644 index 00000000000..0c75637b4d6 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1602diffeq2.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1603gamow.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1603gamow.cdy Binary files differnew file mode 100644 index 00000000000..5d7ee38cf37 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1603gamow.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1604putoncurve.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1604putoncurve.cdy Binary files differnew file mode 100644 index 00000000000..9564ca7995f --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1604putoncurve.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1605triangle.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1605triangle.cdy Binary files differnew file mode 100644 index 00000000000..5279a0b3c3c --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1605triangle.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/s1606morley.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1606morley.cdy Binary files differindex 2f668cca82f..36d5d27c3a3 100644 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/s1606morley.cdy +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1606morley.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1607inputbox.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1607inputbox.cdy Binary files differnew file mode 100644 index 00000000000..77be31c3d07 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1607inputbox.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1608texcalc.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1608texcalc.cdy Binary files differnew file mode 100644 index 00000000000..eca4763b699 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1608texcalc.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1609trigratio.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1609trigratio.cdy Binary files differnew file mode 100644 index 00000000000..11afb67d79a --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketJSmisc/s1609trigratio.cdy diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/s1601basic.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/s1601basic.cdy Binary files differdeleted file mode 100644 index 1d0956a9e12..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/s1601basic.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/s1602diffeq2.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/s1602diffeq2.cdy Binary files differdeleted file mode 100644 index fefad10c46c..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/s1602diffeq2.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/s1603gamow.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/s1603gamow.cdy Binary files differdeleted file mode 100644 index 56d96cb958f..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/s1603gamow.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/s1604putoncurve.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/s1604putoncurve.cdy Binary files differdeleted file mode 100644 index 1f02e44829c..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/s1604putoncurve.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/s1605triangle.cdy b/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/s1605triangle.cdy Binary files differdeleted file mode 100644 index 540823d1b8e..00000000000 --- a/Master/texmf-dist/doc/support/ketcindy/samples/s16ketcindyJS/s1605triangle.cdy +++ /dev/null diff --git a/Master/texmf-dist/doc/support/ketcindy/source/ketmanual/Fig/drawfigures1.tex b/Master/texmf-dist/doc/support/ketcindy/source/ketmanual/Fig/drawfigures1.tex new file mode 100644 index 00000000000..5371fa27dd5 --- /dev/null +++ b/Master/texmf-dist/doc/support/ketcindy/source/ketmanual/Fig/drawfigures1.tex @@ -0,0 +1,748 @@ +%%% /Users/takatoosetsuo/Dropbox/kettoday/0426drawfigures/fig/example1.tex +%%% Generator=example1.cdy +{\unitlength=1cm% +\begin{picture}% +(10,4)(-2,-1)% +\special{pn 8}% +% +\special{pa 394 -394}\special{pa 391 -443}\special{pa 381 -492}\special{pa 366 -539}% +\special{pa 345 -583}\special{pa 319 -625}\special{pa 287 -663}\special{pa 251 -697}% +\special{pa 211 -726}\special{pa 168 -750}\special{pa 122 -768}\special{pa 74 -780}% +\special{pa 25 -787}\special{pa -25 -787}\special{pa -74 -780}\special{pa -122 -768}% +\special{pa -168 -750}\special{pa -211 -726}\special{pa -251 -697}\special{pa -287 -663}% +\special{pa -319 -625}\special{pa -345 -583}\special{pa -366 -539}\special{pa -381 -492}% +\special{pa -391 -443}\special{pa -394 -394}\special{pa -391 -344}\special{pa -381 -296}% +\special{pa -366 -249}\special{pa -345 -204}\special{pa -319 -162}\special{pa -287 -124}% +\special{pa -251 -90}\special{pa -211 -61}\special{pa -168 -37}\special{pa -122 -19}% +\special{pa -74 -7}\special{pa -25 -1}\special{pa 25 -1}\special{pa 74 -7}% +\special{pa 122 -19}\special{pa 168 -37}\special{pa 211 -61}\special{pa 251 -90}% +\special{pa 287 -124}\special{pa 319 -162}\special{pa 345 -204}\special{pa 366 -249}% +\special{pa 381 -296}\special{pa 391 -344}\special{pa 394 -394}% +\special{fp}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 11 -11}\special{pa 5 -15}\special{pa -2 -16}\special{pa -8 -13}\special{pa -13 -8}\special{pa -16 -2}\special{pa -15 5}\special{pa -11 11}\special{pa -5 15}\special{pa 2 16}\special{pa 8 13}\special{pa 13 8}\special{pa 16 2}\special{pa 15 -5}\special{pa 11 -11}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 11 -11}\special{pa 5 -15}\special{pa -2 -16}\special{pa -8 -13}\special{pa -13 -8}\special{pa -16 -2}\special{pa -15 5}\special{pa -11 11}\special{pa -5 15}\special{pa 2 16}\special{pa 8 13}\special{pa 13 8}\special{pa 16 2}\special{pa 15 -5}\special{pa 11 -11}\special{fp}% +}% +\special{pn 2}% +\special{pa 463 -317}\special{pa 470 -366}\special{pa 470 -415}\special{pa 465 -464}% +\special{pa 453 -512}\special{pa 435 -559}\special{pa 411 -602}\special{pa 383 -642}% +\special{pa 349 -679}\special{pa 311 -710}\special{pa 270 -737}\special{pa 225 -759}% +\special{pa 178 -774}\special{pa 130 -784}\special{pa 80 -787}\special{pa 31 -785}% +\special{pa -18 -776}\special{pa -65 -761}\special{pa -110 -740}\special{pa -152 -714}% +\special{pa -190 -683}\special{pa -224 -647}\special{pa -253 -607}\special{pa -278 -564}% +\special{pa -296 -518}\special{pa -309 -471}\special{pa -315 -422}\special{pa -316 -372}% +\special{pa -310 -323}\special{pa -298 -275}\special{pa -280 -229}\special{pa -257 -185}% +\special{pa -228 -145}\special{pa -194 -109}\special{pa -157 -77}\special{pa -115 -50}% +\special{pa -70 -29}\special{pa -24 -13}\special{pa 25 -4}\special{pa 74 -0}% +\special{pa 124 -3}\special{pa 172 -12}\special{pa 219 -27}\special{pa 264 -47}% +\special{pa 306 -73}\special{pa 345 -105}\special{pa 379 -140}\special{pa 408 -180}% +\special{pa 432 -223}\special{pa 451 -269}\special{pa 463 -317}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 12 -19}\special{pa 6 -22}\special{pa -1 -23}\special{pa -8 -21}\special{pa -13 -16}\special{pa -15 -9}\special{pa -14 -2}\special{pa -11 4}\special{pa -5 7}\special{pa 2 8}\special{pa 9 6}\special{pa 14 1}\special{pa 16 -6}\special{pa 15 -13}\special{pa 12 -19}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 12 -19}\special{pa 6 -22}\special{pa -1 -23}\special{pa -8 -21}\special{pa -13 -16}\special{pa -15 -9}\special{pa -14 -2}\special{pa -11 4}\special{pa -5 7}\special{pa 2 8}\special{pa 9 6}\special{pa 14 1}\special{pa 16 -6}\special{pa 15 -13}\special{pa 12 -19}\special{fp}% +}% +\special{pn 2}% +\special{pa 518 -243}\special{pa 534 -290}\special{pa 544 -338}\special{pa 548 -388}% +\special{pa 546 -437}\special{pa 537 -486}\special{pa 523 -533}\special{pa 503 -578}% +\special{pa 477 -620}\special{pa 446 -659}\special{pa 410 -693}\special{pa 371 -723}% +\special{pa 328 -747}\special{pa 282 -766}\special{pa 234 -779}\special{pa 185 -786}% +\special{pa 136 -787}\special{pa 87 -782}\special{pa 39 -770}\special{pa -7 -753}% +\special{pa -51 -729}\special{pa -92 -701}\special{pa -128 -668}\special{pa -160 -630}% +\special{pa -187 -589}\special{pa -209 -544}\special{pa -225 -498}\special{pa -235 -449}% +\special{pa -239 -400}\special{pa -237 -350}\special{pa -228 -302}\special{pa -214 -255}% +\special{pa -193 -209}\special{pa -168 -167}\special{pa -137 -129}\special{pa -101 -94}% +\special{pa -62 -65}\special{pa -19 -40}\special{pa 27 -21}\special{pa 75 -8}% +\special{pa 124 -1}\special{pa 173 -0}\special{pa 222 -6}\special{pa 270 -17}% +\special{pa 317 -35}\special{pa 360 -58}\special{pa 401 -86}\special{pa 437 -120}% +\special{pa 469 -157}\special{pa 497 -199}\special{pa 518 -243}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 15 -41}\special{pa 9 -45}\special{pa 2 -46}\special{pa -4 -43}\special{pa -9 -38}\special{pa -12 -32}\special{pa -11 -25}\special{pa -7 -19}\special{pa -1 -15}\special{pa 6 -14}\special{pa 12 -17}\special{pa 17 -22}\special{pa 20 -28}\special{pa 19 -35}\special{pa 15 -41}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 15 -41}\special{pa 9 -45}\special{pa 2 -46}\special{pa -4 -43}\special{pa -9 -38}\special{pa -12 -32}\special{pa -11 -25}\special{pa -7 -19}\special{pa -1 -15}\special{pa 6 -14}\special{pa 12 -17}\special{pa 17 -22}\special{pa 20 -28}\special{pa 19 -35}\special{pa 15 -41}\special{fp}% +}% +\special{pn 2}% +\special{pa 559 -175}\special{pa 584 -218}\special{pa 603 -263}\special{pa 617 -311}% +\special{pa 624 -360}\special{pa 625 -409}\special{pa 620 -458}\special{pa 609 -507}% +\special{pa 592 -553}\special{pa 569 -597}\special{pa 541 -637}\special{pa 508 -674}% +\special{pa 471 -707}\special{pa 430 -734}\special{pa 385 -756}\special{pa 339 -773}% +\special{pa 290 -783}\special{pa 241 -787}\special{pa 192 -785}\special{pa 143 -777}% +\special{pa 96 -763}\special{pa 50 -743}\special{pa 8 -718}\special{pa -31 -687}% +\special{pa -65 -652}\special{pa -95 -612}\special{pa -120 -570}\special{pa -140 -524}% +\special{pa -153 -477}\special{pa -160 -428}\special{pa -161 -378}\special{pa -156 -329}% +\special{pa -145 -281}\special{pa -128 -235}\special{pa -105 -191}\special{pa -77 -150}% +\special{pa -44 -113}\special{pa -7 -81}\special{pa 34 -53}\special{pa 78 -31}% +\special{pa 125 -15}\special{pa 173 -4}\special{pa 223 -0}\special{pa 272 -2}% +\special{pa 321 -10}\special{pa 368 -24}\special{pa 413 -44}\special{pa 456 -70}% +\special{pa 495 -100}\special{pa 529 -136}\special{pa 559 -175}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 24 -77}\special{pa 18 -81}\special{pa 11 -82}\special{pa 5 -80}\special{pa 0 -75}\special{pa -2 -68}\special{pa -2 -61}\special{pa 2 -55}\special{pa 8 -51}\special{pa 15 -51}\special{pa 22 -53}\special{pa 27 -58}\special{pa 29 -65}\special{pa 28 -72}\special{pa 24 -77}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 24 -77}\special{pa 18 -81}\special{pa 11 -82}\special{pa 5 -80}\special{pa 0 -75}\special{pa -2 -68}\special{pa -2 -61}\special{pa 2 -55}\special{pa 8 -51}\special{pa 15 -51}\special{pa 22 -53}\special{pa 27 -58}\special{pa 29 -65}\special{pa 28 -72}\special{pa 24 -77}\special{fp}% +}% +\special{pn 2}% +\special{pa 588 -115}\special{pa 620 -152}\special{pa 648 -193}\special{pa 671 -237}% +\special{pa 687 -284}\special{pa 698 -332}\special{pa 703 -381}\special{pa 701 -431}% +\special{pa 693 -480}\special{pa 680 -527}\special{pa 660 -572}\special{pa 635 -615}% +\special{pa 605 -654}\special{pa 570 -689}\special{pa 531 -719}\special{pa 488 -744}% +\special{pa 443 -764}\special{pa 395 -778}\special{pa 346 -786}\special{pa 297 -787}% +\special{pa 248 -783}\special{pa 199 -772}\special{pa 153 -755}\special{pa 109 -733}% +\special{pa 68 -705}\special{pa 31 -672}\special{pa -2 -635}\special{pa -30 -594}% +\special{pa -52 -550}\special{pa -69 -504}\special{pa -80 -455}\special{pa -84 -406}% +\special{pa -83 -357}\special{pa -75 -308}\special{pa -61 -260}\special{pa -42 -215}% +\special{pa -16 -172}\special{pa 14 -133}\special{pa 49 -98}\special{pa 88 -68}% +\special{pa 130 -43}\special{pa 176 -23}\special{pa 223 -9}\special{pa 272 -2}% +\special{pa 322 -0}\special{pa 371 -5}\special{pa 419 -16}\special{pa 466 -32}% +\special{pa 510 -55}\special{pa 551 -83}\special{pa 588 -115}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 42 -126}\special{pa 36 -130}\special{pa 29 -131}\special{pa 22 -129}\special{pa 17 -124}\special{pa 15 -117}\special{pa 16 -110}\special{pa 20 -104}\special{pa 26 -100}\special{pa 33 -100}\special{pa 39 -102}\special{pa 44 -107}\special{pa 46 -114}\special{pa 46 -121}\special{pa 42 -126}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 42 -126}\special{pa 36 -130}\special{pa 29 -131}\special{pa 22 -129}\special{pa 17 -124}\special{pa 15 -117}\special{pa 16 -110}\special{pa 20 -104}\special{pa 26 -100}\special{pa 33 -100}\special{pa 39 -102}\special{pa 44 -107}\special{pa 46 -114}\special{pa 46 -121}\special{pa 42 -126}\special{fp}% +}% +\special{pn 2}% +\special{pa 605 -66}\special{pa 645 -96}\special{pa 680 -131}\special{pa 710 -170}% +\special{pa 736 -212}\special{pa 756 -257}\special{pa 770 -305}\special{pa 778 -354}% +\special{pa 780 -403}\special{pa 776 -452}\special{pa 765 -501}\special{pa 749 -547}% +\special{pa 727 -591}\special{pa 699 -633}\special{pa 667 -670}\special{pa 630 -703}% +\special{pa 590 -731}\special{pa 546 -754}\special{pa 499 -771}\special{pa 451 -782}% +\special{pa 402 -787}\special{pa 353 -786}\special{pa 304 -779}\special{pa 256 -765}% +\special{pa 211 -746}\special{pa 168 -721}\special{pa 128 -691}\special{pa 93 -656}% +\special{pa 63 -618}\special{pa 37 -575}\special{pa 17 -530}\special{pa 3 -483}% +\special{pa -5 -434}\special{pa -7 -384}\special{pa -3 -335}\special{pa 8 -287}% +\special{pa 24 -240}\special{pa 46 -196}\special{pa 74 -155}\special{pa 106 -118}% +\special{pa 143 -85}\special{pa 183 -56}\special{pa 227 -34}\special{pa 274 -17}% +\special{pa 322 -5}\special{pa 371 -0}\special{pa 420 -1}\special{pa 469 -9}% +\special{pa 517 -22}\special{pa 562 -42}\special{pa 605 -66}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 70 -186}\special{pa 64 -190}\special{pa 57 -191}\special{pa 51 -188}\special{pa 46 -183}\special{pa 44 -177}\special{pa 44 -170}\special{pa 48 -164}\special{pa 54 -160}\special{pa 61 -159}\special{pa 68 -162}\special{pa 72 -167}\special{pa 75 -173}\special{pa 74 -180}\special{pa 70 -186}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 70 -186}\special{pa 64 -190}\special{pa 57 -191}\special{pa 51 -188}\special{pa 46 -183}\special{pa 44 -177}\special{pa 44 -170}\special{pa 48 -164}\special{pa 54 -160}\special{pa 61 -159}\special{pa 68 -162}\special{pa 72 -167}\special{pa 75 -173}\special{pa 74 -180}\special{pa 70 -186}\special{fp}% +}% +\special{pn 2}% +\special{pa 614 -30}\special{pa 659 -52}\special{pa 700 -79}\special{pa 738 -111}% +\special{pa 771 -148}\special{pa 800 -188}\special{pa 823 -232}\special{pa 840 -278}% +\special{pa 852 -326}\special{pa 857 -375}\special{pa 856 -425}\special{pa 849 -474}% +\special{pa 836 -521}\special{pa 817 -567}\special{pa 793 -610}\special{pa 763 -649}% +\special{pa 729 -685}\special{pa 690 -716}\special{pa 648 -742}\special{pa 603 -762}% +\special{pa 556 -777}\special{pa 507 -785}\special{pa 458 -787}\special{pa 408 -783}% +\special{pa 360 -773}\special{pa 313 -757}\special{pa 269 -736}\special{pa 227 -709}% +\special{pa 190 -676}\special{pa 157 -640}\special{pa 128 -599}\special{pa 105 -556}% +\special{pa 88 -509}\special{pa 76 -461}\special{pa 71 -412}\special{pa 71 -363}% +\special{pa 78 -314}\special{pa 91 -266}\special{pa 110 -220}\special{pa 135 -178}% +\special{pa 164 -138}\special{pa 199 -103}\special{pa 237 -72}\special{pa 280 -46}% +\special{pa 325 -25}\special{pa 372 -11}\special{pa 421 -2}\special{pa 470 -0}% +\special{pa 519 -4}\special{pa 568 -14}\special{pa 614 -30}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 111 -254}\special{pa 105 -258}\special{pa 98 -259}\special{pa 92 -256}\special{pa 87 -251}\special{pa 84 -245}\special{pa 85 -238}\special{pa 89 -232}\special{pa 95 -228}\special{pa 102 -227}\special{pa 108 -230}\special{pa 113 -235}\special{pa 116 -241}\special{pa 115 -248}\special{pa 111 -254}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 111 -254}\special{pa 105 -258}\special{pa 98 -259}\special{pa 92 -256}\special{pa 87 -251}\special{pa 84 -245}\special{pa 85 -238}\special{pa 89 -232}\special{pa 95 -228}\special{pa 102 -227}\special{pa 108 -230}\special{pa 113 -235}\special{pa 116 -241}\special{pa 115 -248}\special{pa 111 -254}\special{fp}% +}% +\special{pn 2}% +\special{pa 618 -8}\special{pa 666 -20}\special{pa 712 -39}\special{pa 755 -63}% +\special{pa 794 -92}\special{pa 830 -126}\special{pa 861 -165}\special{pa 888 -207}% +\special{pa 908 -252}\special{pa 923 -299}\special{pa 932 -347}\special{pa 935 -397}% +\special{pa 931 -446}\special{pa 922 -495}\special{pa 906 -542}\special{pa 885 -586}% +\special{pa 858 -628}\special{pa 826 -665}\special{pa 790 -699}\special{pa 749 -728}% +\special{pa 706 -751}\special{pa 660 -769}\special{pa 612 -781}\special{pa 563 -787}% +\special{pa 513 -786}\special{pa 464 -780}\special{pa 417 -767}\special{pa 371 -749}% +\special{pa 328 -724}\special{pa 288 -695}\special{pa 252 -661}\special{pa 221 -623}% +\special{pa 195 -581}\special{pa 174 -536}\special{pa 159 -489}\special{pa 150 -440}% +\special{pa 147 -391}\special{pa 151 -341}\special{pa 161 -293}\special{pa 176 -246}% +\special{pa 198 -201}\special{pa 224 -160}\special{pa 256 -122}\special{pa 293 -88}% +\special{pa 333 -60}\special{pa 376 -36}\special{pa 422 -18}\special{pa 470 -6}% +\special{pa 519 -1}\special{pa 569 -1}\special{pa 618 -8}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 166 -328}\special{pa 160 -332}\special{pa 153 -333}\special{pa 147 -330}\special{pa 142 -325}\special{pa 139 -319}\special{pa 140 -312}\special{pa 144 -306}\special{pa 150 -302}\special{pa 157 -301}\special{pa 163 -304}\special{pa 168 -309}\special{pa 171 -315}\special{pa 170 -322}\special{pa 166 -328}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 166 -328}\special{pa 160 -332}\special{pa 153 -333}\special{pa 147 -330}\special{pa 142 -325}\special{pa 139 -319}\special{pa 140 -312}\special{pa 144 -306}\special{pa 150 -302}\special{pa 157 -301}\special{pa 163 -304}\special{pa 168 -309}\special{pa 171 -315}\special{pa 170 -322}\special{pa 166 -328}\special{fp}% +}% +\special{pn 2}% +\special{pa 618 -0}\special{pa 668 -3}\special{pa 716 -12}\special{pa 763 -28}% +\special{pa 808 -49}\special{pa 850 -75}\special{pa 888 -107}\special{pa 922 -143}% +\special{pa 951 -183}\special{pa 975 -226}\special{pa 993 -272}\special{pa 1005 -320}% +\special{pa 1011 -369}\special{pa 1011 -418}\special{pa 1005 -467}\special{pa 993 -515}% +\special{pa 975 -561}\special{pa 951 -605}\special{pa 922 -645}\special{pa 888 -681}% +\special{pa 850 -712}\special{pa 808 -739}\special{pa 763 -760}\special{pa 716 -775}% +\special{pa 668 -784}\special{pa 618 -787}\special{pa 569 -784}\special{pa 521 -775}% +\special{pa 473 -760}\special{pa 429 -739}\special{pa 387 -712}\special{pa 349 -681}% +\special{pa 315 -645}\special{pa 286 -605}\special{pa 262 -561}\special{pa 244 -515}% +\special{pa 232 -467}\special{pa 226 -418}\special{pa 226 -369}\special{pa 232 -320}% +\special{pa 244 -272}\special{pa 262 -226}\special{pa 286 -183}\special{pa 315 -143}% +\special{pa 349 -107}\special{pa 387 -75}\special{pa 429 -49}\special{pa 473 -28}% +\special{pa 521 -12}\special{pa 569 -3}\special{pa 618 -0}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 236 -405}\special{pa 230 -409}\special{pa 223 -409}\special{pa 216 -407}\special{pa 211 -402}\special{pa 209 -395}\special{pa 210 -388}\special{pa 214 -383}\special{pa 220 -379}\special{pa 226 -378}\special{pa 233 -380}\special{pa 238 -385}\special{pa 240 -392}\special{pa 240 -399}\special{pa 236 -405}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 236 -405}\special{pa 230 -409}\special{pa 223 -409}\special{pa 216 -407}\special{pa 211 -402}\special{pa 209 -395}\special{pa 210 -388}\special{pa 214 -383}\special{pa 220 -379}\special{pa 226 -378}\special{pa 233 -380}\special{pa 238 -385}\special{pa 240 -392}\special{pa 240 -399}\special{pa 236 -405}\special{fp}% +}% +\special{pn 2}% +\special{pa 619 -8}\special{pa 668 -1}\special{pa 717 -1}\special{pa 766 -6}% +\special{pa 814 -18}\special{pa 861 -36}\special{pa 904 -60}\special{pa 944 -88}% +\special{pa 981 -122}\special{pa 1012 -160}\special{pa 1039 -201}\special{pa 1061 -246}% +\special{pa 1076 -293}\special{pa 1086 -341}\special{pa 1089 -391}\special{pa 1087 -440}% +\special{pa 1078 -489}\special{pa 1063 -536}\special{pa 1042 -581}\special{pa 1016 -623}% +\special{pa 985 -661}\special{pa 949 -695}\special{pa 909 -724}\special{pa 866 -749}% +\special{pa 820 -767}\special{pa 773 -780}\special{pa 724 -786}\special{pa 674 -787}% +\special{pa 625 -781}\special{pa 577 -769}\special{pa 531 -751}\special{pa 487 -728}% +\special{pa 447 -699}\special{pa 411 -665}\special{pa 379 -628}\special{pa 352 -586}% +\special{pa 331 -542}\special{pa 315 -495}\special{pa 306 -446}\special{pa 302 -397}% +\special{pa 305 -347}\special{pa 314 -299}\special{pa 329 -252}\special{pa 349 -207}% +\special{pa 375 -165}\special{pa 407 -126}\special{pa 442 -92}\special{pa 482 -63}% +\special{pa 525 -39}\special{pa 571 -20}\special{pa 619 -8}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 321 -482}\special{pa 315 -485}\special{pa 308 -486}\special{pa 301 -484}\special{pa 296 -479}\special{pa 294 -472}\special{pa 295 -465}\special{pa 298 -459}\special{pa 304 -456}\special{pa 311 -455}\special{pa 318 -457}\special{pa 323 -462}\special{pa 325 -469}\special{pa 324 -476}\special{pa 321 -482}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 321 -482}\special{pa 315 -485}\special{pa 308 -486}\special{pa 301 -484}\special{pa 296 -479}\special{pa 294 -472}\special{pa 295 -465}\special{pa 298 -459}\special{pa 304 -456}\special{pa 311 -455}\special{pa 318 -457}\special{pa 323 -462}\special{pa 325 -469}\special{pa 324 -476}\special{pa 321 -482}\special{fp}% +}% +\special{pn 2}% +\special{pa 622 -30}\special{pa 669 -14}\special{pa 718 -4}\special{pa 767 -0}% +\special{pa 816 -2}\special{pa 865 -11}\special{pa 912 -25}\special{pa 957 -46}% +\special{pa 999 -72}\special{pa 1038 -103}\special{pa 1072 -138}\special{pa 1102 -178}% +\special{pa 1127 -220}\special{pa 1146 -266}\special{pa 1159 -314}\special{pa 1166 -363}% +\special{pa 1166 -412}\special{pa 1161 -461}\special{pa 1149 -509}\special{pa 1132 -556}% +\special{pa 1109 -599}\special{pa 1080 -640}\special{pa 1047 -676}\special{pa 1009 -709}% +\special{pa 968 -736}\special{pa 924 -757}\special{pa 877 -773}\special{pa 829 -783}% +\special{pa 779 -787}\special{pa 730 -785}\special{pa 681 -777}\special{pa 634 -762}% +\special{pa 589 -742}\special{pa 547 -716}\special{pa 508 -685}\special{pa 474 -649}% +\special{pa 444 -610}\special{pa 419 -567}\special{pa 401 -521}\special{pa 388 -474}% +\special{pa 381 -425}\special{pa 380 -375}\special{pa 385 -326}\special{pa 397 -278}% +\special{pa 414 -232}\special{pa 437 -188}\special{pa 466 -148}\special{pa 499 -111}% +\special{pa 537 -79}\special{pa 578 -52}\special{pa 622 -30}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 420 -555}\special{pa 415 -559}\special{pa 408 -560}\special{pa 401 -558}\special{pa 396 -553}\special{pa 394 -546}\special{pa 394 -539}\special{pa 398 -533}\special{pa 404 -529}\special{pa 411 -529}\special{pa 418 -531}\special{pa 423 -536}\special{pa 425 -543}\special{pa 424 -550}\special{pa 420 -555}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 420 -555}\special{pa 415 -559}\special{pa 408 -560}\special{pa 401 -558}\special{pa 396 -553}\special{pa 394 -546}\special{pa 394 -539}\special{pa 398 -533}\special{pa 404 -529}\special{pa 411 -529}\special{pa 418 -531}\special{pa 423 -536}\special{pa 425 -543}\special{pa 424 -550}\special{pa 420 -555}\special{fp}% +}% +\special{pn 2}% +\special{pa 632 -66}\special{pa 674 -42}\special{pa 720 -22}\special{pa 767 -9}% +\special{pa 816 -1}\special{pa 866 -0}\special{pa 915 -5}\special{pa 963 -17}% +\special{pa 1010 -34}\special{pa 1053 -56}\special{pa 1094 -85}\special{pa 1131 -118}% +\special{pa 1163 -155}\special{pa 1191 -196}\special{pa 1213 -240}\special{pa 1229 -287}% +\special{pa 1240 -335}\special{pa 1244 -384}\special{pa 1242 -434}\special{pa 1234 -483}% +\special{pa 1220 -530}\special{pa 1200 -575}\special{pa 1174 -618}\special{pa 1144 -656}% +\special{pa 1108 -691}\special{pa 1069 -721}\special{pa 1026 -746}\special{pa 981 -765}% +\special{pa 933 -779}\special{pa 884 -786}\special{pa 835 -787}\special{pa 786 -782}% +\special{pa 738 -771}\special{pa 691 -754}\special{pa 647 -731}\special{pa 607 -703}% +\special{pa 570 -670}\special{pa 537 -633}\special{pa 510 -591}\special{pa 488 -547}% +\special{pa 471 -501}\special{pa 461 -452}\special{pa 457 -403}\special{pa 459 -354}% +\special{pa 467 -305}\special{pa 481 -257}\special{pa 501 -212}\special{pa 526 -170}% +\special{pa 557 -131}\special{pa 592 -96}\special{pa 632 -66}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 534 -624}\special{pa 528 -627}\special{pa 521 -628}\special{pa 515 -626}\special{pa 510 -621}\special{pa 507 -614}\special{pa 508 -607}\special{pa 512 -601}\special{pa 518 -598}\special{pa 525 -597}\special{pa 531 -599}\special{pa 536 -604}\special{pa 539 -611}\special{pa 538 -618}\special{pa 534 -624}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 534 -624}\special{pa 528 -627}\special{pa 521 -628}\special{pa 515 -626}\special{pa 510 -621}\special{pa 507 -614}\special{pa 508 -607}\special{pa 512 -601}\special{pa 518 -598}\special{pa 525 -597}\special{pa 531 -599}\special{pa 536 -604}\special{pa 539 -611}\special{pa 538 -618}\special{pa 534 -624}\special{fp}% +}% +\special{pn 2}% +\special{pa 649 -115}\special{pa 686 -83}\special{pa 727 -55}\special{pa 771 -32}% +\special{pa 818 -16}\special{pa 866 -5}\special{pa 915 -0}\special{pa 965 -2}% +\special{pa 1014 -9}\special{pa 1061 -23}\special{pa 1106 -43}\special{pa 1149 -68}% +\special{pa 1188 -98}\special{pa 1223 -133}\special{pa 1253 -172}\special{pa 1278 -215}% +\special{pa 1298 -260}\special{pa 1312 -308}\special{pa 1320 -357}\special{pa 1321 -406}% +\special{pa 1316 -455}\special{pa 1306 -504}\special{pa 1289 -550}\special{pa 1267 -594}% +\special{pa 1239 -635}\special{pa 1206 -672}\special{pa 1169 -705}\special{pa 1128 -733}% +\special{pa 1084 -755}\special{pa 1037 -772}\special{pa 989 -783}\special{pa 940 -787}% +\special{pa 891 -786}\special{pa 842 -778}\special{pa 794 -764}\special{pa 749 -744}% +\special{pa 706 -719}\special{pa 667 -689}\special{pa 632 -654}\special{pa 602 -615}% +\special{pa 577 -572}\special{pa 557 -527}\special{pa 543 -480}\special{pa 536 -431}% +\special{pa 534 -381}\special{pa 539 -332}\special{pa 550 -284}\special{pa 566 -237}% +\special{pa 589 -193}\special{pa 617 -152}\special{pa 649 -115}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 660 -683}\special{pa 654 -687}\special{pa 647 -688}\special{pa 641 -685}\special{pa 636 -680}\special{pa 634 -674}\special{pa 634 -667}\special{pa 638 -661}\special{pa 644 -657}\special{pa 651 -656}\special{pa 658 -659}\special{pa 663 -664}\special{pa 665 -670}\special{pa 664 -677}\special{pa 660 -683}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 660 -683}\special{pa 654 -687}\special{pa 647 -688}\special{pa 641 -685}\special{pa 636 -680}\special{pa 634 -674}\special{pa 634 -667}\special{pa 638 -661}\special{pa 644 -657}\special{pa 651 -656}\special{pa 658 -659}\special{pa 663 -664}\special{pa 665 -670}\special{pa 664 -677}\special{pa 660 -683}\special{fp}% +}% +\special{pn 2}% +\special{pa 678 -175}\special{pa 708 -136}\special{pa 742 -100}\special{pa 781 -70}% +\special{pa 823 -44}\special{pa 869 -24}\special{pa 916 -10}\special{pa 965 -2}% +\special{pa 1014 -0}\special{pa 1063 -4}\special{pa 1112 -15}\special{pa 1158 -31}% +\special{pa 1203 -53}\special{pa 1244 -81}\special{pa 1281 -113}\special{pa 1314 -150}% +\special{pa 1342 -191}\special{pa 1365 -235}\special{pa 1382 -281}\special{pa 1393 -329}% +\special{pa 1398 -378}\special{pa 1397 -428}\special{pa 1390 -477}\special{pa 1376 -524}% +\special{pa 1357 -570}\special{pa 1332 -612}\special{pa 1302 -652}\special{pa 1268 -687}% +\special{pa 1229 -718}\special{pa 1186 -743}\special{pa 1141 -763}\special{pa 1094 -777}% +\special{pa 1045 -785}\special{pa 996 -787}\special{pa 946 -783}\special{pa 898 -773}% +\special{pa 851 -756}\special{pa 807 -734}\special{pa 766 -707}\special{pa 729 -674}% +\special{pa 696 -637}\special{pa 668 -597}\special{pa 645 -553}\special{pa 628 -507}% +\special{pa 617 -458}\special{pa 612 -409}\special{pa 613 -360}\special{pa 620 -311}% +\special{pa 633 -263}\special{pa 653 -218}\special{pa 678 -175}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 797 -732}\special{pa 791 -736}\special{pa 784 -737}\special{pa 778 -734}\special{pa 773 -729}\special{pa 771 -723}\special{pa 771 -716}\special{pa 775 -710}\special{pa 781 -706}\special{pa 788 -705}\special{pa 795 -708}\special{pa 800 -713}\special{pa 802 -719}\special{pa 801 -726}\special{pa 797 -732}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 797 -732}\special{pa 791 -736}\special{pa 784 -737}\special{pa 778 -734}\special{pa 773 -729}\special{pa 771 -723}\special{pa 771 -716}\special{pa 775 -710}\special{pa 781 -706}\special{pa 788 -705}\special{pa 795 -708}\special{pa 800 -713}\special{pa 802 -719}\special{pa 801 -726}\special{pa 797 -732}\special{fp}% +}% +\special{pn 2}% +\special{pa 719 -243}\special{pa 740 -199}\special{pa 767 -157}\special{pa 800 -120}% +\special{pa 836 -86}\special{pa 877 -58}\special{pa 920 -35}\special{pa 966 -17}% +\special{pa 1015 -6}\special{pa 1064 -0}\special{pa 1113 -1}\special{pa 1162 -8}% +\special{pa 1210 -21}\special{pa 1255 -40}\special{pa 1298 -65}\special{pa 1338 -94}% +\special{pa 1373 -129}\special{pa 1404 -167}\special{pa 1430 -209}\special{pa 1451 -255}% +\special{pa 1465 -302}\special{pa 1474 -350}\special{pa 1476 -400}\special{pa 1472 -449}% +\special{pa 1462 -498}\special{pa 1446 -544}\special{pa 1424 -589}\special{pa 1397 -630}% +\special{pa 1365 -668}\special{pa 1328 -701}\special{pa 1288 -729}\special{pa 1244 -753}% +\special{pa 1198 -770}\special{pa 1150 -782}\special{pa 1101 -787}\special{pa 1051 -786}% +\special{pa 1002 -779}\special{pa 955 -766}\special{pa 909 -747}\special{pa 866 -723}% +\special{pa 827 -693}\special{pa 791 -659}\special{pa 760 -620}\special{pa 734 -578}% +\special{pa 714 -533}\special{pa 699 -486}\special{pa 691 -437}\special{pa 689 -388}% +\special{pa 692 -338}\special{pa 702 -290}\special{pa 719 -243}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 943 -769}\special{pa 937 -772}\special{pa 930 -773}\special{pa 923 -771}\special{pa 918 -766}\special{pa 916 -759}\special{pa 917 -752}\special{pa 920 -746}\special{pa 926 -743}\special{pa 933 -742}\special{pa 940 -744}\special{pa 945 -749}\special{pa 947 -756}\special{pa 946 -763}\special{pa 943 -769}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 943 -769}\special{pa 937 -772}\special{pa 930 -773}\special{pa 923 -771}\special{pa 918 -766}\special{pa 916 -759}\special{pa 917 -752}\special{pa 920 -746}\special{pa 926 -743}\special{pa 933 -742}\special{pa 940 -744}\special{pa 945 -749}\special{pa 947 -756}\special{pa 946 -763}\special{pa 943 -769}\special{fp}% +}% +\special{pn 2}% +\special{pa 773 -317}\special{pa 786 -269}\special{pa 805 -223}\special{pa 829 -180}% +\special{pa 858 -140}\special{pa 892 -105}\special{pa 931 -73}\special{pa 973 -47}% +\special{pa 1017 -27}\special{pa 1065 -12}\special{pa 1113 -3}\special{pa 1163 -0}% +\special{pa 1212 -4}\special{pa 1260 -13}\special{pa 1307 -29}\special{pa 1352 -50}% +\special{pa 1393 -77}\special{pa 1431 -109}\special{pa 1465 -145}\special{pa 1494 -185}% +\special{pa 1517 -229}\special{pa 1535 -275}\special{pa 1547 -323}\special{pa 1553 -372}% +\special{pa 1552 -422}\special{pa 1546 -471}\special{pa 1533 -518}\special{pa 1514 -564}% +\special{pa 1490 -607}\special{pa 1461 -647}\special{pa 1427 -683}\special{pa 1388 -714}% +\special{pa 1346 -740}\special{pa 1302 -761}\special{pa 1254 -776}\special{pa 1206 -785}% +\special{pa 1156 -787}\special{pa 1107 -784}\special{pa 1059 -774}\special{pa 1012 -759}% +\special{pa 967 -737}\special{pa 926 -710}\special{pa 888 -679}\special{pa 854 -642}% +\special{pa 825 -602}\special{pa 802 -559}\special{pa 784 -512}\special{pa 772 -464}% +\special{pa 766 -415}\special{pa 767 -366}\special{pa 773 -317}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 1094 -791}\special{pa 1088 -795}\special{pa 1081 -795}\special{pa 1074 -793}\special{pa 1069 -788}\special{pa 1067 -782}\special{pa 1068 -775}\special{pa 1072 -769}\special{pa 1078 -765}\special{pa 1084 -764}\special{pa 1091 -767}\special{pa 1096 -771}\special{pa 1098 -778}\special{pa 1098 -785}\special{pa 1094 -791}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 1094 -791}\special{pa 1088 -795}\special{pa 1081 -795}\special{pa 1074 -793}\special{pa 1069 -788}\special{pa 1067 -782}\special{pa 1068 -775}\special{pa 1072 -769}\special{pa 1078 -765}\special{pa 1084 -764}\special{pa 1091 -767}\special{pa 1096 -771}\special{pa 1098 -778}\special{pa 1098 -785}\special{pa 1094 -791}\special{fp}% +}% +\special{pn 2}% +\special{pa 843 -394}\special{pa 846 -344}\special{pa 856 -296}\special{pa 871 -249}% +\special{pa 892 -204}\special{pa 918 -162}\special{pa 950 -124}\special{pa 986 -90}% +\special{pa 1026 -61}\special{pa 1069 -37}\special{pa 1115 -19}\special{pa 1163 -7}% +\special{pa 1212 -1}\special{pa 1262 -1}\special{pa 1311 -7}\special{pa 1359 -19}% +\special{pa 1404 -37}\special{pa 1448 -61}\special{pa 1488 -90}\special{pa 1524 -124}% +\special{pa 1555 -162}\special{pa 1582 -204}\special{pa 1603 -249}\special{pa 1618 -296}% +\special{pa 1627 -344}\special{pa 1631 -394}\special{pa 1627 -443}\special{pa 1618 -492}% +\special{pa 1603 -539}\special{pa 1582 -583}\special{pa 1555 -625}\special{pa 1524 -663}% +\special{pa 1488 -697}\special{pa 1448 -726}\special{pa 1404 -750}\special{pa 1359 -768}% +\special{pa 1311 -780}\special{pa 1262 -787}\special{pa 1212 -787}\special{pa 1163 -780}% +\special{pa 1115 -768}\special{pa 1069 -750}\special{pa 1026 -726}\special{pa 986 -697}% +\special{pa 950 -663}\special{pa 918 -625}\special{pa 892 -583}\special{pa 871 -539}% +\special{pa 856 -492}\special{pa 846 -443}\special{pa 843 -394}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 1248 -799}\special{pa 1242 -802}\special{pa 1235 -803}\special{pa 1228 -801}\special{pa 1224 -796}\special{pa 1221 -789}\special{pa 1222 -782}\special{pa 1226 -776}\special{pa 1232 -773}\special{pa 1239 -772}\special{pa 1245 -774}\special{pa 1250 -779}\special{pa 1252 -786}\special{pa 1252 -793}\special{pa 1248 -799}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 1248 -799}\special{pa 1242 -802}\special{pa 1235 -803}\special{pa 1228 -801}\special{pa 1224 -796}\special{pa 1221 -789}\special{pa 1222 -782}\special{pa 1226 -776}\special{pa 1232 -773}\special{pa 1239 -772}\special{pa 1245 -774}\special{pa 1250 -779}\special{pa 1252 -786}\special{pa 1252 -793}\special{pa 1248 -799}\special{fp}% +}% +\special{pn 2}% +\special{pa 928 -471}\special{pa 921 -422}\special{pa 921 -372}\special{pa 927 -323}% +\special{pa 939 -275}\special{pa 957 -229}\special{pa 980 -185}\special{pa 1009 -145}% +\special{pa 1042 -109}\special{pa 1080 -77}\special{pa 1122 -50}\special{pa 1166 -29}% +\special{pa 1213 -13}\special{pa 1262 -4}\special{pa 1311 -0}\special{pa 1360 -3}% +\special{pa 1409 -12}\special{pa 1456 -27}\special{pa 1501 -47}\special{pa 1543 -73}% +\special{pa 1581 -105}\special{pa 1616 -140}\special{pa 1645 -180}\special{pa 1669 -223}% +\special{pa 1688 -269}\special{pa 1700 -317}\special{pa 1707 -366}\special{pa 1707 -415}% +\special{pa 1701 -464}\special{pa 1690 -512}\special{pa 1672 -559}\special{pa 1648 -602}% +\special{pa 1619 -642}\special{pa 1586 -679}\special{pa 1548 -710}\special{pa 1507 -737}% +\special{pa 1462 -759}\special{pa 1415 -774}\special{pa 1367 -784}\special{pa 1317 -787}% +\special{pa 1268 -785}\special{pa 1219 -776}\special{pa 1172 -761}\special{pa 1127 -740}% +\special{pa 1085 -714}\special{pa 1047 -683}\special{pa 1013 -647}\special{pa 983 -607}% +\special{pa 959 -564}\special{pa 941 -518}\special{pa 928 -471}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 1402 -791}\special{pa 1396 -795}\special{pa 1389 -795}\special{pa 1383 -793}\special{pa 1378 -788}\special{pa 1375 -782}\special{pa 1376 -775}\special{pa 1380 -769}\special{pa 1386 -765}\special{pa 1393 -764}\special{pa 1399 -767}\special{pa 1404 -771}\special{pa 1407 -778}\special{pa 1406 -785}\special{pa 1402 -791}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 1402 -791}\special{pa 1396 -795}\special{pa 1389 -795}\special{pa 1383 -793}\special{pa 1378 -788}\special{pa 1375 -782}\special{pa 1376 -775}\special{pa 1380 -769}\special{pa 1386 -765}\special{pa 1393 -764}\special{pa 1399 -767}\special{pa 1404 -771}\special{pa 1407 -778}\special{pa 1406 -785}\special{pa 1402 -791}\special{fp}% +}% +\special{pn 2}% +\special{pa 1028 -544}\special{pa 1012 -498}\special{pa 1002 -449}\special{pa 998 -400}% +\special{pa 1000 -350}\special{pa 1009 -302}\special{pa 1023 -255}\special{pa 1044 -209}% +\special{pa 1069 -167}\special{pa 1100 -129}\special{pa 1136 -94}\special{pa 1175 -65}% +\special{pa 1218 -40}\special{pa 1264 -21}\special{pa 1312 -8}\special{pa 1361 -1}% +\special{pa 1410 -0}\special{pa 1459 -6}\special{pa 1507 -17}\special{pa 1553 -35}% +\special{pa 1597 -58}\special{pa 1638 -86}\special{pa 1674 -120}\special{pa 1706 -157}% +\special{pa 1733 -199}\special{pa 1755 -243}\special{pa 1771 -290}\special{pa 1781 -338}% +\special{pa 1785 -388}\special{pa 1783 -437}\special{pa 1774 -486}\special{pa 1760 -533}% +\special{pa 1739 -578}\special{pa 1714 -620}\special{pa 1683 -659}\special{pa 1647 -693}% +\special{pa 1608 -723}\special{pa 1565 -747}\special{pa 1519 -766}\special{pa 1471 -779}% +\special{pa 1422 -786}\special{pa 1373 -787}\special{pa 1324 -782}\special{pa 1276 -770}% +\special{pa 1229 -753}\special{pa 1186 -729}\special{pa 1145 -701}\special{pa 1109 -668}% +\special{pa 1077 -630}\special{pa 1049 -589}\special{pa 1028 -544}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 1553 -769}\special{pa 1547 -772}\special{pa 1540 -773}\special{pa 1534 -771}\special{pa 1529 -766}\special{pa 1526 -759}\special{pa 1527 -752}\special{pa 1531 -746}\special{pa 1537 -743}\special{pa 1544 -742}\special{pa 1550 -744}\special{pa 1555 -749}\special{pa 1558 -756}\special{pa 1557 -763}\special{pa 1553 -769}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 1553 -769}\special{pa 1547 -772}\special{pa 1540 -773}\special{pa 1534 -771}\special{pa 1529 -766}\special{pa 1526 -759}\special{pa 1527 -752}\special{pa 1531 -746}\special{pa 1537 -743}\special{pa 1544 -742}\special{pa 1550 -744}\special{pa 1555 -749}\special{pa 1558 -756}\special{pa 1557 -763}\special{pa 1553 -769}\special{fp}% +}% +\special{pn 2}% +\special{pa 1141 -612}\special{pa 1117 -570}\special{pa 1097 -524}\special{pa 1084 -477}% +\special{pa 1077 -428}\special{pa 1075 -378}\special{pa 1080 -329}\special{pa 1092 -281}% +\special{pa 1109 -235}\special{pa 1131 -191}\special{pa 1160 -150}\special{pa 1193 -113}% +\special{pa 1230 -81}\special{pa 1271 -53}\special{pa 1315 -31}\special{pa 1362 -15}% +\special{pa 1410 -4}\special{pa 1459 -0}\special{pa 1509 -2}\special{pa 1558 -10}% +\special{pa 1605 -24}\special{pa 1650 -44}\special{pa 1693 -70}\special{pa 1731 -100}% +\special{pa 1766 -136}\special{pa 1796 -175}\special{pa 1821 -218}\special{pa 1840 -263}% +\special{pa 1854 -311}\special{pa 1861 -360}\special{pa 1862 -409}\special{pa 1857 -458}% +\special{pa 1846 -507}\special{pa 1829 -553}\special{pa 1806 -597}\special{pa 1778 -637}% +\special{pa 1745 -674}\special{pa 1708 -707}\special{pa 1667 -734}\special{pa 1622 -756}% +\special{pa 1576 -773}\special{pa 1527 -783}\special{pa 1478 -787}\special{pa 1429 -785}% +\special{pa 1380 -777}\special{pa 1332 -763}\special{pa 1287 -743}\special{pa 1245 -718}% +\special{pa 1206 -687}\special{pa 1171 -652}\special{pa 1141 -612}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 1699 -732}\special{pa 1693 -736}\special{pa 1686 -737}\special{pa 1679 -734}\special{pa 1674 -729}\special{pa 1672 -723}\special{pa 1673 -716}\special{pa 1676 -710}\special{pa 1682 -706}\special{pa 1689 -705}\special{pa 1696 -708}\special{pa 1701 -713}\special{pa 1703 -719}\special{pa 1702 -726}\special{pa 1699 -732}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 1699 -732}\special{pa 1693 -736}\special{pa 1686 -737}\special{pa 1679 -734}\special{pa 1674 -729}\special{pa 1672 -723}\special{pa 1673 -716}\special{pa 1676 -710}\special{pa 1682 -706}\special{pa 1689 -705}\special{pa 1696 -708}\special{pa 1701 -713}\special{pa 1703 -719}\special{pa 1702 -726}\special{pa 1699 -732}\special{fp}% +}% +\special{pn 2}% +\special{pa 1268 -672}\special{pa 1235 -635}\special{pa 1207 -594}\special{pa 1185 -550}% +\special{pa 1168 -504}\special{pa 1157 -455}\special{pa 1153 -406}\special{pa 1154 -357}% +\special{pa 1162 -308}\special{pa 1176 -260}\special{pa 1195 -215}\special{pa 1220 -172}% +\special{pa 1251 -133}\special{pa 1286 -98}\special{pa 1325 -68}\special{pa 1367 -43}% +\special{pa 1413 -23}\special{pa 1460 -9}\special{pa 1509 -2}\special{pa 1558 -0}% +\special{pa 1608 -5}\special{pa 1656 -16}\special{pa 1702 -32}\special{pa 1746 -55}% +\special{pa 1787 -83}\special{pa 1824 -115}\special{pa 1857 -152}\special{pa 1885 -193}% +\special{pa 1907 -237}\special{pa 1924 -284}\special{pa 1935 -332}\special{pa 1940 -381}% +\special{pa 1938 -431}\special{pa 1930 -480}\special{pa 1916 -527}\special{pa 1897 -572}% +\special{pa 1872 -615}\special{pa 1841 -654}\special{pa 1806 -689}\special{pa 1767 -719}% +\special{pa 1725 -744}\special{pa 1679 -764}\special{pa 1632 -778}\special{pa 1583 -786}% +\special{pa 1534 -787}\special{pa 1484 -783}\special{pa 1436 -772}\special{pa 1390 -755}% +\special{pa 1346 -733}\special{pa 1305 -705}\special{pa 1268 -672}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 1836 -683}\special{pa 1830 -687}\special{pa 1823 -688}\special{pa 1816 -685}\special{pa 1811 -680}\special{pa 1809 -674}\special{pa 1810 -667}\special{pa 1813 -661}\special{pa 1819 -657}\special{pa 1826 -656}\special{pa 1833 -659}\special{pa 1838 -664}\special{pa 1840 -670}\special{pa 1839 -677}\special{pa 1836 -683}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 1836 -683}\special{pa 1830 -687}\special{pa 1823 -688}\special{pa 1816 -685}\special{pa 1811 -680}\special{pa 1809 -674}\special{pa 1810 -667}\special{pa 1813 -661}\special{pa 1819 -657}\special{pa 1826 -656}\special{pa 1833 -659}\special{pa 1838 -664}\special{pa 1840 -670}\special{pa 1839 -677}\special{pa 1836 -683}\special{fp}% +}% +\special{pn 2}% +\special{pa 1405 -721}\special{pa 1365 -691}\special{pa 1330 -656}\special{pa 1299 -618}% +\special{pa 1274 -575}\special{pa 1254 -530}\special{pa 1240 -483}\special{pa 1232 -434}% +\special{pa 1230 -384}\special{pa 1234 -335}\special{pa 1244 -287}\special{pa 1261 -240}% +\special{pa 1283 -196}\special{pa 1310 -155}\special{pa 1343 -118}\special{pa 1380 -85}% +\special{pa 1420 -56}\special{pa 1464 -34}\special{pa 1511 -17}\special{pa 1559 -5}% +\special{pa 1608 -0}\special{pa 1657 -1}\special{pa 1706 -9}\special{pa 1754 -22}% +\special{pa 1799 -42}\special{pa 1842 -66}\special{pa 1881 -96}\special{pa 1917 -131}% +\special{pa 1947 -170}\special{pa 1973 -212}\special{pa 1993 -257}\special{pa 2007 -305}% +\special{pa 2015 -354}\special{pa 2017 -403}\special{pa 2013 -452}\special{pa 2002 -501}% +\special{pa 1986 -547}\special{pa 1964 -591}\special{pa 1936 -633}\special{pa 1904 -670}% +\special{pa 1867 -703}\special{pa 1826 -731}\special{pa 1783 -754}\special{pa 1736 -771}% +\special{pa 1688 -782}\special{pa 1639 -787}\special{pa 1589 -786}\special{pa 1540 -779}% +\special{pa 1493 -765}\special{pa 1447 -746}\special{pa 1405 -721}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 1962 -624}\special{pa 1956 -627}\special{pa 1949 -628}\special{pa 1942 -626}\special{pa 1937 -621}\special{pa 1935 -614}\special{pa 1936 -607}\special{pa 1940 -601}\special{pa 1946 -598}\special{pa 1952 -597}\special{pa 1959 -599}\special{pa 1964 -604}\special{pa 1966 -611}\special{pa 1966 -618}\special{pa 1962 -624}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 1962 -624}\special{pa 1956 -627}\special{pa 1949 -628}\special{pa 1942 -626}\special{pa 1937 -621}\special{pa 1935 -614}\special{pa 1936 -607}\special{pa 1940 -601}\special{pa 1946 -598}\special{pa 1952 -597}\special{pa 1959 -599}\special{pa 1964 -604}\special{pa 1966 -611}\special{pa 1966 -618}\special{pa 1962 -624}\special{fp}% +}% +\special{pn 2}% +\special{pa 1550 -757}\special{pa 1506 -736}\special{pa 1464 -709}\special{pa 1427 -676}% +\special{pa 1393 -640}\special{pa 1365 -599}\special{pa 1342 -556}\special{pa 1324 -509}% +\special{pa 1313 -461}\special{pa 1307 -412}\special{pa 1308 -363}\special{pa 1315 -314}% +\special{pa 1328 -266}\special{pa 1347 -220}\special{pa 1372 -178}\special{pa 1401 -138}% +\special{pa 1436 -103}\special{pa 1474 -72}\special{pa 1516 -46}\special{pa 1562 -25}% +\special{pa 1609 -11}\special{pa 1657 -2}\special{pa 1707 -0}\special{pa 1756 -4}% +\special{pa 1805 -14}\special{pa 1851 -30}\special{pa 1896 -52}\special{pa 1937 -79}% +\special{pa 1975 -111}\special{pa 2008 -148}\special{pa 2036 -188}\special{pa 2059 -232}% +\special{pa 2077 -278}\special{pa 2089 -326}\special{pa 2094 -375}\special{pa 2093 -425}% +\special{pa 2086 -474}\special{pa 2073 -521}\special{pa 2054 -567}\special{pa 2030 -610}% +\special{pa 2000 -649}\special{pa 1966 -685}\special{pa 1927 -716}\special{pa 1885 -742}% +\special{pa 1840 -762}\special{pa 1793 -777}\special{pa 1744 -785}\special{pa 1694 -787}% +\special{pa 1645 -783}\special{pa 1597 -773}\special{pa 1550 -757}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 2076 -555}\special{pa 2070 -559}\special{pa 2063 -560}\special{pa 2056 -558}\special{pa 2051 -553}\special{pa 2049 -546}\special{pa 2050 -539}\special{pa 2053 -533}\special{pa 2059 -529}\special{pa 2066 -529}\special{pa 2073 -531}\special{pa 2078 -536}\special{pa 2080 -543}\special{pa 2079 -550}\special{pa 2076 -555}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 2076 -555}\special{pa 2070 -559}\special{pa 2063 -560}\special{pa 2056 -558}\special{pa 2051 -553}\special{pa 2049 -546}\special{pa 2050 -539}\special{pa 2053 -533}\special{pa 2059 -529}\special{pa 2066 -529}\special{pa 2073 -531}\special{pa 2078 -536}\special{pa 2080 -543}\special{pa 2079 -550}\special{pa 2076 -555}\special{fp}% +}% +\special{pn 2}% +\special{pa 1701 -780}\special{pa 1653 -767}\special{pa 1608 -749}\special{pa 1564 -724}% +\special{pa 1525 -695}\special{pa 1489 -661}\special{pa 1458 -623}\special{pa 1431 -581}% +\special{pa 1411 -536}\special{pa 1396 -489}\special{pa 1387 -440}\special{pa 1384 -391}% +\special{pa 1388 -341}\special{pa 1397 -293}\special{pa 1413 -246}\special{pa 1434 -201}% +\special{pa 1461 -160}\special{pa 1493 -122}\special{pa 1529 -88}\special{pa 1570 -60}% +\special{pa 1613 -36}\special{pa 1659 -18}\special{pa 1707 -6}\special{pa 1756 -1}% +\special{pa 1806 -1}\special{pa 1855 -8}\special{pa 1903 -20}\special{pa 1948 -39}% +\special{pa 1992 -63}\special{pa 2031 -92}\special{pa 2067 -126}\special{pa 2098 -165}% +\special{pa 2124 -207}\special{pa 2145 -252}\special{pa 2160 -299}\special{pa 2169 -347}% +\special{pa 2172 -397}\special{pa 2168 -446}\special{pa 2159 -495}\special{pa 2143 -542}% +\special{pa 2121 -586}\special{pa 2095 -628}\special{pa 2063 -665}\special{pa 2027 -699}% +\special{pa 1986 -728}\special{pa 1943 -751}\special{pa 1897 -769}\special{pa 1849 -781}% +\special{pa 1800 -787}\special{pa 1750 -786}\special{pa 1701 -780}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 2175 -482}\special{pa 2169 -485}\special{pa 2162 -486}\special{pa 2156 -484}\special{pa 2151 -479}\special{pa 2148 -472}\special{pa 2149 -465}\special{pa 2153 -459}\special{pa 2159 -456}\special{pa 2166 -455}\special{pa 2172 -457}\special{pa 2177 -462}\special{pa 2180 -469}\special{pa 2179 -476}\special{pa 2175 -482}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 2175 -482}\special{pa 2169 -485}\special{pa 2162 -486}\special{pa 2156 -484}\special{pa 2151 -479}\special{pa 2148 -472}\special{pa 2149 -465}\special{pa 2153 -459}\special{pa 2159 -456}\special{pa 2166 -455}\special{pa 2172 -457}\special{pa 2177 -462}\special{pa 2180 -469}\special{pa 2179 -476}\special{pa 2175 -482}\special{fp}% +}% +\special{pn 2}% +\special{pa 1855 -787}\special{pa 1806 -784}\special{pa 1757 -775}\special{pa 1710 -760}% +\special{pa 1666 -739}\special{pa 1624 -712}\special{pa 1586 -681}\special{pa 1552 -645}% +\special{pa 1523 -605}\special{pa 1499 -561}\special{pa 1481 -515}\special{pa 1469 -467}% +\special{pa 1462 -418}\special{pa 1462 -369}\special{pa 1469 -320}\special{pa 1481 -272}% +\special{pa 1499 -226}\special{pa 1523 -183}\special{pa 1552 -143}\special{pa 1586 -107}% +\special{pa 1624 -75}\special{pa 1666 -49}\special{pa 1710 -28}\special{pa 1757 -12}% +\special{pa 1806 -3}\special{pa 1855 -0}\special{pa 1905 -3}\special{pa 1953 -12}% +\special{pa 2000 -28}\special{pa 2045 -49}\special{pa 2087 -75}\special{pa 2125 -107}% +\special{pa 2159 -143}\special{pa 2188 -183}\special{pa 2212 -226}\special{pa 2230 -272}% +\special{pa 2242 -320}\special{pa 2248 -369}\special{pa 2248 -418}\special{pa 2242 -467}% +\special{pa 2230 -515}\special{pa 2212 -561}\special{pa 2188 -605}\special{pa 2159 -645}% +\special{pa 2125 -681}\special{pa 2087 -712}\special{pa 2045 -739}\special{pa 2000 -760}% +\special{pa 1953 -775}\special{pa 1905 -784}\special{pa 1855 -787}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 2260 -405}\special{pa 2254 -409}\special{pa 2247 -409}\special{pa 2241 -407}\special{pa 2236 -402}\special{pa 2233 -395}\special{pa 2234 -388}\special{pa 2238 -383}\special{pa 2244 -379}\special{pa 2251 -378}\special{pa 2257 -380}\special{pa 2262 -385}\special{pa 2265 -392}\special{pa 2264 -399}\special{pa 2260 -405}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 2260 -405}\special{pa 2254 -409}\special{pa 2247 -409}\special{pa 2241 -407}\special{pa 2236 -402}\special{pa 2233 -395}\special{pa 2234 -388}\special{pa 2238 -383}\special{pa 2244 -379}\special{pa 2251 -378}\special{pa 2257 -380}\special{pa 2262 -385}\special{pa 2265 -392}\special{pa 2264 -399}\special{pa 2260 -405}\special{fp}% +}% +\special{pn 2}% +\special{pa 2009 -780}\special{pa 1960 -786}\special{pa 1911 -787}\special{pa 1862 -781}% +\special{pa 1814 -769}\special{pa 1768 -751}\special{pa 1724 -728}\special{pa 1684 -699}% +\special{pa 1648 -665}\special{pa 1616 -628}\special{pa 1589 -586}\special{pa 1568 -542}% +\special{pa 1552 -495}\special{pa 1542 -446}\special{pa 1539 -397}\special{pa 1542 -347}% +\special{pa 1550 -299}\special{pa 1565 -252}\special{pa 1586 -207}\special{pa 1612 -165}% +\special{pa 1643 -126}\special{pa 1679 -92}\special{pa 1719 -63}\special{pa 1762 -39}% +\special{pa 1808 -20}\special{pa 1856 -8}\special{pa 1905 -1}\special{pa 1954 -1}% +\special{pa 2003 -6}\special{pa 2051 -18}\special{pa 2097 -36}\special{pa 2141 -60}% +\special{pa 2181 -88}\special{pa 2217 -122}\special{pa 2249 -160}\special{pa 2276 -201}% +\special{pa 2297 -246}\special{pa 2313 -293}\special{pa 2323 -341}\special{pa 2326 -391}% +\special{pa 2324 -440}\special{pa 2315 -489}\special{pa 2300 -536}\special{pa 2279 -581}% +\special{pa 2253 -623}\special{pa 2222 -661}\special{pa 2186 -695}\special{pa 2146 -724}% +\special{pa 2103 -749}\special{pa 2057 -767}\special{pa 2009 -780}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 2330 -328}\special{pa 2324 -332}\special{pa 2317 -333}\special{pa 2310 -330}\special{pa 2305 -325}\special{pa 2303 -319}\special{pa 2304 -312}\special{pa 2308 -306}\special{pa 2314 -302}\special{pa 2320 -301}\special{pa 2327 -304}\special{pa 2332 -309}\special{pa 2334 -315}\special{pa 2334 -322}\special{pa 2330 -328}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 2330 -328}\special{pa 2324 -332}\special{pa 2317 -333}\special{pa 2310 -330}\special{pa 2305 -325}\special{pa 2303 -319}\special{pa 2304 -312}\special{pa 2308 -306}\special{pa 2314 -302}\special{pa 2320 -301}\special{pa 2327 -304}\special{pa 2332 -309}\special{pa 2334 -315}\special{pa 2334 -322}\special{pa 2330 -328}\special{fp}% +}% +\special{pn 2}% +\special{pa 2161 -757}\special{pa 2114 -773}\special{pa 2065 -783}\special{pa 2016 -787}% +\special{pa 1967 -785}\special{pa 1918 -777}\special{pa 1871 -762}\special{pa 1826 -742}% +\special{pa 1783 -716}\special{pa 1745 -685}\special{pa 1711 -649}\special{pa 1681 -610}% +\special{pa 1656 -567}\special{pa 1637 -521}\special{pa 1624 -474}\special{pa 1617 -425}% +\special{pa 1617 -375}\special{pa 1622 -326}\special{pa 1634 -278}\special{pa 1651 -232}% +\special{pa 1674 -188}\special{pa 1703 -148}\special{pa 1736 -111}\special{pa 1773 -79}% +\special{pa 1815 -52}\special{pa 1859 -30}\special{pa 1906 -14}\special{pa 1954 -4}% +\special{pa 2004 -0}\special{pa 2053 -2}\special{pa 2102 -11}\special{pa 2149 -25}% +\special{pa 2194 -46}\special{pa 2236 -72}\special{pa 2275 -103}\special{pa 2309 -138}% +\special{pa 2339 -178}\special{pa 2363 -220}\special{pa 2382 -266}\special{pa 2395 -314}% +\special{pa 2402 -363}\special{pa 2403 -412}\special{pa 2398 -461}\special{pa 2386 -509}% +\special{pa 2369 -556}\special{pa 2346 -599}\special{pa 2317 -640}\special{pa 2284 -676}% +\special{pa 2246 -709}\special{pa 2205 -736}\special{pa 2161 -757}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 2385 -254}\special{pa 2379 -258}\special{pa 2372 -259}\special{pa 2365 -256}\special{pa 2360 -251}\special{pa 2358 -245}\special{pa 2359 -238}\special{pa 2362 -232}\special{pa 2368 -228}\special{pa 2375 -227}\special{pa 2382 -230}\special{pa 2387 -235}\special{pa 2389 -241}\special{pa 2388 -248}\special{pa 2385 -254}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 2385 -254}\special{pa 2379 -258}\special{pa 2372 -259}\special{pa 2365 -256}\special{pa 2360 -251}\special{pa 2358 -245}\special{pa 2359 -238}\special{pa 2362 -232}\special{pa 2368 -228}\special{pa 2375 -227}\special{pa 2382 -230}\special{pa 2387 -235}\special{pa 2389 -241}\special{pa 2388 -248}\special{pa 2385 -254}\special{fp}% +}% +\special{pn 2}% +\special{pa 2306 -721}\special{pa 2263 -746}\special{pa 2218 -765}\special{pa 2170 -779}% +\special{pa 2121 -786}\special{pa 2072 -787}\special{pa 2023 -782}\special{pa 1974 -771}% +\special{pa 1928 -754}\special{pa 1884 -731}\special{pa 1843 -703}\special{pa 1807 -670}% +\special{pa 1774 -633}\special{pa 1747 -591}\special{pa 1725 -547}\special{pa 1708 -501}% +\special{pa 1698 -452}\special{pa 1694 -403}\special{pa 1696 -354}\special{pa 1704 -305}% +\special{pa 1718 -257}\special{pa 1738 -212}\special{pa 1763 -170}\special{pa 1794 -131}% +\special{pa 1829 -96}\special{pa 1868 -66}\special{pa 1911 -42}\special{pa 1957 -22}% +\special{pa 2004 -9}\special{pa 2053 -1}\special{pa 2103 -0}\special{pa 2152 -5}% +\special{pa 2200 -17}\special{pa 2246 -34}\special{pa 2290 -56}\special{pa 2331 -85}% +\special{pa 2368 -118}\special{pa 2400 -155}\special{pa 2428 -196}\special{pa 2450 -240}% +\special{pa 2466 -287}\special{pa 2477 -335}\special{pa 2481 -384}\special{pa 2479 -434}% +\special{pa 2471 -483}\special{pa 2457 -530}\special{pa 2437 -575}\special{pa 2411 -618}% +\special{pa 2380 -656}\special{pa 2345 -691}\special{pa 2306 -721}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 2426 -186}\special{pa 2420 -190}\special{pa 2413 -191}\special{pa 2406 -188}\special{pa 2401 -183}\special{pa 2399 -177}\special{pa 2400 -170}\special{pa 2403 -164}\special{pa 2409 -160}\special{pa 2416 -159}\special{pa 2423 -162}\special{pa 2428 -167}\special{pa 2430 -173}\special{pa 2429 -180}\special{pa 2426 -186}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 2426 -186}\special{pa 2420 -190}\special{pa 2413 -191}\special{pa 2406 -188}\special{pa 2401 -183}\special{pa 2399 -177}\special{pa 2400 -170}\special{pa 2403 -164}\special{pa 2409 -160}\special{pa 2416 -159}\special{pa 2423 -162}\special{pa 2428 -167}\special{pa 2430 -173}\special{pa 2429 -180}\special{pa 2426 -186}\special{fp}% +}% +\special{pn 2}% +\special{pa 2443 -672}\special{pa 2406 -705}\special{pa 2365 -733}\special{pa 2321 -755}% +\special{pa 2274 -772}\special{pa 2226 -783}\special{pa 2177 -787}\special{pa 2127 -786}% +\special{pa 2079 -778}\special{pa 2031 -764}\special{pa 1986 -744}\special{pa 1943 -719}% +\special{pa 1904 -689}\special{pa 1869 -654}\special{pa 1839 -615}\special{pa 1814 -572}% +\special{pa 1794 -527}\special{pa 1780 -480}\special{pa 1773 -431}\special{pa 1771 -381}% +\special{pa 1776 -332}\special{pa 1786 -284}\special{pa 1803 -237}\special{pa 1826 -193}% +\special{pa 1853 -152}\special{pa 1886 -115}\special{pa 1923 -83}\special{pa 1964 -55}% +\special{pa 2008 -32}\special{pa 2055 -16}\special{pa 2103 -5}\special{pa 2152 -0}% +\special{pa 2202 -2}\special{pa 2250 -9}\special{pa 2298 -23}\special{pa 2343 -43}% +\special{pa 2386 -68}\special{pa 2425 -98}\special{pa 2460 -133}\special{pa 2490 -172}% +\special{pa 2515 -215}\special{pa 2535 -260}\special{pa 2549 -308}\special{pa 2556 -357}% +\special{pa 2558 -406}\special{pa 2553 -455}\special{pa 2543 -504}\special{pa 2526 -550}% +\special{pa 2503 -594}\special{pa 2476 -635}\special{pa 2443 -672}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 2454 -126}\special{pa 2448 -130}\special{pa 2441 -131}\special{pa 2434 -129}\special{pa 2430 -124}\special{pa 2427 -117}\special{pa 2428 -110}\special{pa 2432 -104}\special{pa 2438 -100}\special{pa 2445 -100}\special{pa 2451 -102}\special{pa 2456 -107}\special{pa 2459 -114}\special{pa 2458 -121}\special{pa 2454 -126}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 2454 -126}\special{pa 2448 -130}\special{pa 2441 -131}\special{pa 2434 -129}\special{pa 2430 -124}\special{pa 2427 -117}\special{pa 2428 -110}\special{pa 2432 -104}\special{pa 2438 -100}\special{pa 2445 -100}\special{pa 2451 -102}\special{pa 2456 -107}\special{pa 2459 -114}\special{pa 2458 -121}\special{pa 2454 -126}\special{fp}% +}% +\special{pn 2}% +\special{pa 2569 -612}\special{pa 2539 -652}\special{pa 2504 -687}\special{pa 2466 -718}% +\special{pa 2423 -743}\special{pa 2378 -763}\special{pa 2331 -777}\special{pa 2282 -785}% +\special{pa 2233 -787}\special{pa 2183 -783}\special{pa 2135 -773}\special{pa 2088 -756}% +\special{pa 2044 -734}\special{pa 2003 -707}\special{pa 1966 -674}\special{pa 1933 -637}% +\special{pa 1904 -597}\special{pa 1882 -553}\special{pa 1865 -507}\special{pa 1853 -458}% +\special{pa 1848 -409}\special{pa 1850 -360}\special{pa 1857 -311}\special{pa 1870 -263}% +\special{pa 1890 -218}\special{pa 1914 -175}\special{pa 1944 -136}\special{pa 1979 -100}% +\special{pa 2018 -70}\special{pa 2060 -44}\special{pa 2106 -24}\special{pa 2153 -10}% +\special{pa 2202 -2}\special{pa 2251 -0}\special{pa 2300 -4}\special{pa 2349 -15}% +\special{pa 2395 -31}\special{pa 2440 -53}\special{pa 2481 -81}\special{pa 2518 -113}% +\special{pa 2551 -150}\special{pa 2579 -191}\special{pa 2602 -235}\special{pa 2619 -281}% +\special{pa 2630 -329}\special{pa 2635 -378}\special{pa 2634 -428}\special{pa 2627 -477}% +\special{pa 2613 -524}\special{pa 2594 -570}\special{pa 2569 -612}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 2472 -77}\special{pa 2466 -81}\special{pa 2459 -82}\special{pa 2452 -80}\special{pa 2447 -75}\special{pa 2445 -68}\special{pa 2446 -61}\special{pa 2449 -55}\special{pa 2455 -51}\special{pa 2462 -51}\special{pa 2469 -53}\special{pa 2474 -58}\special{pa 2476 -65}\special{pa 2475 -72}\special{pa 2472 -77}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 2472 -77}\special{pa 2466 -81}\special{pa 2459 -82}\special{pa 2452 -80}\special{pa 2447 -75}\special{pa 2445 -68}\special{pa 2446 -61}\special{pa 2449 -55}\special{pa 2455 -51}\special{pa 2462 -51}\special{pa 2469 -53}\special{pa 2474 -58}\special{pa 2476 -65}\special{pa 2475 -72}\special{pa 2472 -77}\special{fp}% +}% +\special{pn 2}% +\special{pa 2683 -544}\special{pa 2661 -589}\special{pa 2634 -630}\special{pa 2602 -668}% +\special{pa 2565 -701}\special{pa 2525 -729}\special{pa 2481 -753}\special{pa 2435 -770}% +\special{pa 2387 -782}\special{pa 2338 -787}\special{pa 2288 -786}\special{pa 2239 -779}% +\special{pa 2192 -766}\special{pa 2146 -747}\special{pa 2103 -723}\special{pa 2063 -693}% +\special{pa 2028 -659}\special{pa 1997 -620}\special{pa 1971 -578}\special{pa 1951 -533}% +\special{pa 1936 -486}\special{pa 1928 -437}\special{pa 1925 -388}\special{pa 1929 -338}% +\special{pa 1939 -290}\special{pa 1955 -243}\special{pa 1977 -199}\special{pa 2004 -157}% +\special{pa 2036 -120}\special{pa 2073 -86}\special{pa 2113 -58}\special{pa 2157 -35}% +\special{pa 2203 -17}\special{pa 2251 -6}\special{pa 2301 -0}\special{pa 2350 -1}% +\special{pa 2399 -8}\special{pa 2447 -21}\special{pa 2492 -40}\special{pa 2535 -65}% +\special{pa 2575 -94}\special{pa 2610 -129}\special{pa 2641 -167}\special{pa 2667 -209}% +\special{pa 2687 -255}\special{pa 2702 -302}\special{pa 2710 -350}\special{pa 2713 -400}% +\special{pa 2709 -449}\special{pa 2699 -498}\special{pa 2683 -544}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 2481 -41}\special{pa 2475 -45}\special{pa 2468 -46}\special{pa 2461 -43}\special{pa 2456 -38}\special{pa 2454 -32}\special{pa 2455 -25}\special{pa 2459 -19}\special{pa 2465 -15}\special{pa 2472 -14}\special{pa 2478 -17}\special{pa 2483 -22}\special{pa 2485 -28}\special{pa 2485 -35}\special{pa 2481 -41}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 2481 -41}\special{pa 2475 -45}\special{pa 2468 -46}\special{pa 2461 -43}\special{pa 2456 -38}\special{pa 2454 -32}\special{pa 2455 -25}\special{pa 2459 -19}\special{pa 2465 -15}\special{pa 2472 -14}\special{pa 2478 -17}\special{pa 2483 -22}\special{pa 2485 -28}\special{pa 2485 -35}\special{pa 2481 -41}\special{fp}% +}% +\special{pn 2}% +\special{pa 2783 -471}\special{pa 2770 -518}\special{pa 2751 -564}\special{pa 2727 -607}% +\special{pa 2698 -647}\special{pa 2664 -683}\special{pa 2625 -714}\special{pa 2583 -740}% +\special{pa 2538 -761}\special{pa 2491 -776}\special{pa 2443 -785}\special{pa 2393 -787}% +\special{pa 2344 -784}\special{pa 2295 -774}\special{pa 2249 -759}\special{pa 2204 -737}% +\special{pa 2162 -710}\special{pa 2125 -679}\special{pa 2091 -642}\special{pa 2062 -602}% +\special{pa 2039 -559}\special{pa 2021 -512}\special{pa 2009 -464}\special{pa 2003 -415}% +\special{pa 2004 -366}\special{pa 2010 -317}\special{pa 2023 -269}\special{pa 2041 -223}% +\special{pa 2066 -180}\special{pa 2095 -140}\special{pa 2129 -105}\special{pa 2167 -73}% +\special{pa 2209 -47}\special{pa 2254 -27}\special{pa 2301 -12}\special{pa 2350 -3}% +\special{pa 2399 -0}\special{pa 2449 -4}\special{pa 2497 -13}\special{pa 2544 -29}% +\special{pa 2589 -50}\special{pa 2630 -77}\special{pa 2668 -109}\special{pa 2702 -145}% +\special{pa 2730 -185}\special{pa 2754 -229}\special{pa 2772 -275}\special{pa 2784 -323}% +\special{pa 2790 -372}\special{pa 2789 -422}\special{pa 2783 -471}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 2484 -19}\special{pa 2478 -22}\special{pa 2471 -23}\special{pa 2465 -21}\special{pa 2460 -16}\special{pa 2458 -9}\special{pa 2458 -2}\special{pa 2462 4}\special{pa 2468 7}\special{pa 2475 8}\special{pa 2482 6}\special{pa 2487 1}\special{pa 2489 -6}\special{pa 2488 -13}\special{pa 2484 -19}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 2484 -19}\special{pa 2478 -22}\special{pa 2471 -23}\special{pa 2465 -21}\special{pa 2460 -16}\special{pa 2458 -9}\special{pa 2458 -2}\special{pa 2462 4}\special{pa 2468 7}\special{pa 2475 8}\special{pa 2482 6}\special{pa 2487 1}\special{pa 2489 -6}\special{pa 2488 -13}\special{pa 2484 -19}\special{fp}% +}% +\special{pn 2}% +\special{pa 2867 -394}\special{pa 2864 -443}\special{pa 2855 -492}\special{pa 2840 -539}% +\special{pa 2819 -583}\special{pa 2792 -625}\special{pa 2761 -663}\special{pa 2725 -697}% +\special{pa 2685 -726}\special{pa 2641 -750}\special{pa 2595 -768}\special{pa 2547 -780}% +\special{pa 2498 -787}\special{pa 2449 -787}\special{pa 2400 -780}\special{pa 2352 -768}% +\special{pa 2306 -750}\special{pa 2263 -726}\special{pa 2223 -697}\special{pa 2187 -663}% +\special{pa 2155 -625}\special{pa 2129 -583}\special{pa 2108 -539}\special{pa 2092 -492}% +\special{pa 2083 -443}\special{pa 2080 -394}\special{pa 2083 -344}\special{pa 2092 -296}% +\special{pa 2108 -249}\special{pa 2129 -204}\special{pa 2155 -162}\special{pa 2187 -124}% +\special{pa 2223 -90}\special{pa 2263 -61}\special{pa 2306 -37}\special{pa 2352 -19}% +\special{pa 2400 -7}\special{pa 2449 -1}\special{pa 2498 -1}\special{pa 2547 -7}% +\special{pa 2595 -19}\special{pa 2641 -37}\special{pa 2685 -61}\special{pa 2725 -90}% +\special{pa 2761 -124}\special{pa 2792 -162}\special{pa 2819 -204}\special{pa 2840 -249}% +\special{pa 2855 -296}\special{pa 2864 -344}\special{pa 2867 -394}% +\special{fp}% +\special{pn 8}% +{% +\color[rgb]{1,0,0}% +{\special{pn 0}\color[rgb]{1,0,0}% +\special{pa 2485 -11}\special{pa 2479 -15}\special{pa 2472 -16}\special{pa 2465 -13}\special{pa 2460 -8}\special{pa 2458 -2}\special{pa 2459 5}\special{pa 2463 11}\special{pa 2468 15}\special{pa 2475 16}\special{pa 2482 13}\special{pa 2487 8}\special{pa 2489 2}\special{pa 2489 -5}\special{pa 2485 -11}\special{sh}\special{fp}}% +\special{pn 4}\special{pa 2485 -11}\special{pa 2479 -15}\special{pa 2472 -16}\special{pa 2465 -13}\special{pa 2460 -8}\special{pa 2458 -2}\special{pa 2459 5}\special{pa 2463 11}\special{pa 2468 15}\special{pa 2475 16}\special{pa 2482 13}\special{pa 2487 8}\special{pa 2489 2}\special{pa 2489 -5}\special{pa 2485 -11}\special{fp}% +}% +\special{pa -787 -0}\special{pa 3150 -0}% +\special{fp}% +\special{pa 0 394}\special{pa 0 -1181}% +\special{fp}% +\settowidth{\Width}{$x$}\setlength{\Width}{0\Width}% +\settoheight{\Height}{$x$}\settodepth{\Depth}{$x$}\setlength{\Height}{-0.5\Height}\setlength{\Depth}{0.5\Depth}\addtolength{\Height}{\Depth}% +\put(8.0500000,0.0000000){\hspace*{\Width}\raisebox{\Height}{$x$}}% +% +\settowidth{\Width}{$y$}\setlength{\Width}{-0.5\Width}% +\settoheight{\Height}{$y$}\settodepth{\Depth}{$y$}\setlength{\Height}{\Depth}% +\put(0.0000000,3.0500000){\hspace*{\Width}\raisebox{\Height}{$y$}}% +% +\settowidth{\Width}{O}\setlength{\Width}{-1\Width}% +\settoheight{\Height}{O}\settodepth{\Depth}{O}\setlength{\Height}{-\Height}% +\put(-0.0500000,-0.0500000){\hspace*{\Width}\raisebox{\Height}{O}}% +% +\end{picture}}%
\ No newline at end of file diff --git a/Master/texmf-dist/doc/support/ketcindy/source/ketmanual/Fig/tablesample1.tex b/Master/texmf-dist/doc/support/ketcindy/source/ketmanual/Fig/tablesample1.tex index f192c3303c9..3771067862e 100644 --- a/Master/texmf-dist/doc/support/ketcindy/source/ketmanual/Fig/tablesample1.tex +++ b/Master/texmf-dist/doc/support/ketcindy/source/ketmanual/Fig/tablesample1.tex @@ -1,5 +1,5 @@ -%%% /Users/Hannya/Desktop/KeTCindy/fig/tablesample1.tex -%%% Generator=template1.cdy +%%% /Users/takatoosetsuo/Dropbox/kettoday/0511ReuleauxTriangle/fig/tablesample1.tex +%%% Generator=tablesample1.cdy {\unitlength=1cm% \begin{picture}% (12,6)(0,0)% @@ -31,6 +31,40 @@ \special{pn 8}% \special{pa 0 -1969}\special{pa 4724 -1969}% \special{fp}% +\special{pa 0 -1969}\special{pa 4724 -1969}% +\special{fp}% +\special{pa 0 -1575}\special{pa 39 -1575}\special{fp}\special{pa 78 -1575}\special{pa 117 -1575}\special{fp}% +\special{pa 156 -1575}\special{pa 195 -1575}\special{fp}\special{pa 234 -1575}\special{pa 273 -1575}\special{fp}% +\special{pa 312 -1575}\special{pa 351 -1575}\special{fp}\special{pa 390 -1575}\special{pa 429 -1575}\special{fp}% +\special{pa 469 -1575}\special{pa 508 -1575}\special{fp}\special{pa 547 -1575}\special{pa 586 -1575}\special{fp}% +\special{pa 625 -1575}\special{pa 664 -1575}\special{fp}\special{pa 703 -1575}\special{pa 742 -1575}\special{fp}% +\special{pa 781 -1575}\special{pa 820 -1575}\special{fp}\special{pa 859 -1575}\special{pa 898 -1575}\special{fp}% +\special{pa 937 -1575}\special{pa 976 -1575}\special{fp}\special{pa 1015 -1575}\special{pa 1054 -1575}\special{fp}% +\special{pa 1093 -1575}\special{pa 1132 -1575}\special{fp}\special{pa 1171 -1575}\special{pa 1210 -1575}\special{fp}% +\special{pa 1249 -1575}\special{pa 1288 -1575}\special{fp}\special{pa 1328 -1575}\special{pa 1367 -1575}\special{fp}% +\special{pa 1406 -1575}\special{pa 1445 -1575}\special{fp}\special{pa 1484 -1575}\special{pa 1523 -1575}\special{fp}% +\special{pa 1562 -1575}\special{pa 1601 -1575}\special{fp}\special{pa 1640 -1575}\special{pa 1679 -1575}\special{fp}% +\special{pa 1718 -1575}\special{pa 1757 -1575}\special{fp}\special{pa 1796 -1575}\special{pa 1835 -1575}\special{fp}% +\special{pa 1874 -1575}\special{pa 1913 -1575}\special{fp}\special{pa 1952 -1575}\special{pa 1991 -1575}\special{fp}% +\special{pa 2030 -1575}\special{pa 2069 -1575}\special{fp}\special{pa 2108 -1575}\special{pa 2147 -1575}\special{fp}% +\special{pa 2187 -1575}\special{pa 2226 -1575}\special{fp}\special{pa 2265 -1575}\special{pa 2304 -1575}\special{fp}% +\special{pa 2343 -1575}\special{pa 2382 -1575}\special{fp}\special{pa 2421 -1575}\special{pa 2460 -1575}\special{fp}% +\special{pa 2499 -1575}\special{pa 2538 -1575}\special{fp}\special{pa 2577 -1575}\special{pa 2616 -1575}\special{fp}% +\special{pa 2655 -1575}\special{pa 2694 -1575}\special{fp}\special{pa 2733 -1575}\special{pa 2772 -1575}\special{fp}% +\special{pa 2811 -1575}\special{pa 2850 -1575}\special{fp}\special{pa 2889 -1575}\special{pa 2928 -1575}\special{fp}% +\special{pa 2967 -1575}\special{pa 3006 -1575}\special{fp}\special{pa 3045 -1575}\special{pa 3085 -1575}\special{fp}% +\special{pa 3124 -1575}\special{pa 3163 -1575}\special{fp}\special{pa 3202 -1575}\special{pa 3241 -1575}\special{fp}% +\special{pa 3280 -1575}\special{pa 3319 -1575}\special{fp}\special{pa 3358 -1575}\special{pa 3397 -1575}\special{fp}% +\special{pa 3436 -1575}\special{pa 3475 -1575}\special{fp}\special{pa 3514 -1575}\special{pa 3553 -1575}\special{fp}% +\special{pa 3592 -1575}\special{pa 3631 -1575}\special{fp}\special{pa 3670 -1575}\special{pa 3709 -1575}\special{fp}% +\special{pa 3748 -1575}\special{pa 3787 -1575}\special{fp}\special{pa 3826 -1575}\special{pa 3865 -1575}\special{fp}% +\special{pa 3904 -1575}\special{pa 3944 -1575}\special{fp}\special{pa 3983 -1575}\special{pa 4022 -1575}\special{fp}% +\special{pa 4061 -1575}\special{pa 4100 -1575}\special{fp}\special{pa 4139 -1575}\special{pa 4178 -1575}\special{fp}% +\special{pa 4217 -1575}\special{pa 4256 -1575}\special{fp}\special{pa 4295 -1575}\special{pa 4334 -1575}\special{fp}% +\special{pa 4373 -1575}\special{pa 4412 -1575}\special{fp}\special{pa 4451 -1575}\special{pa 4490 -1575}\special{fp}% +\special{pa 4529 -1575}\special{pa 4568 -1575}\special{fp}\special{pa 4607 -1575}\special{pa 4646 -1575}\special{fp}% +\special{pa 4685 -1575}\special{pa 4724 -1575}\special{fp}% +% \special{pa 0 -1575}\special{pa 39 -1575}\special{fp}\special{pa 78 -1575}\special{pa 117 -1575}\special{fp}% \special{pa 156 -1575}\special{pa 195 -1575}\special{fp}\special{pa 234 -1575}\special{pa 273 -1575}\special{fp}% \special{pa 312 -1575}\special{pa 351 -1575}\special{fp}\special{pa 390 -1575}\special{pa 429 -1575}\special{fp}% @@ -77,6 +111,8 @@ \special{pa 1236 -709}\special{pa 1260 -764}\special{pa 1283 -822}\special{pa 1307 -883}% \special{pa 1331 -947}\special{pa 1354 -1013}\special{pa 1378 -1083}% \special{fp}% +\special{pa 197 -394}\special{pa 1378 -394}% +\special{fp}% \special{pa 1772 -1280}\special{pa 1795 -1210}\special{pa 1819 -1143}\special{pa 1843 -1080}% \special{pa 1866 -1019}\special{pa 1890 -961}\special{pa 1913 -905}\special{pa 1937 -853}% \special{pa 1961 -803}\special{pa 1984 -757}\special{pa 2008 -713}\special{pa 2031 -671}% @@ -91,6 +127,8 @@ \special{pa 2811 -905}\special{pa 2835 -961}\special{pa 2858 -1019}\special{pa 2882 -1080}% \special{pa 2906 -1143}\special{pa 2929 -1210}\special{pa 2953 -1280}% \special{fp}% +\special{pa 1772 -394}\special{pa 2953 -394}% +\special{fp}% \special{pa 3346 -1476}\special{pa 3370 -1407}\special{pa 3394 -1340}\special{pa 3417 -1277}% \special{pa 3441 -1216}\special{pa 3465 -1157}\special{pa 3488 -1102}\special{pa 3512 -1050}% \special{pa 3535 -1000}\special{pa 3559 -953}\special{pa 3583 -909}\special{pa 3606 -868}% @@ -105,11 +143,7 @@ \special{pa 4386 -1102}\special{pa 4409 -1157}\special{pa 4433 -1216}\special{pa 4457 -1277}% \special{pa 4480 -1340}\special{pa 4504 -1407}\special{pa 4528 -1476}% \special{fp}% -\special{pa 197 -591}\special{pa 1378 -591}% -\special{fp}% -\special{pa 1772 -591}\special{pa 2953 -591}% -\special{fp}% -\special{pa 3346 -591}\special{pa 4528 -591}% +\special{pa 3346 -394}\special{pa 4528 -394}% \special{fp}% \settowidth{\Width}{$D>0$}\setlength{\Width}{-0.5\Width}% \settoheight{\Height}{$D>0$}\settodepth{\Depth}{$D>0$}\setlength{\Height}{-0.5\Height}\setlength{\Depth}{0.5\Depth}\addtolength{\Height}{\Depth}% @@ -123,9 +157,9 @@ \settoheight{\Height}{$D<0$}\settodepth{\Depth}{$D<0$}\setlength{\Height}{-0.5\Height}\setlength{\Depth}{0.5\Depth}\addtolength{\Height}{\Depth}% \put(10.0000000,5.5000000){\hspace*{\Width}\raisebox{\Height}{$D<0$}}% % -\settowidth{\Width}{2 点ã§äº¤ã‚ã‚‹}\setlength{\Width}{-0.5\Width}% -\settoheight{\Height}{2 点ã§äº¤ã‚ã‚‹}\settodepth{\Depth}{2 点ã§äº¤ã‚ã‚‹}\setlength{\Height}{-0.5\Height}\setlength{\Depth}{0.5\Depth}\addtolength{\Height}{\Depth}% -\put(2.0000000,4.5000000){\hspace*{\Width}\raisebox{\Height}{2 点ã§äº¤ã‚ã‚‹}}% +\settowidth{\Width}{2点ã§äº¤ã‚ã‚‹}\setlength{\Width}{-0.5\Width}% +\settoheight{\Height}{2点ã§äº¤ã‚ã‚‹}\settodepth{\Depth}{2点ã§äº¤ã‚ã‚‹}\setlength{\Height}{-0.5\Height}\setlength{\Depth}{0.5\Depth}\addtolength{\Height}{\Depth}% +\put(2.0000000,4.5000000){\hspace*{\Width}\raisebox{\Height}{2点ã§äº¤ã‚ã‚‹}}% % \settowidth{\Width}{接ã™ã‚‹}\setlength{\Width}{-0.5\Width}% \settoheight{\Height}{接ã™ã‚‹}\settodepth{\Depth}{接ã™ã‚‹}\setlength{\Height}{-0.5\Height}\setlength{\Depth}{0.5\Depth}\addtolength{\Height}{\Depth}% diff --git a/Master/texmf-dist/doc/support/ketcindy/source/ketmanual/KeTCindyReferenceE.tex b/Master/texmf-dist/doc/support/ketcindy/source/ketmanual/KeTCindyReferenceE.tex index f2fece34741..1432b0ef180 100644 --- a/Master/texmf-dist/doc/support/ketcindy/source/ketmanual/KeTCindyReferenceE.tex +++ b/Master/texmf-dist/doc/support/ketcindy/source/ketmanual/KeTCindyReferenceE.tex @@ -66,6 +66,22 @@ This function should be written at the first line on Draw slot page. In case of space figure (KeTCindy's 3D-mode), write it in the initialization slot page \verb|ketlib|. \end{cmd} +%----------Initglist,Setglist,Addglist---------------------------------- +\begin{cmd}{Initglist}{initglist} +\itemket{Usage}Initglist(), Setglist(), Addglist() +\itemket{Description}Add the list generated in \verb|"ketlib"| slot to that of \verb|"ketlib"| slot. +\itemket{Examples}\mbox{} + +\begin{verbatim} + Initglist(); // in ketlib slot + Implicitplot(''1'',fun,rng); + Setglist(); + + Ketinit(); // in figures slot + Addglist(); +\end{verbatim} +\end{cmd} + %-----------Setfiles--------------------------------- \begin{cmd}{Setfiles}{setfiles} \itemket{Usage}Setfiles(filename) @@ -1213,7 +1229,7 @@ Extra options is :\\ \itemket{Usage}Circledata(name, list, options) \itemket{Description}Draw a circle or polygon. \itemket{Details} -The list consists of the central point and some point on the circle. +The list consists of the central point and some point on the circle or the radius. It is also permitted that three points on the circle are given in the list. The name can be omitted when the central point and a point on the circle are given with the names of their geometric components.\\ @@ -1228,8 +1244,8 @@ When this number is small, the corresponding polygon is drawn. The circle with center \verb|[0,0]| or A and radius 2 ( draw A by drawing tool) -\verb| Circledata("1",[[0,0],[2,0]]);|\\ -\verb| Circledata("1",[A,A+[2,0]]);|\\ +\verb| Circledata("1",[[0,0],[2,0]]);|(or \verb|[[0,0],2]|)\\ +\verb| Circledata("1",[A,A+[2,0]]);|(or \verb|[A,2]|)\\ The circle with center A and radius AB @@ -1968,30 +1984,36 @@ and keep them from being drawn on \TeX\ final output. \end{cmd} -%--------AddGraph ------------------------------------ -\begin{cmd}{AddGraph}{addgraph} +%--------Drawfigures ------------------------------------ +\begin{cmd}{Drawfigures}{drawfigures} -\itemket{Usage}AddGraph(name,List of PD,options) -\itemket{Description}Manipulate more than one PD all together. -\itemket{Remark} PD name should be passed as a character string, for example, pass "cr1"' for PD name cr1. +\itemket{Usage}Drawfigures(or Drwfigs)(name,List of PDs,List of Options) +\itemket{Description}Manipulate a plural number of PDs together. +\itemket{Remark} List of Options should corrensponds to that of PDs. %\itemket{Details} \itemket{Examples}\mbox{} After manipulating PDs of a circle and a point on the circle by AddGraph, you can translate or rotate them together.\\ -\verb|Setpt(3); |\\ -\verb|Circledata("1",[[0,1],[0,0]]); |\\ -\verb|Pointdata("1",[0,0]); |\\ -\verb|AddGraph("1",["[pt1]","cr1"],["nodisp"]); |\\ -\verb|nn=32; |\\ -\verb|forall(1..nn, |\\ -\verb| t=2*pi/nn*#; |\\ -\verb| Rotatedata(text(#),"ad1",-t,[[0,1],"nodisp"]); |\\ -\verb| Translatedata(text(#),"rt"+text(#),[t,0],["dr,0.3"]); |\\ -\verb|); | +\begin{verbatim} +opcr=["dr"]; +oppt=["Size=2","Color=red"]; +Circledata("1",[[0,1],[0,0]],opcr); +Pointdata("1",[0,0],oppt); +ad1=["cr1","pt1"]; +dt=2*pi/32; +opcr=["dr,0.3"]; +nn=32; +forall(1..nn, + t=dt*#; + Rotatedata(2,ad1,-t,[[0,1],"nodisp"]); + Translatedata(2,"rt2",[t,0],["nodisp"]); + Drawfigures(text(#),["tr2_1","tr2_2"],[opcr,oppt]); +); +\end{verbatim} \begin{center} - \input{Fig/addgraph} + \input{Fig/drawfigures1} \end{center} \end{cmd} @@ -2705,11 +2727,15 @@ The written data is as follows. %------------Tabledata-------------------------------- \begin{cmd}{Tabledata}{tabledata} -\itemket{Usage}Tabledata("",a list of widths, a list of height,a list of removals,[options]); +\itemket{Usage}Tabledata(a list of widths, a list of height,a list of removals,[options]); \item[Descritption]Table function to draw rules of a table. \itemket{Details} The lower left is the origin.\\ -The options are "Rng=y/n"(if "n", command setwindow is not executed) and as usual.\\ +The options are\\ +\hspace*{10mm}''Setwindow=y/n''\ if "n", command setwindow is not executed.\\ +\hspace*{10mm}''Move=point''\ The lower left changes to the point.\\ +\hspace*{10mm}''Geo=n/y''\ if ''y'', geometric points are created.\\ +\hspace*{10mm}integer\ decides to put names par each interval.\\ The unit of length is 1/10 of the grid of Euclidean view. The default is 1mm.\\ Control points are put on the row and column. The names are r0,r1,... and c0,c1,....\\ The points are movable. @@ -2718,39 +2744,27 @@ The points are movable. \verb|xL=[20,20,20,20];|\\ \verb|yL=[10,10,10,10,10];|\\ -\verb|Tabledata("",xL,yL,[]);| +\verb|Tabledata(xL,yL,["Geo=y"]);| \begin{center} \includegraphics[bb=0.00 0.00 403.52 249.51,height=30mm]{Fig/table01.pdf}\hspace{10mm}\input{Fig/table02} \end{center} \verb|Rmv=["r1c0c1","c3r0r1","c3r3r5","r4c2c4"];|\\ -\verb|Tabledata("",xL,yL,Rmv);| +\verb|Tabledata(xL,yL,Rmv);| \begin{center} \includegraphics[bb=0.00 0.00 392.02 251.51, height=36mm]{Fig/table03.pdf} \end{center} \end{cmd} -%--------------Tabledatalight------------------------------ -\begin{cmd}{Tabledatalight}{tabledatalight} -\itemket{Usage}Tabledata("",a list of widths, a list of height,a list of removals,[options]); -\itemket{Description}Table function to make a table without geometric points. -\itemket{Details}interval option decides to put names par each interval. -\itemket{Examples}\mbox{} - -\verb|xL=[20,20,20,20];|\\ -\verb|yL=[10,10,10,10,10];|\\ -\verb|Tabledatalight("",xL,yL,[],[2]);|\\ -\end{cmd} - %--------Changetablestyle------------------------------------ \begin{cmd}{Changetablestyle}{changetablestyle} \itemket{Usage}ChangeTablestyle(a list of Rules, [changed style]); \itemket{Description}Table function to change line styles of rules. \itemket{Examples}\mbox{} -\verb|Tabledatalight("",[10,20,10,20],[10,10,10],[]);|\\ +\verb|Tabledata([10,20,10,20],[10,10,10],[]);|\\ \verb|ChangeTablestyle(["r1c0c4"],["da"]);|\\ \verb|ChangeTablestyle(["r2c0c2","c1r0r3"],["nodisp"]);| @@ -2770,13 +2784,13 @@ The result is a list of center, half of width, half of height. \itemket{Examples}\mbox{} -\verb|Tabledatalight("",[10,20,10,20],[10,10,10],[]);|\\ +\verb|Tabledata([10,20,10,20],[10,10,10],[]);|\\ \verb|tmp=Findcell("c2r0","c3r1");| The return is [[3.5,2.5],0.5,0.5].\\ \verb|tmp=Findcell("c0r1","c2r3");| The return is [[1.5,1],1.5,1] . \end{cmd} %------------Putcell-------------------------------- -\begin{cmd}{Putcell}{putcell} +\begin{cmd}{Putcell, Putcellexpr}{putcell} \itemket{Usage}Putcell(grid name of upper left, grid name of lower right, postion, a string); \itemket{Description}Table function to put a string at the cell. \itemket{Details} @@ -2788,7 +2802,7 @@ Minute movements can be added. \verb|xL=apply(1..5,20);|\\ \verb|yL=apply(1..2,20);|\\ \verb|rL=["c2r2r3","c5r2r3"];|\\ -\verb|Tabledatalight("",xL,yL,rL);|\\ +\verb|Tabledata(xL,yL,rL);|\\ \verb|Putcell("c0r0","c1r1","c","A");|\\ \verb|Putcell("c1r0","c3r1","l2","B");|\\ \verb|Putcell("c0r1","c2r2","rt","C");|\\ @@ -2799,9 +2813,9 @@ Minute movements can be added. \end{center} \end{cmd} -%----------PutcoL---------------------------------- -\begin{cmd}{PutcoL}{putcoL} -\itemket{Usage}PutcoL (column number, position, a list of strings); +%----------Putcol---------------------------------- +\begin{cmd}{Putcol}{putcol} +\itemket{Usage}Putcol (column number, position, a list of strings); \itemket{Description}Table function to put strings to a column. \itemket{Details} The position is as \verb|Putcell|.\\ @@ -2810,9 +2824,9 @@ Null string is available. \itemket{Reference} \hyperlink{putrow}{Putrow}. \end{cmd} -%--------------PutcoLexpr------------------------------ -\begin{cmd}{PutcoLexpr}{putcoLexpr} -\itemket{Usage}PutcoLexpr (column number, position, a list of mathematical expressions); +%--------------Putcolexpr------------------------------ +\begin{cmd}{Putcolexpr}{putcolexpr} +\itemket{Usage}Putcolexpr (column number, position, a list of mathematical expressions); \itemket{Description}Table function to put strings to a column. \itemket{Reference} \hyperlink{putrowexpr}{Putrowexpr}. \end{cmd} @@ -2821,7 +2835,7 @@ Null string is available. \begin{cmd}{Putrow}{putrow} \itemket{Usage}Putrow (row number, position, a list of strings); \itemket{Description}Table function to put strings to a row. -\itemket{Reference} \hyperlink{putcoL}{PutcoL}. +\itemket{Reference} \hyperlink{putcol}{Putcol}. \end{cmd} %--------------Putrowexpr------------------------------ @@ -2830,11 +2844,13 @@ Null string is available. \itemket{Description}Table function to put strings to a row. \itemket{Examples} -In PutcoLexpr (), Putrowexpr (), formulas and general \TeX sentences can be entered. +In Putcolexpr (), Putrowexpr (), formulas and general \TeX sentences can be entered. -\verb|Tabledata("",5,3,100,45,["c1r1r2","r1c2c3","r2c2c3"]);|\\ -\verb|PutcoL(3,"c",["A","B","C"]);|\\ -\verb|PutcoLexpr(4,"l",["x^2","y=\sqrt{x^3}"]);|\\ +\verb|xL=apply(1..5,20);|\\ +\verb|xL=apply(1..3,15);|\\ +\verb|Tabledata(xL,yL,["c1r1r2","r1c2c3","r2c2c3"]);|\\ +\verb|Putcol(3,"c",["A","B","C"]);|\\ +\verb|Putcolexpr(4,"l",["x^2","y=\sqrt{x^3}"]);|\\ \verb|Putrow(1,"c",[1,"two"]);|\\ \verb|Putrowexpr(3,"c",["","\frac{\pi}{2}","","","\sum{x^2}"]);|\\ @@ -3331,7 +3347,40 @@ Cindyscript has a function \verb|format(value, number)|, like as Textformat. %\verb|Windispg();| \end{cmd} +%----------Windispg---------------------------------- +\begin{cmd}{Windispg}{windispg} +\itemket{Usage}Windispg(); +\itemket{Description}Generic function to display all graphs on Euclidean view. +\itemket{Remark}This command must be put on the final line. +%\itemket{Examples}\mbox{} + +%\verb|Windispg();| +\end{cmd} +%----------Fracform---------------------------------- +\begin{cmd}{Fracform}{fracform} +\itemket{Usage}Fracform(number,list of denominators) +\itemket{Description}returns Tex-like form of the fraction +\itemket{Examples}\verb|Fracform(0.33,[2,3]); => fr(1,3)| + +\end{cmd} + +%----------Totexform---------------------------------- +\begin{cmd}{Totexform}{totexform} +\itemket{Usage}Totexform(Tex-like form) +\itemket{Description}returns TeX form +\itemket{Examples}\verb|Totexform(fr(1,3)); => frac{1}{3}| + +\end{cmd} + +%----------Totexform---------------------------------- +\begin{cmd}{Tocindyform}{tocindyform} +\itemket{Usage}Tocindyform(Tex-like form) +\itemket{Description}returns Cindy form +\itemket{Examples}\verb|Tocindyform(fr(1,3)); => (1)/(3)| +\end{cmd} + \newpage + %==== Calling Other Softwares ========= \section{Calling Other Softwares} \subsection{R} @@ -4033,7 +4082,7 @@ When we make the animation, comment out \verb|//mf(C.x);| and click the Anime bu The animation is continued for 5 seconds with the following options.\\ \verb| Setpara("middle","mf(t)","t=[0,4*pi]",["Div=30"],["Frate=6"]);|\\ -A smooth-looking animation is achieved with the options: \verb|["Div=150"],["Frage=30"]|. +A smooth-looking animation is achieved with the options: \verb|["Div=150"],["Frate=30"]|. \end{cmd} \newpage @@ -5607,6 +5656,7 @@ Find on the screen (not in the space) intersection points (\verb|tmp_1|, \verb|t \hyperlink{drwxy}{Drwxy} \> draw axis in the \TeX\ figure.\\ \hyperlink{fontsize}{Fontsize} \> define the font size in the \TeX\ figure.\\ \hyperlink{ketinit}{Ketinit} \> initialize \ketcindy.\\ +\hyperlink{initglist}{Initglist} \> add the list in ketlib slot to that of figures slot.\\ \hyperlink{ptsize}{Ptsize} \> set the size of points.\\ \hyperlink{setarrow}{Setarrow} \> set the style of arrow.\\ \hyperlink{setax}{Setax} \> set the style of axis.\\ @@ -5624,7 +5674,7 @@ Find on the screen (not in the space) intersection points (\verb|tmp_1|, \verb|t \hyperlink{usegraphics}{Usegraphics} \> change to pict2e.\\ {\bf Drawing} \> \\ -\hyperlink{addgraph}{AddGraph} \> manipulate more than one PD all together.\\ +\hyperlink{drawfigures}{Drawfigures} \> manipulate a plural number of PDs together.\\ \hyperlink{anglemark}{Anglemark} \> draw an angle mark.\\ \hyperlink{setarrow}{Setarrowdata} \> set styles of arrows.\\ \hyperlink{arrowdata}{Arrowdata} \> draw an arrow line between two points.\\ @@ -5720,12 +5770,12 @@ Find on the screen (not in the space) intersection points (\verb|tmp_1|, \verb|t \hyperlink{changetablestyle}{Changetablestyle} \> change line styles of rules.\\ \hyperlink{findcell}{Findcell} \> return the information of a cell.\\ \hyperlink{putcell}{Putcell} \> put a string at the cell.\\ -\hyperlink{putcoL}{PutcoL} \> put strings to a column.\\ -\hyperlink{putcoLexpr}{PutcoLexpr} \> put strings to a column.\\ +\hyperlink{putcell}{Putcellexpr} \> put a math expression at the cell.\\ +\hyperlink{putcol}{Putcol} \> put strings to a column.\\ +\hyperlink{putcolexpr}{Putcolexpr} \> put math expressions to a column.\\ \hyperlink{putrow}{Putrow} \> put strings to a row.\\ -\hyperlink{putrowexpr}{Putrowexpr} \> put strings to a row.\\ +\hyperlink{putrowexpr}{Putrowexpr} \> put math expressions to a row.\\ \hyperlink{tabledata}{Tabledata} \> draw rules of a table.\\ -\hyperlink{tabledatalight}{Tabledatalight} \> make a table without geometric points.\\ \hyperlink{tgrid}{Tgrid} \> return the coordinates of the grid name.\\ \hyperlink{tlistplot}{Tlistplot} \> connect two lattice points by line segments.\\ @@ -5753,6 +5803,9 @@ Find on the screen (not in the space) intersection points (\verb|tmp_1|, \verb|t \hyperlink{textformat}{Textformat} \> converts a real number to a string.\\ \hyperlink{toupper}{Toupper} \> return the upper case letters of a string.\\ \hyperlink{windispg}{Windispg} \> display all graphs on Euclidean view.\\ +\hyperlink{fracform}{Fracform} \>return TeX-like form of the fraction.\\ +\hyperlink{totexform}{Totexform} \> return TeX form.\\ +\hyperlink{tocindyform}{Tocindyform} \> return Cindy form.\\ {\bf R} \> \\ \hyperlink{boxplot}{Boxplot} \> draw boxplots.\\ diff --git a/Master/texmf-dist/doc/support/ketcindy/source/ketmanual/KeTCindyReferenceJ.tex b/Master/texmf-dist/doc/support/ketcindy/source/ketmanual/KeTCindyReferenceJ.tex index 26e1fdb5f63..aa8c5bd2346 100644 --- a/Master/texmf-dist/doc/support/ketcindy/source/ketmanual/KeTCindyReferenceJ.tex +++ b/Master/texmf-dist/doc/support/ketcindy/source/ketmanual/KeTCindyReferenceJ.tex @@ -36,21 +36,23 @@ \hypertarget{ketinit}{} \item[関数]Ketinit(options) \item[機能]\ketcindy ã‚’åˆæœŸåŒ–ã™ã‚‹ã€‚å¹³é¢å›³å½¢ã§ã¯Drawスãƒãƒƒãƒˆã«ï¼Œç©ºé–“図形ã§ã¯Initialization スãƒãƒƒãƒˆã®å†’é ã«è¨˜è¿°ã™ã‚‹å¿…è¦ãŒã‚る。 -\item[説明]option 作æ¥ã‚µãƒ–フォルダ,縦方å‘ã®å€çŽ‡ã¨æç”»é ˜åŸŸã‚’è¨å®šã™ã‚‹ã€‚\\ -\phantom{option }通常ã¯ä¸è¦ã§ï¼Œ\verb|Ketinit()| ã ã‘ã§ã‚ˆã„。\\ +\item[説明]option 作æ¥ã‚µãƒ–フォルダ\\%,縦方å‘ã®å€çŽ‡ã¨æç”»é ˜åŸŸã‚’è¨å®šã™ã‚‹ã€‚\\ +\phantom{option }通常ã¯ä¸è¦ã§ï¼Œ\verb|Ketinit()| ã ã‘ã§ã‚ˆã„。 -ã€ä¾‹ã€‘ - -\verb|Ketinit()| :サブフォルダ\verb|"fig"|,å€çŽ‡ï¼‘,æç”»é ˜åŸŸ $-5 \leq x \leq 5 , -5 \leq y \leq 5$ - -\verb|Ketinit("")| : サブフォルダã¯cindyファイルã¨åŒã˜ - -\verb|Ketinit(2)| : å€çŽ‡2,æç”»é ˜åŸŸ $-5 \leq x \leq 5 , -5 \leq y \leq 5$ +\vspace{\baselineskip} +\hypertarget{Initglist}{} +\item[関数]Initglist(), Setglist(), Addglist() +\item[機能]ketlibスãƒãƒƒãƒˆã§ä½œã‚‰ã‚Œã‚‹æ画データをæ画リストã«è¿½åŠ ã™ã‚‹ã€‚ +\item[説明]Implicitplot,Hatchdataãªã©å®Ÿè¡Œæ™‚é–“ã®ã‹ã‹ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã‚’figuresスãƒãƒƒãƒˆã«ãŠãã¨ï¼Œãã®éƒ½åº¦å®Ÿè¡Œã•ã‚Œã¦ã—ã¾ã†ã€‚ãれをé¿ã‘ã‚‹ãŸã‚ketlibスãƒãƒƒãƒˆã«ãŠã„ãŸã¨ãã«ç”¨ã„る。 -\verb|Ketinit(2,[-2,3],[-2,4])| : å€çŽ‡2,æç”»é ˜åŸŸ $-2 \leq x \leq 3 , -2 \leq y \leq 4$ +\begin{verbatim} + Initglist(); // ketlibスãƒãƒƒãƒˆã§ + Implicitplot(''1'',fun,rng); + Setglist(); -\vspace{\baselineskip} -æç”»é ˜åŸŸ(TeXã«å‡ºåŠ›ã™ã‚‹é ˜åŸŸ)ã¯åˆ¶å¾¡ç‚¹SW(左下)ã¨NE(å³ä¸Šï¼‰ã‚’対角ã¨ã™ã‚‹çŸ©å½¢é ˜åŸŸã€‚æç”»é ˜åŸŸã‚’æŒ‡å®šã™ã‚‹ã¨ï¼Œåˆ¶å¾¡ç‚¹ãŒãªã‘ã‚Œã°ãã®ä½ç½®ã«ä½œã‚Šï¼Œã™ã§ã«å˜åœ¨ã™ã‚‹å ´åˆã¯ä½•ã‚‚ã—ãªã„。作æˆã•ã‚ŒãŸåˆ¶å¾¡ç‚¹ã¯ãƒ‰ãƒ©ãƒƒã‚°ã—ã¦æç”»é ˜åŸŸã‚’å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãる。å€çŽ‡ã¯ï¼ŒSetscaling(å€çŽ‡)を実行ã™ã‚‹ã®ã¨åŒã˜ã€‚ãŸã ã—,Cinderellaã§ä½œå›³ã—ãŸå¹¾ä½•è¦ç´ ã«å¯¾ã—ã¦ã¯ç„¡åŠ¹ã€‚(\hyperlink{setscaling}{Setscaling()}ã®é …å‚ç…§) + Ketinit(); // figuresスãƒãƒƒãƒˆã§ + Addglist(); +\end{verbatim} \vspace{\baselineskip} \hypertarget{setfiles}{} @@ -341,7 +343,7 @@ Deffun("f(x)",["regional y","if(x>1,y=1,if(x>-1,y=x,y=-1))","y"]); \item[関数]Fontsize(記å·) \item[機能]フォントサイズをè¨å®šã™ã‚‹ \item[説明]次㫠Fontsize() を実行ã™ã‚‹ã¾ã§æœ‰åŠ¹\\ -記å·ã¯ï¼Œ"t" , "ss" , "f", "s" , "n" , "la","La", "LA", "h" , "H"\\ +記å·ã¯ï¼Œ"t" , "ss" , "f", "s" , "n" , "la","La", "LA", "h" , "H" ã€ä¾‹ã€‘作図ツールã®ã€Œç‚¹ã‚’åŠ ãˆã‚‹ã€ã§ï¼ŒA〜Gã®ç‚¹ã‚’ã¨ã£ã¦ãŠã。å°ã•ã„æ–¹ã‹ã‚‰ã„ãã¤ã‹è¡¨ç¤ºã™ã‚‹ã€‚ \begin{verbatim} @@ -382,6 +384,9 @@ Pointdata("4",D,["Size=4"]); \end{verbatim} %\hspace{10mm}\input{Fig/pointsize} + +\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} + \hypertarget{setarrow}{} \item[関数]Setarrow(size,angle,position,cut,segstyle) \item[機能]矢線ã®å½¢çŠ¶ã®è¨å®šã‚’ã™ã‚‹ã€‚ @@ -466,8 +471,6 @@ Listplot([A,B]); Listplot("1",[[0,0],[2,2]]); \end{verbatim} -\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} - \vspace{\baselineskip} \hypertarget{setunitlen}{} \item[関数]Setunitlen(æ–‡å—列) @@ -479,8 +482,8 @@ Listplot("1",[[0,0],[2,2]]); \vspace{\baselineskip} \hypertarget{setwindow}{} -\item[関数]Setwindow() -\item[機能]出力ã™ã‚‹æç”»é ˜åŸŸã‚’è¨å®šã™ã‚‹ +\item[関数]Setwindow(xã®ç¯„囲, yã®ç¯„囲) +\item[機能]出力ã™ã‚‹æç”»é ˜åŸŸã‚’è¨å®šã™ã‚‹ã€‚ \item[説明]出力ã™ã‚‹æç”»é ˜åŸŸã¯ï¼Œé€šå¸¸ã¯2点SWã¨NEを対角ã¨ã™ã‚‹çŸ©å½¢é ˜åŸŸã§ã‚る。 ã“ã®2点をドラッグã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šãƒ“ジュアルã«æç”»é ˜åŸŸã‚’æ±ºã‚られる。 @@ -489,11 +492,17 @@ Listplot("1",[[0,0],[2,2]]); ã¾ãŸï¼Œè¡¨ã‚’作æˆã—ãŸã¨ãã¯ï¼Œè¡¨ã®ç¯„囲ãŒå‡ºåŠ›ç¯„囲ã¨ã—ã¦å„ªå…ˆã•ã‚Œã‚‹ï¼ˆTabledata()を実行ã—ãŸã¨ã)ã®ã§ï¼Œè¡¨å¤–ã«å›³ã‚’æã„ãŸå ´åˆã¯ï¼Œæœ€å¾Œã«ã“ã®é–¢æ•°ã§å‡ºåŠ›ç¯„囲を指定ã—ã¦æ›¸ã出ã™ã€‚ +\vspace{\baselineskip} +ã€ä¾‹ã€‘\verb|Setwindow([-5,5],[-1,3]);| + +\vspace{\baselineskip} +\hspace{10mm}\includegraphics[bb=0.00 0.00 415.02 199.01,width=6cm]{Fig/setwindow.pdf} + \begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} \end{description} -\newpage +%\newpage %ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ æç”» ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ \subsection{æç”»} \subsubsection{書å¼ã¨ã‚ªãƒ—ション} @@ -709,7 +718,7 @@ Pointdata("1",[P,Q,R],["size=4"]); \vspace{\baselineskip} \hypertarget{putoncurve}{} -\item[関数]PutonCurve(点ã®åå‰, プãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿, options) +\item[関数]Putoncurve(点ã®åå‰, プãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿, options) \item[機能]曲線上ã«ç‚¹ã‚’ä¹—ã›ã‚‹ã€‚ \item[説明]点ãŒå˜åœ¨ã—ãªã„å ´åˆã¯æ–°ãŸã«ä½œã‚‹ã€‚ã™ã§ã«ãã®ç‚¹ãŒå˜åœ¨ã™ã‚‹å ´åˆã¯ï¼Œãã®ç‚¹ã®$x$座標を使ã†ã€‚åˆæœŸå€¤ã®$x$座標㮠åˆæœŸè¨å®šã¯ 0。 @@ -719,28 +728,28 @@ optionsã¯ï¼Œ$x$座標ã®ç¯„囲をリストã§ä¸Žãˆã‚‹ã€‚ ã€ä¾‹ã€‘アステãƒã‚¤ãƒ‰ä¸Šã®å‹•ç‚¹P ã‚’ã¨ã‚‹ã€‚ \begin{verbatim} Paramplot("1","[2*cos(t)^3,2*sin(t)^3]","t=[0,2*pi]"); -PutonCurve("P","gp1",[-1,1]); +Putoncurve("P","gp1",[-1,1]); \end{verbatim} 点PãŒã‚¢ã‚¹ãƒ†ãƒã‚¤ãƒ‰ä¸Šã«ã§ã,ã“ã®ç‚¹ã¯ãƒ‰ãƒ©ãƒƒã‚°ã™ã‚‹ã¨ã‚¢ã‚¹ãƒ†ãƒã‚¤ãƒ‰ä¸Šã‚’ $-1 \leq x\leq 1$ ã®ç¯„囲ã§å‹•ã‹ã™ã“ã¨ãŒã§ãる。ãŸã ã—,-1,1ã®ä»˜è¿‘ã¯y座標ã®åˆ¤æ–ã®é–¢ä¿‚ã§ã´ã£ãŸã‚Šã¯ã„ã‹ãªã„。 - \begin{center} \input{Fig/putoncurve.tex} \end{center} + \begin{center} \scalebox{0.9}{\input{Fig/putoncurve.tex}} \end{center} -%\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} +\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} -\vspace{\baselineskip} +%\vspace{\baselineskip} \hypertarget{putonline}{} -\item[関数]PutonLine(点å , 座標1 ,座標2 ) +\item[関数]Putonline(点å , 座標1 ,座標2 ) \item[機能]直線上ã«ç‚¹ã‚’作る \item[説明]座標1,座標2を通る直線上ã«ç‚¹åã®ç‚¹ã‚’作る。ã§ããŸç‚¹ã¯ç›´ç·šã«å¯¾ã—ã¦ã‚¤ãƒ³ã‚·ãƒ‡ãƒ³ãƒˆã¨ãªã‚‹ã€‚ \vspace{\baselineskip} ã€ä¾‹ã€‘点A,\ Bを通る直線上ã«ç‚¹Pã‚’ã¨ã‚‹ã€‚ -\verb|PutonLine("P",A,B);| +\verb|Putonline("P",A,B);| \vspace{\baselineskip} \hypertarget{putonseg}{} -\item[関数]PutonSeg(点å , 座標1 ,座標2 ) +\item[関数]Putonseg(点å , 座標1 ,座標2 ) \item[機能]線分上ã«ç‚¹ã‚’作る \item[説明]座標1,座標2を端点ã¨ã™ã‚‹ç·šåˆ†ä¸Šã«ç‚¹åã®ç‚¹ã‚’作る。ã§ããŸç‚¹ã¯ç·šåˆ†ã«å¯¾ã—ã¦ã‚¤ãƒ³ã‚·ãƒ‡ãƒ³ãƒˆã¨ãªã‚‹ã€‚指定ã—ãŸç‚¹ãŒã™ã§ã«å˜åœ¨ã™ã‚‹å ´åˆã¯å‹•ã‹ã•ãªã„。 @@ -749,13 +758,11 @@ PutonCurve("P","gp1",[-1,1]); 線分AB上ã«ç‚¹Cã‚’ã¨ã‚‹ã€‚ - \verb|PutonSeg("C",A,B);| + \verb|Putonseg("C",A,B);| 点(-1,0),(2,2)を通る線分上ã«ç‚¹Cã‚’ã¨ã‚‹ã€‚ - \verb|PutonSeg("C",[[-1,0],[2,2]]);| - -\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} + \verb|Putonseg("C",[[-1,0],[2,2]]);| \vspace{\baselineskip} \hypertarget{reflectpoint}{} @@ -1248,7 +1255,8 @@ ptiã¯ï¼Œå„é ‚ç‚¹ã«å¯¾å¿œã™ã‚‹è¤‡ç´ æ•°ã®ãƒªã‚¹ãƒˆï¼ŒptãŒå„é ‚ç‚¹ã®åº§æ¨™ \begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} \end{description} -\newpage +%\newpage + % ====== 曲線 ============== \subsubsection{曲線} \begin{description} @@ -1271,7 +1279,7 @@ ptiã¯ï¼Œå„é ‚ç‚¹ã«å¯¾å¿œã™ã‚‹è¤‡ç´ æ•°ã®ãƒªã‚¹ãƒˆï¼ŒptãŒå„é ‚ç‚¹ã®åº§æ¨™ 2次ベジェ曲線 -Bezier("1",[A,B],[C]); +\verb|Bezier("1",[A,B],[C]);| \vspace{20mm} @@ -1281,7 +1289,7 @@ Bezier("1",[A,B],[C]); 3次ベジェ曲線 -Bezier("2",[A,B],[C,D]); +\verb|Bezier("2",[A,B],[C,D]);| \vspace{20mm} @@ -1302,13 +1310,14 @@ Bezier("2",[A,B],[C,D]); %D,B,E を1直線上ã«ã¨ã‚‹ã¨ï¼Œæ»‘らã‹ã«ã¤ãªãŒã‚‹ 節点を増やã™ã€‚2次ã¨3次。 -Bezier("3",[A,B,C],[[D],[E,F]]); +\verb|Bezier("3",[A,B,C],[[D],[E,F]]);| \vspace{20mm} -å…¨ã¦åŒã˜æ¬¡æ•°ã®å ´åˆï¼Œæ¬¡ã®ã‚ˆã†ã«ã—ã¦ã‚‚よã„. +å…¨ã¦åŒã˜æ¬¡æ•°ã®å ´åˆï¼Œæ¬¡ã®ã‚ˆã†ã«ã—ã¦ã‚‚よã„。 +\newpage -Bezier("4", [A,B,C,D], [E,F,G,H,K,L] ); +\verb|Bezier("4",[A,B,C,D],[E,F,G,H,K,L] ); | \begin{layer}{150}{0} \putnotese{20}{2}{\input{Fig/checkbe7}} @@ -1318,17 +1327,17 @@ Bezier("4", [A,B,C,D], [E,F,G,H,K,L] ); オプションã®ä¾‹ -Bezier("5",[A,B,C],[[D],[E,F]],["Num=3"]); +\verb|Bezier("5",[A,B,C],[[D],[E,F]],["Num=3"]);| \hspace{20mm}\input{Fig/checkbe5} -Bezier("6",[A,B,C],[[D],[E,F]],["Num=40","da"]); +\verb|Bezier("6",[A,B,C],[[D],[E,F]],["Num=40","da"]);| \hspace{20mm}\input{Fig/checkbe6} Numを(ベクトルã¨ã—ã¦ï¼‰åŒºé–“ã”ã¨ã«ä¸Žãˆã‚‹ã“ã¨ã‚‚ã§ãる。 -Bezier("1", [A,B,C,D], [E,F,G,H,K,L] , [ "Num=[2,3,4]"]); +\verb|Bezier("1",[A,B,C,D],[E,F,G,H,K,L],["Num=[2,3,4]"]);| \hspace{10mm} \input{Fig/checkbe8} @@ -1344,22 +1353,22 @@ Bezier("1", [A,B,C,D], [E,F,G,H,K,L] , [ "Num=[2,3,4]"]); \vspace{\baselineskip} ã€ä¾‹ã€‘ +\verb|Beziersmooth("1",[A,B,C,D]);| + \begin{layer}{150}{0} -\putnotese{70}{25}{bz1} -\putnotese{40}{-5}{ \input{Fig/checksm1}} +\putnotese{70}{35}{bz1} +\putnotese{40}{5}{ \input{Fig/checksm1}} \end{layer} -Beziersmooth("1",[A,B,C,D]); - -\vspace{20mm} +\vspace{40mm} ãã®å¾Œï¼Œç¯€ç‚¹ã‚„制御点を動ã‹ã—ã¦ï¼ŒæããŸã„ã‚‚ã®ã«ã™ã‚‹ã€‚ãŸã ã—,C2p 㯠C1q 㨠B を通る直線上ã—ã‹å‹•ã‘ãªã„。C3p 㯠C2q 㨠C を通る直線上ã—ã‹å‹•ã‘ãªã„。 \begin{layer}{150}{0} -\putnotese{70}{35}{bz1} -\putnotese{40}{10}{ \input{Fig/checksm2}} +\putnotese{70}{30}{bz1} +\putnotese{40}{05}{ \input{Fig/checksm2}} \end{layer} -\vspace{40mm} +\vspace{35mm} \vspace{\baselineskip} \hypertarget{beziersym}{} @@ -1368,23 +1377,30 @@ Beziersmooth("1",[A,B,C,D]); \item[説明]節点をã¯ã•ã‚€åˆ¶å¾¡ç‚¹ã¯ç¯€ç‚¹ã«é–¢ã—対称(片方ã¯è¡¨ç¤ºã•ã‚Œãšï¼Œå‹•ã‹ã›ãªã„)。 制御点ã¯è‡ªå‹•çš„ã«é…ç½®ã•ã‚Œã‚‹ã€‚ãã®å¾Œï¼Œç¯€ç‚¹ã‚„制御点を動ã‹ã—ã¦æããŸã„ã‚‚ã®ã«ã™ã‚‹ã€‚ +\vspace{\baselineskip} ã€ä¾‹ã€‘ \begin{layer}{150}{0} -\putnotese{70}{20}{bz1} -\putnotese{40}{10}{ \input{Fig/checksy1}} -\putnotese{0}{5}{Beziersym("1",[A,B,C,D]);} -\putnotese{0}{15}{C2p 㨠C3p ã¯è¡¨ç¤ºã•ã‚Œãªã„} +\putnotese{70}{27}{bz1} +\putnotese{40}{00}{ \input{Fig/checksy1}} +%\putnotese{0}{0}{Beziersym("1",[A,B,C,D]);} +%\putnotese{0}{15}{C2p 㨠C3p ã¯è¡¨ç¤ºã•ã‚Œãªã„} \end{layer} -\vspace{50mm} +\verb|Beziersym("1",[A,B,C,D]);| + +C2p 㨠C3p ã¯è¡¨ç¤ºã•ã‚Œãªã„ + +\vspace{25mm} ãã®å¾Œï¼Œç¯€ç‚¹ã‚„制御点を動ã‹ã—ã¦ï¼ŒæããŸã„ã‚‚ã®ã«ã™ã‚‹ã€‚ C2p 㨠C3p ã¯è¡¨ç¤ºã•ã‚Œãšï¼Œå‹•ã‹ã›ãªã„。 + \begin{center} \input{Fig/checksy2} \end{center} -\vspace{\baselineskip} +\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} +%\vspace{\baselineskip} \hypertarget{mkbeziercrv}{} \item[関数]Mkbeziercrv(åå‰, [節点リスト,制御点リスト] ã®ãƒªã‚¹ãƒˆ,options ) \item[機能]複数ã®ãƒ™ã‚¸ã‚§æ›²ç·šã‚’æã @@ -1395,9 +1411,8 @@ C2p 㨠C3p ã¯è¡¨ç¤ºã•ã‚Œãšï¼Œå‹•ã‹ã›ãªã„。 \verb|Mkbeziercrv("5",[[[A,B,C],[[D],[E,F]]],[[G,H,K,L],[[M],[N,O],[P]]]]);| - \input{Fig/checkmc1} + \scalebox{0.95}{\input{Fig/checkmc1}} -%\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} \vspace{\baselineskip} \hypertarget{mkbezierptcrv}{} \item[関数]Mkbezierptcrv(節点リストptlist,[オプション] ) @@ -1410,42 +1425,41 @@ C2p 㨠C3p ã¯è¡¨ç¤ºã•ã‚Œãšï¼Œå‹•ã‹ã›ãªã„。 オプション -"Deg=...â€æ¬¡æ•°æŒ‡å®šãŒã§ãる。( åˆæœŸè¨å®šã¯3次) +\verb|"Deg=..."| 次数指定ãŒã§ãる。(åˆæœŸè¨å®šã¯3次) -"Num=..."å„区間ã®åŒºé–“数(分点数ー1)を指定ã§ãる。( åˆæœŸè¨å®šã¯10) +\verb|"Num=..."| å„区間ã®åŒºé–“数(分点数$-1$)を指定ã§ãる。(åˆæœŸè¨å®šã¯10) -\vspace{5mm} +\vspace{\baselineskip} ã€ä¾‹ã€‘ \begin{layer}{150}{0} -\putnotese{50}{15}{bzA} -\putnotese{50}{-5}{ \input{Fig/checkb8}} +\putnotese{70}{25}{bzA} +\putnotese{40}{-5}{ \input{Fig/checkb8}} \end{layer} \verb|Mkbezierptcrv([A,B,C]);| -\vspace{25mm} +\vspace{23mm} + +ãã®å¾Œï¼Œç¯€ç‚¹ã‚„制御点を動ã‹ã—ã¦ï¼Œ\par +æããŸã„ã‚‚ã®ã«ã™ã‚‹ã€‚ \begin{layer}{150}{0} -\putnotese{50}{15}{bzA} -\putnotese{60}{-10}{ \input{Fig/checkb11}} +\putnotese{70}{25}{bzA} +\putnotese{55}{-15}{ \input{Fig/checkb11}} \end{layer} -ãã®å¾Œï¼Œç¯€ç‚¹ã‚„制御点を動ã‹ã—ã¦ï¼Œ - -æããŸã„ã‚‚ã®ã«ã™ã‚‹ã€‚ - -\vspace{30mm} +\vspace{35mm} \begin{layer}{150}{0} -\putnotese{80}{25}{bzA} -\putnotese{50}{-5}{\input{Fig/checkb9}} +\putnotese{70}{28}{bzA} +\putnotese{50}{-3}{\input{Fig/checkb9}} \end{layer} \verb|Mkbezierptcrv([A,B,C],["Deg=2"]);| -Deg=2 ã¨ã™ã‚‹ã¨2次ã«ãªã‚‹ã€‚ +\verb|Deg=2| ã¨ã™ã‚‹ã¨2次ã«ãªã‚‹ã€‚ 制御点ã¯å„区間ã«ï¼‘個ãšã¤ã§ãる。 @@ -1501,10 +1515,13 @@ Deg=2 ã¨ã™ã‚‹ã¨2次ã«ãªã‚‹ã€‚ \verb|size ->n|:ç”»é¢ä¸Šã§ã®ç·šã®å¤ªã•ã‚’指定ã™ã‚‹ã€‚ +\vspace{\baselineskip} ã€ä¾‹ã€‘\verb|CRspline("1",[A,B,C,D]);| \hspace{20mm} \input{Fig/checkCR} +%\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} + \vspace{\baselineskip} \hypertarget{ospline}{} \item[関数]Ospline(åå‰ï¼Œåˆ¶å¾¡ç‚¹ãƒªã‚¹ãƒˆï¼Œ[オプション] ) @@ -1526,7 +1543,7 @@ Deg=2 ã¨ã™ã‚‹ã¨2次ã«ãªã‚‹ã€‚ \hypertarget{circledata}{} \item[関数]Circledata(name,リスト,options) \item[機能]円ã¾ãŸã¯å¤šè§’形をæã。 -\item[説明]ä¸å¿ƒã®ç‚¹ã¨ï¼Œå††å‘¨ä¸Šã®1点,ã¾ãŸã¯3点をリストã§ä¸Žãˆã¦å††ã‚’æã。 +\item[説明]ä¸å¿ƒã®ç‚¹ã¨ï¼Œå††å‘¨ä¸Šã®1点(ã‹åŠå¾„),ã¾ãŸã¯3点をリストã§ä¸Žãˆã¦å††ã‚’æã。 ä¸å¿ƒã¨å††å‘¨ä¸Šã®ç‚¹ã‚’,座標ã§ã¯ãªã幾何è¦ç´ åã§æŒ‡å®šã™ã‚‹å ´åˆã¯ name ã¯çœç•¥å¯ã€‚ @@ -1542,13 +1559,17 @@ optionsã¯ä»¥ä¸‹ã®ã‚‚ã®ã‚’リストã§ä¸Žãˆã‚‹ã€‚çœç•¥ã—ãŸå ´åˆã¯å®Ÿç·šã ã€ä¾‹ã€‘ã„ã‚ã„ã‚ãªå††ã‚’æã。\\ \>原点ä¸å¿ƒï¼ŒåŠå¾„2ã®å††\> \verb|Circledata("1",[[0,0],[2,0]]);|\\ + \hspace{50mm}(\verb|[[0,0],2]|ã§ã‚‚よã„)\\ \>Aä¸å¿ƒï¼ŒåŠå¾„ABã®å††\> \verb|Circledata([A,B]);|\\ \>Aä¸å¿ƒï¼ŒåŠå¾„2ã®å††\> \verb|Circledata("1",[A,A+[2,0]]);|\\ + \hspace{50mm}(\verb|[A,2]|ã§ã‚‚よã„)\\ \>3点A,B,Cを通る円\> \verb|Circledata([A,B,C]);|\\ \>下図左より,オプション㫠"dr,2" , "da" , "do" ã‚’ã¤ã‘ãŸå ´åˆã€‚ \end{tabbing} \hspace{10mm} \input{Fig/circledata1} -\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} +\vspace{\baselineskip} + +%\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} \verb|Circledata([A,B,C]);| ã§ï¼Œ3点A,B,Cを通る円をæã„ãŸã¨ã,ã§ããŸå††ã®ä¸å¿ƒã¯ \verb|Pointdata("1",[crABCcenter]);| ã§ä½œå›³ã§ãる。 @@ -1604,6 +1625,8 @@ Circledata("2",[A,B],["Num=6"]); \item[機能]ã™ã¹ã¦ã®å¹¾ä½•å††ã®PD ã‚’ä½œæˆ \item[説明]Cinderellaã®ã€Œå††ã‚’åŠ ãˆã‚‹ã€ãƒ„ール(3種類ã„ãšã‚Œã§ã‚‚)ã§æã„ãŸã™ã¹ã¦ã®å††ã‚’ãã®ã¾ã¾ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã¨ã™ã‚‹ã€‚ãŸã¨ãˆã°ï¼Œä¸å¿ƒA,円周上ã®ç‚¹ã‚’Bã¨ã—ãŸå††ã‚’作るã¨ï¼Œãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿crABãŒä½œæˆã•ã‚Œã‚‹ã€‚ãã®å¾Œï¼Œã‚¤ãƒ³ã‚¹ãƒšã‚¯ã‚¿ã§ç‚¹Bã®è˜åˆ¥åを変更(ãŸã¨ãˆã°Qã«ï¼‰ã™ã‚‹ã¨ï¼Œãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿åも変更ã•ã‚Œã‚‹ã€‚円ã¯ã™ã§ã«æã‹ã‚Œã¦ã„ã¦ã‚‚よã„。 +\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} + \vspace{\baselineskip} \hypertarget{ellipseplot}{} \item[関数]Ellipseplot(name,点リスト ,定義域, options) @@ -1637,6 +1660,7 @@ Circledata("2",[A,B],["Num=6"]); ã€Œç‚¹ã‚’åŠ ãˆã‚‹ã€ãƒ„ールを用ã„ã¦ï¼ŒæŽ¥ç·šï¼Œæ³•ç·šä¸Šã«é©å½“ã«ç‚¹ã‚’å–る。(D,Eã¨ãªã£ãŸã¨ã™ã‚‹) 次ã®ã‚¹ã‚¯ãƒªãƒ—トを書ã„ã¦å®Ÿè¡Œã™ã‚‹ã¨ï¼Œæ¥•å††ã«é–¢ã—ã¦å…¥å°„角ã¨å射角ãŒç‰ã—ããªã‚‹ã‚ˆã†ã«å…‰ãŒåå°„ã™ã‚‹æ§˜åを図ã«ã™ã‚‹ã“ã¨ãŒã§ãる。 +\newpage \vspace{\baselineskip} \begin{layer}{150}{0} @@ -1867,8 +1891,9 @@ Pointdata(text(s+3),[s+1,s],["Inside=0","Size=3"]); ); \end{verbatim} -\hspace{40mm}\input{Fig/plotdata5} -ãªãŠï¼Œã“ã“ã§ï¼ŒPointdata() ã®name ã‚’ text(s+3) ã¨ã—ã¦ã„ã‚‹ã®ã¯ï¼Œs㌠-2 ã‹ã‚‰å§‹ã¾ã‚‹ã®ã§ï¼Œname ã¯1ã‹ã‚‰å§‹ã¾ã‚‹ã‚ˆã†ã«ã™ã‚‹ãŸã‚ã§ã‚る。name ã«è² ã®æ•°ã¯ä½¿ãˆãªã„ã®ã§ã€‚ +\hspace{45mm}\input{Fig/plotdata5} + +ãªãŠï¼Œã“ã“ã§ï¼ŒPointdata() ã®name ã‚’ \verb|text(s+3)| ã¨ã—ã¦ã„ã‚‹ã®ã¯ï¼Œs ㌠$-2$ ã‹ã‚‰å§‹ã¾ã‚‹ã®ã§ï¼Œè² ã®æ•°ãŒä½¿ãˆãªã„ name ã‚’ $1$ ã‹ã‚‰å§‹ã¾ã‚‹ã‚ˆã†ã«ã™ã‚‹ãŸã‚ã§ã‚る。 \vspace{\baselineskip} 関数ã«æ–‡å—ä¿‚æ•°ãŒã¤ã„ã¦ãŠã‚Šï¼Œæ–‡å—ä¿‚æ•°ã®å€¤ã‚’変化ã•ã›ãªãŒã‚‰ã‚°ãƒ©ãƒ•ã‚’æãã«ã¯ï¼ŒAssign を使ã†ã‹ï¼ŒDefvar ã§å¤‰æ•°ã‚’定義ã™ã‚‹ã€‚ @@ -1995,7 +2020,7 @@ Paramplot("4","[2*cos(t)+10,sin(t)]","t=[0,2*pi]",["do"]); \vspace{\baselineskip} ã€ä¾‹ã€‘カージオイド曲線をæã。 -\hspace{20mm}\verb|Polarplot("1","2*(1+cos(t))","t=[0,2*pi]",["Num=200"]);| +\hspace{10mm}\verb|Polarplot("1","2*(1+cos(t))","t=[0,2*pi]",["Num=200"]);| \vspace{\baselineskip} \begin{center}\scalebox{0.7}{\input{Fig/cardioid1}}\end{center} @@ -2114,7 +2139,7 @@ text(L.x*(log(L.x)-1)-G.x*(log(G.x)-1)) ]); \vspace{\baselineskip} \begin{center} \input{Fig/intlog}\end{center} -\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} +%\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} \vspace{\baselineskip} \hypertarget{exprrot}{} @@ -2138,6 +2163,8 @@ Exprrot(C,B-A,"\frac{2}{3}"); \vspace{\baselineskip} \hspace{10mm}\includegraphics[bb=0.00 0.00 181.01 131.01,width=4cm]{Fig/exprrot.pdf} \hspace{10mm} \input{Fig/exprrot} +\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} + \vspace{\baselineskip} \hypertarget{letter}{}\item[関数]Letter([ä½ç½®, æ–¹å‘, æ–‡å—列],option) \item[機能]æ–‡å—列を表示ã™ã‚‹ @@ -2300,7 +2327,7 @@ optionsã¯ï¼Œ[曲ãŒã‚Š , 空白サイズ, æ–‡å—, 線種] \vspace{\baselineskip} \begin{layer}{150}{0} -\putnotese{85}{5}{ \input{Fig/bowdata}} +\putnotese{85}{0}{ \input{Fig/bowdata}} \end{layer} ã€ä¾‹ã€‘三角形ABCã®å„辺ã«å¼“形マークをã¤ã‘記å·ã‚’入れる。 @@ -2424,41 +2451,73 @@ Framedata("1",[A,B],["corner"]); Rulerscale(A,["r",0,5,1],["f",1,"d1",3,"d2"]); \end{verbatim} \begin{center}\scalebox{0.9}{ \input{Fig/ruler}} \end{center} -\vspace{\baselineskip} -%\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} +%\vspace{\baselineskip} +\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} \end{description} -\newpage +%\newpage + %ï¼ï¼ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã®æ“作ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ \subsection{プãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã®æ“作} \begin{description} -\hypertarget{addgraph}{} -\item[関数]AddGraph(name ,プãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã®ãƒªã‚¹ãƒˆ,option) -\item[機能]複数ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‚’ã¾ã¨ã‚ã‚‹ -\item[説明]複数ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‚’ã¾ã¨ã‚ã¦æ‰±ã†ã€‚ãŸã¨ãˆã°ï¼Œå††ã¨ï¼Œå††å‘¨ä¸Šã®ç‚¹ã®2ã¤ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‚’ã¾ã¨ã‚ã¦æ‰±ãˆã°ï¼Œå¹³è¡Œç§»å‹•ã‚„回転ã§ï¼Œãれらã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‚’ã¾ã¨ã‚ã¦å¹³è¡Œç§»å‹•ã‚„回転ãŒã§ãる。Joincrvs()ã§ã¯ï¼Œãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‚’ã¤ãªã’ã¦ï¼‘ã¤ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã«ã™ã‚‹ãŒï¼ŒAddGraph()ã§ã¯ï¼Œãã‚Œãžã‚Œã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‹ã‚‰ãªã‚‹ãƒªã‚¹ãƒˆï¼ˆãƒªã‚¹ãƒˆã®ãƒªã‚¹ãƒˆï¼‰ã«ã™ã‚‹ã€‚(プãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã¯åº§æ¨™ã®ãƒªã‚¹ãƒˆã§ã‚る) +\hypertarget{drawfigures}{} +\item[関数]Drawfigures(or Drwfigs)(name ,データリスト,オプションリスト) +\item[機能]複数ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã®ã‚¹ã‚¿ã‚¤ãƒ«ï¼ˆã‚ªãƒ—ション)をリストã§ä¸Žãˆã¦æç”»ã™ã‚‹ +\item[説明]複数ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‚’ã¾ã¨ã‚ã¦æ‰±ã†ã€‚ãŸã¨ãˆã°ï¼Œå††ã¨ï¼Œå††å‘¨ä¸Šã®ç‚¹ã®2ã¤ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‚’ã¾ã¨ã‚ã¦æ‰±ãˆã°ï¼Œå¹³è¡Œç§»å‹•ã‚„回転ã§ï¼Œãれらã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‚’ã¾ã¨ã‚ã¦å¹³è¡Œç§»å‹•ã‚„回転ãŒã§ãる。%Joincrvs()ã§ã¯ï¼Œãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‚’ã¤ãªã’ã¦ï¼‘ã¤ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã«ã™ã‚‹ãŒï¼ŒAddgraph()ã§ã¯ï¼Œãã‚Œãžã‚Œã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‹ã‚‰ãªã‚‹ãƒªã‚¹ãƒˆï¼ˆãƒªã‚¹ãƒˆã®ãƒªã‚¹ãƒˆï¼‰ã«ã™ã‚‹ã€‚(プãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã¯åº§æ¨™ã®ãƒªã‚¹ãƒˆã§ã‚る) -引数ã«ã¯ï¼Œãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿åã‚’æ–‡å—列化ã—ã¦æ¸¡ã™ã€‚ãŸã¨ãˆã°ï¼Œå††ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ãŒ cr1 ã®ã¨ã,"cr1" ã¨ã™ã‚‹ã€‚ +%引数ã«ã¯ï¼Œãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿åã‚’æ–‡å—列化ã—ã¦æ¸¡ã™ã€‚ãŸã¨ãˆã°ï¼Œå††ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ãŒ cr1 ã®ã¨ã,"cr1" ã¨ã™ã‚‹ã€‚ \vspace{\baselineskip} ã€ä¾‹ã€‘サイクãƒã‚¤ãƒ‰ã®å›³ã‚’æã。 \begin{verbatim} -Setpt(3); -Circledata("1",[[0,1],[0,0]]); -Pointdata("1",[0,0]); -AddGraph("1",["[pt1]","cr1"],["nodisp"]); +opcr=["dr"]; +oppt=["Size=2","Color=red"]; +Circledata("1",[[0,1],[0,0]],opcr); +Pointdata("1",[0,0],oppt); +ad1=["cr1","pt1"]; +dt=2*pi/32; +opcr=["dr,0.3"]; nn=32; forall(1..nn, -t=2*pi/nn*#; -Rotatedata(text(#),"ad1",-t,[[0,1],"nodisp"]); -Translatedata(text(#),"rt"+text(#),[t,0],["dr,0.3"]); + t=dt*#; + Rotatedata(2,ad1,-t,[[0,1],"nodisp"]); + Translatedata(2,"rt2",[t,0],["nodisp"]); + Drawfigures(text(#),["tr2_1","tr2_2"],[opcr,oppt]); ); \end{verbatim} \vspace{\baselineskip} -\hspace{20mm} \input{Fig/addgraph} +\hspace{20mm} \input{Fig/drawfigures1} -ã“ã“ã§ï¼ŒAddGraph()ã®å¼•æ•°ã«ä¸Žãˆã‚‹ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã®ãƒªã‚¹ãƒˆã§ï¼Œç‚¹ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ pt1 ã‚’"[pt1]" ã¨ã—ã¦ã„ã‚‹ã“ã¨ã«æ³¨æ„。円ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ãŒï¼Œç‚¹ã®åº§æ¨™ã®ãƒªã‚¹ãƒˆã§ã‚ã‚‹ã®ã«å¯¾ã—,点ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã¯ä¸€ã¤ã®åº§æ¨™ã ã‘ãªã®ã§ï¼Œã“ã®ã‚ˆã†ã«ã—ã¦ãƒªã‚¹ãƒˆåŒ–ã—ã¦æ¸¡ã™ã€‚ +最åˆã«ï¼Œã¾ã¨ã‚ã¦å¹³è¡Œç§»å‹•ã‚„回転をã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’リスト化ã—ã¦ãŠã。ã¾ãŸï¼Œå„データã®ã‚ªãƒ—ションをリストã¨ã—ã¦ä¸Žãˆã¦ã„ã‚‹ã“ã¨ã«æ³¨æ„。ã“ã†ã™ã‚‹ã“ã¨ã§ï¼Œã‚µã‚¤ã‚ºã‚„色ãªã©ã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚’å…ƒã®ã‚¹ã‚¿ã‚¤ãƒ«ã«åˆã‚ã›ã‚‹ã“ã¨ãŒã§ãる。 + +%\hypertarget{addgraph}{} +%\item[関数]Addgraph(name ,プãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã®ãƒªã‚¹ãƒˆ,option) +%\item[機能]複数ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‚’ã¾ã¨ã‚ã‚‹ +%\item[説明]複数ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‚’ã¾ã¨ã‚ã¦æ‰±ã†ã€‚ãŸã¨ãˆã°ï¼Œå††ã¨ï¼Œå††å‘¨ä¸Šã®ç‚¹ã®2ã¤ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‚’ã¾ã¨ã‚ã¦æ‰±ãˆã°ï¼Œå¹³è¡Œç§»å‹•ã‚„回転ã§ï¼Œãれらã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‚’ã¾ã¨ã‚ã¦å¹³è¡Œç§»å‹•ã‚„回転ãŒã§ãる。Joincrvs()ã§ã¯ï¼Œãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‚’ã¤ãªã’ã¦ï¼‘ã¤ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã«ã™ã‚‹ãŒï¼ŒAddgraph()ã§ã¯ï¼Œãã‚Œãžã‚Œã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‹ã‚‰ãªã‚‹ãƒªã‚¹ãƒˆï¼ˆãƒªã‚¹ãƒˆã®ãƒªã‚¹ãƒˆï¼‰ã«ã™ã‚‹ã€‚(プãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã¯åº§æ¨™ã®ãƒªã‚¹ãƒˆã§ã‚る) +% +%引数ã«ã¯ï¼Œãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿åã‚’æ–‡å—列化ã—ã¦æ¸¡ã™ã€‚ãŸã¨ãˆã°ï¼Œå††ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ãŒ cr1 ã®ã¨ã,"cr1" ã¨ã™ã‚‹ã€‚ +% +%\vspace{\baselineskip} +%ã€ä¾‹ã€‘サイクãƒã‚¤ãƒ‰ã®å›³ã‚’æã。 +%\begin{verbatim} +%Setpt(3); +%Circledata("1",[[0,1],[0,0]]); +%Pointdata("1",[0,0]); +%Addgraph("1",["[pt1]","cr1"],["nodisp"]); +%nn=32; +%forall(1..nn, +%t=2*pi/nn*#; +%Rotatedata(text(#),"ad1",-t,[[0,1],"nodisp"]); +%Translatedata(text(#),"rt"+text(#),[t,0],["dr,0.3"]); +%); +%\end{verbatim} +% +%\vspace{\baselineskip} +%\hspace{20mm} \input{Fig/addgraph} +% +%ã“ã“ã§ï¼ŒAddgraph()ã®å¼•æ•°ã«ä¸Žãˆã‚‹ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã®ãƒªã‚¹ãƒˆã§ï¼Œç‚¹ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ pt1 ã‚’"[pt1]" ã¨ã—ã¦ã„ã‚‹ã“ã¨ã«æ³¨æ„。円ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ãŒï¼Œç‚¹ã®åº§æ¨™ã®ãƒªã‚¹ãƒˆã§ã‚ã‚‹ã®ã«å¯¾ã—,点ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã¯ä¸€ã¤ã®åº§æ¨™ã ã‘ãªã®ã§ï¼Œã“ã®ã‚ˆã†ã«ã—ã¦ãƒªã‚¹ãƒˆåŒ–ã—ã¦æ¸¡ã™ã€‚ \begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} @@ -2552,10 +2611,12 @@ Partcrv("2",tmp_2,tmp_1,"gr1",["dr,2"]); \end{verbatim} \vspace{\baselineskip} +\vspace{\baselineskip} +\vspace{\baselineskip} -\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} +%\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} -%\vspace{\baselineskip} +\vspace{\baselineskip} \hypertarget{enclosing}{} \item[関数]Enclosing(name , PDリスト , [開始ä½ç½®, 交点計算ã®è¨±å®¹é™ç•Œ1, 2]) \item[機能]複数ã®æ›²ç·šã‹ã‚‰é–‰æ›²ç·šã‚’作る。 @@ -2708,7 +2769,7 @@ Circledata([A,B],["da"]); \begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} -%\vspace{\baselineskip} +\vspace{\baselineskip} \hypertarget{dotfilldata}{} \item[関数]Dotfilldata(name , æ–¹å‘リスト , プãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ , options) \item[機能]é ˜åŸŸã‚’ç‚¹ã§æ•·ãè©°ã‚る。 @@ -2721,6 +2782,12 @@ Circledata([A,B],["da"]); Partcrv() 㨠Enclosing() ã§é–‰æ›²ç·šã‚’作ã£ã¦ç‚¹ã‚’æ•·ãè©°ã‚る。 + +%\begin{center}\scalebox{0.9}{\input{Fig/dotfill}} \end{center} +\begin{layer}{150}{0} +\putnotese{85}{-3}{\scalebox{0.9}{ \input{Fig/dotfill}}} +\end{layer} + \begin{verbatim} r=3; p0=r*[cos(pi/2),sin(pi/2)]; @@ -2737,9 +2804,6 @@ Enclosing("2",["sg3","part2","Invert(sg2)"],[[0,0]]); Dotfilldata("1",["i"],[["en1"]]); Dotfilldata("2",["i"],[["en2"]],[0.1]); \end{verbatim} -\begin{layer}{150}{0} -\putnotese{80}{-60}{\scalebox{0.9}{ \input{Fig/dotfill}}} -\end{layer} \vspace{\baselineskip} \hypertarget{shade}{} @@ -2752,7 +2816,13 @@ Dotfilldata("2",["i"],[["en2"]],[0.1]); optionã® Color ã¯ï¼ŒCinderellaã®ç”»é¢ä¸Šã§ã®æ画色をリストã§ä¸Žãˆã‚‹ã€‚濃ã•ã‚’指定ã—ãŸã„å ´åˆã¯è‰²åã‚„RGBã§ã¯ãªãCMYKã«ã™ã‚‹ã€‚ -optionsã«ã¯ï¼Œä»–ã«ï¼Œã€ŒEnclosingを使ã†ã‹ï¼ˆ''Enc=y/n'')ã€ï¼ŒEnclosingã®ã¨ãã®é–‹å§‹ç‚¹ï¼Œæ画色 ãŒã‚る。 +optionsã«ã¯ï¼Œä»–ã«ï¼Œæ¬¡ã®ã‚‚ã®ãŒã‚る。 + +・Enclosingを使ã†ã‹ã©ã†ã‹ï¼š''Enc=y/n''(åˆæœŸå€¤ã¯ y) + +・Enclosingã®ã¨ãã®é–‹å§‹ç‚¹ï¼Œæ画色 + +・æç”»é ˜åŸŸã®ãƒˆãƒªãƒŸãƒ³ã‚°ï¼šTrim=y/n (åˆæœŸå€¤ã¯ n ) 複数ã®Shadeを使ã†ã¨ãã¯ï¼Œåå‰ã‚’ã¤ã‘る。 @@ -2789,7 +2859,20 @@ Shade(["gr2","Invert(gr1)"],[[-1.5,1],"Color=[1,0,0]","alpha->0.4"]); \vspace{\baselineskip} \begin{center}\scalebox{0.9}{\input{Fig/shade01}} \end{center} -%\vspace{\baselineskip} +\vspace{\baselineskip} +ã€ä¾‹ã€‘æç”»é ˜åŸŸï¼ˆNE,SWã®çŸ©å½¢é ˜åŸŸï¼‰ã‹ã‚‰ã¯ã¿å‡ºã—ãŸéƒ¨åˆ†ã¯è¡¨ç¤ºã—ãªã„よã†ã«ã™ã‚‹ã€‚ + +\begin{verbatim} +Plotdata("1","x^2","x"); +Partcrv("1",[-1,1],[3,9],"gr1"); +Listplot("1",[[3,9],[-1,1]]); +Joincrvs("1",["sg1","part1"]); +Shade(["join1"],["Color=[0,0,0.2,0]","Trim=y"]); +\end{verbatim} + +SW,NE ã‚’å‹•ã‹ã—ã¦ã¿ã‚‹ã¨ï¼Œç™½æž 内ã ã‘ãŒè‰²å¡—ã‚Šã•ã‚Œã‚‹ã€‚ + +\vspace{\baselineskip} ã€ä¾‹ã€‘åŒå¿ƒå††ã‚’リング状ã«å¡—る。 下図å³ã®ã‚ˆã†ã«ï¼ŒåŒå¿ƒå††ã‚’リング状ã«å¡—ã‚‹ãŒï¼Œå††2ã¤ã ã‘ã§ã¯é–‰æ›²ç·šã¯ã§ããªã„。ãã“ã§ï¼Œå·¦å›³ã®ã‚ˆã†ã«ï¼Œå††ã®æã始ã‚を線分ã§çµã‚“ã§é–‰æ›²ç·šã‚’作る。ã“ã®ã¨ã,å‘ãを考ãˆã¦ï¼ŒJoincrvsã§çµã¶ã‚ˆã†ã«ï¼Œ''Enc=n''ã‚’ã¤ã‘る。線分ã¯éžè¡¨ç¤ºã«ã—ãŸã„ã®ã§ï¼Œ\verb|"nodisp"|オプションをã¤ã‘ã¦ãŠã。ãªãŠï¼Œç‚¹Aã‚’é©å½“ãªä½ç½®ã«ä½œå›³ã—ã¦ãŠã。 @@ -2806,7 +2889,7 @@ Shade(["cr1","sg1","Invert(cr2)","Invert(sg1)"],["Enc=n","Color=green"]); ãã®ä»–,\hyperlink{joincrvs}{Joincrvs() ã®ä¾‹}ã‚‚å‚ç…§ã®ã“㨠-\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} +%\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} \vspace{\baselineskip} \hypertarget{reflectdata}{} @@ -2833,6 +2916,7 @@ Reflectdata("1","crAB",[C]); Reflectdata("2","crAB",[[-1,2]],["dr,2"]); Reflectdata("3","crAB",[D,E],["da"]); \end{verbatim} + \vspace{\baselineskip} \begin{center} \input{Fig/reflectdata} \end{center} @@ -2881,17 +2965,18 @@ Reflectdata("3","crAB",[D,E],["da"]); Cをä¸å¿ƒã«$x$軸方å‘ã«3,$y$軸方å‘ã«2拡大ã—,実線ã§å¤ªãæã。 -原点ä¸å¿ƒã«ãƒ™ã‚¯ãƒˆãƒ«$\overrightarrow{OD} $ã ã‘拡大ã—ï¼Œç ´ç·šã§æã。 +原点ä¸å¿ƒã«ãƒ™ã‚¯ãƒˆãƒ«$\overrightarrow{\mathrm{OD}} $ã ã‘拡大ã—ï¼Œç ´ç·šã§æã。 \begin{verbatim} Circledata([A,B]); Scaledata("1","crAB",3,2,[[0,0]]); Scaledata("2","crAB",3,2,[C,"dr,2"]); Scaledata("3","crAB",[D.x,D.y],[[0,0],"da"]); \end{verbatim} - \begin{center} \input{Fig/scaledata} \end{center} -\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} +\vspace{0mm} + \begin{center} \input{Fig/scaledata} \end{center} +%\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} \vspace{\baselineskip} \hypertarget{translatedata}{} @@ -2903,12 +2988,11 @@ Scaledata("3","crAB",[D.x,D.y],[[0,0],"da"]); ã€ä¾‹ã€‘点A,B,C,Dを作図ツールã§ã¨ã£ã¦ãŠã。 \verb|Circledata([A,B]);| ã§ã§ãる円(crAB)を + $x$軸方å‘ã«2,$y$軸方å‘ã«3ã ã‘平行移動ã—ã¦å®Ÿç·šã§æã。 + +ベクトル$\overrightarrow{\mathrm{OC}} $ã ã‘平行移動ã—,実線ã§å¤ªãæã。 - x軸方å‘ã«2,y軸方å‘ã«3ã ã‘平行移動ã—ã¦å®Ÿç·šã§æã。 - -ベクトル$\overrightarrow{OC} $ã ã‘平行移動ã—,実線ã§å¤ªãæã。 - -ベクトル$\overrightarrow{OD} $ã ã‘平行移動ã—ï¼Œç ´ç·šã§æã。 +ベクトル$\overrightarrow{\mathrm{OD}} $ã ã‘平行移動ã—ï¼Œç ´ç·šã§æã。 \begin{verbatim} Circledata([A,B]); @@ -2916,13 +3000,13 @@ Translatedata("1","crAB",[2,3]); Translatedata("2","crAB",C,["dr,2"]); Translatedata("3","crAB",D,["da"]); \end{verbatim} -\vspace{\baselineskip} -\begin{center} \input{Fig/translatedata} \end{center} +\vspace{0mm} +\begin{center} \input{Fig/translatedata} \end{center} -\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} +%\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} -\vspace{\baselineskip} +%\vspace{\baselineskip} \hypertarget{intersectcrvs}{} \item[関数]Intersectcrvs(プãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿1, プãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿2) \item[機能]2曲線ã®äº¤ç‚¹ãƒªã‚¹ãƒˆã‚’å–å¾—ã™ã‚‹ã€‚ @@ -2976,7 +3060,7 @@ p1=[[-1,1],[2,4]] p2=[[[-1,1],17.68,1],[[2,4],42.66,1]] \end{verbatim} ã¨è¡¨ç¤ºã•ã‚Œã‚‹ã€‚ -\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} +%\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} \vspace{\baselineskip} \hypertarget{nearestpt}{} @@ -3022,7 +3106,7 @@ Letter([A,"n2w","A",B,"s2e","B",(A+B)/2,"e",text(plist_5)]); 点Aã¯(3,0)ã«ï¼Œç‚¹Bã¯é©å½“ãªä½ç½®ã«ä½œå›³ã—ã¦ãŠã,次ã®ã‚¹ã‚¯ãƒªãƒ—トを実行ã™ã‚‹ã¨ç‚¹BãŒæ±‚ã‚る点ã¨ãªã‚‹ã€‚ \begin{layer}{150}{0} -\putnotese{80}{0}{ \input{Fig/Nearestpt1}} +\putnotese{80}{0}{\scalebox{1.0}{\input{Fig/Nearestpt1}}} \end{layer} \begin{verbatim} @@ -3034,11 +3118,13 @@ Pointdata("1",[A,B]); Letter([A,"ne","A",B,"nw","B"]); \end{verbatim} +\vspace{\baselineskip} +\vspace{\baselineskip} 注)第1引数ã¯åº§æ¨™ãªã®ã§ï¼Œ\verb|A| ã§ã¯ãªã \verb|A.xy| ã¨ã—ãªã‘ã‚Œã°ãªã‚‰ãªã„。 \begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} -\vspace{\baselineskip} +%\vspace{\baselineskip} \hypertarget{numptcrv}{} \item[関数]Numptcrv (プãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿) \item[機能]プãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã®å€‹æ•°ã‚’返㙠@@ -3128,7 +3214,7 @@ Letter([tmp,"nw","A",[2,0],"se","P",[-2,0],"sw","Q"]); ã€ä¾‹ã€‘楕円上ã®ç‚¹ã§åˆ†å‰²ã™ã‚‹ã€‚ã‚ã‹ã‚‰ã˜ã‚å¿…è¦ãªç‚¹ã‚’作図ã—ã¦ãŠã。 \begin{layer}{150}{0} -\putnotese{70}{10}{ \input{Fig/ptcrv}} +\putnotese{70}{05}{ \input{Fig/ptcrv}} \end{layer} \begin{verbatim} Circledata([O,P],["do","Num=100","notex"]); @@ -3164,7 +3250,6 @@ Letter([A,"w2","A",B,"e2","B"]); \vspace{\baselineskip} \begin{center} \input{Fig/ptstart} \end{center} -\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} \vspace{\baselineskip} \hypertarget{readoutdata}{} \item[関数]ReadOutData(ファイルå) @@ -3231,6 +3316,8 @@ dt1=data_1; ã¨ã™ã‚‹ã€‚ +\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} + \hypertarget{readlines}{} \item[関数]Readlines(path,filename,option) \item[機能]テã‚ストファイルを1è¡Œãšã¤èªã‚€ã€‚ @@ -3269,7 +3356,6 @@ start// [[0.87631,-0.48175],[0.92978,-0.36812],・・,[1,0]]// end//// \end{verbatim} -\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} \vspace{\baselineskip} \hypertarget{extractdata}{} @@ -3282,6 +3368,8 @@ Extractdata("gr1",["da"]); \end{verbatim} \end{description} +\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} + %\newpage % ======== 計算 ======================= \subsection{計算} @@ -3327,7 +3415,7 @@ Letter([A,"ne","A"]); ã¾ãŸï¼Œæ›²ç·šã®æŽ¥ç·šã«ã¤ã„ã¦ã¯ï¼Œ\hyperlink{tangentplot}{Tangentplot}ã‚‚å‚ç…§ã•ã‚ŒãŸã„。 -%\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} +\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} \vspace{\baselineskip} \hypertarget{integrate}{} @@ -3376,7 +3464,7 @@ println(Integrate("gr1",[0,3])); \end{description} -\newpage +%\newpage %==========値ã®å–å¾—ã¨å…¥å‡ºåŠ›========================= \subsection{値ã®å–å¾—ã¨å…¥å‡ºåŠ›} @@ -3412,6 +3500,7 @@ optionã¯ï¼Œå¹…ã¾ãŸã¯é«˜ã•ã®æŒ‡å®šã€‚ \vspace{\baselineskip} \includegraphics[bb=0.00 0.00 562.03 124.01,width=10cm]{Fig/bbdata.pdf} +\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} \vspace{\baselineskip} \hypertarget{cindyname}{} @@ -3485,45 +3574,37 @@ println(Sprintf(len,6)); \begin{description} \hypertarget{tabledata}{} -\item[関数]Tabledata(name , 縦横データ, 除外線 , options) +\item[関数]Tabledata(横データ,縦データ, 除外線 , options) \item[機能]表ã®æž を作æˆã—,表ã®ãƒ‡ãƒ¼ã‚¿list を返㙠\item[説明]Cinderellaã®æç”»é¢ä¸Šã«å·¦ä¸‹ã‚’原点ã¨ã™ã‚‹è¡¨ã‚’作æˆã™ã‚‹ã€‚ -ä»–ã®é–¢æ•°ã¨ã®å¼•æ•°ã®æ•´åˆæ€§ï¼Œ\ketpic ã®ã‚³ãƒžãƒ³ãƒ‰ã¨ã®æ•´åˆæ€§ãªã©ã‹ã‚‰ï¼Œå…ˆé ã«nameã®å¼•æ•°ã‚’ã¤ã‘ã‚‹ãŒï¼Œå®Ÿéš›ã«ã¯ã‚ã¾ã‚Šåˆ©ç”¨ã—ãªã„ã®ã§ï¼Œç©ºæ–‡å—""ã§ã‚‚よã„。 - 除外線ãŒãªã„å ´åˆã¯ç©ºãƒªã‚¹ãƒˆã‚’指定ã™ã‚‹ã€‚ï¼ˆå¿…é ˆï¼‰ -optionsã¯ç·šç¨®ã¨"notex"ãªã©ï¼ŒãŠã‚ˆã³ "Rng=n"。 - -"Rng=n" ã‚’ã¤ã‘ã‚‹ã¨ï¼ŒNE,SWã«ã‚ˆã‚‹å‡ºåŠ›é ˜åŸŸæŒ‡å®šãŒæœ‰åŠ¹ã«ãªã‚Šï¼ŒNE,SWをドラッグã—ã¦å‡ºåŠ›é ˜åŸŸã‚’変更ã§ãる。(åˆæœŸçŠ¶æ…‹ã¯ï¼Œè¡¨ã®å³ä¸Šã¨å·¦ä¸‹ï¼‰ã¤ã‘ãªã„å ´åˆã¯ï¼Œè¡¨ã®éƒ¨åˆ†ã ã‘ãŒå‡ºåŠ›ã•ã‚Œã‚‹ã€‚ - -縦横データã«ã¯ï¼Œæ¬¡ã®2通りã®æ›¸å¼ãŒã‚る。ã„ãšã‚Œã‚‚åŒã˜è¡¨ã‚’作æˆã™ã‚‹ã€‚ +optionsã®ã†ã¡ï¼ŒTabledataã«ç‰¹æœ‰ãªã‚‚ã®ã¯\\ +\hspace*{3zw}ラベルã®ã‚¹ã‚ップ幅,''Setwindow=n'',''Geo=n'',''Move=[0,0]''\\ +ã§ã‚る。 -\vspace{\baselineskip} -(1) 横ã®ã‚»ãƒ«æ•° , 縦ã®ã‚»ãƒ«æ•° , 表ã®æ¨ªå¹… , 表ã®ç¸¦å¹…を指定ã™ã‚‹ã€‚除外線ãªã—。 +"Setwindow=n" ã‚’ã¤ã‘ã‚‹ã¨ï¼ŒNE,SWã«ã‚ˆã‚‹å‡ºåŠ›é ˜åŸŸæŒ‡å®šãŒæœ‰åŠ¹ã«ãªã‚Šï¼ŒNE,SWをドラッグã—ã¦å‡ºåŠ›é ˜åŸŸã‚’変更ã§ãる。(åˆæœŸçŠ¶æ…‹ã¯ï¼Œè¡¨ã®å³ä¸Šã¨å·¦ä¸‹ï¼‰ã¤ã‘ãªã„å ´åˆã¯ï¼Œè¡¨ã®éƒ¨åˆ†ã ã‘ãŒå‡ºåŠ›ã•ã‚Œã‚‹ã€‚ -\begin{verbatim} -Tabledata("",4,5,80,50,[]); -\end{verbatim} +縦横データã¯ï¼Œæ¬¡ã®ã‚ˆã†ã«ï¼Œé–“éš”ã®å¹…ã§ä¸Žãˆã‚‹ã€‚ãŸã ã—,幅ã¯Cinderellaã®æç”»é¢ã®0.1ã‚’å˜ä½ã¨ã™ã‚‹ã€‚ -(2) 横ã¨ç¸¦ã®å¹…を指定ã—ãŸãƒªã‚¹ãƒˆã‚’使ㆠ\begin{verbatim} Yoko=[20,20,20,20]; Tate=[10,10,10,10,10]; -Tabledata("",Yoko,Tate,[]); +Tabledata(Yoko,Tate,[]); \end{verbatim} -å¹…ã¯Cinderellaã®æç”»é¢ã®0.1ã‚’å˜ä½ã¨ã™ã‚‹ã€‚ -作æˆã•ã‚ŒãŸè¡¨ã«ã¯ï¼Œè¡Œï¼Œåˆ—ã®åˆ¶å¾¡ç‚¹ãŒã¤ã。画é¢ä¸Šã§ã¯ï¼Œæ¨ªç½«ç·šã®ç•ªå· r0,r1,・・・縦罫線ã®ç•ªå· c0,c1,・・・ã¨è¦‹ã‚‹ã“ã¨ã‚‚ã§ãる。ã¾ãŸï¼Œç¸¦å¹…,横幅ãŒæ•°å—ã§ç¤ºã•ã‚Œã‚‹ã€‚ãŸã ã—,ã“れらã¯\TeX ã«ã¯å‡ºåŠ›ã•ã‚Œãªã„。 + +"Geo=y"ã¨ã™ã‚‹ã¨ï¼Œä½œæˆã•ã‚ŒãŸè¡¨ã«ã¯ï¼Œè¡Œï¼Œåˆ—ã®åˆ¶å¾¡ç‚¹ãŒã¤ã。画é¢ä¸Šã§ã¯ï¼Œæ¨ªç½«ç·šã®ç•ªå· r0,r1,・・・縦罫線ã®ç•ªå· c0,c1,・・・ã¨è¦‹ã‚‹ã“ã¨ã‚‚ã§ãる。ã¾ãŸï¼Œç¸¦å¹…,横幅ãŒæ•°å—ã§ç¤ºã•ã‚Œã‚‹ã€‚ãŸã ã—,ã“れらã¯\TeX ã«ã¯å‡ºåŠ›ã•ã‚Œãªã„。 ã¾ãŸï¼Œä½œè¡¨ã¯Cinderellaã®æç”»é¢ä¸Šã§ã¯åº§æ¨™å¹³é¢ä¸Šã«ç½®ã‹ã‚Œã‚‹ãŒï¼Œ\TeX ã¸ã®å‡ºåŠ›ã¯åº§æ¨™å¹³é¢ä¸Šã«ã¯ç½®ã‹ãªã„ã“ã¨ãŒå¤šã„ã®ã§ï¼Œåº§æ¨™è»¸ã¯éžè¡¨ç¤ºã¨ã—ã¦ã„る。 \hspace{25mm} æç”»é¢ \hspace{45mm} TeX -\hspace{5mm}\includegraphics[bb=0 0 403.52 249.51 , width=5cm]{Fig/table01.pdf} \hspace{10mm}\input{Fig/table02} +\hspace{5mm}\includegraphics[bb=0 0 403.52 249.51 , width=5cm]{Fig/table01.pdf} \hspace{10mm}\input{Fig/table02} \\ -表ã®ã‚µã‚¤ã‚ºãƒ»è¡Œå¹…・列幅ã¯ï¼Œä½œæˆå¾Œã«ãã‚Œãžã‚Œã®åˆ¶å¾¡ç‚¹ã‚’ドラッグã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šä»»æ„ã«å¤‰ãˆã‚‹ã“ã¨ãŒã§ãる。 +"Geo=y"ã®å ´åˆã¯ï¼Œè¡¨ã®ã‚µã‚¤ã‚ºãƒ»è¡Œå¹…・列幅ã¯ï¼Œä½œæˆå¾Œã«ãã‚Œãžã‚Œã®åˆ¶å¾¡ç‚¹ã‚’ドラッグã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šä»»æ„ã«å¤‰ãˆã‚‹ã“ã¨ãŒã§ãる。 \vspace{\baselineskip} 除外線ã¯ï¼Œé™¤å¤–ã™ã‚‹ã‚»ãƒ«ã®ç½«ç·šã‚’,rã¨c ã§ä½ç½®æŒ‡å®šã™ã‚‹ã€‚ @@ -3534,11 +3615,18 @@ Tabledata("",Yoko,Tate,[]); ã¨ã™ã‚‹ã€‚ +ラベルã®ã‚¹ã‚ップ値ã¯ï¼Œã„ãã¤ãŠãã«ãƒ©ãƒ™ãƒ«ã‚’ã¤ã‘ã‚‹ã‹ã®è¨å®šã§ã‚る。0ã¨ã™ã‚‹ã¨ãƒ©ãƒ™ãƒ«ãŒè¡¨ç¤ºã•ã‚Œãªã„。ãŸã ã—,ラベルã¯Cinderellaã®ç”»é¢ä¸Šã ã‘ã®å•é¡Œã€‚ + +\vspace{\baselineskip}"Move=点ã®åº§æ¨™"ã¨ã™ã‚‹ã¨ï¼ŒæŒ‡å®šã•ã‚ŒãŸç‚¹ãŒå·¦ä¸‹ã«ãªã‚‹ã‚ˆã†ã«å¹³è¡Œç§»å‹•ã•ã‚Œã‚‹ã€‚ + + \vspace{\baselineskip} ã€ä¾‹ã€‘4ã¤ã®ç½«ç·šã‚’éžè¡¨ç¤ºã«ã™ã‚‹ \begin{verbatim} Rmv=["r1c0c1","c3r0r1","c3r3r5","r4c2c4"]; -Tabledata("",4,5,80,50,Rmv); +Yoko=[20,20,20,20]; +Tate=[10,10,10,10,10]; +Tabledata(Yoko,Tate,Rmv); \end{verbatim} ã§ï¼Œæ¬¡ã®è¡¨ãŒã§ãる。 @@ -3549,58 +3637,54 @@ Tabledata("",4,5,80,50,Rmv); \vspace{\baselineskip} <補足> -Tabledata()関数ã¯ï¼Œåˆ¶å¾¡ç‚¹r0,r1,・・・,c0,c1,・・・ãŒãªã‘ã‚Œã°æ–°ã—ã作り,ã™ã§ã«å˜åœ¨ã™ã‚‹å ´åˆã¯ãã®ã¾ã¾ã¨ã™ã‚‹ã€‚ã—ãŸãŒã£ã¦ï¼Œä¸€åº¦è¡¨ã‚’作æˆã—ãŸã®ã¡ï¼Œè¡Œæ•°ãƒ»åˆ—æ•°ã‚’ä¿®æ£ã—ã¦ä½œã‚Šç›´ã™å ´åˆã¯ï¼Œä¸€åº¦æ—¢å˜ã®ç‚¹ã‚’消去ã™ã‚‹å¿…è¦ãŒã‚る。ãã®ãŸã‚ã«ã¯ï¼Œã€Œã™ã¹ã¦ã®ç‚¹ã‚’é¸æŠžã™ã‚‹ã€ãƒ„ールをクリックã—ã¦ç‚¹ã‚’消去ã™ã‚‹ã®ãŒã‚ˆã„。クリックã™ã‚‹ã¨ï¼Œæ¶ˆåŽ»å¾Œã™ãã«æ–°è¦ä½œæˆã•ã‚Œã‚‹ã€‚(誤ã£ã¦ã€Œã™ã¹ã¦ã®è¦ç´ ã‚’é¸æŠžã™ã‚‹ã€ã‚’é¸ã°ãªã„ã“ã¨) +"Geo=y"ã®å ´åˆï¼Œåˆ¶å¾¡ç‚¹r0,r1,・・・,c0,c1,・・・ãŒãªã‘ã‚Œã°æ–°ã—ã作り,ã™ã§ã«å˜åœ¨ã™ã‚‹å ´åˆã¯ãã®ã¾ã¾ã¨ã™ã‚‹ã€‚ã—ãŸãŒã£ã¦ï¼Œä¸€åº¦è¡¨ã‚’作æˆã—ãŸã®ã¡ï¼Œè¡Œæ•°ãƒ»åˆ—æ•°ã‚’ä¿®æ£ã—ã¦ä½œã‚Šç›´ã™å ´åˆã¯ï¼Œä¸€åº¦æ—¢å˜ã®ç‚¹ã‚’消去ã™ã‚‹å¿…è¦ãŒã‚る。ãã®ãŸã‚ã«ã¯ï¼Œã€Œã™ã¹ã¦ã®ç‚¹ã‚’é¸æŠžã™ã‚‹ã€ãƒ„ールをクリックã—ã¦ç‚¹ã‚’消去ã™ã‚‹ã®ãŒã‚ˆã„。クリックã™ã‚‹ã¨ï¼Œæ¶ˆåŽ»å¾Œã™ãã«æ–°è¦ä½œæˆã•ã‚Œã‚‹ã€‚(誤ã£ã¦ã€Œã™ã¹ã¦ã®è¦ç´ ã‚’é¸æŠžã™ã‚‹ã€ã‚’é¸ã°ãªã„ã“ã¨) ä»–ã®ç‚¹ãŒæç”»ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ï¼Œè¡¨ã®éƒ¨åˆ†ã ã‘ドラッグã§é¸æŠžã™ã‚‹ã‹ï¼Œè¡¨ç¤ºãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®ã€Œå¼ã«ã‚ˆã‚‹è¡¨ç¤ºã€ã§ä¸€è¦§è¡¨ã‚’出ã—ã¦ï¼Œåˆ¶å¾¡ç‚¹ã‚’é¸æŠžã—ã¦æ¶ˆåŽ»ã™ã‚‹ã€‚ -\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} - \vspace{\baselineskip} -\hypertarget{tabledatalight}{} -\item[関数]Tabledatalight(name , 縦横データ, 除外線 , options) -\item[機能]幾何点をæŒãŸãªã„表ã®æž を作æˆã—,表ã®ãƒ‡ãƒ¼ã‚¿list を返㙠-\item[説明]Tabledata()ãŒCinderellaã®å¹¾ä½•ç‚¹ã‚’生æˆã™ã‚‹ã®ã«å¯¾ã—,Tabledatalight()ã¯å¹¾ä½•ç‚¹ã‚’生æˆã—ãªã„。 - -幾何点を作æˆã—ãªã„メリットã¯ï¼Œã‚¹ã‚¯ãƒªãƒ—トã ã‘ã§å…¨ä½“ã®ç¸¦æ¨ªå¹…を変更ã§ãã‚‹ã“ã¨ã€‚デメリットã¯ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–ãªå¾®èª¿æ•´ãŒã§ããªã„ã“ã¨ã€‚ - -optionã¨ã—ã¦ï¼Œãƒ©ãƒ™ãƒ«ã®ã‚¹ã‚ップ値(スã‚ップã™ã‚‹ã¨ã“ã‚ã¯è¡¨ç¤ºã•ã‚Œãªã„)を指定ã™ã‚‹ã“ã¨ãŒã§ãる。ãŸã ã—,ラベルã¯Cinderellaã®ç”»é¢ä¸Šã ã‘ã®å•é¡Œã€‚ +"Geo=n"(デフォルト)ã®å ´åˆï¼Œå¹¾ä½•ç‚¹ã‚’生æˆã—ãªã„。幾何点を作æˆã—ãªã„メリットã¯ï¼Œã‚¹ã‚¯ãƒªãƒ—トã ã‘ã§å…¨ä½“ã®ç¸¦æ¨ªå¹…を変更ã§ãã‚‹ã“ã¨ã€‚デメリットã¯ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–ãªå¾®èª¿æ•´ãŒã§ããªã„ã“ã¨ã€‚ \vspace{\baselineskip} ã€ä¾‹ã€‘1ã¤ãŠãã«ã‚¹ã‚ップã—ã¦ï¼Œr1,r3,c1,c2 ã‚’éžè¡¨ç¤ºã¨ã™ã‚‹ã€‚ \begin{verbatim} Yoko=[20,20,20,20]; Tate=[10,10,10,10,10]; -Tabledatalight("",Yoko,Tate,[],[2]); +Tabledatalight(Yoko,Tate,[],[2]); \end{verbatim} \vspace{\baselineskip} \hypertarget{changetablestyle}{} -\item[関数]ChangeTablestyle(罫線リスト, 変更オプション) +\item[関数]Changetablestyle(罫線リスト, 変更オプション) \item[機能]Table ã®ç½«ç·šã®æ画オプションを変更 \item[説明]罫線ã®éƒ¨åˆ†çš„ã«æŒ‡å®šã—ã¦æ画オプションを変更ã§ãる。 \vspace{\baselineskip} ã€ä¾‹ã€‘ -\verb|Tabledatalight("",[10,20,10,20],[10,10,10],[]);|\\ -\verb|ChangeTablestyle(["r1c0c4"],["da"]);|\\ -\verb|ChangeTablestyle(["r2c0c2","c1r0r3"],["nodisp"]);| +\verb|Tabledatalight([10,20,10,20],[10,10,10],[]);|\\ +\verb|Changetablestyle(["r1c0c4"],["da"]);|\\ +\verb|Changetablestyle(["r2c0c2","c1r0r3"],["nodisp"]);| \vspace{\baselineskip} \hspace{20mm}\includegraphics[bb=0.00 0.00 324.00 174.00,width=50mm]{Fig/changetable.pdf} \vspace{\baselineskip} +複数ã®è¡¨ã‚’æãã“ã¨ã‚‚ã§ãる。 + +\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} + +\vspace{\baselineskip} \hypertarget{findcell}{} \item[関数]Findcell(列番å·, 行番å·) \item[機能]セルã®æƒ…å ±list(ä¸å¿ƒï¼Œæ¨ªå¹…ï¼2,縦幅ï¼2)を返㙠\item[説明]列番å·ï¼Œè¡Œç•ªå·ã¯å·¦ä¸Šã®ã‚»ãƒ«ã‚’1列1行ã¨ã—ã¦æ•°ãˆã‚‹ã€‚ \vspace{\baselineskip} -ã€ä¾‹ã€‘\verb|Tabledata(4,5,80,50,[]);| +ã€ä¾‹ã€‘\verb|Tabledata(Tate,Yoko,[]);| -\verb|println(Findcell(tb,2,1));| +\verb|println(Findcell(2,1));| -ã¨ã™ã‚‹ã¨ï¼Œ2列1行ã®ã‚»ãƒ«ã®ä¸å¿ƒã®åº§æ¨™ã¨æ¨ªå¹…ã®åŠåˆ†ï¼Œç¸¦å¹…ã®åŠåˆ†ã®å€¤ãŒãƒªã‚¹ãƒˆã¨ã—ã¦ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã«è¡¨ç¤ºã•ã‚Œã‚‹ã€‚çµæžœã¯ [[3,4.5],1,0.5] +ã¨ã™ã‚‹ã¨ï¼Œ2列1行ã®ã‚»ãƒ«ã®ä¸å¿ƒã®åº§æ¨™ã¨æ¨ªå¹…ã®åŠåˆ†ï¼Œç¸¦å¹…ã®åŠåˆ†ã®å€¤ãŒãƒªã‚¹ãƒˆã¨ã—ã¦ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã«è¡¨ç¤ºã•ã‚Œã‚‹ã€‚ \vspace{\baselineskip} \hypertarget{putcell}{} @@ -3612,7 +3696,9 @@ Tabledatalight("",Yoko,Tate,[],[2]); ä½ç½®ã®ä¾‹ã‚’以下ã«ç¤ºã™ã€‚ \begin{verbatim} -Tabledata("",5,2,100,40,["c1r1r2","c4r1r2"]); +yoko=[20,20,20,20,20]; +tate=[20,20]; +Tabledata(yoko,tate,["c1r1r2","c4r1r2"]); Putcell(1,1,"c","A"); Putcell(2,1,"r","B"); Putcell(3,1,"l","C"); @@ -3625,13 +3711,13 @@ Putcell("c3r1","c5r2","rt","H"); \vspace{\baselineskip} \begin{center} \input{Fig/putcell} \end{center} -※r0,c0,・・ã¯ç”»é¢ã«è¡¨ç¤ºã•ã‚Œã‚‹ç•ªå· +※数å¼ã®å ´åˆã¯ï¼Œ{\bf Putcellexpr} を用ã„る。 \begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} \vspace{\baselineskip} \hypertarget{putcol}{} -\item[関数]PutcoL (列番å·, æ–‡å—ä½ç½®ï¼Œæ–‡å—列リスト) +\item[関数]Putcol (列番å·, æ–‡å—ä½ç½®ï¼Œæ–‡å—列リスト) \item[機能]1列ã«é †ã«æ–‡å—を書ã入れる \item[説明]列番å·ã§æŒ‡å®šã—ãŸåˆ—ã«ï¼Œç¬¬ï¼‘è¡Œã‹ã‚‰é †ã«æ–‡å—列リストã®æ–‡å—を書ã入れる\\ æ•°ã®å ´åˆã¯ãƒ€ãƒ–ルクォートã§ããらãªãã¦ã‚‚よã„。 @@ -3640,7 +3726,7 @@ Putcell("c3r1","c5r2","rt","H"); \vspace{\baselineskip} \hypertarget{putcolexpr}{} -\item[関数]PutcoLexpr (列番å·, æ–‡å—ä½ç½®ï¼Œæ–‡å—列リスト) +\item[関数]Putcolexpr (列番å·, æ–‡å—ä½ç½®ï¼Œæ–‡å—列リスト) \item[機能]1列ã«é †ã«æ–‡å—を書ã入れる \item[説明]æ–‡å—列ã«\TeX 書å¼ã‚’使ã†ã“ã¨ãŒã§ãã‚‹ @@ -3659,9 +3745,11 @@ Putcell("c3r1","c5r2","rt","H"); æ–‡å—を入れる例を示ã™ã€‚ \begin{verbatim} -Tabledata("",5,3,100,45,["c1r1r2","r1c2c3","r2c2c3"]); -PutcoL(3,"c",["A","B","C"]); -PutcoLexpr(4,"l",["x^2","y=\sqrt{x^3}"]); +Tate=[20,20,20,20,20]; +Yoko=[15,15,15]; +Tabledata(Tate,Yoko,["c1r1r2","r1c2c3","r2c2c3"]); +Putcol(3,"c",["A","B","C"]); +Putcolexpr(4,"l",["x^2","y=\sqrt{x^3}"]); Putrow(1,"c",[1,"二"]); Putrowexpr(3,"c",["","\frac{\pi}{2}","","","\sum{x^2}"]); \end{verbatim} @@ -3672,7 +3760,7 @@ Putrowexpr(3,"c",["","\frac{\pi}{2}","","","\sum{x^2}"]); グラフや文を入れãŸè¡¨ã®ä½œæˆä¾‹ -PutcoLexpr(),Putrowexpr() ã§ã¯ï¼Œæ•°å¼ã ã‘ã§ãªã,一般ã®\TeX ã®æ–‡ã‚’入れるã“ã¨ãŒã§ãる。 +Putcolexpr(),Putrowexpr() ã§ã¯ï¼Œæ•°å¼ã ã‘ã§ãªã,一般ã®\TeX ã®æ–‡ã‚’入れるã“ã¨ãŒã§ãる。 ã¾ãŸï¼Œã‚°ãƒ©ãƒ•ã®ä½ç½®ã‚’é©å½“ã«åˆã‚ã›ã¦æç”»ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šï¼Œè¡¨ã®ã‚»ãƒ«ã®ä¸ã«ã‚°ãƒ©ãƒ•ã‚’入れるã“ã¨ãŒã§ãる。 \vspace{\baselineskip} @@ -3686,9 +3774,11 @@ x軸をæããŸã‚ã®ç‚¹A〜Fã¯ä½œå›³ãƒ„ールã§ã¨ã£ã¦ãŠã。 \vspace{\baselineskip} \begin{verbatim} -Tabledata("",3,3,120,60,[],["dr,2"]); -ChangeTablestyle(["r1c0c3"],["dr"]); -ChangeTablestyle(["r2c0c3"],["da"]); +Tate=[40,40,40]; +Yoko=[20,20,20]; +Tabledata(Tate,Yoko,[],["dr,2"]); +Changetablestyle(["r1c0c3"],["dr"]); +Changetablestyle(["r2c0c3"],["da"]); Plotdata("1","(x-2)^2+0.5","x=[0.5,3.5]"); Plotdata("2","(x-6)^2+1","x=[4.5,7.5]"); Plotdata("3","(x-10)^2+1.5","x=[8.5,11.5]"); @@ -3712,7 +3802,7 @@ Tate=[6,6,10,6,10,6,40]; Yoko=[30,6,6,6]; Rmv=["c1r0r1","c2r0r1","c3r0r1","c4r0r1","c5r0r1", "r1c6c7", "r2c6c7","r3c6c7"]; -Tabledata("",Tate,Yoko,Rmv,["dr"]) +Tabledata(Tate,Yoko,Rmv,["dr"]) Tlistplot("23d",["c1r2","c2r3"]); Tlistplot("23u",["c1r3","c2r2"]); Putrowexpr(2,"c",["x",0,"\cdots","\tfrac{1}{4}","\cdots",4]); @@ -3737,7 +3827,9 @@ Expr(Ptend(tr1),"nw-2","y=x-\sqrt{x}"); \vspace{\baselineskip} ã€ä¾‹ã€‘凹凸をå«ã‚ãŸå¢—減表 \begin{verbatim} -Tabledata("",8,4,80,40,[]); +Tate=apply(1..8,20); +Yoko=[apply(1..4,10); +Tabledata(Tate,Yoko,[]); Putrowexpr(1,c,["x","\cdots","-1","\cdots","0","\cdots","1","\cdots"]); Putrowexpr(2,c,["y`","+","+","+","0","-","-","-"]); Putrowexpr(3,c,["y``","+","0","-","-","-","0","+"]); @@ -4047,8 +4139,6 @@ KeTCindyã®é–¢æ•°ã®ä¸ã«ã¯å‡¦ç†ã«æ™‚é–“ãŒã‹ã‹ã‚‹ã‚‚ã®ãŒã‚る。ãã® \hspace{15mm} \includegraphics[bb=0.00 0.00 445.02 193.01,height=35mm]{Fig/slider.pdf} -\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} - \vspace{\baselineskip} \hypertarget{sprintf}{} \item[関数]Sprintf(実数,é•·ã•) @@ -4062,7 +4152,7 @@ KeTCindyã®é–¢æ•°ã®ä¸ã«ã¯å‡¦ç†ã«æ™‚é–“ãŒã‹ã‹ã‚‹ã‚‚ã®ãŒã‚る。ãã® Sprintf(pi,7) 㯠3.1415927 を返㙠-注)pi 㯠Cindyscriptã®äºˆç´„変数ã§ï¼Œå††å‘¨çŽ‡ã‚’表ã™ã€‚\vspace{\baselineskip} +注)pi 㯠Cindyscriptã®äºˆç´„変数ã§ï¼Œå††å‘¨çŽ‡ã‚’表ã™ã€‚%\vspace{\baselineskip} \vspace{\baselineskip} \hypertarget{textformat}{} @@ -4085,6 +4175,8 @@ KeTCindyã®é–¢æ•°ã®ä¸ã«ã¯å‡¦ç†ã«æ™‚é–“ãŒã‹ã‹ã‚‹ã‚‚ã®ãŒã‚る。ãã® \hspace{10mm} \verb|Textformat(dt,4); | // 戻り値㯠"[ 0.1667 , 0.5 ]" \\ \hspace{10mm} \verb|format(dt,4); | // 戻り値㯠[ "0.1667" , "0.5" ] \\ +\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} + \vspace{\baselineskip} \hypertarget{texcom}{} \item[関数]Texcom(\TeX コード) @@ -4167,6 +4259,33 @@ Cindyscript㮠アンダーãƒãƒ¼ã®æ¼”ç®—å (list\_n , str\_n) ã¨åŒæ§˜ã€‚ \begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} +\vspace{\baselineskip} +\hypertarget{fracform}{} +\item[関数]Fracform(æ•° , 分æ¯ã®ãƒªã‚¹ãƒˆã¾ãŸã¯æœ€å¤§å€¤) +\item[機能]分æ¯ãƒªã‚¹ãƒˆã®1ã¤ã‚’分æ¯ã¨ã™ã‚‹è¿‘似分数ã¨èª¤å·®ã‚’è¿”ã™ã€‚ +\item[説明]戻り値ã¯ï¼Œç°¡æ˜“TeX-like書å¼ã®æ–‡å—列ã¨èª¤å·®ã€‚ + +\vspace{\baselineskip} +ã€ä¾‹ã€‘\verb|Fracform(0.33,[2,3]); => fr(1,3)| + +\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} + +\vspace{\baselineskip} +\hypertarget{totexform}{} +\item[関数]Totexform(簡易TeX-like書å¼) +\item[機能]TeX書å¼ã®æ–‡å—列を返ã™ã€‚ + +\vspace{\baselineskip} +ã€ä¾‹ã€‘\verb|Totexform(fr(1,3)); => frac{1}{3}| + +\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} + +\vspace{\baselineskip} +\hypertarget{tocindyform}{} +\item[関数]Tocindyform(簡易TeX-like書å¼) +\item[機能]Cindy書å¼ã®æ–‡å—列を返ã™ã€‚ + +\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} \end{description} \newpage @@ -4388,7 +4507,7 @@ PlotdataR(“2â€, â€pnorm(x,5,2)â€, â€x=[0,10]â€); 点A,Bã¯Cinderellaã®ä½œå›³ãƒ„ールã§ä½œå›³ã—ã¦ãŠã,点Aをグラフ上ã®ãŠã‚ˆãã®ä½ç½®ã«ç½®ã„ã¦ã‹ã‚‰å®Ÿè¡Œã™ã‚‹ã€‚ \begin{verbatim} PlotdataR("1","dnorm(x)","x=[-5,5]"); -PutonCurve("A","grR1",[-3,3]); +Putoncurve("A","grR1",[-3,3]); Putpoint("B",[A.x,0]); Listplot("1",[A,B]); \end{verbatim} @@ -4501,7 +4620,10 @@ Rulerscale([0,0],["r",0,7,1],["r",1,7,1]); \begin{center} \input{Fig/scatter} \end{center} \end{description} -\newpage + +\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} +\vspace{\baselineskip} +%\newpage %Maximaã¨ã®é€£æº================================== \subsection{Maximaã¨ã®é€£æº} @@ -4509,9 +4631,9 @@ Maximaã¯æ•°å¼å‡¦ç†ã‚½ãƒ•ãƒˆã§ï¼Œ\ketcindy ã«ãŠã„ã¦ã¯å¾®ç©åˆ†ã®è¨ˆç®—ã \ketcindy ã§ã¯ï¼Œkc.bat/shã«ã‚ˆã£ã¦ã‚³ãƒžãƒ³ãƒ‰ã‚’Maximaã«æ¸¡ã—,çµæžœã‚’テã‚ストファイルã§å—ã‘å–る。ã“ã®ã¨ã,Maximaã¨ã®ã‚„ã‚Šã¨ã‚Šã§ï¼Œæ¬¡ã®ã‚ˆã†ãªãƒ•ã‚¡ã‚¤ãƒ«ãŒä½œæ¥ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ä½œæˆã•ã‚Œã‚‹ã€‚ -æ‹¡å¼µå max :Maxima用ã®ãƒ•ã‚¡ã‚¤ãƒ« +æ‹¡å¼µå max :Maximaã«æ¸¡ã™ã‚³ãƒžãƒ³ãƒ‰ã‚’記述ã—ãŸãƒ•ã‚¡ã‚¤ãƒ« -æ‹¡å¼µå txt:データファイル +æ‹¡å¼µå txt:MaximaãŒå‡ºåŠ›ã—ãŸãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ« ã“ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚„ã‚Šå–ã‚Šã«é–¢ã™ã‚‹æ¬¡ã®ã‚ªãƒ—ションãŒã‚る。 @@ -4532,39 +4654,39 @@ ii) データファイルãŒæ—¢ã«ã‚ã‚Œã°ãれをèªã¿è¾¼ã‚€ \hypertarget{calcbyM}{} \item[関数]CalcbyM(name,コマンド,option) \item[機能]Maximaã®ã‚¹ã‚¯ãƒªãƒ—トを実行ã™ã‚‹ -\item[説明]第2引数ã¯Maximaã§å®Ÿè¡Œã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã€‚ +\item[説明]第2引数ã¯Maximaã§å®Ÿè¡Œã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã‚’記述ã—ãŸã‚¹ã‚¯ãƒªãƒ—ト。 -コマンドã¨å¼•æ•°ãƒªã‚¹ãƒˆã®ç¹°ã‚Šè¿”ã—ã‹ã‚‰ãªã‚‹ãƒªã‚¹ãƒˆï¼ˆä¾‹ãˆã°cmdL)を作ã£ã¦ï¼Œä¸€åº¦ã«å®Ÿè¡Œã™ã‚‹ã€‚ +コマンドã¨å¼•æ•°ãƒªã‚¹ãƒˆã®ç¹°ã‚Šè¿”ã—ã‹ã‚‰ãªã‚‹ã‚¹ã‚¯ãƒªãƒ—トをリストã¨ã—ã¦ä½œã‚Šï¼Œä¸€åº¦ã«å®Ÿè¡Œã™ã‚‹ã€‚ -戻り値ã¯ãªã„。(未定義値)çµæžœã¯ï¼Œã‚³ãƒžãƒ³ãƒ‰ãƒªã‚¹ãƒˆã®æœ€å¾Œã«è¨˜è¿°ã—ãŸå¤‰æ•°ï¼ˆå¼•æ•°ã¯ç©ºãƒªã‚¹ãƒˆï¼‰ã®å€¤ãŒname ã§æŒ‡å®šã•ã‚ŒãŸå¤‰æ•°ã«ä»£å…¥ã•ã‚Œã‚‹ã€‚複数ã®çµæžœã‚’戻ã™ã¨ãã¯ï¼Œ:: ã§åŒºåˆ‡ã£ã¦è¨˜è¿°ã™ã‚‹ã¨ãƒªã‚¹ãƒˆã«ã—ã¦ä»£å…¥ã•ã‚Œã‚‹ã€‚ +戻り値ã¯ãªã„(未定義値)。実行çµæžœã¯ï¼Œã‚³ãƒžãƒ³ãƒ‰ãƒªã‚¹ãƒˆã®æœ€å¾Œã«è¨˜è¿°ã—ãŸå¤‰æ•°ï¼ˆå¼•æ•°ã¯ç©ºãƒªã‚¹ãƒˆï¼‰ã®å€¤ãŒï¼Œname ã§æŒ‡å®šã•ã‚ŒãŸå¤‰æ•°ã«ä»£å…¥ã•ã‚Œã‚‹ã€‚複数ã®çµæžœã‚’戻ã™ã¨ãã¯ï¼Œ:: ã§åŒºåˆ‡ã£ã¦è¨˜è¿°ã™ã‚‹ã¨ãƒªã‚¹ãƒˆã«ã—ã¦nameã«ä»£å…¥ã•ã‚Œã‚‹ã€‚ \vspace{\baselineskip} -ã€ä¾‹ã€‘$\sin x$ ã¨ãã®å°Žé–¢æ•°ã‚’表示ã™ã‚‹ã€‚çµæžœã¯ 変数 fdf ã« f ã¨df ã®ãƒªã‚¹ãƒˆãŒä»£å…¥ã•ã‚Œã‚‹ã€‚ +ã€ä¾‹ã€‘$\sin x$ ã¨ãã®å°Žé–¢æ•°ã‚’表示ã™ã‚‹ã€‚ \begin{verbatim} cmdL=[ -"f:sin(x)", [], -"df:diff",["sin(x)","x"], -"f::df",[] + "f:sin(x)", [], + "df:diff",["sin(x)","x"], + "f::df",[] ]; CalcbyM("fdf",cmdL); println(fdf); \end{verbatim} \vspace{\baselineskip} -実行ã™ã‚‹ã¨ï¼Œã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã«ï¼Œ[sin(x),cos(x)]ã¨è¡¨ç¤ºã•ã‚Œã‚‹ã€‚ +実行ã™ã‚‹ã¨ï¼Œçµæžœã® f ã¨df ã®ãƒªã‚¹ãƒˆãŒå¤‰æ•° fdf ã«ä»£å…¥ã•ã‚Œï¼Œã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã«ï¼Œ\verb|[sin(x),cos(x)]| ã¨è¡¨ç¤ºã•ã‚Œã‚‹ã€‚ \vspace{\baselineskip} ã€ä¾‹ã€‘2æ¬¡æ–¹ç¨‹å¼ $x^2-x-4=0$ã®è§£ã‚’求ã‚る。 \begin{verbatim} cmdL=[ -"ans:solve",["x^2-x-4","x"], -"ans",[] + "ans:solve",["x^2-x-4","x"], + "ans",[] ]; CalcbyM("ans",cmdL); println("ans="+ans); \end{verbatim} コンソールã«ã¯ -ans=[x = -(sqrt(17)-1)/2,x = (sqrt(17)+1)/2] +\verb|ans=[x = -(sqrt(17)-1)/2,x = (sqrt(17)+1)/2] | ãŒè¡¨ç¤ºã•ã‚Œã‚‹ã€‚ @@ -4574,15 +4696,14 @@ ans=[x = -(sqrt(17)-1)/2,x = (sqrt(17)+1)/2] \vspace{\baselineskip} $f(x)=\dfrac{e^x+e^{-x}}{2}$ ã®ï¼Œ$x=a$ã«ãŠã‘る接線ã®æ–¹ç¨‹å¼ã‚’作る。 -Maximaã§ãã®å‡¦ç†ã‚’è¡Œã†ã‚³ãƒžãƒ³ãƒ‰ã‚’定義ã—,CalcbyMã§å®Ÿè¡Œã™ã‚‹ã€‚ \begin{verbatim} fx="(exp(x)+exp(-x))/2"; cmdL=[ -"df:diff",[fx,"x"], -"c:ev",["df","x=a"], -"b:ev",[fx,"x=a"], -"eq:c*(x-a)+b",[], -"eq",[] + "df:diff",[fx,"x"], + "c:ev",["df","x=a"], + "b:ev",[fx,"x=a"], + "eq:c*(x-a)+b",[], + "eq",[] ]; CalcbyM("tn1",cmdL); println(tn1); @@ -4596,7 +4717,7 @@ println(tn1); \begin{verbatim} tn1=Assign(tn1,["%e^a","exp(a)","%e^-a","exp(-a)"]); Plotdata("1",fx,"x"); -PutonCurve("A","gr1"); +Putoncurve("A","gr1"); tmp=Assign(tn1,["a",A.x]); plotdata("2",tmp,"x",["Num=2"]); \end{verbatim} @@ -4611,7 +4732,7 @@ plotdata("2",tmp,"x",["Num=2"]); {\bf 応用例2:パラメトリックã®å ´åˆã®æŽ¥ç·š} \vspace{\baselineskip} -媒介変数ã®å€¤ã‚’決ã‚ã‚‹ãŸã‚ã«ï¼Œç‚¹Aã‚’Cinderellaã®æç”»é¢ã®x軸上ã«ã¨ã£ã¦ãŠã,ãã®$x$座標を媒介変数$t$ã®å€¤ã¨ã™ã‚‹ã€‚スライダを作ã£ã¦ã‚‚よã„。 +媒介変数ã®å€¤ã‚’決ã‚ã‚‹ãŸã‚ã«ï¼Œç‚¹Aã‚’Cinderellaã®æç”»é¢ã®x軸上ã«ã¨ã£ã¦ãŠã,ãã®$x$座標を媒介変数$t$ã®å€¤ã¨ã™ã‚‹ã€‚スライダを作ã£ã¦ã‚‚よã„。\\ \begin{layer}{150}{0} \putnotese{60}{10}{ \input{Fig/maxfun02}} @@ -4619,11 +4740,11 @@ plotdata("2",tmp,"x",["Num=2"]); \begin{verbatim} fn="3*cos(t)^2*[cos(t),sin(t)]"; cmdL=[ -"f:",[fn], -"df:diff",["f","t"], -"df:trigsimp",["df"], -"tn:f+s*df",[], -"tn",[] + "f:",[fn], + "df:diff",["f","t"], + "df:trigsimp",["df"], + "tn:f+s*df",[], + "tn",[] ]; CalcbyM("tn2",cmdL); Paramplot("1",fn,"t=[0,2*pi]",["Num=100"]); @@ -4641,8 +4762,8 @@ $\displaystyle \int _{-1} ^2 (-x^3+3x+2)dx$ ã®å€¤ã‚’求ã‚る。çµæžœã¯ val ã \begin{verbatim} cmdL=[ -"val:integrate",["-x^3+3*x+2,x,-1,2"], -"val",[] + "val:integrate",["-x^3+3*x+2,x,-1,2"], + "val",[] ]; CalcbyM("val",cmdL); Mxtex("1",val); @@ -4653,10 +4774,17 @@ Expr([[2,2],"e","S="+tx1]); \vspace{\baselineskip} \hypertarget{mxbatch}{} \item[関数]Mxbatch(ファイルå) -\item[機能]Maximaã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’実行ã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã‚’作る -\item[説明]ketcindy/ketlib/maximaL ã«ã‚るファイルを実行ã™ã‚‹ãŸã‚ã®ï¼ŒCalcbyM用ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’作æˆã™ã‚‹ã€‚ +\item[機能]Maximaã®ãƒ©ã‚¤ãƒ–ラリを使ã†ãƒãƒƒãƒãƒ•ã‚¡ã‚¤ãƒ«ã‚’ä½œæˆ +\item[説明]ketcindy/ketlib/maximaL ã«ã‚るライブラリを用ã„るコマンドã§ãƒãƒƒãƒãƒ•ã‚¡ã‚¤ãƒ«ã‚’作æˆã™ã‚‹ã€‚ + +ketcindy/ketlib/maximaL ã«ã¯ï¼Œfourier\_sec.max , matoperation.max , poincare.mac ã®3ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚り,関数を定義ã—ãŸãƒ©ã‚¤ãƒ–ラリãŒå…¥ã£ã¦ã„る。ãã‚Œãžã‚Œæ¬¡ã®ã‚ˆã†ãªå†…容ã§ã‚る。å„ファイルをテã‚ストエディタã§é–‹ã„ã¦å‚ç…§ã•ã‚ŒãŸã„。 + +fourier\_sec.max :フーリエ級数ã®è¨ˆç®—ã‚’è¡Œã†ã€‚ + +matoperation.max : 行列ã®è¨ˆç®—ã‚’è¡Œã†ã€‚ + +poincare : ãƒãƒŸãƒ«ãƒˆãƒ‹ã‚¢ãƒ³ã‚·ã‚¹ãƒ†ãƒ ã«é–¢ã™ã‚‹è¨ˆç®—ã‚’è¡Œã†ã€‚ -ketcindy/ketlib/maximaL ã«ã¯ï¼Œfourier\_sec.max , matoperation.max , poincare.mac ã®3ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒå…¥ã£ã¦ã„る。ãŸã¨ãˆã°ï¼Œãƒ•ãƒ¼ãƒªã‚¨ç´šæ•°ã‚’扱ã†ã¨ãã«ã¯ï¼Œfourier\_sec.max を使用ã™ã‚‹ã€‚ \vspace{\baselineskip} ã€ä¾‹ã€‘\verb|cmd=Mxbatch("fourier_sec")| @@ -4680,9 +4808,9 @@ per=tmp_2; Htickmark([1,"n","1",2,"n","2",3,"nw","3"]); Htickmark([-1,"-1",-2,"-2",-3,"-3"]); cmdL=Concat(Mxbatch("fourier_sec"),[ -"Ffun(x):="+fun,[], -"c:fourier_sec_coeff",["Ffun(x)","x"], -"c[1]::c[2]::c[3]",[] + "Ffun(x):="+fun,[], + "c:fourier_sec_coeff",["Ffun(x)","x"], + "c[1]::c[2]::c[3]",[] ]); CalcbyM("ans",cmdL,[]); nterm=round(4*(C.x-A.x)); @@ -4691,66 +4819,78 @@ Mxtex("2",ans_3); Expr([[-5,-2],"e","s_n="+tx2,[4,-2],"e","n="+text(nterm)]); \end{verbatim} -\hspace{20mm}\input{Fig/mxbatch} +\hspace{10mm}\input{Fig/mxbatch} %\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} -\vspace{\baselineskip} +\vspace{15mm} \hypertarget{mxfun}{} \item[関数]Mxfun(name,å¼ï¼Œãƒªã‚¹ãƒˆï¼Œoption) \item[機能]Maximaã®é–¢æ•°ã‚’実行ã™ã‚‹ \item[説明]第2引数ã®ã€Œå¼ã€ã¯Maximaã®é–¢æ•°å。第3引数ã®ãƒªã‚¹ãƒˆã¯é–¢æ•°ã«æ¸¡ã™å¼•æ•°ã®ãƒªã‚¹ãƒˆã€‚ 戻り値ã¯ï¼Œç¬¬ï¼‘引数ã®å¼ã«ï¼‘ã¤ã§ã‚‚æ–‡å—ãŒã‚ã‚‹ã¨æ–‡å—列ã¨ãªã‚‹ã€‚ã™ã¹ã¦æ•°å—(+,-, . ã‚’å«ã‚€ï¼‰ã®å ´åˆã¯ -16æ¡ä»¥ä¸‹ã§ã‚ã‚Œã°æ•°ï¼Œãれ以上ã®å ´åˆã¯æ–‡å—列ã¨ãªã‚‹ã€‚ã¾ãŸï¼Œæˆ»ã‚Šå€¤ã¯ï¼Œå¤‰æ•° mxname ã«ã‚‚代入ã•ã‚Œã‚‹ã€‚ +16æ¡ä»¥ä¸‹ã§ã‚ã‚Œã°æ•°ï¼Œãれ以上ã®å ´åˆã¯æ–‡å—列ã¨ãªã‚‹ã€‚ã¾ãŸï¼Œæˆ»ã‚Šå€¤ã¯ï¼Œå¤‰æ•° mx+name ã«ã‚‚代入ã•ã‚Œã‚‹ã€‚ オプション㫠"Disp=no" ã‚’ã¤ã‘ã‚‹ã¨ï¼Œçµæžœã‚’コンソールã«è¡¨ç¤ºã—ãªã„。 \vspace{\baselineskip} ã€ä¾‹ã€‘$10!$を求ã‚る。 -\verb|Mxfun("1","10!",[]);| +\verb| Mxfun("1","10!",[]);| -を実行ã™ã‚‹ã¨ï¼Œã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã«mx1 is 362880 ã¨è¡¨ç¤ºã•ã‚Œã‚‹ã€‚ã“ã®å€¤ã¯å¤‰æ•° mx1 ã«ä»£å…¥ã•ã‚Œã¦ã„ã‚‹ã®ã§ï¼Œ +を実行ã™ã‚‹ã¨ï¼Œã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã«mx1 is 3628800 ã¨è¡¨ç¤ºã•ã‚Œã‚‹ã€‚ã“ã®å€¤ã¯å¤‰æ•° mx1 ã«ä»£å…¥ã•ã‚Œã¦ã„ã‚‹ã®ã§ï¼Œ -\verb|drawtext([0,1],mx1);| +\verb| Letter([[0,1],"e",mx1]);| -ã¨ã™ã‚Œã°Cinderellaã®æç”»é¢ä¸Šã«è¡¨ç¤ºã•ã‚Œã‚‹ã€‚mx1ã®ã‹ã‚ã‚Šã«ï¼Œæˆ»ã‚Šå€¤ã‚’変数ã«ä»£å…¥ã—ã¦ä½¿ã†ã“ã¨ã‚‚ã§ãる。 +ã¨ã™ã‚Œã°Cinderellaã®æç”»é¢ä¸Šã«è¡¨ç¤ºã•ã‚Œã‚‹ã€‚mx1ã§ã¯ãªã,戻り値を変数ã«ä»£å…¥ã—ã¦ä½¿ã†ã“ã¨ã‚‚ã§ãる。 \begin{verbatim} fact10=Mxfun("1","10!",[]); -drawtext([0,1],fact10); +Letter([[0,1],"e",fact10]); \end{verbatim} \vspace{\baselineskip} -ã€ä¾‹ã€‘$f(x)=\sin x$ を微分ã™ã‚‹ +ã€ä¾‹ã€‘æ–‡å—列ã®é€£çµ -\verb|Mxfun("1", "diff",["sin(x)","x"])| +æ–‡å—列を引数ã¨ã™ã‚‹å ´åˆï¼Œä¾‹ãˆã°ï¼ŒMaximaã®æ–‡å—列を連çµã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰concatã§ã¯ï¼Œ -ã¨ã™ã‚‹ã¨ +\verb| concat("a","b")| -diff(sin(x),x) +ã¨ã™ã‚‹ãŒï¼Œä¸ã«ãƒ€ãƒ–ルクォートãŒå…¥ã£ã¦ã„ã‚‹ãŸã‚,全体を文å—列ã«ã™ã‚‹ã“ã¨ãŒã§ããªã„。 -ã¨ã„ã†ã‚³ãƒžãƒ³ãƒ‰ã‚’Maximaã«æ¸¡ã—ã¦ï¼Œæˆ»ã‚Šå€¤ã‚’Cindyã®å¤‰æ•°mx1ã«ä»£å…¥ã™ã‚‹ã€‚ +ã“ã®ã‚ˆã†ãªå ´åˆã¯ï¼Œç¬¬2引数を使ã£ã¦ -\verb|Mxfun("1", "diff(sin(x),x)",[]])| +\verb| Mxfun("1","concat",["a","b"])| + +ã¨ã™ã‚Œã°ã‚ˆã„。 -ã¨ï¼Œç¬¬ï¼‘引数ã«ã¾ã¨ã‚ã¦ã‚‚åŒã˜çµæžœã«ãªã‚‹ã€‚ãŸã ã—,ã“ã®å ´åˆï¼Œç¬¬2引数ã¯ç©ºãƒªã‚¹ãƒˆã¨ã™ã‚‹ã€‚ +\vspace{\baselineskip} +<å‚考> CindyScript ã® unicode(code) 関数を用ã„ã¦ãƒ€ãƒ–ルクォートを表ã—,次ã®ã‚ˆã†ã«ã™ã‚‹ã“ã¨ã‚‚ã§ãる。 + +\begin{verbatim} +dq=unicode("22"); +comm="concat("+dq+"a"+dq+","+dq+"b"+dq+")"; +Mxfun("1",comm,[]); +\end{verbatim} + +\vspace{\baselineskip} +ã€ä¾‹ã€‘$f(x)=\sin x$ を微分ã™ã‚‹ -æ–‡å—列を引数ã¨ã™ã‚‹å ´åˆï¼Œä¾‹ãˆã°ï¼Œæ–‡å—列を連çµã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰concatã§ã¯ï¼Œ +\verb| Mxfun("1", "diff",["sin(x)","x"])| -concat("a","b") +ã¨ã™ã‚‹ã¨ -ã¨ã™ã‚‹ãŒï¼ŒCindyscriptã®æ–‡å—列ã®å‡¦ç†ã®é–¢ä¿‚ã§ï¼Œç¬¬ï¼‘引数ã§ã¯ã“ã®å½¢ã§è¨˜è¿°ã§ããªã„。 +\verb| diff(sin(x),x)| -ã—ãŸãŒã£ã¦ï¼Œã“ã®ã‚ˆã†ãªå ´åˆã¯ï¼Œç¬¬2引数を使ã£ã¦ +ã¨ã„ã†ã‚³ãƒžãƒ³ãƒ‰ã‚’Maximaã«æ¸¡ã—ã¦ï¼Œæˆ»ã‚Šå€¤ã‚’Cindyã®å¤‰æ•°mx1ã«ä»£å…¥ã™ã‚‹ã€‚ -\verb|Mxfun("1","concat",["a","b"])| - -ã¨ã™ã‚Œã°ã‚ˆã„。 +\verb| Mxfun("1", "diff(sin(x),x)",[]])| + +ã¨ï¼Œç¬¬ï¼‘引数ã«ã¾ã¨ã‚ã¦ã‚‚åŒã˜çµæžœã«ãªã‚‹ã€‚ãŸã ã—,ã“ã®å ´åˆï¼Œç¬¬2引数ã¯ç©ºãƒªã‚¹ãƒˆã¨ã™ã‚‹ã€‚ \vspace{\baselineskip} -{\bf Cindyscriptã®å¾®åˆ†ã¨ã®é•ã„} +{\bf <å‚考>Cindyscriptã®å¾®åˆ†ã¨ã®é•ã„} Cindyscriptã§ã‚‚微分ã¯ã§ãる。ãŸã¨ãˆã°ï¼Œ \begin{verbatim} @@ -4777,17 +4917,12 @@ println(mx1); \end{verbatim} ã§ã¯ï¼Œã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã« \verb|cos(x)| ã¨è¡¨ç¤ºã•ã‚Œã‚‹ã€‚ -mx1ã¯æ–‡å—列ã§ã‚ã‚‹ã®ã§ï¼Œ -\begin{verbatim} -g(x):=parse(mx1); -\end{verbatim} -ã¨ã™ã‚Œã°ï¼Œg(x)を導関数ã¨ã™ã‚‹ã“ã¨ãŒã§ã,\verb|plot(g(#))| ã§ã‚°ãƒ©ãƒ•ã‚’æãã“ã¨ãŒã§ãる。 +mx1ã¯æ–‡å—列ã§ã‚ã‚‹ã®ã§ï¼Œ\verb|Plotdata("1",mx1,"x")| ã§ã‚°ãƒ©ãƒ•ãŒæã‘る。 ã¾ãŸï¼ŒCindyscriptã®å¾®åˆ†ã§ã¯ï¼Œ3階ã‹4階ã¾ã§ã®å°Žé–¢æ•°ãŒè¨ˆç®—上ã®é™åº¦ã§ã‚ã‚‹ã®ã«å¯¾ã—,Maximaãªã‚‰ä½•éšŽã§ã‚‚微分ãŒã§ãã‚‹ã®ã§ï¼Œãƒ†ã‚¤ãƒ©ãƒ¼å±•é–‹ãªã©ã§æœ‰åˆ©ã§ã‚る。 \vspace{\baselineskip} -\vspace{\baselineskip} -例$\sin x$ 㮠テイラー展開を行ã„,グラフを表示ã™ã‚‹ã€‚ +ã€ä¾‹ã€‘$\sin x$ 㮠テイラー展開ã«ã‚ˆã‚‹è¿‘ä¼¼ã®ã‚°ãƒ©ãƒ•ã‚’表示ã™ã‚‹ã€‚ \begin{verbatim} Mxfun("1","taylor",["sin(x)","x",0,7],[""]); Plotdata("1","sin(x)","x",["da"]); @@ -4796,14 +4931,14 @@ Plotdata("2",mx1,"x"); \vspace{\baselineskip} \begin{center} \input{Fig/taylor} \end{center} \vspace{\baselineskip} -Mxtex() を用ã„ã¦ï¼ŒMxfun()ã®çµæžœã® mx1ã‚’TeX書å¼ã«ã—ã¦è¡¨ç¤ºã™ã‚‹ã“ã¨ã‚‚ã§ãる。 +ãªãŠï¼ŒMxtex() を用ã„ã‚Œã°ï¼ŒMxfun()ã®çµæžœã® mx1ã‚’TeX書å¼ã«ã—ã¦è¡¨ç¤ºã§ãる。 -\verb|Expr([[1,2],"e",Mxtex("1",mx1)]);| +\verb| Expr([[1,2],"e",Mxtex("1",mx1)]);| ã‚’è¿½åŠ ã™ã‚Œã°[1,2]ã®ä½ç½®ã«å¼ãŒè¡¨ç¤ºã•ã‚Œã‚‹ã€‚ \vspace{\baselineskip} -{\bf 応用ã€ä¾‹ã€‘接線ã®æ–¹ç¨‹å¼ã‚’作る} +ã€ä¾‹ã€‘接線ã®æ–¹ç¨‹å¼ã‚’作る \vspace{\baselineskip} $f(x)=\dfrac{e^x+e^{-x}}{2}$ ã®ï¼Œ$x=a$ã«ãŠã‘る接線ã®æ–¹ç¨‹å¼ã‚’作る。 @@ -4824,7 +4959,9 @@ println(tf); \end{verbatim} ãŒè¡¨ç¤ºã•ã‚Œã‚‹ã€‚ -\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} +åŒæ§˜ã®ä¾‹ã‚’ CalcbyM() ã§ä¾‹ç¤ºã—ã¦ã„ã‚‹ã®ã§å‚ç…§ã•ã‚ŒãŸã„。 + +%\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} \vspace{\baselineskip} \hypertarget{mxtex}{} \item[関数]Mxtex(name,å¼) @@ -4881,8 +5018,9 @@ Cindyscriptã®æ–‡å—列ã®é–¢æ•° replace を用ã„ã¦ï¼Œ ã€ä¾‹ã€‘2次関数ã®ã‚°ãƒ©ãƒ•ã‚’表示ã—,$x$軸ã¨ã®äº¤ç‚¹ã®$x$座標を表示ã™ã‚‹ã€‚ \begin{layer}{150}{0} -\putnotese{60}{20}{ \input{Fig/mxtex03}} +\putnotese{60}{05}{ \input{Fig/mxtex03}} \end{layer} + \begin{verbatim} fx="x^2-x-3"; cmdL=[ @@ -4972,7 +5110,7 @@ Expr([2,-0.5],"e",tx2); \end{description} \begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} -\newpage +%\newpage %FriCASã¨ã®é€£æº================================== \subsection{FriCAS(Axiom)ã¨ã®é€£æº} @@ -5003,7 +5141,7 @@ Expr([2,-0.5],"e",tx2); \end{description} \begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} -\newpage +%\newpage %MeshLabã¨ã®é€£æº================================== \subsection{MeshLabã¨ã®é€£æº} @@ -5094,9 +5232,6 @@ options ã¯ï¼Œé¢ã®åŽšã¿ã®æŒ‡å®šã€‚厚ã¿ã¯ä¸å¿ƒç·šã«å¯¾ã—,両å´ã«ã¤ \vspace{\baselineskip} ã€ä¾‹ã€‘三角形ã®ãƒ—レートをæã -\begin{layer}{150}{0} -\putnotese{80}{15}{ \includegraphics[bb=0 0 287.01 228.01 , width=3cm]{Fig/meshlab03.pdf} } -\end{layer} \begin{verbatim} Xyzax3data("","x=[-5,5]","y=[-5,5]","z=[-5,5]"); p1=[2,0,0]; @@ -5108,6 +5243,11 @@ Mkobjcrvcmd("2","ax3d"); Mkviewobj("plane",Concatcmd([oc1,oc2]),["m","v"]); \end{verbatim} +\begin{center} \includegraphics[bb=0 0 287.01 228.01 , width=4cm]{Fig/meshlab03.pdf} \end{center} +%\begin{layer}{150}{0} +%\putnotese{80}{15}{ \includegraphics[bb=0 0 287.01 228.01 , width=3cm]{Fig/meshlab03.pdf} } +%\end{layer} + \vspace{\baselineskip} \hypertarget{mkobjpolycmd}{} \item[関数]Mkobjpolycmd(name,PD,options) @@ -5139,8 +5279,8 @@ PDã¯ï¼Œå¹³é¢ã®æ画コマンドã«ã‚ˆã‚‹ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ãŒä½¿ãˆã‚‹ã€‚ \vspace{\baselineskip} ã€ä¾‹ã€‘回転放物線 -\begin{layer}{150}{0} -\putnotese{70}{0}{ \includegraphics[bb=0 0 287.01 189.01 , width=4cm]{Fig/meshlab06.pdf}} +\begin{layer}{150}{20} +\putnotes{58}{37}{ \includegraphics[bb=0 0 287.01 189.01 , width=5cm]{Fig/meshlab06.pdf}} \end{layer} \begin{verbatim} fd=[ @@ -5152,9 +5292,9 @@ Mkobjthickcmd("1",fd,[40,40,0.2,"+n+s-e-w+","assume(R>0)"]); Mkviewobj("pala",oc1,["m","v","Wait=5"]); \end{verbatim} -%\begin{center}\includegraphics[bb=0 0 574 378 , width=5cm]{Fig/meshlab06.pdf}\end{center} +%\begin{center}\includegraphics[bb=0 0 574 378 , width=4cm]{Fig/meshlab06.pdf}\end{center} -\vspace{\baselineskip} +\vspace{37mm} \hypertarget{mkviewobj}{} \item[関数]Mkviewobj(name,PD, options) \item[機能]objファイルを作æˆã€‚optionã«ã‚ˆã‚Š MeshLab ã‚’ç«‹ã¡ä¸Šã’ã¦è¡¨ç¤ºã™ã‚‹ã€‚ @@ -5173,7 +5313,7 @@ Mkviewobj("pala",oc1,["m","v","Wait=5"]); \end{description} \begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} -\newpage +%\newpage %表計算ソフトã¨ã®é€£æº================================== \subsection{表計算ソフトã¨ã®é€£æº} 表計算ソフトã§ã¯ï¼Œè¤‡æ•°ã®ã‚»ãƒ«ã‚’é¸æŠžã—ã¦ã‚³ãƒ”ー(Windowsã§ã¯ Crtl+ C ,Macã§ã¯ Command+C)ã™ã‚‹ã¨ï¼Œã‚»ãƒ«ã®å†…容ã¯tab区切りã®ãƒ†ã‚ストデータã¨ã—ã¦ã‚¯ãƒªãƒƒãƒ—ボードã«ã‚³ãƒ”ーã•ã‚Œã‚‹ã€‚ã“れをCindyscriptエディタã«ãƒšãƒ¼ã‚¹ãƒˆã™ã‚‹ã“ã¨ã§è¡¨è¨ˆç®—ソフトã®ãƒ‡ãƒ¼ã‚¿ã‚’\ketcindy ã§åˆ©ç”¨ã§ãる。逆ã«ï¼ŒCindyscriptã®ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã¸ã®å‡ºåŠ›ã‚’表計算ソフトã®ã‚·ãƒ¼ãƒˆã«ã‚³ãƒ”ーã™ã‚‹ã“ã¨ã‚‚ã§ãる。 @@ -5306,7 +5446,7 @@ namelistã¯ï¼ŒCSVファイルã®1行目ã«è¿½åŠ ã•ã‚Œã‚‹é …ç›®å。çœç•¥ã™ã‚ Cinderellaã®ä½œå›³æ©Ÿèƒ½ã¨Cindyscriptを用ã„ã¦ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ãŒã§ãã‚‹ãŒï¼ŒPDFã«ã™ã‚‹ã“ã¨ã§CinderellaãŒãªãã¦ã‚‚PDFビュアーãŒã‚ã‚Œã°ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’実行ã§ãã‚‹ã®ã§ï¼Œãƒ—レゼンテーションや教æã®å—ã‘渡ã—ãªã©ã«ä¾¿åˆ©ã§ã‚る。 -次ã®ç”»é¢ã¯ï¼Œsamplesフォルダã«ã‚る「s06animationã€ã®ã€Œs0601cycloidã€ã®ã‚‚ã®ã§ã‚る。ã“れをã²ãªå½¢ã¨ã—ã¦ä½¿ã†ã®ãŒã‚ˆã„。 +次ã®ç”»é¢ã¯ï¼Œsamplesフォルダã«ã‚る「s06animationã€ã®ã€Œs0601cycloidã€ã®ã‚‚ã®ã§ã‚る。ã“れをã²ãªå½¢ã¨ã—ã¦ä½¿ã†ã®ãŒã‚ˆã„。ã™ã§ã«ã‚るスライダãªã©ãŒé‚ªé”ã§ã‚ã‚Œã°ï¼Œæ¶ˆåŽ»ãƒœã‚¿ãƒ³ã§æ¶ˆåŽ»ã™ã‚‹ã‹ï¼Œtemplate2allbuttons.cdy ã‚’ã²ãªå½¢ã¨ã—ã¦ç”¨ã„る。 \vspace{\baselineskip} \includegraphics[bb=0 0 732.04 376.02 , width=12cm]{Fig/mvgaiyou01.pdf} @@ -5314,15 +5454,15 @@ Cinderellaã®ä½œå›³æ©Ÿèƒ½ã¨Cindyscriptを用ã„ã¦ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ãŒã§ã ç”»é¢ä¸Šæ–¹ã®ãƒœã‚¿ãƒ³ã«ã¯ï¼Œæ¬¡ã®ã‚ˆã†ãªã‚¹ã‚¯ãƒªãƒ—トãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„る。 \begin{tabbing} -12345678\=1234567897890123456\=\kill -Figure\>: Viewtex(); \>ç¾åœ¨ã®ç”»é¢ã®PDFデータを作る\\ -Parent \>:複数ã®ã‚¹ã‚¯ãƒªãƒ—ト\>Figpdf() を使ã†ã¨ãã«ä½¿ç”¨ã™ã‚‹ã€‚\\ -ParaF \>: Parafolder(); \>アニメーションã®ãƒ‡ãƒ¼ã‚¿ã‚’作る\\ -Anime\>: Mkanimation(); \>アニメーションPDFを作る\\ -Flip \>: Mkflipanime(); \>パラパラ動画PDFを作る +1234\=12345678\=1234567897890123456\=\kill +\>Figure\>: Viewtex(); \>ç¾åœ¨ã®ç”»é¢ã®PDFデータを作る\\ +\>Parent \>:複数ã®ã‚¹ã‚¯ãƒªãƒ—ト\>Figpdf() を使ã†ã¨ãã«ä½¿ç”¨ã™ã‚‹ã€‚\\ +\>ParaF \>: Parafolder(); \>アニメーションã®ãƒ•ãƒ¬ãƒ¼ãƒ データを作る\\ +\>Anime\>: Mkanimation(); \>アニメーションPDFを作る\\ +\>Flip \>: Mkflipanime(); \>パラパラ動画PDFを作る \end{tabbing} -アニメーションã®ä½œæˆã¯ï¼Œãƒ•ãƒ¬ãƒ¼ãƒ を定義ã™ã‚‹é–¢æ•°ã‚’作æˆã—,Mkanimation() 関数を実行ã™ã‚‹(Animeボタン)。 +アニメーションPDFを作るã«ã¯ï¼Œãƒ•ãƒ¬ãƒ¼ãƒ を定義ã™ã‚‹é–¢æ•°ã‚’記述ã—,「ParaFã€ãƒœã‚¿ãƒ³ã§ãƒ•ãƒ¬ãƒ¼ãƒ データを作り,「Animeã€ã¾ãŸã¯ã€ŒFlipã€ãƒœã‚¿ãƒ³ã§PDFを作æˆã™ã‚‹ã€‚ %ãŸã¨ãˆã°ï¼ŒFhead ㌠"hoge" ã®å ´åˆï¼ŒTeX ã®æ–‡æ›¸ã«ã¯\\ % \verb|\begin{center} \input{hogemoviefigs.tex}|\\ %ã§å‹•ç”»ã‚’挿入ã™ã‚‹ã“ã¨ãŒã§ãる。 @@ -5334,9 +5474,11 @@ Flip \>: Mkflipanime(); \>パラパラ動画PDFを作る %パッケージ㯠animate ã« dvipdfmx オプションをã¤ã‘る。\\ %\verb|\usepackage[dvipdfmx]{animate}| -ãªãŠï¼Œã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³PDFã§ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’è¡Œã†ã«ã¯Adobe Acrobat Reader ãªã©ï¼Œã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã«å¯¾å¿œã—ãŸPDFリーダーãŒå¿…è¦ã§ã‚る。Windowsã®SumatraPDF,Mac㮠プレビューã§ã¯å‹•ã‹ãªã„。 +Anime ボタンを押ã™ã¨ï¼Œ\verb|\usepackage[dvipdfmx]{animate}| ã§ãƒ‘ッケージをèªã¿è¾¼ã¿ï¼Œanimateinline 環境ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’作る。 + +Flip ボタンを押ã™ã¨ï¼Œanimateinline 環境ã§ã¯ãªã,フレームã«åˆ†å‰²ã—ãŸPDFãŒç”Ÿæˆã•ã‚Œã‚‹ã€‚ -Flipボタンを押ã™ã¨ï¼Œãƒ•ãƒ¬ãƒ¼ãƒ ã«åˆ†å‰²ã—ãŸPDFãŒç”Ÿæˆã•ã‚Œã¦è¡¨ç¤ºã•ã‚Œã‚‹ã€‚ +ãªãŠï¼Œã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³PDFã§ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’è¡Œã†ã«ã¯Adobe Acrobat Reader ãªã©ï¼Œã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã«å¯¾å¿œã—ãŸPDFリーダーãŒå¿…è¦ã§ã‚る。Windowsã®SumatraPDF,Mac㮠プレビューã§ã¯ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ãŒã§ããªã„。 \subsection{関数} \begin{description} @@ -5344,7 +5486,11 @@ Flipボタンを押ã™ã¨ï¼Œãƒ•ãƒ¬ãƒ¼ãƒ ã«åˆ†å‰²ã—ãŸPDFãŒç”Ÿæˆã•ã‚Œã¦è¡¨ç \hypertarget{setpara}{} \item[関数]Setpara(fname,funcstr,range,options1,options2) \item[機能]アニメーションã®è¨å®šã‚’ã™ã‚‹ -\item[説明]fname ã¯å‡ºåŠ›ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«å,funcstrã¯å‹•ç”»é–¢æ•°å,rangeã¯ç¯„囲 +\item[説明]fname ã¯å‡ºåŠ›ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«å,funcstrã¯å®šç¾©ã—ãŸå‹•ç”»é–¢æ•°å,rangeã¯ç¯„囲 + +「Animeã€ãƒœã‚¿ãƒ³ã‚’押ã™ã¨ï¼Œanimate+fname.pdf ãŒä½œã‚‰ã‚Œã‚‹ã€‚å†ç”Ÿã¯ã‚³ãƒ³ãƒˆãƒãƒ¼ãƒ©ã‹ï¼Œç”»é¢ã‚¯ãƒªãƒƒã‚¯ã§è¡Œã†ã€‚ + +「Flipã€ãƒœã‚¿ãƒ³ã‚’押ã™ã¨ï¼Œflipanime+filename.pdf ãŒä½œã‚‰ã‚Œã‚‹ã€‚å†ç”Ÿï¼ˆã‚³ãƒžé€ã‚Šï¼‰ã¯ï¼ŒAcrobat Reader ã®ãƒšãƒ¼ã‚¸é€ã‚Šãƒœã‚¿ãƒ³ã§è¡Œã†ã€‚ options1 ã¯ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã®ãƒ‡ãƒ¼ã‚¿ã‚’作るãŸã‚ã®è¨å®šã€‚ \begin{tabbing} @@ -5356,14 +5502,24 @@ options2 ã¯ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã«ã¤ã„ã¦ã®è¨å®šã§ï¼Œæ¬¡ã®é€šã‚Šã€‚ \begin{tabbing} 1234567890123\=90123456789012345678\=\kill Frate=n\>1秒間ã®ãƒ•ãƒ¬ãƒ¼ãƒ 数。åˆæœŸå€¤ã¯20。 \\ -Title=str\> タイトル。\\ +Title=str\> タイトル。指定ã—ãªã„å ´åˆã¯ fname ã¨åŒã˜ã€‚\\ Scale=n\> 図ã®å¤§ãã•ã®æ‹¡å¤§çŽ‡ \\ -opA\> animate.sty ã®ãŸã‚ã®ã‚ªãƒ—ション。 \\ -\> loop:loopã™ã‚‹ï¼Œcontrols:ボタンを表示,buttonsize:ボタンã®ã‚µã‚¤ã‚º\\ -\> step:コマé€ã‚Šãƒ¢ãƒ¼ãƒ‰\\ -\>åˆæœŸè¨å®šã¯loop,controls,buttonsize=3mm\\ -\> +ã‚’ã¤ã‘ã‚‹ã¨ãƒ¢ãƒ¼ãƒ‰ãŒè¿½åŠ ã•ã‚Œã‚‹ã€‚ãŸã¨ãˆã° \verb|"OpA=+step"| ã§\\ -\>\verb|"OpA=[loop,controls,buttonsize=3mm,step]"| ã¨ãªã‚‹ã€‚ +opA=[option]\> animateinline 環境ã®ãŸã‚ã®ã‚ªãƒ—ション \\ +\>åˆæœŸè¨å®šã¯\verb|[loop,controls,buttonsize=3mm]|。\\ +\> loop:繰り返ã—å†ç”Ÿã™ã‚‹ã€‚\\ +\> controls:コントãƒãƒ¼ãƒ©ã‚’表示ã™ã‚‹\\ +\> buttonsize:コントãƒãƒ¼ãƒ©ã®ã‚µã‚¤ã‚º\\ +\> palindrome:å転ã—ã¦ç¹°ã‚Šè¿”ã—å†ç”Ÿã™ã‚‹\\ +\> step:コマé€ã‚Šãƒ¢ãƒ¼ãƒ‰ã«ã™ã‚‹ã€‚コントãƒãƒ¼ãƒ©ã‚‚コマé€ã‚Šä»•æ§˜ã€‚\\ +\>\verb|"OpA=[controls,buttonsize=5mm]" |ã®ã‚ˆã†ã«è¨˜è¿°ã™ã‚‹ã€‚\\ +\> +ã‚’ã¤ã‘ã‚‹ã¨åˆæœŸè¨å®šã®ã‚‚ã®ã«è¿½åŠ ã™ã‚‹ã“ã¨ãŒã§ãる。\\ +\>ãŸã¨ãˆã° \verb|"OpA=+step"| ã§\\ +\>\verb|"OpA=[loop,controls,buttonsize=3mm,step]"| ã¨ãªã‚‹ã€‚\\ +\>\verb|"OpA=[]"| ã¨ã™ã‚‹ã¨ï¼Œã‚ªãƒ—ションãªã—ã¨ãªã‚Šï¼Œ\\ +\>ç”»é¢ã‚’クリックã™ã‚‹ã¨ç¹°ã‚Šè¿”ã—ãªã—ã§å†ç”Ÿã•ã‚Œã‚‹ã€‚\\ +記述例\\ +\verb|Setpara("cycloid","mf(t)","t=[0,60]",["Div=60"],|\\ +\verb| ["Frate=30","Title="サイクãƒã‚¤ãƒ‰","Scale=1.5","OpA=[controls]"]);|\\ \end{tabbing} \vspace{\baselineskip} @@ -5396,36 +5552,38 @@ opA\> animate.sty ã®ãŸã‚ã®ã‚ªãƒ—ション。 \\ %\begin{description} \vspace{\baselineskip} ã€ä¾‹ã€‘定円上を動ã点Pã¨ï¼Œå®šç‚¹Aã‚’çµã¶ç·šåˆ†ã®ä¸ç‚¹ã‚’Qã¨ã—ã¦å‹•ãを見る。 -アニメーションを定義ã™ã‚‹é–¢æ•°ã¯ï¼Œæ™‚é–“ã‚’ $t$ ã¨ã™ã‚Œã°ï¼Œæ™‚刻 $t$ ã«ãŠã‘る図(動ãã‚‚ã®ã ã‘)を定義ã™ã‚‹ã€‚時刻ã¯å˜ãªã‚‹åª’介変数ã§ã‚ã‚‹ã®ã§ï¼Œ$t$ ã§ãªã $s$ ãªã©ã§ã‚‚よã„。 + +アニメーション(フレーム)を定義ã™ã‚‹é–¢æ•°ã¯ï¼Œæ™‚刻を $t$ ã¨ã—ã¦ï¼Œ $t$ ã«ãŠã‘る図を定義ã™ã‚‹ã¨è€ƒãˆã‚‹ã€‚時刻ã¯å˜ãªã‚‹åª’介変数ã§ã‚ã‚‹ã®ã§ï¼Œ$t$ ã§ãªã $s$ ãªã©ã§ã‚‚よã„。関数åã¯ï¼ŒãŸã¨ãˆã° mf(movie frame) ã¨ã™ã‚‹ã€‚ \begin{verbatim} Setax(["","","sw","","sw"]); Slider("A-C-B",[0,YMIN-1],[2*pi,YMIN-1]); Circledata("1",[[0,0],[0,2]]); mf(t):=( -pt=2*[cos(t),sin(t)]; -mp=(pt+[4,0])/2; -Listplot("1",[[4,0],pt]); -Pointdata("1",[mp,pt],["Size=2"]); -if(t==0, -ptlist=[mp]; -, -ptlist=append(ptlist,mp); -); -Letter([[4,0],"s","A",pt,"en","P",mp,"ne","Q"]); -Pointdata("2",ptlist,["Size=2","Color=red"]); + pt=2*[cos(t),sin(t)]; + mp=(pt+[4,0])/2; + Listplot("1",[[4,0],pt]); + Pointdata("1",[mp,pt],["Size=2"]); + if(t==0, + ptlist=[mp]; + , + ptlist=append(ptlist,mp); + ); + Letter([[4,0],"s","A",pt,"en","P",mp,"ne","Q"]); + Pointdata("2",ptlist,["Size=2","Color=red"]); ); mf(C.x); Setpara("middle","mf(t)","t=[0,4*pi]"); \end{verbatim} -ã“ã®ä¾‹ã®å ´åˆï¼Œ\verb|mf(C.x)| を実行ã™ã‚‹ã¨ã‚¹ãƒ©ã‚¤ãƒ€ã‚’å‹•ã‹ã™ã“ã¨ã§ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–ã«è»Œè·¡ã‚’表示ã§ãる。 +ã“ã®ä¾‹ã®å ´åˆï¼Œ\verb|mf(C.x)| を実行ã™ã‚‹ã¨ã‚¹ãƒ©ã‚¤ãƒ€ã‚’å‹•ã‹ã™ã“ã¨ã§ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–ã«è»Œè·¡ã‚’表示ã§ãる。アニメーションを作る上ã§ã¯ \verb|mf(C.x)| やスライダã¯ãªãã¦ã‚‚よã„。 + Cinderellaã®ç”»é¢ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚‹ã€‚ \vspace{\baselineskip} \hspace{20mm} \includegraphics[bb=0.00 0.00 608.03 367.02,width=8cm]{Fig/moviedata01.pdf} -アニメーションを作æˆã™ã‚‹ã¨ã㯠\verb|//mf(C.x)| ã¨ã‚³ãƒ¡ãƒ³ãƒˆã‚¢ã‚¦ãƒˆã—ã¦ã‹ã‚‰ Anime ボタンをクリックã™ã‚‹ã€‚次ã®å›³ã¯ï¼Œã§ã上ãŒã£ãŸ animatemiddle.pdf ã®å§‹ã‚ã®ç”»é¢ã§ã‚る。 +アニメーションを作æˆã™ã‚‹ã¨ã㯠\verb|//mf(C.x)| ã¨ã‚³ãƒ¡ãƒ³ãƒˆã‚¢ã‚¦ãƒˆã—ã¦ã‹ã‚‰ 「ParaFã€ã€ŒAnime〠ボタンをクリックã™ã‚‹ã€‚次ã®å›³ã¯ï¼Œã§ã上ãŒã£ãŸ animatemiddle.pdf ã®å§‹ã‚ã®ç”»é¢ã§ã‚る。 \hspace{30mm}\includegraphics[bb=0.00 0.00 470.02 394.02,width=6cm]{Fig/moviedata02.pdf} @@ -5433,7 +5591,7 @@ Cinderellaã®ç”»é¢ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚‹ã€‚ \verb| Setpara("middle","mf(t)","t=[0,4*pi]",["Div=30"],["Frate=6"]);| -\verb|["Div=150"],["Frage=30"]|ã¨ã™ã‚‹ã¨ï¼Œã‚„ã¯ã‚Š5秒間ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã¨ãªã‚‹ãŒï¼Œ1秒間ã®ãƒ•ãƒ¬ãƒ¼ãƒ æ•°ãŒå¤šã„ãŸã‚,ãªã‚らã‹ãªå‹•ãã¨ãªã‚‹ã€‚ã“ã‚Œã¯æ¨™æº–çš„ãªãƒ“デオã®ãƒ•ãƒ¬ãƒ¼ãƒ レートã§ã‚る。ãŸã ã—,ファイルサイズã¯ç´„5å€ã¨ãªã‚‹ã€‚ +\verb|["Div=150"],["Frate=30"]|ã¨ã™ã‚‹ã¨ï¼Œã‚„ã¯ã‚Š5秒間ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã¨ãªã‚‹ãŒï¼Œ1秒間ã®ãƒ•ãƒ¬ãƒ¼ãƒ æ•°ãŒå¤šã„ãŸã‚,ãªã‚らã‹ãªå‹•ãã¨ãªã‚‹ã€‚ã“ã‚Œã¯æ¨™æº–çš„ãªãƒ“デオã®ãƒ•ãƒ¬ãƒ¼ãƒ レートã§ã‚る。ãŸã ã—,ファイルサイズã¯ç´„5å€ã¨ãªã‚‹ã€‚ \begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} @@ -5444,7 +5602,7 @@ Cinderellaã®ç”»é¢ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚‹ã€‚ %==================== Slide =============== -\section{\ketcindy スライド} +\section{KeTスライド} \subsection{概è¦ã¨åˆ¶ä½œæ‰‹é †} \ketcindy ã§ä½œæˆã—ãŸå›³ã¨ãƒ†ã‚ストを統åˆã—ã¦ãƒ—レゼンテーション用ã®ã‚¹ãƒ©ã‚¤ãƒ‰PDFを作æˆã™ã‚‹ã€‚å¿…è¦ãªãƒ•ã‚¡ã‚¤ãƒ«ã¯ï¼Œã‚¹ãƒ©ã‚¤ãƒ‰ã®å†…容を記述ã—ãŸãƒ†ã‚ストファイル(ã“ã“ã§ã¯ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ファイルã¨å‘¼ã¶ï¼‰ã¨ï¼Œã‚¿ã‚¤ãƒˆãƒ«ã‚„図を作æˆã—,コンテンツファイルã¨çµ±åˆã™ã‚‹ \ketcindy ã®ãƒ•ã‚¡ã‚¤ãƒ«ã§ã‚る。ã“ã®2ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ï¼Œæ‹¡å¼µå㌠txt 㨠cdy ã§ï¼Œãƒ•ã‚¡ã‚¤ãƒ«åã¯åŒä¸€ã¨ã™ã‚‹ã€‚ãŸã¨ãˆã°ï¼Œã‚³ãƒ³ãƒ†ãƒ³ãƒ„ファイルを makeslide.txt , \ketcindy ファイルを makeslide.cdy ã¨ã—ãŸã¨ãã®ï¼Œåˆ¶ä½œã‚¤ãƒ¡ãƒ¼ã‚¸ã‚’次ã®å›³ã«ç¤ºã™ã€‚ @@ -5473,7 +5631,7 @@ Cinderellaã®ç”»é¢ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚‹ã€‚ (4) Slide ボタンã§ã‚¹ãƒ©ã‚¤ãƒ‰PDFを作æˆã™ã‚‹ã€‚ -PDFã¨ï¼Œé–¢é€£ã™ã‚‹ä¸é–“ファイルã¯ï¼Œä½œæ¥ãƒ•ã‚©ãƒ«ãƒ€ã§ã¯ãªã,makeslide.cdyã®ã‚るフォルダã«ä½œæˆã•ã‚Œã‚‹ã€‚ã¾ãŸï¼Œã‚¹ãƒ©ã‚¤ãƒ‰PDFã¯ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã¨åŒæ§˜ï¼ŒAdobe Reader ã§é–‹ãå¿…è¦ãŒã‚る。 +PDFã¨ï¼Œé–¢é€£ã™ã‚‹ä¸é–“ファイルã¯ï¼Œä½œæ¥ãƒ•ã‚©ãƒ«ãƒ€ã§ã¯ãªã,makeslide.cdyã®ã‚るフォルダã«ä½œæˆã•ã‚Œã‚‹ã€‚ã¾ãŸï¼Œã‚¹ãƒ©ã‚¤ãƒ‰PDFã¯ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã¨åŒæ§˜ï¼ŒWindows,Macã§ã¯Adobe Reader ã§é–‹ãå¿…è¦ãŒã‚る。Linux(Ubuntu)ã§ã¯ Evince ã§ãƒ—レゼンテーションãŒã§ãる。 \subsection{コンテンツファイル} @@ -5708,6 +5866,8 @@ end// \vspace{\baselineskip} {\bf ã€ãƒ¬ã‚¤ãƒ¤ãƒ¼ã€‘} +ketlayerã®\verb|\begin{layer}・・\end{layer}| ã¨ã—ã¦æ›¸ã出ã™ã€‚本æ¥ã®è¨˜è¿°ã‚ˆã‚Šç°¡ç´ ã«ãªã£ã¦ã„る。 + \hspace{10mm}\verb|layer::{範囲}{0}//| 㧠layer環境ã®å§‹ã¾ã‚Šã‚’示ã™ã€‚layer環境ã®çµ‚ã‚り㯠@@ -5742,6 +5902,7 @@ end// {\bf ã€ãƒ†ã‚ストã¨å‹•ç”»ã€‘} コマンド以外ã®ãƒ†ã‚ストã¯ãã®ã¾ã¾ \TeX\ ã«æ›¸ã出ã•ã‚Œã‚‹ã€‚行末ã«ã¯ // ã‚’ã¤ã‘る。 + テã‚ストを途ä¸ã§æ”¹è¡Œã™ã‚‹ã«ã¯ï¼Œ\TeX\ 㮠強制改行マーク \textbackslash \textbackslash ã‚’ã¤ã‘る。 å‹•ç”»ã®å ´åˆã¯ï¼Œå‹•ç”»ã®è¨å®šã‚’ã—ã¦ï¼ˆã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã®ç¯€ã‚’å‚照)ファイルを作る。 @@ -5806,6 +5967,13 @@ mp4ãƒ•ã‚¡ã‚¤ãƒ«ã‚’è¿½åŠ ã™ã‚‹ã¨ãã¯ï¼Œ\verb|\inputmovie|を用ã„る。\\ \hspace{10mm}\verb|\inputsountclik[90]{1}{0.4}{フォルダ/}{ファイル}|\\ 2番目ã¨3番目ã®å¼•æ•°ã¯ï¼Œå¹…ã¨é«˜ã•ã®\verb|\linewidth|ã‹ã‚‰ã®å€çŽ‡ã§ã‚る。 +\vspace{\baselineskip} +{\bf ã€ä½™ç™½ãªã©ã®ç·¨é›†ã€‘} + +スライドã®ä¸Šå´ä½™ç™½ã¨ã—ã¦ï¼ŒåˆæœŸçŠ¶æ…‹ã§ã€€\verb|\vspace*{18mm}| ãŒè¨å®šã•ã‚Œã‚‹ã€‚次ã®ãƒšãƒ¼ã‚¸ã«ã¯ã¿å‡ºã—ã¦ã—ã¾ã†ã‚ˆã†ãªå ´åˆã¯ï¼Œå‡ºåŠ›ã•ã‚ŒãŸ tex ファイルã§èª¿æ•´ã™ã‚Œã°ã‚ˆã„。 + +ãã®ä»–,é©å®œç·¨é›†ã—ã¦ï¼Œkc.command(bat/sh) を実行ã™ã‚Œã°ï¼Œç´°ã‹ã„部分を修æ£ã—ãŸPDFを作æˆã™ã‚‹ã“ã¨ãŒã§ãる。 + \subsection{関数} makeslide.cdy ã§ä½¿ã†ï¼Œ\ketcindy ã®é–¢æ•°ã€‚ @@ -5924,6 +6092,9 @@ Settitle([ 例ã®ã‚ˆã†ã«ï¼Œã‚¿ã‚¤ãƒˆãƒ«ãƒªã‚¹ãƒˆã¯æ”¹è¡Œã™ã‚‹ã¨è¦‹ã‚„ã™ã„。 \end{description} + +\begin{flushright}\hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} + \newpage %================== 3Dæ¦‚è¦ =============== \section{\ketcindy 3D} @@ -6057,7 +6228,7 @@ optionsãŒãªã„ã¨ãã¯ï¼Œä»¥ä¸‹ã® åˆæœŸè¨å®šã‚’用ã„る。 \end{description} %================== 3Dæç”» =============== -\newpage +%\newpage \subsection{æç”»} %================== 3D点・線 =============== @@ -6094,8 +6265,6 @@ Pointdata3d("1",[[1,1,1],[0,1,0]],["Size=2","Color=red"]); \end{verbatim} \vspace{\baselineskip} -\begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} -\vspace{\baselineskip} %---------------- Putpoint3d---------------------------------------------- \hypertarget{putpoint3d}{} \item[関数]Putpoint3d(リスト,option) @@ -6122,8 +6291,6 @@ optionã¯ï¼Œ"fix"( åˆæœŸè¨å®š) ã¾ãŸã¯ "free"。リスト ["free"] ã«ã—㦠空間ã«ãŠã‘る点ã®åº§æ¨™ã¯ï¼Œç‚¹åã«"3d"ã‚’ä»˜åŠ ã—ãŸåå‰ã®å¤‰æ•°ã«ä»£å…¥ã•ã‚Œã‚‹ã€‚ãŸã¨ãˆã°ï¼Œç‚¹Aã®åº§æ¨™ã¯A3dã§ã‚る。ã“ã‚Œã«ã‚ˆã‚Šï¼Œç‚¹ã®åº§æ¨™ã‚’å–å¾—ã§ãる。 -\begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} - %----------------Putaxes3d--------------------------------------------- \vspace{\baselineskip} \hypertarget{putaxes3d}{} @@ -6140,11 +6307,10 @@ Putaxes3d(5);原点ã¨ï¼Œ$x(5,0,0),y(0,5,0),z(0,0,5)$ を作る。 Putaxes3d([1,2,3]);原点ã¨ï¼Œ$x(1,0,0),y(0,2,0),z(0,0,3)$ を作る。 -\begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} - %----------------PutonCurve3d--------------------------------------------- + %----------------Putoncurve3d--------------------------------------------- \vspace{\baselineskip} \hypertarget{putonCurve3d}{} -\item[関数]PutonCurve3d(点å,PD) +\item[関数]Putoncurve3d(点å,PD) \item[機能]空間曲線上ã«ç‚¹ã‚’ã¨ã‚‹ \item[説明]プãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿PDã®æ›²ç·šä¸Šã«ï¼Œç‚¹åã®ç‚¹ã‚’ã¨ã‚‹ã€‚ @@ -6184,12 +6350,8 @@ options ã¯ç·šç¨®ï¼ˆdr,da,do) ・Spaceline("2",[A,B,C,A]);作図ã•ã‚Œã¦ã„ã‚‹2点A,B,Cã‚’çµã‚“ã 三角形をæã。 - ・節点を表示ã™ã‚‹å ´åˆã¯ï¼ŒPointdata3d() ã§æç”»ã™ã‚‹ã€‚ -\begin{layer}{150}{0} -\putnotese{80}{10}{ \input{Fig/oresenex01}} -\end{layer} \begin{verbatim} pt=[[2,0,0],[2,0,2],[2,2,2],[0,2,2],[0,4,2],[0,4,4]]; Spaceline("1",pt); @@ -6201,7 +6363,13 @@ Pointdata3d("1",pt,["Size=3"]); \verb|pname=apply(1..6,"P"+text(#));| ã®ã‚ˆã†ã«ã—ã¦ï¼Œåå‰ãƒªã‚¹ãƒˆã‚’作るã“ã¨ãŒã§ãる。 -\vspace{\baselineskip} + +%\vspace{\baselineskip} +%\begin{layer}{150}{0} +%\putnotese{80}{10}{ \input{Fig/oresenex01}} +%\end{layer} + \begin{center} \input{Fig/oresenex01} \end{center} + %------------------ Spacecurve----------------------------------------------- \hypertarget{spacecurve}{} \item[関数]Spacecurve(name,å¼,定義域,options) @@ -6257,10 +6425,8 @@ Pointdata3d("1",pt,["Size=3"]); ã€ä¾‹ã€‘\verb|Mkbezierptcrv3d(["A","B","C","D"]);|\\ 線分AB上ã«2点a1p,a2p,線分BC上ã«2点a2p,a2q,線分CD上ã«2点a3p,a3qãŒã§ãる。 - -\begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} - \vspace{\baselineskip} + %------------------ Skeletonparadata----------------------------------------------- \hypertarget{skeletonparadata}{} \item[関数]Skeletonparadata(name,PDリスト,PDリスト,option) @@ -6310,21 +6476,32 @@ Spacecurve("1","[2*cos(t),2*sin(t),0.2*t]","t=[0,4*pi]",["Num=100"]); \end{description} -\newpage + +\begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} + +%\newpage %================== 3D多é¢ä½“ =============== \subsubsection{多é¢ä½“} 多é¢ä½“ã®æç”»ã«ã¤ã„ã¦ï¼Œå››é¢ä½“ã®å ´åˆã‚’例ã«ã—ã¦èª¬æ˜Žã™ã‚‹ã€‚ -å››é¢ä½“ã¯4ã¤ã®é¢ã‹ã‚‰ãªã£ã¦ã„ã‚‹ã€‚é ‚ç‚¹ã‚’A,B,C,Dã¨ã™ã‚‹ã¨ï¼Œ4ã¤ã®é¢ã¯ +\begin{layer}{130}{0} +\putnotesw{130}{0}{\input{Fig/concatobj}} +\end{layer} + +å››é¢ä½“ã¯4ã¤ã®é¢ã‹ã‚‰ãªã£ã¦ã„る。 -\hspace{20mm} â–³ABC,△ABD,△ACD,△BCD +é ‚ç‚¹ã‚’A,B,C,Dã¨ã™ã‚‹ã¨ï¼Œ4ã¤ã®é¢ã¯ + +\hspace{10mm} â–³ABC,△ABD,△ACD,△BCD ã§ã‚る。 - \begin{center} \input{Fig/concatobj} \end{center} +% \begin{center} \input{Fig/concatobj} \end{center} + +é ‚ç‚¹ã®ãƒªã‚¹ãƒˆ[A,B,C,D] ã«å¯¾ã—,Aã‹ã‚‰é †ã«ç•ªå·ã‚’ -é ‚ç‚¹ã®ãƒªã‚¹ãƒˆ[A,B,C,D] ã«å¯¾ã—,Aã‹ã‚‰é †ã«ç•ªå·ã‚’ã¤ã‘ã‚‹ã¨ï¼Œå„é¢ã®é ‚点ã®é †ç•ªã¯ +ã¤ã‘ã‚‹ã¨ï¼Œå„é¢ã®é ‚点ã®é †ç•ªã¯ \hspace{20mm}[1,2,3],[1,2,4],[1,3,4],[2,3,4] @@ -6930,7 +7107,7 @@ ExeccmdC("1"); \begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} \end{description} -\newpage +%\newpage %================== 3Dプãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã®æ“作 =============== \subsection{プãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã®æ“作} @@ -6970,8 +7147,7 @@ println("PD="+Datalist3d()); \end{verbatim} ã¨ã™ã‚‹ã¨ï¼Œã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã«PD=[ax3d,AB3d] ã¨è¡¨ç¤ºã•ã‚Œã‚‹ã€‚ - -\begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} +\vspace{\baselineskip} %------------------- Changestyle3d ----------------------------------------------- \hypertarget{changestyle3d}{} @@ -7028,6 +7204,9 @@ Pointdata3d("1",intercrvsf1); ã®ã‚ˆã†ã«è¡¨ç¤ºã•ã‚Œï¼Œç”»é¢ã«ã¯äº¤ç‚¹ãŒè¡¨ç¤ºã•ã‚Œã‚‹ã€‚ + +\begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} + %------------------- IntersectsgpL ----------------------------------------------- \vspace{\baselineskip} \hypertarget{intersectsgpL}{} @@ -7071,19 +7250,23 @@ Spaceline("2",[p3,p4,p5,p3]); ret=IntersectsgpL("P",[p1,p2],[p3,p4,p5],"put"); println("flag1="+ret_2+": flag2="+ret_3); \end{verbatim} + \begin{layer}{150}{0} -\putnotese{10}{20}{ \input{Fig/wire01}} -\putnotese{60}{20}{ \input{Fig/wire02}} +\putnotese{10}{15}{ \input{Fig/wire01}} +\putnotese{60}{15}{ \input{Fig/wire02}} \end{layer} + \begin{verbatim} p2=[0,0,1/2]; p2=[-1,1,1]; flag1=false : flag2=trueflag1=true : flag2=true \end{verbatim} -\vspace{30mm} + +\newpage%\vspace{55mm} \begin{layer}{150}{0} -\putnotese{10}{20}{ \input{Fig/wire03}} -\putnotese{60}{20}{ \input{Fig/wire04}} +\putnotese{10}{15}{ \input{Fig/wire03}} +\putnotese{60}{15}{ \input{Fig/wire04}} \end{layer} + \begin{verbatim} p2=[1,2,1]; p2=[1,0,1/2]; flag1=true : flag2=false  flag1=false : flag2=false @@ -7159,8 +7342,6 @@ ExeccmdC("1"); \end{verbatim} %\begin{center} \input{Fig/sfcut} \end{center} -\begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} - %------------------Partcrv3d ----------------------------------------------- \vspace{\baselineskip} @@ -7172,12 +7353,12 @@ ExeccmdC("1"); 始点ã¨çµ‚点ã¯ï¼Œãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã®ç•ªå·ã‚‚ã—ãã¯æ›²ç·šä¸Šã«ã¨ã£ãŸç‚¹ã®è˜åˆ¥åã§ç¤ºã™ã€‚ \vspace{\baselineskip} -ã€ä¾‹ã€‘螺旋をæã一部分を太ãã™ã‚‹ã€‚PutonCurve3d() ã§èžºæ—‹ä¸Šã«ç‚¹C,DãŒã§ãã‚‹ã®ã§ï¼Œãƒ‰ãƒ©ãƒƒã‚°ã—ã¦é©å½“ãªä½ç½®ã«ç§»å‹•ã™ã‚‹ã€‚ +ã€ä¾‹ã€‘螺旋をæã一部分を太ãã™ã‚‹ã€‚Putoncurve3d() ã§èžºæ—‹ä¸Šã«ç‚¹C,DãŒã§ãã‚‹ã®ã§ï¼Œãƒ‰ãƒ©ãƒƒã‚°ã—ã¦é©å½“ãªä½ç½®ã«ç§»å‹•ã™ã‚‹ã€‚ \begin{verbatim} Xyzax3data("","x=[-5,5]","y=[-5,5]","z=[-5,4]"); Spacecurve("1","[2*cos(t),2*sin(t),0.2*t]","t=[0,4*pi]",["Num=100"]); -PutonCurve3d("C","sc3d1"); -PutonCurve3d("D","sc3d1"); +Putoncurve3d("C","sc3d1"); +Putoncurve3d("D","sc3d1"); Partcrv3d("1",C,D,"sc3d1",["dr,3"]); Letter([C,"n2","C",D,"n2","D"]); \end{verbatim} @@ -7193,6 +7374,8 @@ Partcrv3d("1",3.3,8.5,"sc3d1"); \end{verbatim} \begin{center} \input{Fig/partcrv3d2} \end{center} +\begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} + %------------------Reflectdata3d----------------------------------------------- \hypertarget{reflectdata3d}{} \item[関数]Reflectdata3d(name , PDlist , list , options) @@ -7244,6 +7427,8 @@ Spaceline("1",[A,B,C,A]); å¹³é¢BCDã«é–¢ã™ã‚‹é¡æ˜ 点\verb| Reflectpoint3d(A3d,[B3d,C3d,D3d]);| +\begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} + %------------------Rotatedata3d ----------------------------------------------- \vspace{\baselineskip} \hypertarget{rotatedata3d}{} @@ -7326,6 +7511,8 @@ Putpoint3d(["B",pt]); 点Bã®ä½ç½®ã¯(4,-3,5)ã«ãªã‚‹ã€‚ +%\begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} + %------------------ Translatedata3d ----------------------------------------------- \vspace{\baselineskip} \hypertarget{translatedata3d}{} @@ -7356,8 +7543,6 @@ VertexEdgeFace("1",phd); \end{verbatim} \begin{center} \input{Fig/translate01} \end{center} -\begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} - %------------------Translatepoint3d( ----------------------------------------------- \hypertarget{translatepoint3d}{} \item[関数]Translatepoint3d(座標,平行移動é‡) @@ -7371,11 +7556,9 @@ Putpoint3d(["A",[1,0,0]]); pt=Translatepoint3d(A3d,[-1,1,1]); Putpoint3d(["B",pt]); \end{verbatim} -\vspace{\baselineskip} +%\vspace{\baselineskip} \begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} - - \end{description} \newpage %ãã®ä»–================================== @@ -7434,9 +7617,6 @@ Letter([P,"w","P",A,"ne","A",B,"e","B",C,"ws","C",D,"nw","D",]); Skeletonparadata("1"); \end{verbatim} - -\begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} -\vspace{\baselineskip} %-----------------Perppt( ----------------------------------------------- \hypertarget{perppt}{} \item[関数]Perppt(点å,点,点リスト,option) @@ -7478,6 +7658,10 @@ Letter([A,"nw","A",B,"ne","B",C,"ne","C",O,"nw","O",H,"ne","H"]); %\vspace{\baselineskip} \begin{center}\scalebox{0.9}{ \input{Fig/perppt}} \end{center} + +\begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} +%\vspace{\baselineskip} + %------------------Projcoordpara ----------------------------------------------- \hypertarget{projcoordpara}{} \item[関数]Projcoordpara(座標) @@ -7537,7 +7721,7 @@ Nohiddenbyfaces("1","phf3d1"); ã“ã®ä»–ã«n01〜n92ã¾ã§æ•´é¢å‡¸å¤šé¢ä½“ãŒã‚る。 -\begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} +%\begin{flushright} \hyperlink{functionlist}{$\Rightarrow$関数一覧}\end{flushright} %-------------------Xyzcoord----------------------------------------------- @@ -7551,6 +7735,7 @@ Nohiddenbyfaces("1","phf3d1"); \vspace{\baselineskip} ã€ä¾‹ã€‘点Aをドラッグã—ã¦å‹•ã‹ã—ãŸã¨ã,Aã®åº§æ¨™ã‚’求ã‚る。 + \verb|println(Xyzcoord(A.x,A.y,Az.y));| ã«ã‚ˆã‚Šï¼Œã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã«åº§æ¨™ãŒè¡¨ç¤ºã•ã‚Œã‚‹ã€‚ @@ -7977,6 +8162,7 @@ Cinderellaã§ä½¿ã£ã¦ã„る用語ã«æ¬¡ã®ã‚‚ã®ãŒã‚る。 \hyperlink{drwxy}{Drwxy()} \>座標軸を先ã«æã\\ \hyperlink{fontsize}{Fontsize(記å·)}\>フォントサイズをè¨å®šã™ã‚‹\\ \hyperlink{ketinit}{Ketinit(options)}\>\ketcindy ã‚’åˆæœŸåŒ–ã™ã‚‹\\ +\hyperlink{initglist}{Initglist} \> ketlib スãƒãƒƒãƒˆã®æç”»ãƒ‡ãƒ¼ã‚¿ã‚’è¿½åŠ ã™ã‚‹\\ \hyperlink{ptsize}{Ptsize(æ•°)} \>表示ã™ã‚‹ç‚¹ã®å¤§ãã•ã‚’è¨å®šã™ã‚‹\\ \hyperlink{setarrow}{Setarrow(size,angle,pos,cut,style}\>矢線ã®å½¢çŠ¶ã‚’è¨å®šã™ã‚‹\\ \hyperlink{setax}{Setax(list)}\>座標軸ã®æ›¸å¼ã‚’è¨å®šã™ã‚‹\\ @@ -7992,7 +8178,8 @@ Cinderellaã§ä½¿ã£ã¦ã„る用語ã«æ¬¡ã®ã‚‚ã®ãŒã‚る。 \hyperlink{setwindow}{Setwindow()}\>æç”»é ˜åŸŸã‚’è¨å®šã™ã‚‹\\ \hyperlink{usegraphics}{Usegraphics()} \>グラフィクスパッケージを\verb|"pict2e"| ã«å¤‰æ›´ã™ã‚‹\\ ã€æ画】\\ -\hyperlink{addgraph}{AddGraph(name ,プãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿)} \>ユーザー定義ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‚’æç”»ã™ã‚‹\\ +\hyperlink{drawfigures}{Drawfigures(name ,figlist,optionlist)} \>複数ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚’リストã§ä¸Žãˆã¦æç”»ã™ã‚‹\\ +%\hyperlink{addgraph}{Addgraph(name ,プãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿)} \>ユーザー定義ã®ãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‚’æç”»ã™ã‚‹\\ \hyperlink{anglemark}{Anglemark(点list, options)}\>角ã®å°ã‚’入れる\\ \hyperlink{setarrow}{Setarrow(options)}\>矢線をスタイルをè¨å®šã™ã‚‹\\ \hyperlink{arrowdata}{Arrowdata(name.[始点,終点],options)}\>2点間をçµã¶çŸ¢ç·šã‚’æã\\ @@ -8041,9 +8228,9 @@ Cinderellaã§ä½¿ã£ã¦ã„る用語ã«æ¬¡ã®ã‚‚ã®ãŒã‚る。 \hyperlink{pointdata}{Pointdata(name,点list,options)}\>点データを作る\\ \hyperlink{polygonplot}{Polygonplot(name,点list,æ•´æ•°,options)}\>æ£å¤šè§’形をæã\\ \hyperlink{putintersect}{Putintersect(点å,PD1,PD2)}\>2曲線ã®äº¤ç‚¹ã‚’作る\\ -\hyperlink{putoncurve}{PutonCurve(name,PD,åˆæœŸå€¤)}\>曲線上ã«ç‚¹ã‚’作る\\ -\hyperlink{putonline}{PutonLine(点å,座標1,座標2)}\>直線上ã«ç‚¹ã‚’作る\\ -\hyperlink{putonseg}{PutonSeg(点å,座標1,座標2)}\>線分上ã«ç‚¹ã‚’作る\\ +\hyperlink{putoncurve}{Putoncurve(name,PD,åˆæœŸå€¤)}\>曲線上ã«ç‚¹ã‚’作る\\ +\hyperlink{putonline}{Putonline(点å,座標1,座標2)}\>直線上ã«ç‚¹ã‚’作る\\ +\hyperlink{putonseg}{Putonseg(点å,座標1,座標2)}\>線分上ã«ç‚¹ã‚’作る\\ \hyperlink{putpoint}{Putpoint(点å,座標1,座標2)}\>点を作る\\ \hyperlink{reflectdata}{Reflectdata(name,PD,点list,options)}\>プãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã®é¡æ˜ を作æˆ\\ \hyperlink{reflectpoint}{Reflectpoint(点,対称点/対称軸)}\>点ã®é¡æ˜ を作æˆ\\ @@ -8059,11 +8246,11 @@ Cinderellaã§ä½¿ã£ã¦ã„る用語ã«æ¬¡ã®ã‚‚ã®ãŒã‚る。 \hyperlink{translatepoint}{Translatepoint(点,ベクトル)}\>点を平行移動ã™ã‚‹\\ \hyperlink{vtickmark}{Vtickmark([横座標 , æ–¹å‘ , æ–‡å—])}\>縦軸ã«ç›®ç››ã‚Šã‚’æã\\ ã€ä½œè¡¨ã€‘\\ -\hyperlink{changetablestyle}{ChangeTablestyle(罫線list, options)}\>Table ã®ç½«ç·šã®æ画オプションを変更ã™ã‚‹ã€‚\\ +\hyperlink{changetablestyle}{Changetablestyle(罫線list, options)}\>Table ã®ç½«ç·šã®æ画オプションを変更ã™ã‚‹ã€‚\\ \hyperlink{findcell}{Findcell(列番å·, 行番å·)}\>セルã®æƒ…å ±listã‚’è¿”ã™\\ \hyperlink{putcell}{Putcell (列番å·, 行番å·, ä½ç½®, æ–‡å—)} \>セルã«æ–‡å—列を入れる\\ -\hyperlink{putcol}{PutcoL (列番å·, ä½ç½®ï¼Œæ–‡å—列list)} \>1列ã«é †ã«æ–‡å—を書ã入れる\\ -\hyperlink{putcolexpr}{PutcoLexpr (列番å·, ä½ç½®ï¼Œæ–‡å—列list)}\>1列ã«é †ã«\TeX 書å¼ã®æ–‡å—を書ã入れる\\ +\hyperlink{putcell}{Putcellexpr (列番å·, 行番å·, ä½ç½®, æ–‡å—)} \>セルã«æ•°å¼ã‚’入れる\\\hyperlink{putcol}{Putcol (列番å·, ä½ç½®ï¼Œæ–‡å—列list)} \>1列ã«é †ã«æ–‡å—を書ã入れる\\ +\hyperlink{putcolexpr}{Putcolexpr (列番å·, ä½ç½®ï¼Œæ–‡å—列list)}\>1列ã«é †ã«\TeX 書å¼ã®æ–‡å—を書ã入れる\\ \hyperlink{putrow}{Putrow (行番å·, ä½ç½®ï¼Œæ–‡å—列list)} \>1行ã«é †ã«æ–‡å—を書ã入れる\\ \hyperlink{putrowexpr}{Putrowexpr (行番å·, ä½ç½®ï¼Œæ–‡å—列list)} \>1行ã«é †ã«\TeX 書å¼ã®æ–‡å—を書ã入れる\\ \hyperlink{tabledata}{Tabledata("" , 縦横 ,除外 , options)}\>表ã®æž を作æˆã™ã‚‹\\ @@ -8125,6 +8312,9 @@ Cinderellaã§ä½¿ã£ã¦ã„る用語ã«æ¬¡ã®ã‚‚ã®ãŒã‚る。 \hyperlink{texcom}{Texcom(コード)} \>\TeX ã®ã‚³ãƒ¼ãƒ‰ã‚’書ã出ã™\\ \hyperlink{textformat}{Textformat(æ•°,æ¡æ•°)} \>å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡æ•°ã‚’指定ã—ã¦æ•°å€¤ã‚’æ–‡å—列化ã™ã‚‹\\ \hyperlink{windispg}{Windispg()}\>定義ã•ã‚ŒãŸãƒ—ãƒãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã‚’æç”»é¢ã«æã\\ +\hyperlink{fracform}{Fracform(æ•°,分æ¯ãƒªã‚¹ãƒˆ)}\>簡易TeX-like書å¼ã®æ–‡å—列を返ã™\\ +\hyperlink{totexform}{Totexform(TeX-like書å¼)}\>TeX書å¼ã®æ–‡å—列を返ã™\\ +\hyperlink{tocindyform}{Tocindyform(TeX-like書å¼}\>Cindy書å¼ã®æ–‡å—列を返ã™\\ \vspace{\baselineskip} ã€ï¼²ã¨ã®é€£æºã€‘\\ \hyperlink{boxplot}{Boxplot(åå‰,データ,ä½ç½®,高ã•,option)} \>ç®±ã²ã’図をæã\\ @@ -8203,7 +8393,7 @@ Cinderellaã§ä½¿ã£ã¦ã„る用語ã«æ¬¡ã®ã‚‚ã®ãŒã‚る。 \hyperlink{phparadata}{Phparadata(name,name2,options)}\>多é¢ä½“を陰線処ç†ã—ã¦æã\\ \hyperlink{pointdata3d}{Pointdata3d(åå‰,点list,options)} \>空間点ã®ãƒ‡ãƒ¼ã‚¿ã‚’作æˆã™ã‚‹\\ \hyperlink{putaxes3d}{Putaxes3d([x,y,z])}\>軸上ã«å¹¾ä½•ç‚¹ã‚’ã¨ã‚‹\\ -\hyperlink{putonCurve3d}{PutonCurve3d(点å,PD)}\>空間曲線上ã«ç‚¹ã‚’ã¨ã‚‹\\ +\hyperlink{putonCurve3d}{Putoncurve3d(点å,PD)}\>空間曲線上ã«ç‚¹ã‚’ã¨ã‚‹\\ \hyperlink{putonseg3d}{Putonseg3d(点å,点1,点2)}\>線分上ã«ç‚¹ã‚’ã¨ã‚‹\\ \hyperlink{putpoint3d}{Putpoint3d(list,option)}\>空間点をã¨ã‚‹\\ \hyperlink{readobj}{Readobj(ファイルå)}\>objファイルをèªã¿è¾¼ã‚€\\ diff --git a/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeLinuxE.tex b/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeLinuxE.tex index d42acd524ac..b366eff95b6 100644 --- a/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeLinuxE.tex +++ b/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeLinuxE.tex @@ -65,13 +65,13 @@ How to install KeTCindy(Linux) \item Style files for \ketcindy\ will be copied and mktexlsr will be executed. \item In Cinderella/PlugIns\\ \hspace*{5mm}KetcindyPluign.jar will be copied.\\ - \hspace*{5mm}ketcindy.ini will be generated . + \hspace*{5mm}ketcindy.ini will be generated or remade(if selected). + \item TeX(typeset) will be usually latex,xelatex or pdflatex. \end{itemize} \item Open setwork.sh with a text editor and confirm/modify it. \begin{itemize} \item Execute on terminal:\\ \hspace*{10mm}\verb|bash setwork.sh| - \item TeX(typeset) will be usually latex,xelatex or pdflatex. \item Contents of “work†will be copied into "ketcindy"(work folder). \item \verb|.ketcindy.conf| will be also generated in User's home.\\ \hspace*{10mm}You can change the setting of PasthT, Mackc, etc. diff --git a/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeLinuxJ.tex b/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeLinuxJ.tex index 03595f047f4..301b47d4a79 100644 --- a/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeLinuxJ.tex +++ b/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeLinuxJ.tex @@ -68,16 +68,17 @@    \verb|sudo bash setketcindy.sh| \item scriptsã®ä¸èº«ãŒ\TeX ã«ã‚³ãƒ”ーã•ã‚Œã‚‹ \item ketcindyã®styleファイルãŒ\TeX ã«ã‚³ãƒ”ーã•ã‚ŒmktexlsrãŒå®Ÿè¡Œã•ã‚Œã‚‹ï¼Ž - \item Cinderellaã®Pluginsã«KetcindyPlugin.jarãŒã‚³ãƒ”ーã•ã‚Œketcindy.iniãŒä½œæˆã•ã‚Œã‚‹ï¼Ž + \item Cinderellaã®Pluginsã«KetcindyPlugin.jarãŒã‚³ãƒ”ーã•ã‚Œã‚‹ï¼Ž + \item Pluginsã«ketcindy.iniãŒä½œæˆã•ã‚Œã‚‹ï¼ˆæ–°è¦ã¾ãŸã¯å†ä½œæˆã®å ´åˆï¼‰ + \item タイプセットã®æ–¹æ³•ï¼ˆTeXã®ç¨®é¡žï¼‰\\ + \hspace*{10mm}通常ã¯ï¼Œplatex (p)ã¾ãŸã¯uplatex(u)ã‚’é¸ã¶ï¼Ž \end{itemize} \item setwork.shをテã‚ストエディタã§é–‹ã„ã¦ï¼Œãƒ‘スを確èªï¼Œä¿®æ£ã™ã‚‹ï¼Ž \begin{itemize} \item ターミナルã§ä»¥ä¸‹ã‚’実行ã™ã‚‹ï¼Ž\\    \verb|bash setketwork.sh| \item 作æ¥ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªketcindyãŒãƒ¦ãƒ¼ã‚¶ãƒ›ãƒ¼ãƒ ã«ä½œæˆã•ã‚Œã‚‹ï¼Ž - \item タイプセットã®æ–¹æ³•ï¼ˆ\TeX ã®ç¨®é¡žï¼‰\\ - \hspace*{10mm}通常ã¯ï¼Œplatex (p)ã¾ãŸã¯uplatex(u)ã‚’é¸ã¶ï¼Ž - \item ketcindyフォルダã«workフォルダã®ä¸èº«ãŒã‚³ãƒ”ーã•ã‚Œã‚‹ï¼Ž + \item ketcindyフォルダã«workフォルダã®ä¸èº«ãŒã‚³ãƒ”ーã•ã‚Œã‚‹ï¼Ž \item \verb|.ketcindy.conf|(ä¸å¯è¦–ファイルã ãŒç·¨é›†å¯èƒ½ï¼‰ãŒãƒ¦ãƒ¼ã‚¶ãƒ›ãƒ¼ãƒ ã«ä½œæˆã•ã‚Œã‚‹ï¼Ž\\ \hspace*{10mm}注)\TeX を切り替ãˆã‚‹ã¨ããªã©ã¯ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ä¿®æ£ã™ã‚‹ï¼Ž \item マニュアルもコピーã•ã‚Œã‚‹ï¼Ž diff --git a/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeMacE.tex b/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeMacE.tex index bafe8c7c61c..67142fe8964 100644 --- a/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeMacE.tex +++ b/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeMacE.tex @@ -56,6 +56,7 @@ How to install KeTCindy(Mac) \end{itemize} \item Open ketcindy(-master)/forMac. \begin{itemize} + \item[Rem)]If the folder name includes spaces, remove them. \item[Rem)]If you use TeX other than TeXLIve/KeTTeX, \begin{itemize} \item Open setketcindy.command with a text editor. @@ -70,7 +71,8 @@ How to install KeTCindy(Mac) \item ketcindystyle files will be copied and mktexlsr will be executed. \item In Cinderella/PlugIns\\ \hspace*{5mm}KetcindyPluign.jar will be copied.\\ - \hspace*{5mm}ketcindy.ini will be generated . + \hspace*{5mm}ketcindy.ini will be generated or remade(if selected). + \item TeX(typeset) will be usually latex,xelatex or pdflatex. \end{itemize} \item Double-click setwork.command. \begin{itemize} @@ -78,7 +80,6 @@ How to install KeTCindy(Mac) \end{itemize} \begin{itemize} \item Work directory "ketcindy" will be generated in User's home. - \item TeX(typeset) will be usually latex,xelatex or pdflatex. \item Contents of “work†will be copied into "ketcindy" \item \verb|.ketcindy.conf| will be also generated in User's home.\\ \hspace*{10mm}You can change the setting of PasthT, Mackc, etc. @@ -95,7 +96,7 @@ How to install KeTCindy(Mac) \item Test run of KeTCindy \begin{enumerate}[(1)] \item Double-click "template1basic.cdy" in work directory "ketcindy".\\ - \hspace*{10mm}Then a frame in white appear on the screen. \end{enumerate} + \hspace*{10mm}Then a frame in white appear on the screen. \item Press "Figure" button at the top left, then the final PDF output is displayed. \begin{itemize} \item[Rem)]To close the window of Terminal when the process exits : @@ -103,8 +104,9 @@ How to install KeTCindy(Mac) \item Start \verb|Terminal|.\\ \hspace*{10mm}Preferences \verb|>| Shell \verb|>| "Colse if the shell exited clearly" \end{itemize} + \item[Rem)]It will be better to delete installer folder "ketcindy(-master)" . \end{itemize} - + \end{enumerate} \item Set Texworks if necessary. For example, in case of KeTTeX, \begin{itemize} \item Downloadable from \url{https://github.com/TeXworks/texworks/releases/}. @@ -118,9 +120,14 @@ How to install KeTCindy(Mac) \item Install Xcode if you use gcc for drawings of surface. \begin{itemize} \item[Rem)]f you want to use only gcc, execute on Terminal:\\ - \hspace*{10mm}\verb|sudo xcode-select —install| + \hspace*{10mm}\verb|sudo xcode-select --install| \end{itemize} +\item Others + \begin{itemize} + \item Terminal command to allow to execute all aplications (Sierra or later)\\ +\hspace*{20mm}sudo spctl --master-disable + \end{itemize} \end{enumerate} \end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeMacJ.tex b/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeMacJ.tex index ba98fdd75dd..eaab9903d14 100644 --- a/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeMacJ.tex +++ b/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeMacJ.tex @@ -79,16 +79,17 @@ KETCindyã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« (Mac) \begin{itemize} \item scriptsã®ä¸èº«ãŒTeXã«ã‚³ãƒ”ーã•ã‚Œã‚‹ \item ketcindyã®styleファイルãŒTeXã«ã‚³ãƒ”ーã•ã‚ŒmktexlsrãŒå®Ÿè¡Œã•ã‚Œã‚‹ï¼Ž - \item Cinderellaã®Pluginsã«KetcindyPlugin.jarをコピー,ketcindy.iniãŒä½œæˆã•ã‚Œã‚‹ï¼Ž - \end{itemize} + \item Cinderellaã®Pluginsã«KetcindyPlugin.jarãŒã‚³ãƒ”ーã•ã‚Œã‚‹ï¼Ž + \item Pluginsã«ketcindy.iniãŒä½œæˆã•ã‚Œã‚‹ï¼ˆæ–°è¦ã¾ãŸã¯å†ä½œæˆã®å ´åˆï¼‰ + \item タイプセットã®æ–¹æ³•ï¼ˆTeXã®ç¨®é¡žï¼‰\\ + \hspace*{10mm}通常ã¯ï¼Œplatex (p)ã¾ãŸã¯uplatex(u)ã‚’é¸ã¶ï¼Ž + \end{itemize} \item setwork.commandをダブルクリック \begin{itemize} \item[注)]é–‹ã‹ãªã„ã¨ãã¯Control+クリックã§ã‚¿ãƒ¼ãƒŸãƒŠãƒ«ã‚’é¸ã¶ï¼Ž \end{itemize} \begin{itemize} \item 作æ¥ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªketcindyãŒãƒ¦ãƒ¼ã‚¶ãƒ›ãƒ¼ãƒ ã«ä½œæˆã•ã‚Œã‚‹ï¼Ž - \item タイプセットã®æ–¹æ³•ï¼ˆTeXã®ç¨®é¡žï¼‰\\ - \hspace*{10mm}通常ã¯ï¼Œplatex (p)ã¾ãŸã¯uplatex(u)ã‚’é¸ã¶ï¼Ž \item ketcindyフォルダã«workフォルダã®ä¸èº«ãŒã‚³ãƒ”ーã•ã‚Œã‚‹ï¼Ž \item \verb|.ketcindy.conf|(ä¸å¯è¦–ファイルã ãŒç·¨é›†å¯èƒ½ï¼‰ãŒãƒ¦ãƒ¼ã‚¶ãƒ›ãƒ¼ãƒ ã«ä½œæˆã•ã‚Œã‚‹ï¼Ž\\ \hspace*{10mm}注)TeXを切り替ãˆã‚‹ã¨ããªã©ã¯ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ä¿®æ£ã™ã‚‹ï¼Ž @@ -120,6 +121,7 @@ KETCindyã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« (Mac) \hspace*{5mm}ターミナル>環境è¨å®š \verb|>|(プãƒãƒ•ã‚¡ã‚¤ãƒ«ï¼‰\verb|>| シェル\\ \hspace*{10mm}「シェルãŒæ£å¸¸ã«çµ‚了ã—ãŸå ´åˆé–‰ã˜ã‚‹ã€ã‚’é¸æŠž \end{itemize} + \item[注)]インストール用ã®ketcindy(-master)フォルダã¯å‰Šé™¤ã—ãŸæ–¹ãŒæ··ä¹±ã—ãªã„. \end{itemize} \end{enumerate} @@ -149,7 +151,7 @@ KETCindyã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« (Mac) \item 曲é¢æç”»ã®ãŸã‚ã«ã¯, gccãŒå¿…è¦ã§ã‚る. \item XcodeãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ãªã‘ã‚Œã°ï¼Œã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹ï¼Ž\\ \hspace*{5mm}注) ターミナルã§æ¬¡ã‚’実行ã™ã‚Œã°ï¼Œgccã ã‘ãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã‚‹ï¼Ž\\ - \hspace*{20mm}\verb|sudo xcode-select —install| + \hspace*{20mm}\verb|sudo xcode-select --install| \end{itemize} \item 手動ã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹å ´åˆï¼ˆKeTTeX)\\ diff --git a/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeWinE.tex b/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeWinE.tex index 49cae8839b2..58aa67c2b41 100644 --- a/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeWinE.tex +++ b/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeWinE.tex @@ -64,7 +64,7 @@ How to install KeTCindy(Windows) \item Edit paths in it. \end{itemize} \end{itemize} - \item Right click the following batch file setketcindy.bat and select "Run as adiministrator".\\ + \item Right click a following batch file setketcindy.bat and select "Run as adiministrator".\\ \hspace*{10mm}\Ltab{15mm}{KeTTeX} setketcindy.bat\\ \hspace*{10mm}\Ltab{15mm}{TeXLive} setketcindytexlive.bat\\ \hspace*{10mm}\Ltab{15mm}{Others} edited setketcindy.bat @@ -73,7 +73,10 @@ How to install KeTCindy(Windows) \item ketcindystyle files will be copied and mktexlsr will be executed. \item In Cinderella/PlugIns\\ \hspace*{5mm}KetcindyPluign.jar will be copied.\\ - \hspace*{5mm}ketcindy.ini will be generated . + \hspace*{5mm}ketcindy.ini will be generated (if make/remake is chosen). + \item TeX(typeset) will be usually latex,xelatex or pdflatex. + \item Input the version numbers of R, Maxima, for example 3.4.2,\ 5.37.3. + \end{itemize} \item Double-click setwork.bat. \begin{itemize} @@ -81,9 +84,7 @@ How to install KeTCindy(Windows) \end{itemize} \begin{itemize} \item Work directory "ketcindy" will be generated in User's home. - \item TeX(typeset) will be usually latex,xelatex or pdflatex. - \item Input the version numbers of R, Maxima, for example 3.4.2,\ 5.37.3. - \item Contents of “work†will be copied into "ketcindy" + \item Contents of “work†will be copied into "ketcindy" \item \verb|.ketcindy.conf| will be also generated in User's home.\\ \hspace*{10mm}You can change the setting of PasthT, Mackc, etc. \item Template of "ketcindy.conf" will be also copied to work directory. @@ -99,7 +100,7 @@ How to install KeTCindy(Windows) \item Test run of KeTCindy \begin{enumerate}[(1)] \item Double-click "template1basic.cdy" in work directory "ketcindy".\\ - \hspace*{10mm}Then a frame in white appear on the screen. \end{enumerate} + \hspace*{10mm}Then a frame in white appear on the screen. \item Press "Figure" button at the top left, then the final PDF output is displayed. \begin{itemize} \item[Rem)]To close the window of Terminal when the process exits : @@ -107,7 +108,9 @@ How to install KeTCindy(Windows) \item Start \verb|Terminal|.\\ \hspace*{10mm}Preferences > Shell \verb|>| "Colse if the shell exited clearly" \end{itemize} + \item[Rem)]It will be better to delete installer folder "ketcindy(-master)" . \end{itemize} + \end{enumerate} \item Set Texworks if necessary. For example, in case of KeTTeX, \begin{itemize} diff --git a/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeWinJ.tex b/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeWinJ.tex index 23c46b9d5ea..199fed6ce28 100644 --- a/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeWinJ.tex +++ b/Master/texmf-dist/doc/support/ketcindy/source/readme/ReadmeWinJ.tex @@ -69,22 +69,23 @@ KETCindyã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« (Windows) \item パスを修æ£ã™ã‚‹ï¼Ž \end{itemize} \end{itemize} - \item 次ã®ãƒãƒƒãƒãƒ•ã‚¡ã‚¤ãƒ«ã‚’å³ã‚¯ãƒªãƒƒã‚¯ã€Œç®¡ç†è€…ã¨ã—ã¦å®Ÿè¡Œã€ã‚’é¸ã¶ï¼Ž\\ - \hspace*{3zw}\Ltab{5zw}{KeTTeX} setketcindy.bat\\ + \item 次ã®ã„ãšã‚Œã‹ã®ãƒãƒƒãƒãƒ•ã‚¡ã‚¤ãƒ«ã‚’å³ã‚¯ãƒªãƒƒã‚¯ã€Œç®¡ç†è€…ã¨ã—ã¦å®Ÿè¡Œã€ã‚’é¸ã¶ï¼Ž\\ + \hspace*{3zw}\Ltab{5zw}{KeTTeX} setketcindykettex.bat\\ \hspace*{3zw}\Ltab{5zw}{TeXLive} setketcindytexlive.bat\\ \hspace*{3zw}\Ltab{5zw}{W32TeX} setketcindyw32J.bat\\ \hspace*{3zw}\Ltab{5zw}{ä»–ã®TeX} setketcindy.bat(è¦ä¿®æ£ï¼‰ \begin{itemize} \item scriptsã®ä¸èº«ãŒTeXã«ã‚³ãƒ”ーã•ã‚Œã‚‹ \item ketcindyã®styleファイルãŒTeXã«ã‚³ãƒ”ーã•ã‚ŒmktexlsrãŒå®Ÿè¡Œã•ã‚Œã‚‹ï¼Ž - \item Cinderellaã®Pluginsã«KetcindyPlugin.jarをコピー,ketcindy.iniãŒä½œæˆã•ã‚Œã‚‹ï¼Ž + \item Cinderellaã®Pluginsã«KetcindyPlugin.jarãŒã‚³ãƒ”ーã•ã‚Œã‚‹ï¼Ž + \item Pluginsã«ketcindy.iniãŒä½œæˆã•ã‚Œã‚‹ï¼ˆä½œæˆã¾ãŸã¯å†ä½œæˆã‚’é¸ã‚“ã å ´åˆï¼‰ï¼Ž + \item タイプセットã®æ–¹æ³•ï¼ˆTeXã®ç¨®é¡žï¼‰\\ + \hspace*{10mm}通常ã¯ï¼Œplatex (p)ã¾ãŸã¯uplatex(u)ã‚’é¸ã¶ï¼Ž + \item R,\ Maximaã§ã¯ï¼Œãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ï¼ˆ3.4.2,\ 5.37.3ãªã©ï¼‰ã‚’入れる. \end{itemize} \item setwork.batをダブルクリック \begin{itemize} \item 作æ¥ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªketcindyãŒãƒ¦ãƒ¼ã‚¶ãƒ›ãƒ¼ãƒ ã«ä½œæˆã•ã‚Œã‚‹ï¼Ž - \item タイプセットã®æ–¹æ³•ï¼ˆTeXã®ç¨®é¡žï¼‰\\ - \hspace*{10mm}通常ã¯ï¼Œplatex (p)ã¾ãŸã¯uplatex(u)ã‚’é¸ã¶ï¼Ž - \item R,\ Maximaã§ã¯ï¼Œãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ï¼ˆ3.4.2,\ 5.37.3ãªã©ï¼‰ã‚’入れる. \item ketcindyフォルダã«workフォルダã®ä¸èº«ãŒã‚³ãƒ”ーã•ã‚Œã‚‹ï¼Ž \item \verb|.ketcindy.conf|(編集å¯èƒ½ï¼‰ãŒãƒ¦ãƒ¼ã‚¶ãƒ›ãƒ¼ãƒ ã«ä½œæˆã•ã‚Œã‚‹ï¼Ž\\ \hspace*{10mm}注)TeXを切り替ãˆã‚‹ã¨ããªã©ã¯ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ä¿®æ£ã™ã‚‹ï¼Ž @@ -116,6 +117,7 @@ KETCindyã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« (Windows) \hspace*{5mm}ターミナル>環境è¨å®š \verb|>|(プãƒãƒ•ã‚¡ã‚¤ãƒ«ï¼‰\verb|>| シェル\\ \hspace*{10mm}「シェルãŒæ£å¸¸ã«çµ‚了ã—ãŸå ´åˆé–‰ã˜ã‚‹ã€ã‚’é¸æŠž \end{itemize} + \item[注)]インストール用ã®ketcindy(-master)フォルダã¯å‰Šé™¤ã—ãŸæ–¹ãŒæ··ä¹±ã—ãªã„. \end{itemize} \end{enumerate} diff --git a/Master/texmf-dist/scripts/ketcindy/allbuttons.cdy b/Master/texmf-dist/scripts/ketcindy/allbuttons.cdy Binary files differindex 0925ce4386a..71627998d8a 100644 --- a/Master/texmf-dist/scripts/ketcindy/allbuttons.cdy +++ b/Master/texmf-dist/scripts/ketcindy/allbuttons.cdy diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylib3dlogr.txt b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylib3dlogr.txt index d95eabc503f..169d22e7674 100644 --- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylib3dlogr.txt +++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylib3dlogr.txt @@ -1,3 +1,41 @@ +// 20190511 +// Start3d changed (KetcindyDataList initialized) +// 20190506 +// Skeletonparadata debugged ( parseparse for pfe3d ) +// Vertexedgeface debugged (vname) +// 20190505 +// Xyzax3data changed ( Lightarrowdata used,"axx,axy,axz" generated ) +// isselected changed to Ptselected +// text(pt) => pt.name +// PointonCurve => Poinoncurve +// Makeskeletondata changed (floor() => re(floor()) +// 20190504 +// Ketinit3d changed (Slider part moved to Start3d) +// Start3d changed ( optionjs (slider,removept) added ) +// Start3d debugged ( SLIDEFLG ) +// 20190502 +// Vertexedgeface changed ( Label=n ) +// VertexEdgeFace added ( for compatibility with conventional files) +// 20190416 +// Xyzaxparaname debugged ( Label ) +// 20190415 +// parse( ..= ) changed ( ; added ) +// 20190413 +// Nohiddenbyfaces debugged (for Arg1,Arg2, Arg3) +// 20190401 +// VertexEdgeFace changed ( for MeasureDepth==1 ) +// Nohiddenbyfaces debugged (for Arg1,Arg2 and making faceL) +// Mkseg3d changed ( no display when "geoseg3d" is null ) +// IntersectsgpL changed ( varialble set when "draw" ) +// 20190331 +// VertexEdgeFace changed (Labelsize option added) +// Nohiddensegs, Nohiddenbyfaces majorly changed (segL,faceL) +// 20190330 +// Spacecurve debugged (Precision, string data) +// 20190329 +// Start3d,Ptseg3d Setangle changed/debugged (PTEXCEPTION) +// 20190320 +// Skeletonparadata maintained, debugged (FI => F) // 20190301 // MeasureDepth => Measuredepth // 20190209 diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylib3dr.cs b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylib3dr.cs index f14e3ff603e..956e726b438 100644 --- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylib3dr.cs +++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylib3dr.cs @@ -14,27 +14,21 @@ // along with this program. If not, see <http://www.gnu.org/licenses/> // -println("ketcindylib3d[20190301] loaded"); +println("ketcindylib3d[20190511] loaded"); //help:start(); ////%Ketinit3d start//// Ketinit3d():=Ketinit3d(1); -Ketinit3d(sf):=( - regional(tmp); - tmp=round(4*SW.y)/4; -// Ketinit3d(sf,[round(SW.x)+1,tmp-0.5,tmp-1]); - Ketinit3d(sf,[-5,tmp-0.5,tmp-1]); -); -Ketinit3d(subflg,position):=( +Ketinit3d(subflg):=( //help:Ketinit3d(); //help:Ketinit3d(0); - regional(ctr,tmp,tmp1,tmp2,tmp3,tmp4,xPos,yTh,yPh); - BezierNumber3=1; //15.02.28 + regional(ctr,tmp,tmp1,tmp2,tmp3,tmp4); + BezierNumber3=1; //15.02.28 // no ketjs on if(!islist(BZLIST3), BZLIST3=[]; //15.02.28 , - tmp=apply(allpoints(),text(#)); + tmp=apply(allpoints(),#.name); //190505 tmp1=select(tmp,substring(#,length(#)-1,length(#))=="p"); tmp2=[]; forall(tmp1,ctr, @@ -45,35 +39,10 @@ Ketinit3d(subflg,position):=( ); ); BZLIST3=tmp2; - ); - SUBSCR=subflg; + ); // no ketjs off + SUBSCR=subflg; // no ketjs + // SUBSCR=0 // only ketjs Setwindow("Msg=no"); - if(length(position)>2, - xPos=position_1; - yTh=position_2; - yPh=position_3; - , - xPos=0; - yTh=position_1; - yPh=position_2; - ); -// THETA=60*pi/180; -// PHI=30*pi/180; - FocusPoint=[0,0,0]; - EyePoint=[5,5,5]; - Listplot("th",[[xPos,yTh],[xPos+9,yTh]],["notex","linecolor->[0,1,0]","Msg=no"]); - Listplot("ph",[[xPos,yPh],[xPos+9,yPh]],["notex","linecolor->[0,1,0]","Msg=no"]); - //16.02.10 - PutonCurve("TH",sgth,[xPos,xPos+9,"Msg=no"]); - PutonCurve("FI",sgph,[xPos,xPos+9,"Msg=no"]); - THETA=(TH.x-xPos)*20*pi/180; - PHI=(FI.x-xPos)*40*pi/180; -// Defvar("THETA",THETA); // 16.06.20 -// Defvar("PHI",PHI); // 16.06.20 - drawtext([xPos-0.8,yTh-0.1],Sprintf((TH.x-xPos)*20,2),align->"right"); //17.05.02 - drawtext([xPos-0.8,yPh-0.1],Sprintf((FI.x-xPos)*40,2),align->"right"); //17.05.02 - tmp="Setangle("+text((TH.x-xPos)*20)+","+text((FI.x-xPos)*40)+")"; - GLIST=append(GLIST,tmp); Addax(0); TSIZE=10; TSIZEZ=10; @@ -82,55 +51,84 @@ Ketinit3d(subflg,position):=( ////%Ketinit3d end//// ////%Start3d start//// -Start3d():=Start3d([]); -Start3d(ptexception):=( +Start3d():=Start3d([],[]); +Start3d(Arg):=( //190503from + regional(tmp); + tmp=select(Arg,indexof(#,"=")>0); + if(length(tmp)==0, + Start3d(Arg,[]); + , + Start3d([],Arg); + ); +); +Start3d(ptexception,optionjs):=(//190503to //help:Start3d(); //help:Start3d(["A","B"](exceptionptlist)); +//help:Start3d(optionjs=["Slider=n","Removept=[]"); regional(xmn,xMx,ymn,yMx,pt,pt3,pt2, xPos,yTh,yPh,Eps,tmp,tmp1,tmp2,tmp3,tmp4); PTEXCEPTION=[]; - Setfiles(Namecdy); //180608 - ConstantListC=[[50,50],[5000,1500,500,200],[0.00001,0.01,0.1]]; + SLIDEFLG="Y"; + forall(optionjs, + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,1)); + if(tmp1=="S", + SLIDEFLG=Toupper(substring(tmp_2,0,1)); + ); + if(tmp1=="R", + tmp2=tmp_2; + if(substring(tmp2,0,1)=="[",tmp2=substring(tmp2,1,length(tmp2)-1)); + tmp2=tokenize(tmp2,","); + REMOVEPTJS=concat(REMOVEPTJS,tmp2); + ); + ); + Setfiles(Namecdy); //180608 // no ketjs + ConstantListC=[[50,50],[5000,1500,500,200],[0.00001,0.01,0.1]]; // no ketjson FuncListC=[]; CommandListC=[]; //180531 CutFunList=[];//180601 EraseList=[];//180601 - ADDPACK=[]; //180606 + ADDPACK=[]; //180606 // no ketjs off GCLIST=[]; - GLIST=[]; + GLIST=[]; // no ketjs on FUNLIST=[]; COM0thlist=[]; COM1stlist=[]; - COM2ndlist=[]; + COM2ndlist=[]; // no ketjs off SEG3dlist=[]; - OutFileList=[]; + OutFileList=[]; // no ketjs on FigPdfList=[]; // 16.04.08 ErrFlag=0; - OBJCMD=[]; // 16.11.29from + OBJCMD=[]; // 161129from OCNAME=Fhead; - OCOPTION=["m","v"];// 16.11.29until + OCOPTION=["m","v"];// 161129to //no ketjs off + KETJSOP=[]; //190129 + REMOVEPTJS=[]; SLIDEFLG="Y"; //190504 + KetcindyjsDataList=[]; //190511 ArrowlineNumber=1; // 16.01.31 ArrowheadNumber=1; BezierNumber=1; //16.01.31 BezierNumber3=1; //16.08.19 - Fnametex=Fhead+".tex"; // 15.04.06 + Fnametex=Fhead+".tex"; // 15.04.06 //no ketjs on FnameR=Fhead+".r"; FnameRbody=Fhead+"body.r"; - Fnameout=Fhead+".txt"; + Fnameout=Fhead+".txt"; // no ketjs off Setwindow("Msg=no"); // 16.06.20from - tmp=round(4*SW.y)/4; - xPos=-5; yTh=tmp-0.5; yPh=tmp-1; - Slider("TH",[xPos,yTh],[xPos+9,yTh],["Color=green"]); //190209 - Slider("FI",[xPos,yPh],[xPos+9,yPh],["Color=green"]); //190209 - drawtext([xPos-0.8,yTh-0.1],Sprintf((TH.x-xPos)*20,2),align->"right"); //17.05.02 - drawtext([xPos-0.8,yPh-0.1],Sprintf((FI.x-xPos)*40,2),align->"right"); //17.05.02 - tmp="Setangle(" //no ketjs on - +format((TH.x-xPos)*20,5)+"," + tmp=round(4*SW.y)/4; + xPos=-5; yTh=tmp-0.5; yPh=tmp-1; +// if(SLIDEFLG=="Y", // only ketjs //190503from + Slider("TH",[xPos,yTh],[xPos+9,yTh],["Color=green"]); //190209 + Slider("FI",[xPos,yPh],[xPos+9,yPh],["Color=green"]); //190209 + drawtext([xPos-0.8,yTh-0.1],Sprintf((TH.x-xPos)*20,2),align->"right"); //17.05.02 + drawtext([xPos-0.8,yPh-0.1],Sprintf((FI.x-xPos)*40,2),align->"right"); //17.05.02 +// ); // only ketjs //190503to + tmp="Setangle(" //no ketjs on + +format((TH.x-xPos)*20,5)+"," +format((FI.x-xPos)*40,5)+")"; GLIST=append(GLIST,tmp); //no ketjs off THETA=(TH.x-xPos)*20*pi/180; PHI=(FI.x-xPos)*40*pi/180; // 16.06.20until - if(isselected(TH) % isselected(FI), // 17.05.18from + if(Ptselected(TH) % Ptselected(FI), //190505 if(length(Ch)>0, ChNum=Ch_(length(Ch)); if(ChNum==0, ChNum=1); @@ -138,8 +136,8 @@ Start3d(ptexception):=( ChNum=1; ); Ch=[0]; - );// 17.05.18to - if(SUBSCR==1, + ); + if(SUBSCR==1, // no ketjs on xmn=SW.x+NE.x-SW.x; xMx=NE.x+NE.x-SW.x; ymn=SW.y; @@ -148,18 +146,18 @@ Start3d(ptexception):=( [xmn,ymn],[xMx,ymn]],color->[1,1,1]); connect([[NE.x-SW.x,yMx],[NE.x-SW.x,ymn]], color->[0.5,0.5,0.5]); - ); + ); // no ketjs off // for Presentation //17.07.01from //no ketjs on letterc=[0.98,0.13,0,0.43]; boxc=[0,0.32,0.52,0]; shadowc=[0,0,0,0.5]; mboxc="yellow"; //17.03.02 regional debugged SlideColorList=[letterc,boxc,boxc,boxc,shadowc,shadowc,6,1.3, letterc,mboxc,mboxc,mboxc,62,2,letterc]; - ThinDense=0.1; //17.07.01to //no ketjs off + ThinDense=0.1; //17.07.01to //no ketjs off tmp=ptexception; //181106 if(!islist(tmp),tmp=[tmp]); //190209 - PTEXCEPTION=concat(PTEXCEPTION,tmp); //190209 + PTEXCEPTION=concat(PTEXCEPTION,tmp); //190209 // if(!islist(tmp),PTEXCEPTION=[tmp],PTEXCEPTION=tmp); - Ptseg3data(PTEXCEPTION); //16.08.23 + Ptseg3data(PTEXCEPTION);//16.08.23 // PTEXCEPTION=ptexception; //180916 //190209[del] ); ////%Start3d end//// @@ -180,14 +178,14 @@ Setangle(theta,phi):=( //16.12.24 FI.x=phi/40+xPos; // drawtext([xPos-0.8,yTh-0.1],text(theta)); //17.05.05 // drawtext([xPos-0.8,yPh-0.1],text(phi)); - tmp="Setangle(" + tmp="Setangle(" // no ketjs on +format(theta,5)+","+format(phi,5)+")"; - GLIST=append(GLIST,tmp); - if(length(VLIST)==0, // 16.06.20 - tmp=remove(allpoints(),[NE,SW,TH,FI]); - tmp4=remove(tmp,PTEXCEPTION); //180916 + GLIST=append(GLIST,tmp); //no ketjs off + if(length(VLIST)==0, // 16.06.20 + tmp=apply(allpoints(),#.name); //190505 + tmp4=remove(tmp,PTEXCEPTION); //190329 forall(tmp4,pt, - tmp1=text(pt); + tmp1=pt; tmp=substring(tmp1,length(tmp1)-1,length(tmp1)); if(tmp!="z", tmp=parse(tmp1+"z.xy"); //181028[2lines]; @@ -198,11 +196,11 @@ Setangle(theta,phi):=( //16.12.24 ); ); , - if(isselected(NE) % isselected(SW), - tmp=remove(allpoints(),[NE,SW,TH,FI]); - tmp4=remove(tmp,PTEXCEPTION); //180916 + if(Ptselected(NE) % Ptselected(SW), //190505 + tmp4=apply(allpoints(),#.name); //190505 + tmp4=remove(tmp4,PTEXCEPTION); forall(tmp4,pt, - tmp1=text(pt); + tmp1=pt; tmp=substring(tmp1,length(tmp1)-1,length(tmp1)); if(tmp!="z", tmp=select(VLIST,#_1==tmp1+"3d"); @@ -212,14 +210,14 @@ Setangle(theta,phi):=( //16.12.24 ); ); , - tmp=remove(allpoints(),[NE,SW,TH,FI]); + tmp=apply(allpoints(),#.name); //190505 tmp4=remove(tmp,PTEXCEPTION); //180916 forall(tmp4,pt, - tmp1=text(pt); + tmp1=pt; tmp=substring(tmp1,length(tmp1)-1,length(tmp1)); if(tmp!="z", tmp2=parse(tmp1+"z"); - if(isselected(pt) % isselected(tmp2), + if(Ptselected(pt) % Ptselected(tmp2), Defvar(tmp1+"2d",pt.xy); tmp=parse(tmp1+"z.xy"); //181028[2lines] tmp=Xyzcoord(pt.xy,tmp); @@ -228,14 +226,14 @@ Setangle(theta,phi):=( //16.12.24 ); ); ); - ); + ); forall(Datalist3d(),#, tmp1=replace(#,"3d","2d"); tmp2=Projpara(#,["nodata"]); - tmp=tmp1+"="+textformat(tmp2,5); + tmp=tmp1+"="+textformat(tmp2,5)+";"; //190415 parse(tmp); ); - Ptseg3data(PTEXCEPTION); //180916 + Ptseg3data(PTEXCEPTION); //180916 ); ////%Setangle end//// @@ -267,7 +265,7 @@ Angleselected():=IsAngle(); //180713 ////%Angleselected end//// ////%Isangle start//// -Isangle():=isselected(TH)%isselected(FI); //180517 +Isangle():=Ptselected(TH)%Ptselected(FI); //180517 ////%Isangle end//// ////%Changestyle3d start//// @@ -303,13 +301,13 @@ Dist3d(pt1,pt2):=( if(islist(pt1), p1=pt1; , - if(ispoint(pt1),p1=text(pt1),p1=pt1); + if(ispoint(pt1),p1=pt1.name,p1=pt1); //190505 p1=parse(p1+"3d"); ); if(islist(pt2), p2=pt2; , - if(ispoint(pt2),p2=text(pt2),p2=pt2); + if(ispoint(pt2),p2=pt2.name,p2=pt2); //190505 p2=parse(p2+"3d"); ); sqrt((p2-p1)*(p2-p1)); @@ -417,8 +415,8 @@ Mainsubpt3d(pm,psv):=( //181027 ); ////%Mainsubpt3d end//// -////%ProjCurve start//// -ProjCurve(crv):=( +////%Projcurve start//// +Projcurve(crv):=( //help:Projcurve("sl3d1"); regional(CurveL,Curve,Eps,AnsL,Out,sp,cp,st,,ct,ii,pt, Xz,Yz,tmp,tmp1,tmp2); @@ -469,7 +467,7 @@ ProjCurve(crv):=( ); Out; ); -////%ProjCurve end//// +////%Projcurve end//// ////%Projpara start//// Projpara(ptdata):=Projpara(ptdata,[]); @@ -513,7 +511,7 @@ Projpara(ptdata,optionsorg):=( if(msgflg==1,//180602from println("generate projparadata "+name2); );//180602to - tmp=name2+"="+textformat(ptL,5); + tmp=name2+"="+textformat(ptL,5)+";"; //190415 parse(tmp); tmp=name2+"=Projpara("+name3+")"; GLIST=append(GLIST,tmp); @@ -523,7 +521,7 @@ Projpara(ptdata,optionsorg):=( if(color!=KCOLOR, //180904 Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); - Ltype=GetLinestyle(text(Noflg)+Ltype,name2); + Ltype=Getlinestyle(text(Noflg)+Ltype,name2); if(color!=KCOLOR, //180904 Texcom("}");//180722 ); @@ -544,8 +542,8 @@ Projpara(ptdata,optionsorg):=( ); ////%Projpara end//// -////%InvparaptPp start//// -InvparaptPp(pt,pd):=( +////%Invparaptpp start//// +Invparaptpp(pt,pd):=( regional(Eps,fk,nfk,ph,fh,ah,bh,ak,bk,v1,v2, nn,s0,t2,out,tmp,tmp1,tmp2,flg); Eps=10^(-4); @@ -580,7 +578,7 @@ InvparaptPp(pt,pd):=( ); if(flg==0, if(nfk>2, - nn=floor(ph); + nn=re(floor(ph)); //190505 s0=ph-nn; if(ph>Numptcrv(fh)-Eps, out=[Ptend(fk),Numptcrv(fh)]; @@ -601,12 +599,12 @@ InvparaptPp(pt,pd):=( ); out; ); -////%InvparaptPp end//// +////%Invparaptpp end//// ////%Invparapt start//// Invparapt(pt,pd):=( regional(tmp); - tmp=InvparaptPp(pt,pd); + tmp=Invparaptpp(pt,pd); tmp_1; ); ////%Invparapt end//// @@ -625,7 +623,7 @@ Subgraph(name3,opcindy):=( //181029 ); sub2d=append(sub2d,tmp2); ); - tmp=name+"="+Textformat(sub2d,5); + tmp=name+"="+Textformat(sub2d,5)+";"; parse(tmp); GCLIST=append(GCLIST,[name,[0,1],opcindy]); //190127 sub2d; @@ -639,7 +637,7 @@ Spaceline(Arg1,Arg2):=( if(isstring(Arg1), Spaceline(Arg1,Arg2,[]); , - tmp=text(Arg1); + tmp=Arg1.name; //190505 tmp=substring(tmp,1,length(tmp)-1); name="-"+replace(tmp,",",""); Spaceline(name,Arg1,Arg2); @@ -651,7 +649,8 @@ Spaceline(nm,ptlistorg,optionorg):=( //help:Spaceline(options=["Msg=y(n)"]); regional(name2,name3,options,Out,tmp,tmp1,tmp2, opstr,opcindy,Ltype,Noflg,eqL,ptlist, Msg,color); - ptlist=apply(ptlistorg,if(ispoint(#),parse(text(#)+"3d"),#)); // 16.02.10 + ptlist=apply(ptlistorg,if(ispoint(#),parse(#.name+"3d"),#)); // 190505 + ptlist=apply(ptlist,if(isstring(#),parse(#),#)); //190330 if(substring(nm,0,2)=="bz", name2=replace(nm,"bz","bz2d"); name3=replace(nm,"bz","bz3d"); @@ -687,22 +686,22 @@ Spaceline(nm,ptlistorg,optionorg):=( if(Msg==1, println("generate Spaceline "+name3); ); - tmp=name3+"="+ptlist; + tmp=name3+"="+Textformat(ptlist,6)+";"; //190330//190415 parse(tmp); tmp1=Projpara(name3,["nodata"]); - tmp=name2+"="+textformat(tmp1,5); + tmp=name2+"="+Textformat(tmp1,5)+";"; //190415 parse(tmp); tmp="["; forall(ptlist, //17.07.13from if(isstring(#), tmp=tmp+#+","; , - tmp=tmp+textformat(#,5)+","; + tmp=tmp+Textformat(#,5)+","; ); ); tmp=substring(tmp,0,length(tmp)-1)+"]"; - tmp=name3+"=Spaceline("+tmp+")"; //17.07.13until -// tmp=name3+"=Spaceline("+textformat(ptlist,5)+")"; //17.05.24 + tmp=name3+"=Spaceline("+tmp+")"; //17.07.13to +// tmp=name3+"=Spaceline("+Textformat(ptlist,5)+")"; //17.05.24 GLIST=append(GLIST,tmp); tmp=name2+"=Projpara("+name3+")"; GLIST=append(GLIST,tmp); @@ -712,7 +711,7 @@ Spaceline(nm,ptlistorg,optionorg):=( if(color!=KCOLOR, //180904 Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); - Ltype=GetLinestyle(text(Noflg)+Ltype,name2); + Ltype=Getlinestyle(text(Noflg)+Ltype,name2); if(color!=KCOLOR, //180904 Texcom("}");//180722 ); @@ -720,9 +719,9 @@ Spaceline(nm,ptlistorg,optionorg):=( if(Noflg==1,Ltype=0); ); GCLIST=append(GCLIST,[name2,Ltype,opcindy]); - if(SUBSCR==1, // 15.02.11 + if(SUBSCR==1, //no ketjs on// 15.02.11 Subgraph(name3,opcindy); - ); + ); //no ketjs off ); ptlist; ); @@ -864,10 +863,10 @@ Spacecurve(nm,funstr,variable,optionorg):=( if(Msg==1, println("generate Spacecurve "+name3); ); - tmp=name3+"="+textformat(Out,5); + tmp=name3+"="+textformat(Out,5)+";"; //190415 parse(tmp); tmp1=Projpara(name3,["nodata"]); - tmp=name2+"="+textformat(tmp1,5); + tmp=name2+"="+textformat(tmp1,5)+";"; //190415 parse(tmp); tmp=name3+"=Spacecurve(Assign('"+funstr+"'),'"+variable+"'"+opstr+")"; GLIST=append(GLIST,tmp); @@ -879,7 +878,7 @@ Spacecurve(nm,funstr,variable,optionorg):=( if(color!=KCOLOR, //180904 Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); - Ltype=GetLinestyle(text(Noflg)+Ltype,name2); + Ltype=Getlinestyle(text(Noflg)+Ltype,name2); if(color!=KCOLOR, //180904 Texcom("}");//180722 ); @@ -910,7 +909,7 @@ Partcrv3d(nm,pA,pB,PkLstr,options):=( if(islist(pA), tmp=pA; , - if(ispoint(pA),tmp=text(pA),tmp=pA); + if(ispoint(pA),tmp=pA.name,tmp=pA); //190505 tmp=parse(tmp+"3d"); ); p1=parapt(tmp); @@ -922,7 +921,7 @@ Partcrv3d(nm,pA,pB,PkLstr,options):=( if(islist(pB), tmp=pB; , - if(ispoint(pB),tmp=text(pB),tmp=pB); + if(ispoint(pB),tmp=pB.name,tmp=pB); //190505 tmp=parse(tmp+"3d"); ); p2=parapt(tmp); @@ -1001,10 +1000,10 @@ Joincrvs3d(nm,plotstrL,options):=( ); if(Noflg<3, println("generate Joincurves3d "+name3); - tmp=name3+"="+textformat(PtL,5); + tmp=name3+"="+textformat(PtL,5)+";"; //190415 parse(tmp); tmp1=Projpara(name3,["nodata"]); - tmp=name2+"="+textformat(tmp1,5); + tmp=name2+"="+textformat(tmp1,5)+";"; //190415 parse(tmp); tmp=text(plotstrL); tmp=substring(tmp,1,length(tmp)-1); @@ -1018,7 +1017,7 @@ Joincrvs3d(nm,plotstrL,options):=( if(color!=KCOLOR, //180904 Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); - Ltype=GetLinestyle(text(Noflg)+Ltype,name2); + Ltype=Getlinestyle(text(Noflg)+Ltype,name2); if(color!=KCOLOR, //180904 Texcom("}");//180722 ); @@ -1040,13 +1039,14 @@ Joincrvs3d(nm,plotstrL,options):=( ////%Xyzax3data start//// Xyzax3data(nm,Xrange,Yrange,Zrange):= Xyzax3data(nm,Xrange,Yrange,Zrange,[]); -Xyzax3data(nm,Xrange,Yrange,Zrange,options):=( +Xyzax3data(nm,Xrange,Yrange,Zrange,optionorg):=( //help:Xyzax3data("","x=[-5,5]","y=[-5,5]","z=[-5,5]"); -//help:Xyzax3data(Options2=["a1","Osw"]); - regional(name2,name3,Out,tmp,tmp1,tmp2,eqL,reL,strL, - opstr,opcindy,Ltype,Noflg,Axname,Arrow,Origin,color); +//help:Xyzax3data(Options2=["a1,18","Osw"]); + regional(name2,name3,Out,tmp,tmp1,tmp2,ops,eqL,reL,strL,msgflg, + options,opstr,opcindy,Ltype,Noflg,Axname,Arrow,Origin,color); name2="ax2d"+nm; name3="ax3d"+nm; + options=optionorg; tmp=Divoptions(options); Ltype=tmp_1; Noflg=tmp_2; @@ -1056,7 +1056,7 @@ Xyzax3data(nm,Xrange,Yrange,Zrange,options):=( color=tmp_(length(tmp)-2); opcindy=tmp_(length(tmp)); Axname=1; - Arrow=0; // 16.08.14 + Arrow=[]; // 190505 Origin=""; // 16.08.14 if(length(reL)>0, Axname=reL_1; @@ -1066,9 +1066,8 @@ Xyzax3data(nm,Xrange,Yrange,Zrange,options):=( if(tmp1=="A", tmp=substring(#,1,length(#)); if(length(tmp)>0, - Arrow=parse(tmp); - , - Arrow=1; + Arrow=tokenize(tmp,","); //190505 + if(length(Arrow)==1,Arrow=append(Arrow,18)); ); ); if(tmp1=="O", @@ -1084,7 +1083,18 @@ Xyzax3data(nm,Xrange,Yrange,Zrange,options):=( ); ); ); - ); // 16.08.14until + ); // 16.08.14to + options=remove(options,reL); + options=remove(options,strL); + msgflg="Y"; //190506from + forall(eqL, + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,1)); + if(tmp1=="M", + msgflg=Toupper(substring(tmp_2,0,1)); + options=remove(options,[#]); + ); + ); //190506to tmp1=indexof(Xrange,"="); tmp=parse(substring(Xrange,tmp1,length(Xrange))); Px=[tmp_1,0,0]; Qx=[tmp_2,0,0]; @@ -1094,16 +1104,26 @@ Xyzax3data(nm,Xrange,Yrange,Zrange,options):=( tmp1=indexof(Zrange,"="); tmp=parse(substring(Zrange,tmp1,length(Zrange))); Pz=[0,0,tmp_1]; Qz=[0,0,tmp_2]; + tmp=["nodisp","Msg=n"]; + Spaceline("-axx3d"+nm,[Px,Qx],tmp); + Spaceline("-axy3d"+nm,[Py,Qy],tmp); + Spaceline("-axz3d"+nm,[Pz,Qz],tmp); Out=[[Px,Qx],[Py,Qy],[Pz,Qz]]; if(Axname>0, Xyzaxparaname(Xrange,Yrange,Zrange,[Axname]); ); if(Noflg<3, - println("generate axes "+name3); - tmp=name3+"="+textformat(Out,5); + if(msgflg=="Y", + tmp="generate axes "+name3; + tmp=tmp+" : axx3d"+nm+",axy3d"+nm+",axz3d"+nm; + println(tmp); + ); + tmp="["+"axx3d"+nm+","+"axy3d"+nm+","; + tmp=tmp+"axz3d"+nm+"]"; + tmp=name3+"="+tmp; parse(tmp); tmp1=Projpara([name3],["nodata"]); - tmp=name2+"="+textformat(tmp1,5); + tmp=name2+"="+textformat(tmp1,5)+";"; //190415 parse(tmp); tmp=name3+"=Xyzax3data("+ Dq+Xrange+Dq+","+Dq+Yrange+Dq+","+Dq+Zrange+Dq+")"; @@ -1116,7 +1136,7 @@ Xyzax3data(nm,Xrange,Yrange,Zrange,options):=( if(color!=KCOLOR, //180904 Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); - Ltype=GetLinestyle(text(Noflg)+Ltype,name2); + Ltype=Getlinestyle(text(Noflg)+Ltype,name2); if(color!=KCOLOR, //180904 Texcom("}");//180722 ); @@ -1125,14 +1145,15 @@ Xyzax3data(nm,Xrange,Yrange,Zrange,options):=( ); GCLIST=append(GCLIST,[name2,Ltype,opcindy]); if(Noflg<1, // 16.08.14from - if(Arrow>0, + if(length(Arrow)==2, //190505from tmp1=Parapt(Px); tmp2=Parapt(Qx); - Arrowhead(tmp2,tmp2-tmp1,[Arrow]); + ops=[Arrow_1,Arrow_2,"Line=n"]; + Lightarrowdata("ax1",[tmp2,tmp2-tmp1],ops); tmp1=Parapt(Py); tmp2=Parapt(Qy); - Arrowhead(tmp2,tmp2-tmp1,[Arrow]); + Lightarrowdata("ax2",[tmp2,tmp2-tmp1],ops); tmp1=Parapt(Pz); tmp2=Parapt(Qz); - Arrowhead(tmp2,tmp2-tmp1,[Arrow]); - ); + Lightarrowdata("ax3",[tmp2,tmp2-tmp1],ops); + ); //190505to if(length(Origin)>0, Letter([Parapt([0,0,0]),Origin,"O"]); ); @@ -1145,7 +1166,7 @@ Xyzax3data(nm,Xrange,Yrange,Zrange,options):=( ); ////%Xyzax3data end//// -////%Xyzax3paraname start//// +////%Xyzaxparaname start//// Xyzaxparaname(Xrange,Yrange,Zrange):= Xyzaxparaname(Xrange,Yrange,Zrange,[]); Xyzaxparaname(Xrange,Yrange,Zrange,options):=( @@ -1189,7 +1210,7 @@ Xyzaxparaname(Xrange,Yrange,Zrange,options):=( Expr(ch,"c",Zname); ); ); -////%Xyzax3paraname end//// +////%Xyzaxparaname end//// ////%Datalist3d start//// Datalist3d():=( @@ -1267,10 +1288,10 @@ Embed(nm,Pd2str,funstr,varstr,options):=( if(Noflg<3, println("generate Embed "+name3); if(length(Out)>0, - tmp=name3+"="+textformat(Out,5); + tmp=name3+"="+textformat(Out,5)+";"; //190415 parse(tmp); tmp1=Projpara(name3,["nodata"]); - tmp=name2+"="+textformat(tmp1,5); + tmp=name2+"="+textformat(tmp1,5)+";"; //190415 parse(tmp); ); if(!islist(Pd2str), @@ -1289,7 +1310,7 @@ Embed(nm,Pd2str,funstr,varstr,options):=( if(color!=KCOLOR, //180904 Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); - Ltype=GetLinestyle(text(Noflg)+Ltype,name2); + Ltype=Getlinestyle(text(Noflg)+Ltype,name2); if(color!=KCOLOR, //180904 Texcom("}");//180722 ); @@ -1433,10 +1454,10 @@ Rotatedata3d(nm,P3data,w1,w2,options):=( if(length(Out)==1,Out=Out_1); if(Noflg<3, println("generate Rotatedata3d "+name3); - tmp=name3+"="+textformat(Out,5); + tmp=name3+"="+textformat(Out,5)+";"; //190415 parse(tmp); tmp1=Projpara(name3,["nodata"]); - tmp=name2+"="+textformat(tmp1,5); + tmp=name2+"="+textformat(tmp1,5)+";"; //190415 parse(tmp); tmp=Textformat(P3data,5); // 17.12.23 tmp=RSform(tmp,1); //180602 @@ -1455,7 +1476,7 @@ Rotatedata3d(nm,P3data,w1,w2,options):=( if(color!=KCOLOR, //180904 Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); - Ltype=GetLinestyle(text(Noflg)+Ltype,name2); + Ltype=Getlinestyle(text(Noflg)+Ltype,name2); if(color!=KCOLOR, //180904 Texcom("}");//180722 ); @@ -1531,10 +1552,10 @@ Translatedata3d(nm,P3data,w1,options):=( if(length(Out)==1,Out=Out_1); if(Noflg<3, println("generate Translatedata3d "+name3); - tmp=name3+"="+textformat(Out,5); + tmp=name3+"="+textformat(Out,5)+";"; //190415 parse(tmp); tmp1=Projpara(name3,["nodata"]); - tmp=name2+"="+textformat(tmp1,5); + tmp=name2+"="+textformat(tmp1,5)+";"; //190415 parse(tmp); tmp=textformat(P3data,5); // 17.12.23 tmp=RSform(tmp,1); // 180602 @@ -1552,7 +1573,7 @@ Translatedata3d(nm,P3data,w1,options):=( if(color!=KCOLOR, //180904 Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); - Ltype=GetLinestyle(text(Noflg)+Ltype,name2); + Ltype=Getlinestyle(text(Noflg)+Ltype,name2); if(color!=KCOLOR, //180904 Texcom("}");//180722 ); @@ -1627,10 +1648,10 @@ Reflectdata3d(nm,P3data,vecL,options):=( if(length(Out)==1,Out=Out_1); if(Noflg<3, println("generate Reflectdata3d "+name3); - tmp=name3+"="+textformat(Out,5); + tmp=name3+"="+textformat(Out,5)+";"; //190415 parse(tmp); tmp1=Projpara(name3,["nodata"]); - tmp=name2+"="+Textformat(tmp1,5); + tmp=name2+"="+Textformat(tmp1,5)+";"; //190415 parse(tmp); tmp=Textformat(P3data,5); // 17.12.23 tmp=RSform(tmp,1); // 180602 @@ -1649,7 +1670,7 @@ Reflectdata3d(nm,P3data,vecL,options):=( if(color!=KCOLOR, //180904 Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); - Ltype=GetLinestyle(text(Noflg)+Ltype,name2); + Ltype=Getlinestyle(text(Noflg)+Ltype,name2); if(color!=KCOLOR, //180904 Texcom("}");//180722 ); @@ -1722,10 +1743,10 @@ Scaledata3d(nm,P3data,ratio,options):=( if(length(Out)==1,Out=Out_1); if(Noflg<3, println("generate Scaledata3d "+name3); - tmp=name3+"="+textformat(Out,5); + tmp=name3+"="+textformat(Out,5)+";"; //190415 parse(tmp); tmp1=Projpara(name3,["nodata"]); - tmp=name2+"="+Textformat(tmp1,5); + tmp=name2+"="+Textformat(tmp1,5)+";"; //190415 parse(tmp); tmp=Textformat(P3data,5); // 17.12.23 tmp=RSform(tmp,1); // 180602 @@ -1745,7 +1766,7 @@ Scaledata3d(nm,P3data,ratio,options):=( if(color!=KCOLOR, //180904 Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); - Ltype=GetLinestyle(text(Noflg)+Ltype,name2); + Ltype=Getlinestyle(text(Noflg)+Ltype,name2); if(color!=KCOLOR, //180904 Texcom("}");//180722 ); @@ -1771,9 +1792,9 @@ Xyzcoord(X,Y,ps):=( ); ////%Xyzcoord end//// -////%PutonCurve3d start//// -PutonCurve3d(name,pdstr):=( -//help:PutonCurve3d("T","sc3d1"); +////%Putoncurve3d start//// +Putoncurve3d(name,pdstr):=( +//help:Putoncurve3d("T","sc3d1"); regional(pt,pd2str,tmp,tmp1,tmp2); pd2str=replace(pdstr,"3d","2d"); PutonCurve(name,pd2str); @@ -1781,15 +1802,15 @@ PutonCurve3d(name,pdstr):=( tmp=Nearestpt(pt,pd2str); // 15.03.13 tmp1=Paramoncurve(tmp_1,tmp_2,pd2str); tmp="sub"+pd2str; - tmp2=PointonCurve(tmp1,tmp); + tmp2=Pointoncurve(tmp1,tmp); // pt=append(pt,tmp2_2); //181028[2lines] pt=Xyzcoord(pt,tmp2); // 15.03.13 - tmp=name+"z.xy="+textformat(tmp2,5); + tmp=name+"z.xy="+textformat(tmp2,5)+";"; //190415 parse(tmp); // VLIST=select(VLIST,#_1!=name+"3d"); Defvar(name+"3d",pt); ); -////%PutonCurve3d end//// +////%Putoncurve3d end//// ////%Mkpointlist start//// Mkpointlist():=Mkpointlist([]); //16.11.12 @@ -1799,7 +1820,7 @@ Mkpointlist(options):=( //181030 dp=pi/24; mv=NE.x-SW.x; Eps=10^(-4); - pos=[NE.x+1,NE.y]; + pos=[NE.x+1,NE.y+0.1]; worklist=Workprocess(); //181030 plist=select(worklist,length(#_3)!=2); plist=apply(plist,#_1); @@ -1820,9 +1841,9 @@ Mkpointlist(options):=( //181030 inspect(pt,"ptsize",3); inspect(pt,"color",2); inspect(pt,"textsize",TSIZE); - ptz=text(pt)+"z"; + ptz=pt.name+"z"; //190505 tmp=Finddef(pt); - tmp=select(VLIST,#_1==text(pt)+"3d"); + tmp=select(VLIST,#_1==pt.name+"3d"); //190505 if(length(tmp)==0, tmp=parse(ptz); //181108from if(ispoint(tmp), @@ -1843,37 +1864,37 @@ Mkpointlist(options):=( //181030 pt3=Mainsubpt3d(pt.xy,parse(ptz+".xy")); ); ); //181028to - Defvar(text(pt)+"3d",pt3); - Defvar(text(pt)+"fix",0); + Defvar(pt.name+"3d",pt3); //190505 + Defvar(pt.name+"fix",0); //190505 ); flg=0; if(isstring(ptz),ptz=parse(ptz));//181029from inspect(ptz,"ptsize",3); inspect(ptz,"color",3); inspect(ptz,"textsize",TSIZEZ);//181029to - if(isselected(pt), - if(parse(text(pt)+"fix")!=1, - tmp=select(VLIST,#_1==text(pt)+"3d"); + if(Ptselected(pt), + if(parse(pt.name+"fix")!=1, //190505 + tmp=select(VLIST,#_1==pt.name+"3d"); //190505 tmp1=tmp_1_2; pt3=Mainsubpt3d(pt.xy,ptz.xy); //181029 - Putpoint(text(ptz),Parasubpt(pt3)); + Putpoint(ptz.name,Parasubpt(pt3)); if(Norm(tmp1-pt3)>Eps, - Defvar(text(pt)+"3d",pt3); + Defvar(pt.name+"3d",pt3); //190505 ); flg=1; ); ); - if(isselected(ptz),//181108from - tmp=select(VLIST,#_1==text(pt)+"3d"); + if(Ptselected(ptz),//181108from + tmp=select(VLIST,#_1==pt.name+"3d"); //190505 tmp1=tmp_1_2; tmp=Parasubpt(tmp1); //181108from if(abs(cos(THETA))>Eps, - tmp=text(ptz)+".x="+format(tmp_1,6); + tmp=tptz.name+".x="+format(tmp_1,6)+";"; //190505 parse(tmp); tmp=Parapt([tmp1_1,tmp1_2,ptz.y]); - Putpoint(text(pt),tmp); + Putpoint(pt.name,tmp); //190505 , - tmp=text(ptz)+".y="+format(tmp_2,6); + tmp=ptz.name+".y="+format(tmp_2,6)+";"; //190505 parse(tmp); if(abs(sin(PHI+dp))>abs(cos(PHI+dp)), //181108 tmp=-(ptz.x-mv-tmp1_2*cos(PHI+dp))/sin(PHI+dp); @@ -1882,30 +1903,30 @@ Mkpointlist(options):=( //181030 tmp=(ptz.x-mv+tmp1_1*sin(PHI+dp))/cos(PHI+dp); //181109pm tmp=Parapt([tmp1_1,tmp,tmp1_3]); ); - Putpoint(text(pt),tmp); + Putpoint(pt.name,tmp); //190505 ); pt3=Mainsubpt3d(pt.xy,ptz.xy); - Defvar(text(pt)+"3d",pt3);//181108to + Defvar(pt.name+"3d",pt3); //190505 flg=2; ); - if(isselected(TH) % isselected(FI), //181029 - tmp=select(VLIST,#_1==text(pt)+"3d"); + if(Ptselected(TH) % Ptselected(FI), //181029 + tmp=select(VLIST,#_1==pt.name+"3d"); //190505 if(length(tmp)>0, //17.10.07 tmp1=Parapt(tmp_1_2); - Putpoint(text(pt),tmp1); //181029 + Putpoint(pt.name,tmp1); //190505 tmp2=Parasubpt(tmp_1_2);//181027[2lines] - Putpoint(text(ptz),tmp2); //181029 + Putpoint(ptz.name,tmp2); //190505 flg=3; ); //17.10.07 ); if(flg==0, //181030from pt3=Mainsubpt3d(pt.xy,ptz.xy); - Defvar(text(pt)+"3d",pt3); + Defvar(pt.name+"3d",pt3); //190505 ); //181030to - if(isselected(pt) % isselected(ptz), - drawtext(pos,text(pt3)); + if(Ptselected(pt) % Ptselected(ptz), + drawtext(pos,pt3.xy,size->12); // no ketjs //190505 ); - if(!contains(["p","q"],text(pt)), + if(!contains(["p","q"],pt.name), //190505 ptL=append(ptL,pt); ); ); @@ -1944,14 +1965,16 @@ Mkseg3d(options):=( ); ); ); - println("generate totally "+name); + if(length(parse(name))>0, //190401 + println("generate totally "+name); + ); if(length(segL)>0, // 15.03.06 strg=substring(strg,0,length(strg)-1)+")"; if(Noflg<3, GLIST=append(GLIST,strg); ); tmp1=apply(segL,Dq+#+Dq); //15.03.02 - tmp=name+"="+text(tmp1); + tmp=name+"="+tmp1.name; //190505 parse(tmp); ); segL; @@ -1963,36 +1986,37 @@ Ptseg3data():=Ptseg3data([]); //help:Ptseg3data(); //help:Ptseg3data([A,B]); Ptseg3data(options):=( - regional(pt,pt3,plist,tmp,tmp1,tmp2); - if(isselected(TH) % isselected(FI), - tmp=remove(allpoints(),[NE,SW,TH,FI]); - tmp=remove(tmp,options); //16.11.12 - tmp=apply(tmp,text(#)); - plist=select(tmp,substring(#,length(#)-1,length(#))!="z"); + regional(pt,ptz,pt3,plist,plistz,tmp,tmp1,tmp2); + tmp=remove(allpoints(),options); + tmp=remove(tmp,[SW,NE,TH,FI]); + plist=select(tmp,indexof(#.name,"z")==0); + plistz=select(tmp,indexof(#.name,"z")>0); + if(Ptselected(TH) % Ptselected(FI), forall(plist,pt, - tmp1=text(pt); - tmp=select(VLIST,#_1==tmp1+"3d"); //17.10.07 + tmp=select(plistz,#.name==pt.name+"z"); + if(length(tmp)>0, + ptz=tmp_1; + , + ptz=[]; + ); + tmp=select(VLIST,#_1==pt.name+"3d"); //190506 if(length(tmp)>0, pt3=tmp_1_2; - tmp=tmp1+".xy="+Textformat(Parapt(pt3),6);//181107 - parse(tmp); - if(SUBSCR==1, - tmp=tmp1+"z"+".xy="+Textformat(Parasubpt(pt3),6);//181107 - parse(tmp); - ); + pt.xy=Parapt(pt3); + ptz.xy=Parasubpt(pt3); , - tmp=Mainsubpt3d(parse(pt+".xy"),parse(tmp1+"z.xy")); //181107[2lines] - Defvar(tmp1+"3d",tmp); + pt3=Mainsubpt3d(pt.xy,ptz.xy); //181107[2lines] + Defvar(pt+"3d",pt3); ); ); , Mkpointlist(options); // 16.12.18 ); - forall(alllines(), + forall(alllines(), // no ketjs on #.color=[0.5,0.5,1]; ); SEG3dlist=Mkseg3d(options); - SEG3dlist; + SEG3dlist; // no ketjs off ); ////%Ptseg3data end//// @@ -2027,11 +2051,11 @@ Putonseg3d(name,pt1,pt2,options):=( inspect(parse(name+"z"),"color",3); inspect(parse(name+"z"),"textsize",TSIZEZ); if(ispoint(pt1), - pn1=text(pt1); - pn2=text(pt2); + pn1=pt1.name; //190505 + pn2=pt2.name; //190505 tmp1=replace("PCz.xy=PAz.xy+|PC-PA|/|PB-PA|*(PBz.xy-PAz.xy)","PC",name); tmp1=replace(tmp1,"PA",pn1); - tmp1=replace(tmp1,"PB",pn2); + tmp1=replace(tmp1,"PB",pn2)+";"; parse(tmp1); , pn1=Textformat(Parapt(pt1),5); //181030from @@ -2042,7 +2066,7 @@ Putonseg3d(name,pt1,pt2,options):=( pn1=Textformat(Parasubpt(pt1),5); //181030from pn2=Textformat(Parasubpt(pt2),5); tmp1=replace(tmp1,"PAs",pn1); - tmp1=replace(tmp1,"PBs",pn2); + tmp1=replace(tmp1,"PBs",pn2)+";"; //190415 parse(tmp1); ); tmp1=parse(name+".xy"); //181028[3lines] @@ -2125,7 +2149,7 @@ Fixpoint3d(ptlist):=( pt2=Parapt(pt3); tmp1=textformat(pt2_1,5); tmp2=textformat(pt2_2,5); - tmp=name+".xy=["+tmp1+","+tmp2+"]"; + tmp=name+".xy=["+tmp1+","+tmp2+"];"; parse(tmp); tmp1=name+".x+NE.x-SW.x"; tmp2=textformat(pt3_3,5); @@ -2151,7 +2175,7 @@ Letter3d(dtlist,options):=( forall(1..nall, jj=#*3-2; tmp=dt_jj; - if(ispoint(tmp),tmp=parse(text(tmp)+"3d")); + if(ispoint(tmp),tmp=parse(tmp.name+"3d")); //190505 dt_jj=Parapt(tmp); ); Letter(dt,options); @@ -2175,7 +2199,7 @@ Expr3d(dtlist,options):=( forall(1..nall, jj=#*3-2; tmp=dt_jj; - if(ispoint(tmp),tmp=parse(text(tmp)+"3d")); + if(ispoint(tmp),tmp=parse(tmp.name+"3d")); //190505 dt_jj=Parapt(tmp); ); Expr(dt,options); @@ -2298,10 +2322,10 @@ Drawpoint3d(pt3,options):=( opcindy=tmp_(length(tmp)); if(Measuredepth(pt3)==0,ptL=[pt3],ptL=pt3); forall(ptL, - tmp="draw("+Textformat(Parapt(#),6)+opcindy+")"; + tmp="draw("+Textformat(Parapt(#),6)+opcindy+");"; parse(tmp); if(SUBSCR==1, - tmp="draw("+Textformat(Parasubpt(#),6)+opcindy+")"; + tmp="draw("+Textformat(Parasubpt(#),6)+opcindy+");"; parse(tmp); ); ); @@ -2316,7 +2340,7 @@ Pointdata3d(nm,pt3,options):=( //181017from if(Measuredepth(pt3)==0,pt3L=[pt3],pt3L=pt3); pt2L=apply(pt3L,Parapt(#)); Pointdata("2d"+nm,pt2L,append(options,"Disp=n")); - tmp="pt3d"+nm+"="+format(pt3L,6); + tmp="pt3d"+nm+"="+format(pt3L,6)+";"; //190415 parse(tmp); ); //181017to ////%Pointdata3d end//// @@ -2341,8 +2365,8 @@ IntersectsgpL(name,sgstr,pLstr):= IntersectsgpL(name,sgstr,pLstr,["ie"]); IntersectsgpL(name,sgstr,pLstr,optionsorg):=( //help:IntersectsgpL("R","P-Q","A-B-C"); -//help:IntersectsgpL("",[p1,p2],[p3,p4,p5]); -//help:IntersectsgpL(options=["draw(put)","ie","Screen=n"+pointoptions]); +//help:IntersectsgpL("pR","pP-pQ","A-B-C"); +//help:IntersectsgpL(options=["draw(put)","ie","Screen=n"+pointoptions,"Color="]); regional(options,eqL, strL,ptflg,out,pP,pQ,pA,pB,pC,pH,pK,pR,tseg,tt,ss,Eps, flg,scrflg,nvec,tmp,tmp1,tmp2,tmp3,tmp4); options=optionsorg; //181026from @@ -2439,9 +2463,14 @@ IntersectsgpL(name,sgstr,pLstr,optionsorg):=( if(tmp1&tmp2&(scrflg=="Y"), //181031 if(ptflg_1=="P", //181025 Putpoint3d([name,pR],"fix"); -// Fixpoint3d([name,pR]); //190114 , Drawpoint3d(pR,options); + tmp=name; //190401from + if(indexof(name,"3d")==0, + tmp=name+"3d"; + ); + tmp=tmp+"="+Textformat(pR,6)+";"; //190415 + parse(tmp); //190401to ); ); , @@ -2517,10 +2546,10 @@ Bezier3(nm,ptlistorg,ctrlistorg,options):=( //17.10.08 greatly changed ); if(Noflg<3, println("generate Beziercurve "+name3); - tmp=name3+"="+tmp1; + tmp=name3+"="+tmp1+";"; //190415 parse(tmp); tmp1=Projpara(name3,["nodata"]); - tmp=name2+"="+textformat(tmp1,5); + tmp=name2+"="+textformat(tmp1,5)+";"; //190415 parse(tmp); ptlist=apply(ptlistorg,#+"3d"); ptlist=RSform(text(ptlist),1); @@ -2539,7 +2568,7 @@ Bezier3(nm,ptlistorg,ctrlistorg,options):=( //17.10.08 greatly changed if(Noflg<2, if(isstring(Ltype), if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")")); - Ltype=GetLinestyle(text(Noflg)+Ltype,name2); + Ltype=Getlinestyle(text(Noflg)+Ltype,name2); if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")")); , if(Noflg==1,Ltype=0); @@ -2606,7 +2635,7 @@ Mkbezierptcrv3(ptdata,options):=( //17.10.08 greatly changed Eps=10^(-4); pos=[NE.x+1,NE.y]; Out=[]; - tmp=floor((BezierNumber3-1)/26);// 15.02.23 from + tmp=re(floor((BezierNumber3-1)/26)); //190505 // 15.02.23 from if(tmp==0,tmp="",tmp=text(tmp)); tmp2=mod(BezierNumber3,26); if(tmp2==0,tmp2=26); @@ -2848,7 +2877,7 @@ Mkobjfile(path,fnameorg,objL):=( forall(vtx,tmp1, tmp2=tmp1; if(ispoint(tmp1), - tmp2=parse(text(tmp1)+"3d"); + tmp2=parse(tmp1.name+"3d"); //190505 ); tmp="v "+format(tmp2_1,5)+" "+format(tmp2_2,5)+" "+format(tmp2_3,5); println(SCEOUTPUT,tmp); @@ -2866,14 +2895,20 @@ Mkobjfile(path,fnameorg,objL):=( ); //end of skip +////%VertexEdgeFace start//// //190502 +VertexEdgeFace(nm,vfnL):=Vertexedgeface(nm,vfnL,[]); +VertexEdgeFace(nm,vfnLorg,optionorg):=Vertexedgeface(nm,vfnLorg,optionorg); ////%VertexEdgeFace start//// -VertexEdgeFace(nm,vfnL):=VertexEdgeFace(nm,vfnL,[]); // 16.02.10 -VertexEdgeFace(nm,vfnLorg,optionorg):=( -//help:VertexEdgeFace("1",[vL,fnL]); -//help:VertexEdgeFace("1",["A","B","C"]); -//help:VertexEdgeFace(options=["Pt=fix","Vtx=n(y)","Edg=n(y)"]); - regional(name3,namev,namee,namef,vfnL,options,Noflg,eqL,strL, - vL,eL,enL,face,edge,vtx,vname,fixflg,vtxflg, edgflg,dispflg,tmp,tmp1,tmp2); + +////%Vertexedgeface start//// +Vertexedgeface(nm,vfnL):=Vertexedgeface(nm,vfnL,[]); // 16.02.10 +Vertexedgeface(nm,vfnLorg,optionorg):=( +//help:Vertexedgeface("1",[vL,fnL]); +//help:Vertexedgeface("1",["A","B","C"]); +//help:Vertexedgeface(options=["Vtx=n(y)" ',"Pt=fix") ,"Edg=n(y)","Label=8(/0)"]); + regional(name3,namev,namee,namef,vfnL,options,Noflg,eqL,strL, Lsize,msgflg, + Eps,vL,eL,enL,face,edge,vtx,vname,fixflg,vtxflg, edgflg,dispflg,tmp,tmp1,tmp2); + Eps=10^(-5); name3="phvef"+nm; namev="phv3d"+nm; namee="phe3d"+nm; @@ -2891,9 +2926,11 @@ VertexEdgeFace(nm,vfnLorg,optionorg):=( eqL=tmp_5; strL=tmp_7; fixflg=1; - vtxflg=0; //180905 - edgflg=0; + vtxflg="N"; //180905 + edgflg="N"; dispflg=1; //181106 + Lsize="8"; //190331 + msgflg="Y"; //190506 forall(eqL, tmp=Strsplit(#,"="); tmp1=Toupper(substring(tmp_1,0,1)); @@ -2903,23 +2940,22 @@ VertexEdgeFace(nm,vfnLorg,optionorg):=( options=remove(options,[#]); ); if(tmp1=="V", //180905from - if((tmp2=="Y")%(tmp2==G), //181107 - vtxflg=1; - ); + vtxflg=tmp2; options=remove(options,[#]); ); //180905to if(tmp1=="E", - if((tmp2=="Y")%(tmp2=="G"),//181107[2lines] - if(vtxflg==1,edgflg=1); - ); + edgflg=tmp2; options=remove(options,[#]); ); - if(tmp1=="D", //181106from - if(substring(tmp2,0,1)=="N", - dispflg=0; vtxflg=0; edgflg=0; - ); + if(tmp1=="L", //190331from + Lsize=tmp_2; + if(Lsize=="0",dispflg=0); //190502 + options=remove(options,[#]); + ); //190331to + if(tmp1=="M", //190506from + msgflg=Toupper(substring(tmp_2,0,1)); options=remove(options,[#]); - ); //181106to + ); //190506to ); forall(strL, if(Toupper(#)=="FREE", @@ -2927,30 +2963,39 @@ VertexEdgeFace(nm,vfnLorg,optionorg):=( options=remove(options,[#]); ); ); + tmp=select(allpoints(),indexof(#.name,"z")==0); //190506from + tmp1=remove(tmp,[SW,NE,TH,FI]); vL=[]; forall(1..length(vfnL_1), vtx=vfnL_1_#; // 16.02.10 from if(isstring(vtx),vtx=parse(vtx)); // 16.06.19 if(ispoint(vtx), - tmp=parse(text(vtx)+"3d"); - vname=text(vtx); + tmp=parse(vtx.name+"3d"); //190506 + vname=vtx.name; , - vname="V"+nm+text(#); //181212 - if(vtxflg==1, //180905 + tmp=select(tmp1,|#.xy-Parapt(vtx)|<Eps); + if(length(tmp)>0, + tmp=tmp_1; + vname=tmp.name; + , + vname="V"+nm+text(#); //181212 + ); //190506to + if(vtxflg=="Y", if(fixflg==1, Putpoint3d([vname,vtx],"fix"); , Putpoint3d([vname,vtx]); ); - , //180905from - tmp=vname+"3d="+format(vtx,6); + , + tmp=vname+"3d="+format(vtx,6)+";"; //190415 parse(tmp); Defvar(vname+"3d",parse(vname+"3d")); - tmp=vname+"2d=Parapt("+vname+"3d)"; + tmp=vname+"2d=Parapt("+vname+"3d);"; //190415 parse(tmp); Defvar(vname+"2d",parse(vname+"2d")); if(dispflg==1, //181106 - drawtext(parse(vname+"2d"),vname,size->8); //190128 + tmp="drawtext(parse(vname+"+Dqq("2d")+"),vname,size->"; //190331 + parse(tmp+Lsize+");"); //190331 draw(parse(vname+"2d"),pointsize->3,color->[0,1,0]); //190128 ); ); //180905to @@ -2980,7 +3025,7 @@ VertexEdgeFace(nm,vfnLorg,optionorg):=( if(Noflg<3, enL=[]; forall(eL,edge, - if(edgflg==0, + if(edgflg=="N", if(Noflg<2, tmp1=edge_1;//parse(edge_1); tmp2=edge_2;//parse(edge_2); @@ -3007,17 +3052,16 @@ VertexEdgeFace(nm,vfnLorg,optionorg):=( ); ); if(Noflg<2, - println("generate "+name3); - println(" generate totally "+namee); - println(" generate vertexes "+namev); - println(" generate faces "+namef); + if(msgflg=="Y", + println("generate "+namev+","+namee+","+namef); + ); ); tmp1=""; forall(enL, tmp1=tmp1+Dq+#+Dq+","; ); tmp1=substring(tmp1,0,length(tmp1)-1); - tmp=namee+"=["+tmp1+"]"; + tmp=namee+"=["+tmp1+"];"; //190415 parse(tmp); tmp=namee+"=list("+tmp1+")"; tmp=replace(tmp,Dq,""); @@ -3025,21 +3069,21 @@ VertexEdgeFace(nm,vfnLorg,optionorg):=( tmp1=apply(vL,Dq+#+"3d"+Dq); tmp1=text(tmp1); tmp1=substring(tmp1,1,length(tmp1)-1); - tmp=namev+"=["+tmp1+"]"; + tmp=namev+"=["+tmp1+"];"; //190415 parse(tmp); tmp1=replace(tmp1,Dq,""); tmp=namev+"=list("+tmp1+")"; GLIST=append(GLIST,tmp); - tmp1=text(vfnL_2); + tmp1=Textformat(vfnL_2,6); tmp1=substring(tmp1,1,length(tmp1)-1); - tmp=namef+"=["+tmp1+"]"; + tmp=namef+"=["+tmp1+"];"; parse(tmp); tmp=namef+"=list("+tmp1+")"; GLIST=append(GLIST,tmp); ); [namev,namee,namef]; ); -////%VertexEdgeFace end//// +////%Vertexedgeface end//// ////%Phparadata start//// Phparadata(nm,nmvf):=( @@ -3122,7 +3166,7 @@ Phparadata(nm,nmvf,vfL,options):=( if(Noflg<2, if(isstring(Ltype), if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")")); - Ltype=GetLinestyle(text(Noflg)+Ltype,name2); + Ltype=Getlinestyle(text(Noflg)+Ltype,name2); if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")")); , if(Noflg==1,Ltype=0); @@ -3177,7 +3221,7 @@ Nohiddenseg(seg,rng,triang,Eps):=( ss1=Parapt(sg1); ss2=Parapt(sg2); if(|ss2-ss1|>Eps & abs(Crossprod(pB-pA,pC-pA))>Eps, - tmp=IntersectcrvsPp([ss1,ss2],[pA,pB,pC,pA]); + tmp=Intersectcrvspp([ss1,ss2],[pA,pB,pC,pA]); parL=apply(tmp,#_2-1); parL=sort(parL); if(length(parL)==0, @@ -3221,7 +3265,7 @@ Nohiddenseg(seg,rng,triang,Eps):=( sghid=[parL_(#-1),parL_#]; tmp1=ss1+sghid_1*(ss2-ss1); tmp2=ss1+sghid_2*(ss2-ss1); - tmp=IntersectcrvsPp([tmp1,tmp2],[pA,pB,pC,pA]); + tmp=Intersectcrvspp([tmp1,tmp2],[pA,pB,pC,pA]); if(length(tmp)<2, veB=pB-pA; veC=pC-pA; @@ -3281,10 +3325,8 @@ Nohiddenseg(seg,rng,triang,Eps):=( ////%Nohiddenseg end//// ////%Nohiddensegs start//// -Nohiddensegs(seg,range,faceno,vtxL,Eps):=( - regional(rng,face,vtx,out,ra,rb,tmp,tmp1,tmp2); -// Eps=10^(-2); - face=apply(faceno,vtxL_#); // 16.02.10 +Nohiddensegs(seg,range,face,Eps):=( //190331 + regional(rng,vtx,out,ra,rb,tmp,tmp1,tmp2); rng=range; out=rng; forall(2..(length(face)-1),vtx, @@ -3322,128 +3364,106 @@ Nohiddensegs(seg,range,faceno,vtxL,Eps):=( ////%Nohiddensegs end//// ////%Nohiddenbyfaces start//// -Nohiddenbyfaces(nm,facestr):= - Nohiddenbyfaces(nm,Datalist3d(),facestr,[],["do"]); -Nohiddenbyfaces(nm,Arg1,Arg2):=( - regional(segstr,facestr,options); - if(islist(Arg2), - segstr=Datalist3d(); - facestr=Arg1; - options=Arg2; - , - segstr=Arg1; - facestr=Arg2; +Nohiddenbyfaces(nm,faceL):= + Nohiddenbyfaces(nm,Datalist3d(),faceL,[],["do"]); +Nohiddenbyfaces(nm,Arg1,Arg2):=( //190331 + regional(tmp1,tmp2,tmp3,segL,faceL,options); + tmp1=select(Arg2,indexof(#,"=")>0); //190401from + tmp2=select(Arg2,indexof(#,",")>0); + tmp3=select(Arg2,length(#)<=2); + if(length(tmp1)+length(tmp2)+length(tmp3)==0, //190401to + segL=Arg1; + faceL=Arg2; options=[]; - ); - Nohiddenbyfaces(nm,segstr,facestr,options,["do"]); -); -Nohiddenbyfaces(nm,Arg1,Arg2,Arg3):=( - regional(segstr,facestr,options,optionsh); - if(islist(Arg2), - segstr=Datalist3d(); - facestr=Arg1; - options=Arg2; - optionsh=Arg3; - , - segstr=Arg1; - facestr=Arg2; - options=Arg3; - optionsh=["do"]; - ); - Nohiddenbyfaces(nm,segstr,facestr,options,optionsh); // 16.02.21 -); -Nohiddenbyfaces(nm,segstr,Arg1,Arg2,Arg3):=( //180815from - regional(facestr,faceL,vtxL,options,optionsh); - if(isstring(Arg1), - facestr=Arg1; - options=Arg2; - optionsh=Arg3; - if(substring(facestr,0,3)=="phf", - faceL=parse(facestr); - tmp=replace(facestr,"phf","phv"); - tmp=parse(tmp); - vtxL=apply(tmp,replace(#,"3d","")); - - , - faceL=parse(facestr); - ); , + segL=Datalist3d(); faceL=Arg1; - vtxL=Arg2; - options=Arg3; - optionsh=[]; + options=Arg2; ); - Nohiddenbyfaces(nm,segstr,faceL,vtxL,options,optionsh); + Nohiddenbyfaces(nm,segL,faceL,options,["do"]); ); -Nohiddenbyfaces(nm,segstr,faceL,vtxL,optionorg,optionsh):=( -//help:Nohiddenbyfaces("1","phf3d1"); -//help:Nohiddenbyfaces("1","ax3d","phf3d1"); -//help:Nohiddenbyfaces("1","ax3d",phf3d1,phv3d1); -//help:Nohiddenbyfaces(options1=["dr","Eps=10^(-2)"]); -//help:Nohiddenbyfaces(options2=["do"]); - regional(Eps,namen,nameh,options,segL,rng,seg,face, - ctr,tmp,tmp1,tmp2,Ltype,Noflg,eqL,color,opstr,opcindy,frnL,frhL); - Eps=10^(-2); +//Nohiddenbyfaces(nm,segL,faceL,options):=( //190331 +Nohiddenbyfaces(nm,Arg1,Arg2,Arg3):=( //190413from + if(islist(Arg1), + Nohiddenbyfaces(nm,Arg1,Arg2,Arg3,["do"]); + , + Nohiddenbyfaces(nm,Datalist3d(),Arg1,Arg2,Arg3); + ); +); //190413to +Nohiddenbyfaces(nm,segLorg,faceLorg,optionorg,optionsh):=(//190331 +//help:Nohiddenbyfaces("1",["phf3d1"]); +//help:Nohiddenbyfaces("1",["ax3d"],["phf3d1"]); +//help:Nohiddenbyfaces("1",["ax3d","phe3d1"],["phv3d1"]); +//help:Nohiddenbyfaces(options=["dr","Eps=10^(-2)"]); +//help:Nohiddenbyfaces(optionsh=["do"]); + regional(Eps,namen,nameh,options,segL,faceL,rng,vtxL,msgflg, + ctr,tmp,tmp1,tmp2,tmp3,tmp4,Ltype,Noflg,eqL,color,frnL,frhL); namen="frn"+nm; nameh="frh"+nm; - if(isstring(segstr), - tmp=parse(segstr);//180714from - if(islist(tmp), - if(isstring(tmp_1), - segL=tmp; - , - segL=[segstr]; - ); - );//180714to - , - segL=segstr; - ); - tmp2=[]; // 16.02.29 from - forall(segL,seg, - tmp=replace(seg,"3d","2d"); - tmp1=select(GCLIST,#_1==tmp); - tmp1=tmp1_1; - if(tmp1_2_1==0, //190127 - tmp2=append(tmp2,seg); - ); - ); - segL=tmp2; - Changestyle3d(segL,["nodisp"]); // 16.02.29 until - if(islist(segL), - if(isstring(segL_1), - segL=apply(segL,parse(#)); - ); - ); - tmp1=Flattenlist(segL); //180816from - segL=[]; - forall(tmp1,tmp2, - forall(1..(length(tmp2)-1), - segL=append(segL,[tmp2_#,tmp2_(#+1)]); - ); - ); //180816from options=optionorg; tmp=Divoptions(options); Ltype=tmp_1; Noflg=tmp_2; eqL=tmp_5; color=tmp_(length(tmp)-2); - opstr=tmp_(length(tmp)-1); - opcindy=tmp_(length(tmp)); + Eps=10^(-2); + msgflg="Y"; forall(eqL, //180815from tmp=Strsplit(#,"="); - tmp1=Toupper(substring(tmp_1,0,1)); //181111 - if(substring(tmp1,0,3)=="E", + tmp1=Toupper(substring(tmp_1,0,1)); + if(tmp1=="E", Eps=parse(tmp_2); options=remove(options,[#]); ); - );//180815to + if(tmp1=="M", //190506from + msgflg=Toupper(substring(tmp_2,0,1)); + options=remove(options,[#]); + ); //190506to + );//180815to + tmp1=segLorg; //190331from + if(!islist(tmp1),tmp1=[tmp1]); + Changestyle3d(tmp1,["nodisp"]); + segL=[]; + forall(tmp1,tmp4, // 190401[seg=>tmp4] + if(isstring(tmp4), + tmp3=parse(tmp4); + if(MeasureDepth(tmp3)==1,tmp3=[tmp3]); //190401 + tmp2=[]; + forall(tmp3, + if(isstring(#),tmp=parse(#),tmp=#); + tmp2=append(tmp2,tmp); + ); + , + tmp2=[#]; + ); + segL=concat(segL,tmp2); + ); + tmp1=faceLorg; + if(!islist(tmp1),tmp1=[tmp1]); + faceL=[]; + forall(tmp1,tmp4, // 190401[face=>tmp4] + if(isstring(tmp4), + tmp2=parse(tmp4); + if(indexof(tmp4,"phf")>0, + tmp=replace(tmp4,"phf","phv"); + vtx=parse(tmp); + vtx=apply(vtx,parse(#)); + tmp2=apply(tmp2,vtx_#); + , + tmp2=[tmp2]; //190401 + ); + , + tmp2=tmp4; + ); + faceL=concat(faceL,tmp2); + ); //190331to ctr=1; frnL=[]; frhL=[]; forall(segL,seg, rng=[0,1]; forall(faceL,face, - rng=Nohiddensegs(seg,rng,face,vtxL,Eps); + rng=Nohiddensegs(seg,rng,face,Eps); ); forall(1..length(rng)/2, tmp=rng_(2*#-1); @@ -3484,13 +3504,14 @@ Nohiddenbyfaces(nm,segstr,faceL,vtxL,optionorg,optionsh):=( ); ); tmp1=apply(frnL,Dq+#+Dq); - tmp="frn3d"+nm+"="+text(tmp1); + tmp="frn3d"+nm+"="+text(tmp1)+";"; //190415 parse(tmp); - println(" generate totally "+"frn3d"+nm); tmp1=apply(frhL,Dq+#+Dq); - tmp="frh3d"+nm+"="+text(tmp1); + tmp="frh3d"+nm+"="+text(tmp1)+";"; //190415 parse(tmp); - println(" generate totally "+"frh3d"+nm); + if(msgflg=="Y", + println("generate "+"frn3d"+nm+",frh3d"+nm+""); //190331 + ); [frnL,frhL]; //181106 ); ////%Nohiddenbyfaces end//// @@ -3550,7 +3571,7 @@ Faceremovaldata(nm,vfdata,crvdata,options):=( if(Noflg<2, if(isstring(Ltype), if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")")); - Ltype=GetLinestyle(text(Noflg)+Ltype,name2); + Ltype=Getlinestyle(text(Noflg)+Ltype,name2); if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")")); , if(Noflg==1,Ltype=0); @@ -3769,7 +3790,7 @@ Sf3data(nm,funstr,var1org,var2org,optionorg):=( tmp2=tmp2+Dq+#+Dq+","; ); tmp2=substring(tmp2,0,length(tmp2)-1); - tmp="sf3d"+nm+"=[["+tmp1+"],["+tmp2+"]]"; + tmp="sf3d"+nm+"=[["+tmp1+"],["+tmp2+"]];"; //190415 parse(tmp); ); [sfdtuL,sfdtvL]; @@ -4393,7 +4414,7 @@ IntersectcrvsfR(nm,crvstr,fdorg,bdyeq,optionorg):=( ReadOutData(fname); ); println("generate "+name); - parse(name); + parse(name+";"); //190415 ); ////%IntersectcrvsfR end//// @@ -4498,6 +4519,8 @@ SfcutparadataR(nm,eqstrorg,sf,fdorg,optionorg,optionsh):=( ); ////%SfcutparadataR end//// +////////////// current skeleton 2018.01.04 //////////////// + ////%Skeletonparadata start//// Skeletonparadata(nm):=Skeletondatacindy(nm,[]); Skeletonparadata(nm,options):=Skeletondatacindy(nm,options); @@ -4506,8 +4529,7 @@ Skeletonparadata(nm,pltdata1org,pltdata2org,options):= Skeletondatacindy(nm,pltdata1org,pltdata2org,options); ////%Skeletonparadata end//// -////////////// new skeleton 2018.01.04 not completed and slow//////////////// - +////%Skeletondatacindy start//// Skeletondatacindy(nm):=Skeletondatacindy(nm,[]); Skeletondatacindy(nm,options):=( regional(tmp); @@ -4516,225 +4538,27 @@ Skeletondatacindy(nm,options):=( ); Skeletondatacindy(nm,pltdata1,pltdata2):= Skeletondatacindy(nm,pltdata1,pltdata2,[]); -Skeletondatacindy(nm,pltdata1org,pltdata2org,options):=( +Skeletondatacindy(nm,pltdata1org,pltdata2org,optionsorg):=( //help:Skeletonparadata("1"); //help:Skeletonparadata("1",[pdata1,pdata2],[pdata3]); -//help:Skeletondata(options2=[1(width)]); - regional(Eps,Eps2,name2,name3,Ltype,Noflg,reL,opcindy,color, - Data,Out,ObjL,Plt3L,Rr,pltdata1,pltdata2,Plt2L,ObjL,ii,Data, - Obj3,jj,Gd,PtD,size,tmp,tmp1,tmp2); - name2="sk2d"+nm; - name3="sk3d"+nm; - pltdata1=[];// 16.01.31 - forall(pltdata1org,tmp1, - tmp=parse(tmp1); - pltdata1=append(pltdata1,tmp); - ); - pltdata2=[];// 16.01.31 - forall(pltdata2org,tmp1, - tmp=parse(tmp1); - pltdata2=append(pltdata2,tmp); - ); - tmp=Divoptions(options); - Ltype=tmp_1; - Noflg=tmp_2; - reL=tmp_6; //16.02.28 - color=tmp_(length(tmp)-2); - opcindy=tmp_(length(tmp)); - Rr=0.15*1000/2.54/MilliIn; - size=1; - Eps2=0.05; - if(length(reL)>0, //16.02.28 - size=reL_1; - Rr=size*Rr; - if(length(reL)>1,Eps2=reL_2); - ); - Eps=10^(-4); - ObjL=Flattenlist(pltdata1); - PltL=Flattenlist(pltdata2); - Data=Makeskeletondata(ObjL,PltL,Rr); - Out=select(Data,length(Projcurve(#))>0); - Out=Flattenlist(Out); - tmp1=apply(Out,textformat(#,5)); - tmp=name3+"="+tmp1; - parse(tmp); - tmp=name2+"=Projcurve("+name3+");"; - parse(tmp); - Changestyle3d(pltdata1org,["nodisp"]); - if(Noflg<3, - println("generate skeleton :"+name3); - tmp1=text(pltdata1org); - tmp1="list("+substring(tmp1,1,length(tmp1)-1)+")"; - tmp2=text(pltdata2org); - tmp2="list("+substring(tmp2,1,length(tmp2)-1)+")"; - tmp=name3+"=Skeletonpara3data("+tmp1+","+tmp2+","; - tmp=tmp+text(size)+")"; - GLIST=append(GLIST,tmp); - tmp=name2+"=Projpara("+name3+")"; - GLIST=append(GLIST,tmp); - ); - if(Noflg<2, - if(isstring(Ltype), - if(color!=KCOLOR, //180904 - Texcom("{");Com2nd("Setcolor("+color+")");//180722 - ); - Ltype=GetLinestyle(text(Noflg)+Ltype,name2); - if(color!=KCOLOR, //180904 - Texcom("}");//180722 - ); - , - if(Noflg==1,Ltype=0); - ); - GCLIST=append(GCLIST,[name2,Ltype,opcindy]); - if(SUBSCR==1, - Subgraph(name3,opcindy); - ); - ); - Out; -); - -Makeskeletondata(ObjL,PltL,R0):=( - regional(Allres,res,Eps1,obj,plt,obj2,remov,flg,koc,z1,z2,Rr,str, - mm,nn,kk,ptk,pL,pt,ptL,tmp,tmp1,tmp2,tmp3,tmp3d); - Eps1=10.0^(-2); - Allres=[]; - forall(1..(length(ObjL)),mm, - obj=ObjL_mm; - remov=[]; - obj2=Projcurve(obj); - forall(1..(length(PltL)),nn, - plt=PltL_nn; - tmp=Projcurve(plt); - koc=IntersectcurvesPp(obj2,tmp); - forall(1..(length(koc)),kk, - ptk=koc_kk; - tmp=PointonCurve(ptk_2,obj); - z1=Zparapt(tmp); - tmp=PointonCurve(ptk_3,plt); - z2=Zparapt(tmp); - if(z1<z2-Eps1, - tmp=max([sqrt(1-(ptk_5)^2),0.75]); - Rr=R0/tmp; - tmp2=[]; - flg=0; - tmp=reverse(1..(floor(ptk_2))); - forall(tmp, - if(flg==0, - if(|obj2_#-ptk_1|>Rr, - tmp2=[#]; - flg=1; - ); - ); - ); - if(length(tmp2)==0,tmp2=[1]); - flg=0; - tmp=(ceil(ptk_2))..(length(obj2)); - forall(tmp, - if(flg==0, - if(|obj2_#-ptk_1|>Rr, - tmp2=append(tmp2,#); - flg=1; - ); - ); - ); - if(length(tmp2)==1,tmp2=append(tmp2,length(obj2))); - tmp=obj2_((tmp2_1)..(tmp2_2)); - tmp1=Circledata("",[ptk_1,ptk_1+[Rr,0]],["Num=8","nodata"]); - tmp1=Intersectcurves(tmp,tmp1); - if(length(tmp1)==2, - tmp=sort([tmp1_1_2,tmp1_2_2]); - tmp=[[tmp2_1-1+tmp_1,1],[tmp2_1-1+tmp_2,-1]]; - remov=concat(remov,tmp); - ); - if(length(tmp1)==1, - if(tmp2_1==1, - tmp=[[1,1],[tmp2_1-1+tmp1_1_2,-1]]; - , - tmp=[[tmp2_1-1+tmp1_1_2,1],[length(obj2),-1]]; - ); - remov=concat(remov,tmp); - ); - ); - ); - ); - if(length(remov)==0, - res=obj; - , - res=[]; - remov=sort(remov,[#_1,#_2]); - tmp=select(remov,#_1<1-Eps1); - if(length(tmp)==0, - flg=0; - res=[1]; - , - flg=length(tmp); - res=[]; - ); - forall(remov, - tmp=flg; - if(#_2==-1, - flg=flg-1; - if(flg==0,res=append(res,#_1)); - ); - if(#_2==1, - flg=flg+1; - if(tmp==0,res=append(res,#_1)); - ); - ); - if((flg==0)&(res_(length(res))<length(obj)), - res=append(res,length(obj)); - ); - tmp=res; - res=[]; - forall(1..(length(tmp)/2),nn, - tmp1=tmp_(2*nn-1); - tmp2=tmp_(2*nn); - pL=(ceil(tmp1))..(floor(tmp2)); - if(tmp1<ceil(tmp1)-Eps1,pL=prepend(tmp1,pL)); - if(tmp2>floor(tmp2)+Eps1,pL=append(pL,tmp2)); - ptL=[]; - forall(pL, - pt=PointonCurve(#,obj); - ptL=append(ptL,pt); - ); - res=append(res,ptL); - ); - ); - Allres=append(Allres,res); - ); - Allres; -); - -////////////// current skeleton 2018.01.04 //////////////// - -////%Skeletonparadata start//// -Skeletondatacindy(nm):=Skeletondatacindy(nm,[]); -Skeletondatacindy(nm,options):=( - regional(tmp); - tmp=Datalist3d(); - Skeletondatacindy(nm,tmp,tmp,options); -); -Skeletondatacindy(nm,pltdata1,pltdata2):= - Skeletondatacindy(nm,pltdata1,pltdata2,[]); -Skeletondatacindy(nm,pltdata1org,pltdata2org,optionsorg):=( -//help:Skeletondatacindy("1"); -//help:Skeletondatacindy("1",[pdata1,pdata2],[pdata3]); -//help:Skeletondatacindy(options=[1(width),"File=y(/m/n)","Not=ptlist","Check=ptlist"]); +//help:Skeletonparadatac(options=[1(width),"File=y(/m/n)","Not=ptlist","Check=ptlist"]); regional(Eps,Eps2,name2,name3,options,Ltype,Noflg,reL,eqL,opcindy, Out,ObjL,Plt3L,Rr,pltdata1,pltdata2,Plt2L,ObjL,ii,Data, Obj3,jj,Gd,PtD,size,tmp,tmp1,tmp2,color, fileflg,wflg,mkflg,fname,varL,nn,chkL); //181101 name2="sk2d"+nm; name3="sk3d"+nm; - fname=Fhead+"sk"+nm+".txt"; //181102 + fname=Fhead+"sk"+nm+".txt"; // no ketjs //181102 pltdata1=[];// 16.01.31 forall(pltdata1org,tmp1, tmp=parse(tmp1); + tmp=apply(tmp,if(isstring(#),parse(#),#));//190506 pltdata1=append(pltdata1,tmp); ); pltdata2=[];// 16.01.31 forall(pltdata2org,tmp1, tmp=parse(tmp1); + tmp=apply(tmp,if(isstring(#),parse(#),#));//190506 pltdata2=append(pltdata2,tmp); ); options=optionsorg; @@ -4755,10 +4579,10 @@ Skeletondatacindy(nm,pltdata1org,pltdata2org,optionsorg):=( Rr=size*Rr; if(length(reL)>1,Eps2=reL_2); ); - forall(eqL, //181101from + forall(eqL, // no ketjs on //181101from tmp=Strsplit(#,"="); tmp1=Toupper(substring(tmp_1,0,1)); - if(tmp1=="FI", + if(tmp1=="F", //190320 fileflg=Toupper(substring(tmp_2,0,1)); options=remove(options,[#]); ); @@ -4773,13 +4597,13 @@ Skeletondatacindy(nm,pltdata1org,pltdata2org,optionsorg):=( chkL=parse(tmp_2); options=remove(options,[#]); ); - ); + );// no ketjs off Eps=10^(-4); ObjL=Flattenlist(pltdata1); Plt3L=Flattenlist(pltdata2); - tmp=apply(Plt3L,ProjcoordCurve(#)); + tmp=apply(Plt3L,Projcoordcurve(#)); Plt2L=Flattenlist(tmp); - if((fileflg=="Y")%(fileflg=="M")&(mkflg>-1), //181101from, 181103 + if((fileflg=="Y")%(fileflg=="M")&(mkflg>-1), // no ketjs on //181101from, 181103 wflg=1; tmp=flatten(pltdata1org); varL=tmp; @@ -4814,21 +4638,21 @@ Skeletondatacindy(nm,pltdata1org,pltdata2org,optionsorg):=( if(isexists(Dirwork,fname), mkflg=0; ReadOutData(fname); - tmp=name3+"="+Textformat(parse(name3),5); + tmp=name3+"="+Textformat(parse(name3),5)+";"; //190415 parse(tmp); - tmp=name2+"="+Textformat(parse(name2),5); + tmp=name2+"="+Textformat(parse(name2),5)+";"; //190415 parse(tmp); ); ); ); - ); - ); + ); + );// no ketjs off if(mkflg==1, //181102 ///////////// tmp=apply(pltdata1,replace(#,"3d","2d")); Out=[]; forall(1..(length(ObjL)),ii, Obj3=ObjL_ii; - tmp=ProjcoordCurve(Obj3); + tmp=Projcoordcurve(Obj3); Data=Makeskeletondata([tmp],Plt2L,Rr,Eps2); forall(1..(length(Data)),jj, Gd=Data_jj; @@ -4846,7 +4670,7 @@ Skeletondatacindy(nm,pltdata1org,pltdata2org,optionsorg):=( ); Out=select(Out,length(Projcurve(#))>0); // 16.12.19 tmp1=apply(Out,textformat(#,5)); - tmp=name3+"="+tmp1; + tmp=name3+"="+tmp1+";"; //190415 parse(tmp); tmp=name2+"=Projcurve("+tmp1+");"; parse(tmp); @@ -4854,7 +4678,7 @@ Skeletondatacindy(nm,pltdata1org,pltdata2org,optionsorg):=( if(mkflg>-1, Changestyle3d(pltdata1org,["nodisp"]); ); - if((Noflg<3)&(mkflg>-1), //181103 + if((Noflg<3)&(mkflg> -1), //no ketjs on //181103 if(fileflg!="Y", //181102 println("generate skeleton :"+name3); tmp1=text(pltdata1org); @@ -4869,11 +4693,11 @@ Skeletondatacindy(nm,pltdata1org,pltdata2org,optionsorg):=( , GLIST=append(GLIST,"ReadOutData("+Dq+fname+Dq+")");//181102 ); - ); + ); //no ketjs off if((Noflg<2)&(mkflg>-1), //181103 if(isstring(Ltype), if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")")); - Ltype=GetLinestyle(text(Noflg)+Ltype,name2); + Ltype=Getlinestyle(text(Noflg)+Ltype,name2); if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")")); , if(Noflg==1,Ltype=0); @@ -4883,7 +4707,7 @@ Skeletondatacindy(nm,pltdata1org,pltdata2org,optionsorg):=( Subgraph(name3,opcindy); ); ); - if(mkflg>-1, + if(mkflg>-1, // no ketjs on if((fileflg=="Y")&(wflg==1), //181102from tmp1="skeleton"+nm+".txt"; SCEOUTPUT = openfile(tmp1); @@ -4892,11 +4716,11 @@ Skeletondatacindy(nm,pltdata1org,pltdata2org,optionsorg):=( ); closefile(SCEOUTPUT); WriteOutData(fname,[name3,parse(name3),name2,parse(name2)]); - ); //181102to + ); //181102to Out; - ); + );// no ketjs off ); -////%Skeletonparadata end//// +////%Skeletondatacindy end//// ////%Makeskeletondata start//// Makeskeletondata(Obj2L,Plt2L,R0,Eps2):=( @@ -4925,7 +4749,7 @@ Makeskeletondata(Obj2L,Plt2L,R0,Eps2):=( tmp=Dind_ii; tmp=Dmat_(Dind_ii_1..Dind_ii_2); pt2=Columnlist(tmp,1..2); - koc=IntersectcrvsPp(pt1,pt2,[Eps]); + koc=Intersectcrvspp(pt1,pt2,[Eps]); if(length(koc)>0, breakflg=0; forall(1..(length(koc)),jj, @@ -5014,7 +4838,7 @@ Makeskeletondata(Obj2L,Plt2L,R0,Eps2):=( forall(reverse(1..nn),jj, contflg=0; if(breakflg==0, - ptq=PointonCurve(jj,pt1); + ptq=Pointoncurve(jj,pt1); if(Norm(pt-ptq)<Rr, contflg=1; ); @@ -5032,7 +4856,7 @@ Makeskeletondata(Obj2L,Plt2L,R0,Eps2):=( hh=t2-t1; forall(1..10, hh=hh*0.5; - ptq=PointonCurve(t1+hh,pt1); + ptq=Pointoncurve(t1+hh,pt1); if(Norm(pt-ptq)<Rr, t2=t2-hh; , @@ -5046,7 +4870,7 @@ Makeskeletondata(Obj2L,Plt2L,R0,Eps2):=( forall((nn+1)..te,jj, contflg=0; if(breakflg==0, - ptq=PointonCurve(jj,pt1); + ptq=Pointoncurve(jj,pt1); if(Norm(pt-ptq)<Rr, contflg=1; ); @@ -5064,7 +4888,7 @@ Makeskeletondata(Obj2L,Plt2L,R0,Eps2):=( hh=t2-t1; forall(1..10, hh=hh*0.5; - ptq=PointonCurve(t1+hh,pt1); + ptq=Pointoncurve(t1+hh,pt1); if(Norm(pt-ptq)<Rr, t1=t1+hh; , @@ -5079,19 +4903,19 @@ Makeskeletondata(Obj2L,Plt2L,R0,Eps2):=( Res=[]; forall(1..(length(KukanL)),ii, tmp=KukanL_ii; - t1=tmp_1; nn1=floor(t1); - t2=tmp_2; nn2=floor(t2); - PtL=[]; + t1=tmp_1; nn1=re(floor(t1)); + t2=tmp_2; nn2=re(floor(t2)); + PtL=[]; if(t1-nn1<1-Eps, - tmp=PointonCurve(t1,pt1); + tmp=Pointoncurve(t1,pt1); PtL=[tmp]; ); forall((nn1+1)..nn2,jj, - tmp=PointonCurve(jj,pt1); + tmp=Pointoncurve(jj,pt1); PtL=append(PtL,tmp); ); if(t2-nn2>Eps, - tmp=PointonCurve(t2,pt1); + tmp=Pointoncurve(t2,pt1); PtL=append(PtL,tmp); ); tmp=Listplot("",PtL,["nodata"]); @@ -5099,6 +4923,7 @@ Makeskeletondata(Obj2L,Plt2L,R0,Eps2):=( ); Allres=concat(Allres,Res); ); + Allres; ); ////%Makeskeletondata end//// @@ -5160,8 +4985,8 @@ Kukannozoku(Jokyo,KukanL):=( ////////////////// end of current skeleton////////////// -////%ProjcoordCurve start//// -ProjcoordCurve(Curve):=( +////%Projcoordcurve start//// +Projcoordcurve(Curve):=( regional(SP,CP,ST,CT,Out,jj,pt,x,y,z,xz,yz,zz); SP=sin(PHI); CP=cos(PHI); ST=sin(THETA); CT=cos(THETA); @@ -5176,7 +5001,7 @@ ProjcoordCurve(Curve):=( ); Out; ); -////%ProjcoordCurve end//// +////%Projcoordcurve end//// ////%Divnohidhid start//// Divnohidhid(nm,dt3dorg,nvec):=Divnohidhid(nm,dt3dorg,nvec,[],["do"]); @@ -5235,11 +5060,11 @@ Divnohidhid(nm,dt3dorg,nvec,optionorg,options2):=( ); tmp1="["; forall(nohid,tmp1=tmp1+textformat(#,5)+","); - tmp1=substring(tmp1,0,length(tmp1)-1)+"]"; + tmp1=substring(tmp1,0,length(tmp1)-1)+"];"; //190415 parse(name+"nh="+tmp1); tmp1="["; forall(hid,tmp1=tmp1+textformat(#,5)+","); - tmp1=substring(tmp1,0,length(tmp1)-1)+"]"; + tmp1=substring(tmp1,0,length(tmp1)-1)+"];"; //190415 parse(name+"h="+tmp1); [nohid,hid]; ); @@ -5282,7 +5107,7 @@ Beziersurf(nm,m,n,pL):=( "y" ]); if(ispoint(pL_1), - p3dL=apply(pL,parse(text(#)+"3d")); + p3dL=apply(pL,#.name+"3d"); //190505 , p3dL=apply(pL,parse(#+"3d")); ); diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1logr.txt b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1logr.txt index 79cc8fc315b..d77763598c8 100644 --- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1logr.txt +++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1logr.txt @@ -1,3 +1,55 @@ +// 20190622 +// Implicitplot changed ("x","y" supported) +// 20190603 +// Initglist changed (XMIN,... added ) +// 20190530 +// Initglist, Setglist, Addglist added +// 20190514 +// Setenglish removed +// 20190511 +// Implicitplot changed (Eps=>10^(-6)) +// Ketinit changed (KetcindyDataList initialized) +// 20190508 +// Implicitplot debugged (bisection method employed ) +// 20190507 +// Replaceall added +// 20190505 +// Ptselected changed (for KeTCinyJS, one point) +// text(pt) => pt.name +// 20190504 +// Ketinit changed (REMOVEPT,SLIDEFLG) +// Colorname2rgb changed ("cindycolor" added) +// 20190502 +// Pp -> pp, etc +// 20190429 +// Colorname2rgb changed (lightgray added) +// 20190426 +// Pointdata debugged ( case of geo-point ) +// 20190428 +// Ketinit changed (TABLECOUNT added ) +// 20190424 +// Framedata majorly changed/debugged +// 20190423 +// Ketinit changed ( Frame not appeared in KeTCindyJS ) +// MeasureDepth majorly changed +// 20190420 +// Plotdata changed (name in case of "-...") +// 20190416 +// Ketinit changed (zenkaku space) +// 20190415 +// parse( ..= ) changed ( ; added ) +// 20190412 +// Some functions moved to basic2 +// 20190409 +// Pointdata changed (color) +// 20190406 +// Pointdata changed (size) +// Implicitplot debugged (opstr ) +// 20190405 +// Pointdata changed (color,inside ) +// 20190323 +// Circledata changed ([Center,r] supported +// Colorname2rgb changed ( in the case of no color, "Assign" added ) // 20190311 // Shade changed ( order of COM2ndlist) // Com2nd changed ("before" removed ) diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1r.cs b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1r.cs index 4957f56cd83..c68a550dd11 100644 --- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1r.cs +++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1r.cs @@ -14,9 +14,9 @@ // along with this program. If not, see <http://www.gnu.org/licenses/> // -println("KeTCindy V.3.2.5"); +println("KeTCindy V.3.2.9"); println(ketjavaversion()); -println("ketcindylibbasic1[20190311] loaded"); +println("ketcindylibbasic1[20190622] loaded"); //help:start(); @@ -58,7 +58,8 @@ Ketinit(work,sy,rangex,rangey):=(//181001to MARKLEN=0.05; MARKLENInit=MARKLEN; //180504 MARKLENNow= MARKLEN; - GENTEN=[0,0];//18.01.15until + GENTEN=[0,0];//18.01.15to + TABLECOUNT=0; //190428 KETPICLAYER=20; MilliIn=1/2.54*1000; PenThick=round(MilliIn*0.02); @@ -69,17 +70,17 @@ Ketinit(work,sy,rangex,rangey):=(//181001to YaCut=0; YasenStyle="dr,1"; Yajiristyle="tf"; KETPICCOUNT=1; KCOLOR=[0,0,0]; - GLIST=[]; + GLIST=[]; // no ketjs GCLIST=[]; -// GDATALIST=[]; //no ketjs +// GDATALIST=[]; //no ketjs on GOUTLIST=[]; - POUTLIST=[]; + POUTLIST=[]; // no ketjs off VLIST=[]; FUNLIST=[]; LETTERlist=[]; - COM0thlist=[]; + COM0thlist=[]; // no ketjs on COM1stlist=[]; - COM2ndlist=[]; + COM2ndlist=[]; // no ketjs off // COM2ndlistb=[]; //180612 ADDAXES="1"; AXSTYLE=["l","x","e","y","n","O","sw","","",""]; //181216 @@ -99,14 +100,15 @@ Ketinit(work,sy,rangex,rangey):=(//181001to GPACK="tpic"; //180817 ErrFlag=0; KETJSOP=[]; //190129 - // no ketjs on 190122 + REMOVEPTJS=[]; SLIDEFLG="Y"; //190504 + KetcindyjsDataList=[]; // setdirectory(Dirwork); if(!isstring(Fhead), // 17.10.13from, 17.11.12 Fhead=text(curkernel()); Fhead=replace(Fhead,".cdy",""); Slidename=Fhead; //17.10.24 );//17.11.12 - Dircdy=replace(Dircdy,"%E3%80%80"," ");//180405 + Dircdy=replace(Dircdy,"%E3%80%80",unicode("3000"));//190416 Namecdy=Cindyname();//180608 tmp1=Indexall(Dircdy,"%"); //180329from if(length(tmp1)>0, @@ -170,15 +172,53 @@ Ketinit(work,sy,rangex,rangey):=(//181001to ); ////%Ketinit end//// +////%Initglist start//// 190530 +Initglist():=( + GLIST=[]; // no ketjs + GCLIST=[]; + COM0thlist=[]; // no ketjs on + COM1stlist=[]; + COM2ndlist=[]; // no ketjs off + KCOLOR=[0,0,0]; + SCALEX=1; + SCALEY=1; + XMIN=SW.x; XMAX=NE.x; //190603[2lines] + YMIN=SW.y; YMAX=NE.y; +); +////%Initglist end//// + +////%Setglist start//// 190530 +Setglist():=( + GLISTadd=GLIST; + GCLISTadd=GCLIST; + COM0thlistadd=COM0thlist; // no ketjs on + COM1stlistadd=COM1stlist; + COM2ndlistadd=COM2ndlist; // no ketjs off +); +////%Setglist end//// + +////%Addglist start//// 190530 +Addglist():=( + GLIST=GLISTadd; + GCLIST=GCLISTadd; + COM0thlist=COM0thlist; // no ketjs on + COM1stlist=COM1stlistadd; + COM2ndlist=COM2ndlistadd; // no ketjs off +); +////%Addglist end//// + ////%Fillstore start//// Fillstore():=( regional(tmp,tmp1,out,dtL,txtL,clrL,txt,clr,nn,jj); dtL=[ //181209from ["Figure",[1,0.29,0.29]],["Parent",[1,1,0]], - ["ParaF",[0,1,1]],["Flip",[0,0,1]],["Anime",[0.51,0.95,1]], + ["ParaF",[1,0.93,0.6]],["Flip",[0,0,1]],["Anime",[0.51,0.95,1]], ["Title",[0,1,0]],["Slide",[0.47,0,0.72]],["Digest",[1,0.74,0.47]], ["KeTJS",[0,1,1]],["KeTJSoff",[0,1,1]], - ["Objview",[0,1,0]] + ["Objview",[0,1,0]], + ["Play",[1.0, 0.741, 0.467]],["Pause",[1.0, 0.741, 0.467]], //190426[2lines] + ["Rev",[1.0, 0.741, 0.467]],["Stop",[1.0, 0.741, 0.467]], + ["Skele",[1.0, 0.741, 0.467]],["Nohid",[1.0, 0.741, 0.467]] ]; txtL=apply(dtL,#_1); clrL=apply(dtL,#_2); @@ -212,7 +252,7 @@ Fillblack(str):=( tmp=select(tmp1,#.name=="Text0"); if(length(tmp)==0, forall(store, - tmp=parse(#_1); + tmp=parse(#_1+";"); tmp.fillcolor=[0,0,0]; ); , @@ -304,13 +344,13 @@ Setwindow(str):=( Putpoint("SW",Pcrd([XMIN,YMIN])); Putpoint("NE", Pcrd([XMAX,YMAX])); ); - if(msg=="y", + if(msg=="y", // no ketjs on println("Setwindow(["+XMIN+","+XMAX+"],["+YMIN+","+YMAX+"])"); ); layer(KETPICLAYER); autoclearlayer(KETPICLAYER,true); drawpoly([Pcrd([XMIN,YMIN]), Pcrd([XMAX,YMIN]), - Pcrd([XMAX,YMAX]),Pcrd([XMIN,YMAX])],color->[1,1,1]); + Pcrd([XMAX,YMAX]),Pcrd([XMIN,YMAX])],color->[1,1,1]); // no ketjs off ); Setwindow(xrange,yrange):=( //help:Setwindow([2,3],[-1,1]); @@ -787,7 +827,7 @@ Changework(dirorg):=Changework(dirorg,["Sub=y"]); Changework(dirorg,options):=( //16.10.21 //help:Changework(directory); //help:Changework(Dircdy+"fig"); -//help:Changework(options=["Sub=n"(not to make folder fig]); +//help:Changework(options=["Sub=n"<not to make folder fig>); regional(dir,subdir,tmp,,eqL,makesub); tmp=Divoptions(options); eqL=tmp_5; //180605from @@ -865,7 +905,7 @@ Changestyle(nameL,style):=( if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on Texcom("}");//180722 ); //no ketjs off @@ -896,17 +936,19 @@ Op(n,object):=( // 16.05.25 ////%Op end//// ////%Ptselected start//// -Ptselected():=Isptselected(allpoints());//180711[2lines] -Ptselected(ptlist):=Isptselected(ptlist); -Isptselected():=Isptselected(allpoints()); //180706 -Isptselected(ptlist):=( +Ptselected():=Isptselected(allpoints()); //180706 +Ptselected(ptlistorg):=( //help:Ptselected(); -//help:Isptselected(); - regional(flg); +//help:Ptselected(geopoint); + regional(ptlist,flg,Eps); + Eps=(XMAX-XMIN)/10; //190505 flg=0; + ptlist=ptlistorg; //190505[2lines] + if(!islist(ptlist),ptlist=[ptlist]); forall(ptlist, if(flg==0, - if(isselected(#),flg=1); + if(isselected(#),flg=1); // no ketjs +// if(|mouse().xy-#.xy|<Eps,flg=1); // only ketjs //190505 ); ); if(flg==0,false,true); @@ -970,7 +1012,7 @@ Dependgeo(geo):=( regional(tmp,tmp1,tmp2,out); tmp=Finddef(geo); if(!iscircle(geo), - out=[text(geo)]; + out=[geo.name]; //190505 , out=[geo]; ); @@ -1013,7 +1055,7 @@ Drawprocess(nn,options):=( ); //181030to tmp=remove(allpoints(),[NE,SW,TH,FI]); tmp1=select(tmp, - substring(text(#),length(text(#))-1,length(text(#)))!="z"); + substring(#.name,length(#.name)-1,length(#.name))!="z"); //190505 tmp1=concat(tmp1,alllines()); // tmp1=concat(tmp1,allcircles()); All=apply(tmp1,Dependgeo(#)); @@ -1149,6 +1191,20 @@ Sprintf(value,dig):=( ); ////%Sprintf end//// +////%Replaceall start//// 190507 +Replaceall(str,repL):=( + regional(tmp1,tmp2,out); + out=str; + forall(1..(length(repL)/2), + tmp1=repL_(2*#-1); + tmp2=repL_(2*#); + if(!isstring(tmp2),tmp2=text(tmp2)); + out=replace(out,tmp1,tmp2); + ); + out; +); +////%Replaceall end//// + ////%Assign start//// Assign(str):=( //190125from regional(tmp); @@ -1210,7 +1266,6 @@ Assign(funstr,varname,rep):=( ); ////%Assign end//// -////%Measuredepth start//// Measuredepth(list):=( regional(tmp,tmp1,Depth,Flg); Flg=0; @@ -1237,6 +1292,22 @@ Measuredepth(list):=( );//180501 Depth; ); + +////%Measuredepth start//// +Measuredepth(list):=( //190423 + regional(str,nn,tmp,tmp1,tmp2); + str=text(list); + tmp1=Indexall(str,"["); + tmp2=select(tmp1,!contains(tmp1,#+1)); + nn=tmp2_1; + tmp1=substring(str,nn,length(str)); + tmp=indexof(tmp1,","); + tmp1=substring(tmp1,0,tmp-1); + if(!ispoint(parse(tmp1)), + nn=nn-1; + ); + nn; +); ////%Measuredepth end//// ////%Flattenlist start//// @@ -1456,19 +1527,19 @@ Ptcrv(Num,Fig):=( ////%Invert start//// Invert(Fig):=( -//help:Invert("gr1"); +//help:Invert("gr1"); //no ketjs regional(tmp); if(isstring(Fig),tmp=parse(Fig),tmp=Fig); // 16.01.27 reverse(tmp); ); -Invert(nm,Fig):=Invert(nm,Fig,["nodisp"]); // from 16.01.27 +Invert(nm,Fig):=Invert(nm,Fig,["nodisp"]); // from 160127 Invert(nm,Fig,options):=( //help:Invert("1","gr1"); regional(name,tmp); name="-inv"+nm; tmp=Invert(Fig); Listplot(name,tmp,options); -);// until 16.01.27 +);// to 160127 ////%Invert end//// ////%Paramoncrv start//// @@ -1643,11 +1714,11 @@ Koutenseg(pA,pB,pC,pD,options):=( ///////// Start of old Intersect //////////// -////%IntersectcrvsPp start//// -IntersectcrvsPp(Gr1,Gr2):=IntersectcrvsPp(Gr1,Gr2,[]); -IntersectcrvsPp(Gr1,Gr2,options):=( -//help:IntersectcrvsPp("gr1","pa1"); -//help:IntersectcrvsPp(options=[Eps2(0.1),"Dif=0.05"]); +////%Intersectcrvspp start//// +Intersectcrvspp(Gr1,Gr2):=Intersectcrvspp(Gr1,Gr2,[]); +Intersectcrvspp(Gr1,Gr2,options):=( +//help:Intersectcrvspp("gr1","pa1"); +//help:Intersectcrvspp(options=[Eps2(0.1),"Dif=0.05"]); regional(Out,Eps,Eps2,Eps0,Flg,Data1,Data2, Tmp1,Tmp2,Tmp3,Tmp,KL1,KL2,pA,pB,Ni,Nj, pP,pQ,rT,Flg,eqL,realL,opstr,Dif); @@ -1788,14 +1859,14 @@ IntersectcrvsPp(Gr1,Gr2,options):=( ); // 15.04.06 until Out; ); -////%IntersectcrvsPp end//// +////%Intersectcrvspp end//// ////%Intersectcrvs start//// Intersectcrvs(Gr1,Gr2):=Intersectcrvs(Gr1,Gr2,[]); //help:Intersectcrvs("gr1","pa1"); Intersectcrvs(Gr1,Gr2,options):=( regional(tmp,tmp1,tmp2); - tmp1=IntersectcrvsPp(Gr1,Gr2,options); + tmp1=Intersectcrvspp(Gr1,Gr2,options); apply(tmp1,#_1); ); ////%Intersectcrvs end//// @@ -2107,11 +2178,11 @@ Collectsameseg(ptdL):=( ); ////%Collectsameseg end//// -////%IntersectcurvesPp start//// -IntersectcurvesPp(crv1org,crv2org):=IntersectcurvesPp(crv1org,crv2org,[]); -IntersectcurvesPp(crv1org,crv2org,options):=( -//help:IntersectcurvesPp(crv1,crv2); -//help:IntersectcurvesPp(options=[Eps1(0.01),Eps2(0.1),Dist(2)]) +////%Intersectcurvespp start//// +Intersectcurvespp(crv1org,crv2org):=Intersectcurvespp(crv1org,crv2org,[]); +Intersectcurvespp(crv1org,crv2org,options):=( +//help:Intersectcurvespp(crv1,crv2); +//help:Intersectcurvespp(options=[Eps1(0.01),Eps2(0.1),Dist(2)]) regional(Eps,Eps1,Eps2,Dist,crv1,crv2,ii,jj,seg1,seg2,self,loopL,out, flg,tmp,tmp1,tmp2); Eps=10^(-4); @@ -2215,7 +2286,7 @@ IntersectcurvesPp(crv1org,crv2org,options):=( ); //190221to out; ); -////%IntersectcurvesPp end//// +////%Intersectcurvespp end//// ////%Intersectcurves start//// Intersectcurves(crv1org,crv2org):=Intersectcurves(crv1org,crv2org,[]); @@ -2223,15 +2294,15 @@ Intersectcurves(crv1org,crv2org,options):=( //help:Intersectcurves(crv1,crv2); //help:Intersectcurves(options=[Eps1(0.1),Dist(2)]) regional(tmp); - tmp=IntersectcurvesPp(crv1org,crv2org,options); + tmp=Intersectcurvesop(crv1org,crv2org,options); tmp=apply(tmp,#_1); ); ////%Intersectcurves end//// ///////////End of new Intersect ////////////// -////%NearestptcrvPhy start//// -NearestptcrvPhy(point,PL):=( +////%Nearestptcrvphy start//// +Nearestptcrvphy(point,PL):=( regional(tmp,pP,plist); pP=Pcrd(point); if(isstring(PL),plist=parse(PL),plist=PL); @@ -2241,7 +2312,7 @@ NearestptcrvPhy(point,PL):=( tmp=tmp_1; [tmp_1/SCALEX,tmp_2/SCALEY]; ); -////%NearestptcrvPhy end//// +////%Nearestptcrvphy end//// ////%Nearestptcrv start//// Nearestptcrv(point,plist):=( @@ -2339,7 +2410,7 @@ Derivative(Arg1,Arg2,Arg3):=(//1807120 , tmp1=Lineplot("",[[0,v],[1,v]],["nodata"]); ); - tmp=IntersectcurvesPp(pdstr,tmp1); + tmp=Intersectcurvespp(pdstr,tmp1); if(length(tmp)==0, println(" Derivative cannot be found"); out=""; @@ -2432,7 +2503,7 @@ Tangentplot(nm,pdstr,ptinfo,optionsorg):=( , tmp1=Lineplot("",[[0,v],[1,v]],["nodata"]); ); - tmp=IntersectcurvesPp(pdstr,tmp1); + tmp=Intersectcurvespp(pdstr,tmp1); if(length(tmp)==0,//1807120 println(" Derivative cannot be calculated"); flg=1; @@ -2611,8 +2682,8 @@ IntegrateO(pltdata,rangeorg):=( range=reverse(range); pmflg=-1; ); - va1=MeetCurve(pdata,range_1,0); - va2=MeetCurve(pdata,range_2,0); + va1=Meetcurve(pdata,range_1,0); + va2=Meetcurve(pdata,range_2,0); list=select(pdata,(#_1>range_1 & #_1<range_2)); if(length(list)>0, // 16.09.25 if(list_1_1>list_(length(list))_1, //16.11.03 @@ -2850,13 +2921,6 @@ Dottedline(gstr):=( ); ////%Dottedline end//// -////%SetEnglish start//// -SetEnglish():=( -//help:SetEnglish(); - Com0th("setlanguage('en')"); -); -////%SetEnglish end//// - ////%Drawlinetype start//// Drawlinetype(name,type):=( //help:Drawlinetype("gr1","da,1"); @@ -2942,7 +3006,7 @@ Setunitlen(UI):=( Setmarklen(ratio):=( //help:Setmarklen(0.2); MARKLEN=ratio*0.2;//16.11.01 - Com2nd("Setmarklen("+Textformat(ratio,5)+")"); + Com2nd("Setmarklen("+Textformat(ratio,5)+")"); //no ketjs ); ////%Setmarklen end//// @@ -2950,14 +3014,14 @@ Setmarklen(ratio):=( Setorigin(point):=( //help:Setorigin([1,2]); GENTEN=point; //181231 - Com2nd("Setorigin("+Textformat(point,5)+")"); + Com2nd("Setorigin("+Textformat(point,5)+")"); //no ketjs ); ////%Setorigin end//// ////%Fontsize start//// Fontsize(sizestr):=( //help:Fontsize("s"); - Com2nd("Fontsize('"+sizestr+"')"); + Com2nd("Fontsize('"+sizestr+"')"); //no ketjs ); ////%Fontsize end//// @@ -2965,7 +3029,7 @@ Fontsize(sizestr):=( Setpen(width):=( //help:Setpen(2); PenThick=PenThickInit*width; // 16.04.09 - Com2nd("Setpen("+text(width)+")"); + Com2nd("Setpen("+text(width)+")"); //no ketjs ); ////%Setpen end//// @@ -3401,6 +3465,8 @@ Colorname2rgb(name):=( //181212 ["olivegreen",[0.64,0,0.95,0.4]],["rawsienna",[0,0.72,1,0.45]], ["sepia",[0,0.83,1,0.7]],["brown",[0,0.81,1,0.6]], ["tan",[0.14,0.42,0.56,0]],["gray",[0,0,0,0.5]], + ["lightgray",[0,0,0,0.17]], //190429 + ["cindycolor",[0.66,0,69,0.71]], //190504 ["black",[0,0,0,1]],["white",[0,0,0,0]] ]; tmp=select(dL,#_1==name); @@ -3410,13 +3476,13 @@ Colorname2rgb(name):=( //181212 code=Colorcmyk2rgb(code); , println(" "+name+" not found"); - code=[0,0,0]; + code=Assign(name); //190323 ); ); ////%Colorname2rgb end//// -////%GetLinestyle start//// -GetLinestyle(str,name):=( +////%Getlinestyle start//// +Getlinestyle(str,name):=( regional(noflg,tmp,tmp1,tmp2,Dop,Ltype,subflg); Ltype=-1; Dop=""; @@ -3483,7 +3549,7 @@ GetLinestyle(str,name):=( ); Ltype; ); -////%GetLinestyle end//// +////%Getlinestyle end//// ////%Chunderscore start//// Chunderscore(str):=( @@ -3557,7 +3623,7 @@ AddGraph(nm,pltdata,options):=( pdata=tmp1; if(Noflg<3, println("generate addgraph "+name); - tmp=name+"="+Textformat(pdata,5); + tmp=name+"="+Textformat(pdata,5)+";"; //190415 parse(tmp); if(isstring(pltdata), // 16.04.04 from if(indexof(pltdata,"]")>0, @@ -3599,14 +3665,14 @@ AddGraph(nm,pltdata,options):=( forall(1..(length(pdata)), tmp=name+"p"+Textformat(#,5)+"="; if(length(pdata_#)>1, // 15.01.22 - tmp=tmp+"Listplot("+Textformat(pdata_#,5)+")"; + tmp=tmp+"Listplot("+Textformat(pdata_#,5)+");"; //190425 , - tmp=tmp+"Pointdata("+Textformat(pdata_#_1,5)+")"; + tmp=tmp+"Pointdata("+Textformat(pdata_#_1,5)+");"; //190425 ); GLIST=append(GLIST,tmp); //no ketjs tmp1=tmp1+name+"p"+Textformat(#,5)+","; ); - tmp1=name+"="+substring(tmp1,0,length(tmp1)-1)+")"; + tmp1=name+"="+substring(tmp1,0,length(tmp1)-1)+");"; //190425 ); GLIST=append(GLIST,tmp1); //no ketjs ); @@ -3616,7 +3682,7 @@ AddGraph(nm,pltdata,options):=( if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("}");//180722 ); //no ketjs off @@ -3701,7 +3767,7 @@ Joincrvs(nm,plotstrL,options):=( if(Noflg<3, println("generate joincurve "+name); tmp1=apply(PtL,Pcrd(#)); - tmp=name+"="+Textformat(tmp1,5); + tmp=name+"="+Textformat(tmp1,5)+";"; parse(tmp); tmp1=""; forall(plotstrL, @@ -3715,7 +3781,7 @@ Joincrvs(nm,plotstrL,options):=( if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("}");//180722 ); //no ketjs off @@ -3791,7 +3857,7 @@ Partcrv(nm,pA,pB,PkLstr,options):=( if(Noflg<3, println("generate partcrv "+name); tmp1=apply(Ans,Pcrd(#)); - tmp=name+"="+Textformat(tmp1,5); + tmp=name+"="+Textformat(tmp1,5)+";"; //190415 parse(tmp); // GLIST=append(GLIST, // 16.04.03 if(DepthFlg==0, @@ -3808,7 +3874,7 @@ Partcrv(nm,pA,pB,PkLstr,options):=( if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("}");//180722 ); //no ketjs off @@ -3838,8 +3904,8 @@ Pointdata(nm,list):=Pointdata(nm,list,[]); Pointdata(nm,listorg,options):=( //help:Pointdata("1",[2,4],["Size=5"]); //help:Pointdata("2",[[2,3],[4,1]]); -//help:Pointdata(options=["Size=(1)","Disp=(y)","Inside="]); -//help:Pointdata("Inside=1(def)/ratio/rgblist/colorname/-1"]); +//help:Pointdata(options=["Size=(1)","Disp=(y)","Msg=(y)","Inside=","Color="]); +//help:Pointdata("Inside=color/ratio/no"]); regional(list,name,nameL,ptlist,opstr,opcindy,Msg, eqL,dispflg,size,thick,tmp,tmp1,tmp2,tmp3, Ltype,Noflg,color,inside); @@ -3849,9 +3915,9 @@ Pointdata(nm,listorg,options):=( Ltype=tmp_1; Noflg=tmp_2; eqL=tmp_5; - opcindy=tmp_(length(tmp)); -// opstr=tmp_(length(tmp)-1); + opstr=tmp_(length(tmp)-1); color=tmp_(length(tmp)-2); + opcindy=tmp_(length(tmp)); size=""; dispflg="Y"; inside=color; @@ -3860,27 +3926,27 @@ Pointdata(nm,listorg,options):=( tmp=Strsplit(#,"="); tmp1=Toupper(substring(tmp_1,0,1)); if(tmp1=="S", - size=Toupper(substring(tmp_2,0,1));; - opcindy=opcindy+",size->"+text(size); //181013 + size=tmp_2; //190406from + tmp1=parse(size); + opcindy=opcindy+",size->"+text(tmp1); //190409to ); if(tmp1=="D", //181030from dispflg=Toupper(substring(tmp_2,0,1)); ); - if(tmp1=="I", //181229from - if(contains(["","no"],tmp_2), - if(tmp_2=="no",inside=append(inside,-1)); + if(tmp1=="I", //190405from + if(Toupper(substring(tmp_2,0,1))=="N", + inside=[-1,-1,-1]; , - tmp2=substring(tmp_2,0,1); - if(contains(["-","0","1",".","["],tmp2), - tmp=parse(tmp_2); - if(length(tmp)==4,tmp=Colorcmyk2rgb(tmp)); //190115 - if(!isstring(tmp),tmp=[tmp]); + tmp3=["0","1","2","3","4","5","6","7","8","9"]; + if(contains(tmp3,substring(tmp_2,0,1)), + inside=parse(tmp_2)*color; , - tmp=Colorname2rgb(tmp_2); + tmp3=Divoptions(["Color="+text(tmp_2)]); + inside=tmp3_(length(tmp3)-2); ); - inside=concat(inside,tmp); + opcindy=opcindy+",pointcolor->"+text(inside); ); - ); //181229to + ); //100405to if(tmp1=="M", //190206from Msg=Toupper(substring(tmp_2,0,1)); ); //190206to @@ -3891,10 +3957,11 @@ Pointdata(nm,listorg,options):=( ); ); //181030to if(isstring(listorg), - list=parse(listorg) + list=parse(listorg); , - list=listorg - ); //17.10.23 + list=listorg; + ); //17.10.23 + list=apply(list,Lcrd(#)); //190426 if(Measuredepth(list)==0,list=[list]);//180530 tmp=Measuredepth(list); if(tmp==1,ptlist=list,ptlist=list_1); //190126from @@ -3906,9 +3973,9 @@ Pointdata(nm,listorg,options):=( if(length(tmp)==1, //190301from tmp1=Textformat(tmp_1,5); ); //190301to - tmp=name+"="+tmp1; + tmp=name+"="+tmp1+";"; //190415 parse(tmp); - tmp=nameL+"="+tmp3; + tmp=nameL+"="+tmp3+";"; //190415 parse(tmp); //190126to if(Noflg<3, if(isstring(listorg), //17.10.23 @@ -3920,7 +3987,7 @@ Pointdata(nm,listorg,options):=( tmp=#; , if(ispoint(#), - tmp=text(#); + tmp=#.name; //190505 , tmp=Textformat(#,6); ); @@ -3928,7 +3995,7 @@ Pointdata(nm,listorg,options):=( tmp2=tmp2+tmp+","; ); tmp2=substring(tmp2,0,length(tmp2)-1)+")"; - //17.10.10until + //17.10.10to ); GLIST=append(GLIST,name+"=Pointdata("+tmp2+")"); //no ketjs ); @@ -3939,10 +4006,7 @@ Pointdata(nm,listorg,options):=( if(length(size)>0, Com2nd("Setpt("+size+")"); ); - thick=PenThick/PenThickInit; // 16.04.09 from - if(length(size)>0,tmp1=parse(size),tmp1=1); - tmp1=max(tmp1,1)/8; - Setpen(tmp1); // 16.04.09 until + thick=PenThick/PenThickInit; // 16.04.09 if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("{"); Com2nd("Setcolor("+color+")");//180711 @@ -3952,7 +4016,6 @@ Pointdata(nm,listorg,options):=( if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("}");//180711 ); //no ketjs off - Setpen(thick); // 16.04.09 if(length(size)>0, //no ketjs on tmp=Textformat(TenSize/TenSizeInit,1); Com2nd("Setpt("+tmp+")"); @@ -4025,7 +4088,7 @@ Listplot(nm,list,options):=( ptlist_1=ptlist_1+tmp*cutend_1; ptlist_(length(ptlist))=ptlist_(length(ptlist))-tmp*cutend_2; );//180719to - tmp=name+"="+Textformat(ptlist,5); + tmp=name+"="+Textformat(ptlist,5)+";"; //190415 parse(tmp); GLIST=append(GLIST,name+"=Listplot("+Textformat(ptlist,5)+")"); // 180719 //no ketjs ); @@ -4034,7 +4097,7 @@ Listplot(nm,list,options):=( if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180711 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("}");//180711 ); //no ketjs off @@ -4096,7 +4159,7 @@ Lineplot(nm,list,optionorg):=( println("generate Lineplot "+name); ); tmp1=apply(Out,Pcrd(#)); - tmp=name+"="+Textformat(tmp1,5); + tmp=name+"="+Textformat(tmp1,5)+";"; //190415 parse(tmp); GLIST=append(GLIST,name+"=Lineplot("+Textformat(list,5)+opstr+")"); //no ketjs ); @@ -4105,7 +4168,7 @@ Lineplot(nm,list,optionorg):=( if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("}");//180722 ); //no ketjs off @@ -4144,7 +4207,11 @@ Plotdata(name1,func,variable,options):=( regional(Fn,Va,tmp,tmp1,tmp2,eqL,name,Vname,x1,x2,dx, PdL,Num,Ec,Dc,Fun,Exfun,x,Ke,Eps,Pa,Msg, Ltype,Noflg,Inflg,Outflg,opstr,opcindy,color); - name="gr"+name1; + if(substring(name1,0,1)!="-", //190420from + name="gr"+name1; + , + name=substring(name1,1,length(name1)); + ); //190420to tmp=Divoptions(options); Ltype=tmp_1; Noflg=tmp_2; @@ -4297,7 +4364,7 @@ Plotdata(name1,func,variable,options):=( tmp1=append(tmp1,apply(tmp2,Pcrd(#))); ); ); - tmp=name+"="+Textformat(tmp1,5); + tmp=name+"="+Textformat(tmp1,5)+";"; parse(tmp); tmp1=replace(func,LFmark,""); //no ketjs on tmp2=replace(variable,LFmark,""); @@ -4309,7 +4376,7 @@ Plotdata(name1,func,variable,options):=( if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("}");//180722 ); //no ketjs off @@ -4325,7 +4392,7 @@ Plotdata(name1,func,variable,options):=( if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("}");//180722 ); //no ketjs off @@ -4362,6 +4429,7 @@ Paramplot(nm,funstr,variable,options):=( opstr=tmp_(length(tmp)-1); opcindy=tmp_(length(tmp)); eqL=tmp_5; + Msg="Y"; //190322 Num=50; Ec=[]; Exfun=""; @@ -4472,7 +4540,7 @@ Paramplot(nm,funstr,variable,options):=( tmp1=append(tmp1,apply(tmp2,Pcrd(#))); ); ); - tmp=name+"="+Textformat(tmp1,5); + tmp=name+"="+Textformat(tmp1,5)+";"; parse(tmp); tmp1=replace(funstr,LFmark,""); // 15.11.13 //no ketjs on tmp2=replace(variable,LFmark,""); @@ -4484,7 +4552,7 @@ Paramplot(nm,funstr,variable,options):=( if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("}");//180722 ); //no ketjs off @@ -4500,7 +4568,7 @@ Paramplot(nm,funstr,variable,options):=( if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("}");//180722 ); //no ketjs off @@ -4596,14 +4664,21 @@ Connectseg(Pdata):=( ////%Implicitplot start//// Implicitplot(name1,func,xrng,yrng):=Implicitplot(name1,func,xrng,yrng,[]); -Implicitplot(name1,func,xrng,yrng,optionsorg):=( +Implicitplot(name1,func,xrngorg,yrngorg,optionsorg):=( //help:Implicitplot("1","x^2+x*y+y^2=1","x=[-3,3]","y=[-3,3]"); -//help:Implicitplot(options=["Num=[50,50]","Msg=y(n)"]); - regional(name,options,Fn,varx,vary,rngx,rngy,Mdv,Ndv,tmp,tmp1,tmp2, - Eps,Ltype,Noflg,eqL,color,opsr,opcindy,dx,dy,out,jj,ii,kk,msg, +//help:Implicitplot(options=["Num=[50,50]","Msg=y(n)","Bisection=y(n)]); + regional(name,options,Fn,xrng,yrng,varx,vary,rngx,rngy,Mdv,Ndv,tmp,tmp1,tmp2, + Eps,Ltype,Noflg,eqL,color,opsr,opcindy,dx,dy,out,jj,ii,kk,msg,biflg,flg, yval1,yval2,xval1,xval2,eval11,eva12,eval21,eval22,pL,vL,qL); name="imp"+name1; - Eps=10^(-4); + xrng=xrngorg; yrng=yrngorg; //190622from + if(indexof(xrng,"=")==0, + xrng=xrng+"="+Textformat([XMIN,XMAX],5); + ); + if(indexof(yrng,"=")==0, + yrng=yrng+"="+Textformat([YMIN,YMAX],5); + ); //190622to + Eps=10^(-6); //190511 options=optionsorg; tmp=Divoptions(options); Ltype=tmp_1; @@ -4611,8 +4686,10 @@ Implicitplot(name1,func,xrng,yrng,optionsorg):=( eqL=tmp_5; color=tmp_(length(tmp)-2); opcindy=tmp_(length(tmp)); + opstr=tmp_(length(tmp)-1); //190406 Mdv=50;Ndv=50; msg="Y"; + biflg="Y"; forall(eqL, tmp=Strsplit(#,"="); tmp1=Toupper(substring(tmp_1,0,1)); @@ -4631,6 +4708,10 @@ Implicitplot(name1,func,xrng,yrng,optionsorg):=( msg=Toupper(substring(tmp2,0,1)); options=remove(options,[#]); ); //181112to + if(substring(#,0,1)=="B", //190509from + biflg==Toupper(substring(tmp2,0,1)); + options=remove(options,[#]); + ); //190509to ); tmp=indexof(func,"="); if(tmp==0, @@ -4646,7 +4727,7 @@ Implicitplot(name1,func,xrng,yrng,optionsorg):=( tmp=indexof(yrng,"="); vary=substring(yrng,0,tmp-1); rngy=parse(substring(yrng,tmp,length(yrng))); - tmp="Impfun("+varx+","+vary+"):="+Fn; + tmp="Impfun("+varx+","+vary+"):="+Fn+";"; parse(tmp); dx=(rngx_2-rngx_1)/Mdv; dy=(rngy_2-rngy_1)/Ndv; @@ -4673,14 +4754,46 @@ Implicitplot(name1,func,xrng,yrng,optionsorg):=( , if(vL_kk>Eps, if(vL_(kk+1)< -Eps, - tmp=1/(vL_kk-vL_(kk+1))* + if(biflg=="n", //190508 + tmp=1/(vL_kk-vL_(kk+1))* (-vL_(kk+1)*pL_kk+vL_kk*pL_(kk+1)); + , + tmp1=pL_(kk); tmp2=pL_(kk+1); //190508from + flg=0; + forall(1..20, //190511 + if(flg==0, + tmp=(tmp1+tmp2)/2; + eval11=Impfun(tmp_1,tmp_2); + if(abs(eval11)<=Eps, + flg=1; + , + if(eval11>Eps,tmp1=tmp,tmp2=tmp); + ); + ); + ); //190508to + ); qL=append(qL,tmp); ); - , + , if(vL_(kk+1)>Eps, - tmp=1/(-vL_kk+vL_(kk+1))* + if(biflg=="n", //190508 + tmp=1/(-vL_kk+vL_(kk+1))* (vL_(kk+1)*pL_kk-vL_kk*pL_(kk+1)); + , + tmp1=pL_(kk); tmp2=pL_(kk+1); //190508from + flg=0; + forall(1..20, //190511 + if(flg==0, + tmp=(tmp1+tmp2)/2; + eval11=Impfun(tmp_1,tmp_2); + if(abs(eval11)<=Eps, + flg=1; + , + if(eval11>Eps,tmp2=tmp,tmp1=tmp); + ); + ); + ); //190508to + ); qL=append(qL,tmp); ); ); @@ -4712,19 +4825,20 @@ Implicitplot(name1,func,xrng,yrng,optionsorg):=( tmp1=append(tmp1,apply(tmp2,Pcrd(#))); ); ); - tmp=name+"="+Textformat(tmp1,5); - parse(tmp); - tmp=name+"=Implicitplot('"+func+"','"+xrng+"','"+yrng+"'"+opstr+")"; //no ketjs + tmp=name+"="+Textformat(tmp1,5); //190415 + parse(tmp+";"); + tmp=name+"=Implicitplot('"+func+"','"+xrng+"','"+yrng+"'"+opstr+")"; GLIST=append(GLIST,tmp); //no ketjs +// Drawfigures(name,[name],[options]); //190508 ); if(Noflg<2, if(isstring(Ltype), if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on - Texcom("}");//180722 + Texcom("}");//180722 ); //no ketjs off , if(Noflg==1,Ltype=0); @@ -4787,6 +4901,9 @@ Circledata(nm,cenrad,options):=( if(length(cenrad)==2, Ctr=Lcrd(cenrad_1); Ptcir=Lcrd(cenrad_2); + if(!islist(Ptcir), //190323from + Ptcir=Ctr+[Ptcir,0]; + ); //190323to ra=dist(Ctr,Ptcir); , Eps=10^(-1); @@ -4805,9 +4922,9 @@ Circledata(nm,cenrad,options):=( , Ctr=1/2*(pA+pB)+1/2*d2/d1*tmp1; ra=|pA-Ctr|; - tmp=name+"center="+Ctr; + tmp=name+"center="+Textformat(Ctr,5)+";"; parse(tmp); - Defvar(name+"center",Ctr); + Defvar(name+"center",re(Ctr)); ); ); if(ra>0, @@ -4824,7 +4941,7 @@ Circledata(nm,cenrad,options):=( println("generate Circledata "+name); ); tmp1=apply(Out,Pcrd(#)); - tmp=name+"="+Textformat(tmp1,5); + tmp=name+"="+Textformat(tmp1,5)+";"; //190415 parse(tmp); if(length(cenrad)==2, //no ketjs on tmp=name+"=Circledata("+cenrad+opstr+")"; @@ -4842,7 +4959,7 @@ Circledata(nm,cenrad,options):=( if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on Texcom("}");//180722 ); //no ketjs off @@ -4883,105 +5000,32 @@ Framedata(Arg1,Arg2):=( Framedata(name,list,options); ); ); -Framedata(nm,list,optionsorg):=( +Framedata(nm,list,optionsorg):=( //190424modified //help:Framedata(); -//help:Framedata([C,A]); //help:Framedata("1",[C,A]); -//help:Framedata("1",[A,B],["corner"]); //help:Framedata("1",[C,dx,dy]); - regional(name,options,Out,tmp,tmp1,pB,x1,x2,y1,y2,dx,dy, - opcindy,Ltype,Noflg,strL,type,cent,dx,dy,color); + regional(name,options,Out,tmp,tmp1,x1,x2,y1,y2,dx,dy, + opcindy,Ltype,Noflg,strL,cent,dx,dy,color); name="fr"+nm; options=optionsorg; tmp=Divoptions(options); Ltype=tmp_1; Noflg=tmp_2; - strL=tmp_7; //180801from - type="center"; - forall(strL, - if(Toupper(#)=="CORNER", - type="corner"; - options=remove(options,[#]); - ); - if(Toupper(#)=="CENTER", - type="center"; - options=remove(options,[#]); - ); - ); - if(type=="corner", - Out=Framedata2(nm,list,options); - , //180801to - color=tmp_(length(tmp)-2); - opcindy=tmp_(length(tmp)); - if(length(list)==2, // 15.05.12 - pA=Lcrd(list_1); pB=Lcrd(list_2); - dx=abs(pB_1-pA_1); dy=abs(pB_2-pA_2); - , - pA=Lcrd(list_1); - dx=list_2; dy=list_3; - ); - x1=pA_1-dx; x2=pA_1+dx; - y1=pA_2-dy; y2=pA_2+dy; - Out=[[x1,y1],[x2,y1],[x2,y2],[x1,y2],[x1,y1]]; - if(Noflg<3, - println("generate Framedata "+name); - tmp1=apply(Out,Pcrd(#)); - tmp=name+"="+Textformat(tmp1,5); - parse(tmp); - GLIST=append(GLIST,name+"=Framedata("+pA+","+dx+","+dy+")"); //no ketjs - ); - if(Noflg<2, - if(isstring(Ltype), - if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on - Texcom("{");Com2nd("Setcolor("+color+")");//180722 - ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); - if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on - Texcom("}");//180722 - ); //no ketjs off - , - if(Noflg==1,Ltype=0); - ); - GCLIST=append(GCLIST,[name,Ltype,opcindy]); - ); - ); - Out; -); -Framedata(nm,cent,dx,dy):=Framedata(nm,cent,dx,dy,[]); -Framedata(nm,cent,dx,dy,options):=( - regional(name,Out,tmp,tmp1,x1,y1,x2,y2,Ltype,opcindy,Noflg,color); - name="fr"+nm; - tmp=Divoptions(options); - Ltype=tmp_1; - Noflg=tmp_2; color=tmp_(length(tmp)-2); opcindy=tmp_(length(tmp)); - x1=cent.x-dx; x2=cent.x+dx; - y1=cent.y-dy; y2=cent.y+dy; - Out=[[x1,y1],[x2,y1],[x2,y2],[x1,y2],[x1,y1]]; - if(Noflg<3, - println("generate Framedata "+name); - tmp1=apply(Out,Pcrd(#)); - tmp=name+"="+Textformat(tmp1,5); - parse(tmp); - GLIST=append(GLIST,name+"=Framedata("+cent.xy+","+dx+","+dy+")"); //no ketjs - ); - if(Noflg<2, - if(isstring(Ltype), - if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on - Texcom("{");Com2nd("Setcolor("+color+")");//180722 - ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); - if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on - Texcom("}");//180722 - ); //no ketjs off - , - if(Noflg==1,Ltype=0); - ); - GCLIST=append(GCLIST,[name,Ltype,opcindy]); + if(length(list)==2, // 15.05.12 + cent=Lcrd(list_1); tmp=Lcrd(list_2); + dx=abs(tmp_1-cent_1); dy=abs(tmp_2-cent_2); + , + cent=Lcrd(list_1); + dx=list_2; dy=list_3; ); - Out; + x1=cent_1-dx; x2=cent_1+dx; + y1=cent_2-dy; y2=cent_2+dy; + Listplot("-"+name,[[x1,y1],[x2,y1],[x2,y2],[x1,y2],[x1,y1]],options); ); +Framedata(nm,cent,dx,dy):=Framedata(nm,[cent,dx,dy],[]); +Framedata(nm,cent,dx,dy,options):=Framedata(nm,[cent,dx,dy],options); ////%Framedata end//// ////%Framedata2 start//// @@ -5042,7 +5086,7 @@ Ovaldata(nm,Pdata,options):=( if(Noflg<3, println("generate Ovaldata "+name); tmp1=apply(Graph,Pcrd(#)); - tmp=name+"="+Textformat(tmp1,5); + tmp=name+"="+Textformat(tmp1,5)+";"; //190415 parse(tmp); GLIST=append(GLIST, //no ketjs name+"=Ovaldata("+Ctr+","+Dx+","+Dy+opstr+")");//16.01.30 //no ketjs @@ -5052,7 +5096,7 @@ Ovaldata(nm,Pdata,options):=( if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on Texcom("}");//180722 ); //no ketjs off @@ -5061,7 +5105,7 @@ Ovaldata(nm,Pdata,options):=( ); GCLIST=append(GCLIST,[name,Ltype,opcindy]); tmp1=apply(Graph,Pcrd(#)); - tmp=name+"="+Textformat(tmp1,5); + tmp=name+"="+Textformat(tmp1,5)+";"; //190415 parse(tmp); tmp=Textformat(Ctr,5)+","+Textformat(Dx,5)+","+Textformat(Dy,5); ); @@ -5374,1956 +5418,5 @@ Putintersect(nm,pdata1,pdata2,ptno):=( ); ////%Putintersect end//// -////%Setarrow start//// -Setarrow():=Setarrow([]); -Setarrow(arglist):=( -//help:Setarrow([-1,-1,-1,1,0.3]); -//help:Setarrow([size(1),angle(18),position(1),cut(0),segstyle("dr,1")]); - regional(tmp); - tmp=select(arglist,isreal(#)); - if(length(tmp)==0, - println([YaSize,YaAngle,YaPosition,YaCut,YasenStyle]); - ); - if(length(tmp)>=1, - if((tmp_1>0),YaSize=tmp_1); - ); - if(length(tmp)>=2, - if((tmp_2>0)&(tmp_2<90),YaAngle=tmp_2); - ); - if(length(tmp)>=3, - if((tmp_3>=0)&(tmp_3<=1),YaPosition=tmp_3); - ); - if(length(tmp)>=4, - if((tmp_4>=0)&(tmp_4<1),YaCut=tmp_4); - ); - tmp=select(arglist,isstring(#)); - if(length(tmp)>0, - YasenStyle=tmp_1; - ); - [YaSize,YaAngle,YaPosition,YaCut,YasenStyle]; -); -////%Setarrow end//// - - -////%Arrowheaddata start//// -Arrowheaddata(point,direction):=Arrowheaddata(point,direction,[]); -Arrowheaddata(point,direction,options):=( -// help:Arrowheaddata(A,B); -// help:Arrowheaddata(options=[size(1),angle(18), "Coord=phy"]); - regional(list,ookisa,hiraki,Houkou,Str,Flg,Ev,Nv,pA,pB, - reL,eqL,coord,pP,rF,gG,Flg,Nj,Eps,scx,scy,tmp,tmp1,tmp2); - Eps=10^(-3); - coord="P"; - ookisa=0.2*YaSize; - hiraki=YaAngle; - iti=1; - kiri=0; - Futosa=0; - Str=YaStyle; - tmp=Divoptions(options); - eqL=tmp_5; //181018from - reL=tmp_6; - forall(eqL, - tmp=Strsplit(#,"="); - tmp1=substring(tmp_1,0,1); - tmp2=substring(tmp_2,0,1); - if(Toupper(tmp1)=="C", - coord=Touppera(tmp2); - ); - ); //181018to - forall(1..(length(reL)), //181110from - tmp=reL_#; - if(#==1,ookisa=ookisa*tmp); - if(#==2, - if(tmp<5, - hiraki=hiraki*tmp; - , - hiraki=tmp; - ); - ); - ); //181110to - Flg=0; - hiraki=hiraki*pi/180; - if(ispoint(direction),Houkou=direction.xy); //181018 - if(isstring(direction),Houkou=parse(direction),Houkou=direction); - if(Measuredepth(Houkou)==2,Houkou=Houkou_1); - if(coord=="P",//181018from - if(ispoint(point),pP=point.xy,pP=point); - , - pP=Pcrd(point); - if(!islist(Houkou_1), - Houkou=Pcrd(Houkou); - , - Houkou=apply(Houkou,Pcrd(#)); - ); - );//181018to - if(islist(Houkou_1), - tmp=Nearestpt(pP,Houkou); - pP=tmp_1; - rF=floor(tmp_2); - if(rF==1, - if(|Ptend(Houkou)-Ptstart(Houkou)|<Eps, - rF=Numptcrv(Houkou); - ); - ); - gG=apply(0..10,pP+ookisa*cos(hiraki)*[cos(2*pi/10*#),sin(2*pi/10*#)]); - Flg=0; - forall(1..rF,Nj, - if(Flg==0, - pB=Ptcrv(rF+1-Nj,Houkou); - tmp1=apply([pP,pB],LLcrd(#)); - tmp2=apply(gG,LLcrd(#)); - tmp=IntersectcrvsPp([pP,pB],gG); - if(length(tmp)>0, - Houkou=pP-Pcrd(tmp_1_1); - Flg=1; - ); - ); - ); - if(Flg==0, - println("Arrowhead may be too large (no intersect)"); - Flg=2; - ); - ); - if(Flg<2, - Ev=-1/|Houkou|*Houkou; - Nv=[-Ev_2, Ev_1]; - if(indexof(Str,"c")>0, - pP=pP-0.5*ookisa*cos(hiraki)*Ev; - ); - if(indexof(Str,"b")>0, - pP=pP-ookisa*cos(hiraki)*Ev; - ); - pA=pP+ookisa*cos(hiraki)*Ev+ookisa*sin(hiraki)*Nv; - pB=pP+ookisa*cos(hiraki)*Ev-ookisa*sin(hiraki)*Nv; - list=[pA,pP,pB]; - list; - ); -); -////%Arrowheaddata end//// - -////%Arrowhead start//// -Arrowhead(point,Houkou):=Arrowhead(point,Houkou,[]); //181018from -Arrowhead(Arg1,Arg2,Arg3):=( - if(isstring(Arg1), - Arrowhead(Arg1,Arg2,Arg3,[]); - , - Arrowhead(text(ArrowheadNumber),Arg1,Arg2,Arg3); - ); -); -Arrowhead(nm,point,direction,optionsorg):=(//181018from -//help:Arrowhead("1",B,B-A); -//help:Arrowhead(options=[size(1),angle(18),position(1),cut(0),"Coord=P(L)"]); -//help:Arrowhead(the default is -1 for numeric option); -//help:Arrowhead(A,"gr1"); - regional(name,Ltype,Noflg,reL,opstr,opcindy,color,eqL,coord, - options,cut,pP,Houkou,ptstr,hostr,tmp,tmp1,tmp2,list); - name="arh"+nm; //181018 - ArrowheadNumber=ArrowheadNumber+1; - options=optionsorg; - tmp=Divoptions(options); - Ltype=tmp_1; - Noflg=tmp_2; - reL=tmp_6; - color=tmp_(length(tmp)-2); - eqL=tmp_5; - coord="P"; - forall(eqL, - tmp=Strsplit(#,"="); - tmp1=substring(tmp_1,0,1); - tmp2=substring(tmp_2,0,1); - if(Toupper(tmp1)=="C", - coord=Toupper(tmp2); - options=remove(options,[#]); - ); - ); //181018to - tmp1=[YaSize,YaAngle,YaPosition,YaCut]; //181214from - forall(1..(length(reL)), - if(reL_#<0, reL_#=tmp1_#); - ); - forall((length(reL)+1)..4, - reL=append(reL,tmp1_#); - ); - cut=reL_4; - tmp=reL_(1..3); - options=select(options,!isreal(#)); - options=concat(options,tmp); //181214to - if(ispoint(direction),Houkou=direction.xy); //181018 - if(isstring(direction),Houkou=parse(direction),Houkou=direction); - if(Measuredepth(Houkou)==2,Houkou=Houkou_1); - if(coord=="P",//181018from - if(ispoint(point),pP=point.xy,pP=point); - , - pP=Pcrd(point); - if(!islist(Houkou_1), - Houkou=Pcrd(Houkou); - , - Houkou=apply(Houkou,Pcrd(#)); - ); - );//181018to - list=Arrowheaddata(pP,Houkou,options); - if(!Inwindow(LLcrd(pP)),Noflg=2);//181018 - if(Noflg<3, - tmp1=apply(list,LLcrd(#)); - tmp=name+"="+Textformat(tmp1,5); - parse(tmp); - ); - if(Noflg<2, - if(isstring(Ltype), - Listplot("-arh"+nm,apply(list,LLcrd(#)),concat(options,["notex","Msg=n"])); - ); - ); - if(Noflg==0, - tmp=Divoptions(options); - opstr=tmp_(length(tmp)-1); - opstr=opstr+","+Dqq("Cut="+format(cut,5)); - ptstr=Textformat(LLcrd(pP),5); - if(isstring(direction), //181019 - hostr=direction; - , - if(!islist(Houkou_1), - hostr=format(LLcrd(Houkou),5); - , - hostr=format(apply(Houkou,LLcrd(#)),5); - ); - ); - if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on - Texcom("{");Com2nd("Setcolor("+color+")");//180722 - ); //no ketjs off - Com2nd("Arrowhead("+ptstr+","+hostr+opstr+")"); - if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on - Texcom("}");//180722 - ); //no ketjs off - ); -); -////%Arrowhead end//// - -////%Arrowdata start//// -Arrowdata(ptlist):=Arrowdata(ptlist,[]); //181110from -Arrowdata(Arg1,Arg2):=( - regional(name); - if(isstring(Arg1), - Arrowdata(Arg1,Arg2,[]); - , - name=""; - forall(Arg1, - if(ispoint(#), - name=name+text(#); - ); - ); - Arrowdata(name,Arg1,Arg2); - ); -); //181110from -Arrowdata(nm,ptlist,optionsorg):=( -//help:Arrowdata("1",[A,B]); -//help:Arrowdata("1",[pt1,pt2]); -//help:Arrowdata(options=[size(1),angle(18),pos(1),cut(0),"Cutend=0,0","Coord=p/l"]); -//help:Arrowdata(optionsadded=["line"]); - regional(options,Ltype,Noflg,name,opstr,opcindy,eqL,reL,strL,color,size,coord, - flg,lineflg,cutend,tmp,tmp1,tmp2,pA,pB,angle,segpos,cut); - name="ar"+nm; - options=optionsorg; - tmp=select(options,isstring(#)); //181214from - tmp1=select(tmp,contains(["dr","da","do","id"],substring(#,0,2))); - if(length(tmp1)==0,options=append(options,YasenStyle)); //181214to - tmp=Divoptions(options); - Ltype=tmp_1; - Noflg=tmp_2; - eqL=tmp_5; - reL=tmp_6; - strL=tmp_7; - color=tmp_(length(tmp)-2); - opstr=tmp_(length(tmp)-1); - opcindy=tmp_(length(tmp)); - tmp1=[YaSize,YaAngle,YaPosition,YaCut]; //181214from - forall(1..(length(reL)), - if(reL_#<0, reL_#=tmp1_#); - ); - forall((length(reL)+1)..4, - reL=append(reL,tmp1_#); - ); - size=reL_1; - angle=reL_2; - segpos=reL_3; - cut=reL_4; - lineflg=0; - if(contains(strL,"l")%contains(strL,"L"), - lineflg=1; - );//181018from - options=remove(options,strL); - cutend=[0,0];//180719 - coord="P";//181018 - forall(eqL, - tmp=Strsplit(#,"="); - tmp1=Toupper(substring(tmp_1,0,2)); - tmp2=tmp_2; - if(tmp1=="CU",//180719from - tmp2=replace(tmp2,"[",""); - tmp2=replace(tmp2,"]",""); - cutend=tokenize(tmp2,","); - if(length(cutend)==1,cutend=[cutend_1,cutend_1]); - options=remove(options,[#]); - ); - if(tmp1=="CO",//181018from - coord=Toupper(substring(tmp2,0,1)); - options=remove(options,[#]); - ); - ); - if(|cutend|>0,//181110from - tmp=ptlist_2-ptlist_1; - tmp=tmp/|tmp|; - ptlist_1=ptlist_1+tmp*cutend_1; - ptlist_2=ptlist_2-tmp*cutend_2; - );//181110to - if(coord=="P", - pA=ptlist_1; pB=ptlist_2; - if(ispoint(pA),pA=pA.xy); - if(ispoint(pB),pB=pB.xy); - , - pA=Pcrd(ptlist_1); pB=Pcrd(ptlist_2); - );//181018to - if(Noflg<3, - println("generate Arrowdata "+name); - tmp=name+"="+Textformat([pA,pB],5); - parse(tmp); - if(lineflg==0, // 16.04.09 from - tmp=pA-0.2*size/2*(pB-pA)/|pB-pA|; // 15.06.11 - , - tmp=pB; - ); // 16.04.09 until - tmp=format([LLcrd(pA),LLcrd(tmp)],6); - ); - if(Noflg<2, - if(isstring(Ltype), - Listplot("-ar"+nm,[LLcrd(pA),LLcrd(pB)],append(options,"Msg=n")); - Arrowhead(nm,pA+segpos*(pB-pA),pB-pA,options); //181110 - , - if(Noflg==1,Ltype=0); - ); - ); - [Lcrd(pA),Lcrd(pB)]; -); -////%Arrowdata end//// - -////%Anglemark start//// -Anglemark(plist):=Anglemark(plist,[]); -Anglemark(Arg1,Arg2):=( // 2015.04.28 from - regional(nm,plist,options,tmp); - if(isstring(Arg1), - nm=Arg1; - plist=Arg2; - Anglemark(nm,plist,[]); - , - plist=Arg1; - options=Arg2; - tmp=Textformat(plist,5); - tmp=replace(tmp,",",""); - nm=substring(tmp,1,length(tmp)-1); - Anglemark(nm,plist,options); - ); -); // to -Anglemark(nm,plist,options):=( -//help([A,B,C],["E=\theta",2]); -//help:Anglemark("1",[A,B,C],["E=1.2,\theta",2]); -// help:Anglemark("1",[A,B,2*pi]); -//help:Anglemark(options=[size,"E/L=(sep,)letter"]); - regional(name,Out,pB,pA,pC,Ctr,ra,sab,sac,ratio,opstr,Bname,Bpos,color, - Brat,tmp,tmp1,tmp2,Num,opcindy,Ltype,eqL,realL,Rg,Th,Noflg,Msg); - name="ag"+nm; - Bpos="md"+name; - ra=0.5; - tmp=Divoptions(options); - Ltype=tmp_1; - Noflg=tmp_2; - color=tmp_(length(tmp)-2); - opcindy=tmp_(length(tmp)); - eqL=tmp_5; - realL=tmp_6; - Bname=""; - Brat=1.2; //180530 - Num=20; - Msg="Y"; - opstr=""; - if(length(realL)>0, - ra=realL_1*ra; - opstr=","+text(realL_1);//180530 - ); - forall(eqL, - tmp=Strsplit(#,"="); - tmp1=Toupper(substring(tmp_1,0,1)); - if((tmp1=="L")%(tmp1=="E"), - if(tmp1=="L",Bname="Letter("); - if(tmp1=="E",Bname="Expr("); - Bname=Bname+Bpos+","+Dq+"c"+Dq+","+Dq;//16.10.29 - tmp1=indexof(tmp_2,","); - Bname=Bname+substring(tmp_2,tmp1,length(tmp_2))+Dq+")"; //190219 - if(tmp1>0, - Brat=parse(substring(tmp_2,0,tmp1-1)); - ); - ); - if(tmp1=="M", //190206from - Msg=Toupper(substring(tmp_2,0,1)); - ); //190206to - ); - pB=Lcrd(plist_1); pA=Lcrd(plist_2); sab=pB-pA; - Ctr=pA; - if((length(plist_3)>1)%(ispoint(plist_3)), //180506from - pC=Lcrd(plist_3); - sac=pC-pA; - Rg=[arctan2(sab)+0,arctan2(sac)+0]; - , - sac=pB-pA; - Rg=[arctan2(sab)+0,arctan2(sab)+plist_3]; - ); //180506to - if(Rg_2<Rg_1,Rg_2=Rg_2+2*pi); - Out=[]; - if(ra>min(|sab|,|sac|), // 16.12.29 - println(" segments too short"); - , - forall(0..Num, - Th=Rg_1+#*(Rg_2-Rg_1)/Num; - Out=append(Out,Ctr+ra*[cos(Th),sin(Th)]); - ); - Th=(Rg_1+Rg_2)/2; //16.10.31from[moved] - tmp1=Ctr+Brat*ra*[cos(Th),sin(Th)]; - tmp="Defvar("+Dq+Bpos+"="; - tmp=tmp+Textformat(tmp1,5)+Dq+");"; - parse(tmp);//16.10.31to[moved] - if(length(Bname)>0, - parse(Bname); - ); - if(Noflg<3, - if(Msg=="Y", //190206 - println("generate anglemark "+name+" and "+Bpos); - ); - tmp1=apply(Out,Pcrd(#)); - tmp=name+"="+Textformat(tmp1,5); - parse(tmp); - tmp=Textformat(plist,5); //no ketjs on - tmp1=substring(tmp,1,length(tmp)-1); - tmp=name+"=Anglemark("+tmp1+opstr+")"; - GLIST=append(GLIST,tmp); //no ketjs off - ); - if(Noflg<2, - if(isstring(Ltype), - if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on - Texcom("{");Com2nd("Setcolor("+color+")");//180722 - ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); - if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on - Texcom("}");//180722 - ); //no ketjs off - , - if(Noflg==1,Ltype=0); - ); - GCLIST=append(GCLIST,[name,Ltype,opcindy]); - ); - ); - Out; -); -////%Anglemark end//// - -////%Paramark start//// -Paramark(plist):=Paramark(plist,[]); -Paramark(Arg1,Arg2):=( // 17.03.27 from - regional(nm,plist,options,tmp); - if(isstring(Arg1), - nm=Arg1; - plist=Arg2; - Paramark(nm,plist,[]); - , - plist=Arg1; - options=Arg2; - tmp=Textformat(plist,5); - tmp=replace(tmp,",",""); - nm=substring(tmp,1,length(tmp)-1); - Paramark(nm,plist,options); - ); -);// to -Paramark(nm,plist,options):=( -//help:Paramark([A,B,C],["E=\theta"]); -//help:Paramark("1",[p1,p2,p3],["E=\theta"]); - regional(name,Out,pB,pA,pC,ra,sab,sac,ratio,opstr,Bname,Bpos, - Brat,tmp,tmp1,tmp2,Ltype,Noflg,eqL,realL,opcindy,color); - name="pm"+nm; - tmp=Divoptions(options); - Ltype=tmp_1; - Noflg=tmp_2; - color=tmp_(length(tmp)-2); - opstr=tmp_(length(tmp)-1); - opcindy=tmp_(length(tmp)); - eqL=tmp_5; - realL=tmp_6; - ra=0.5; - Bname=""; - Brat=1.2; - if(length(realL)>0, - tmp=realL_1; - ra=tmp*ra; - opstr=opstr+","+text(tmp); - ); - forall(eqL, - if(substring(#,0,1)=="L",Bname="Letter("); - if(substring(#,0,1)=="E",Bname="Expr("); - Bpos="md"+name; - Bname=Bname+Bpos+","+Dq+"c"+Dq+","+Dq; //180705 - tmp=substring(#,indexof(#,"="),length(#)); - tmp1=indexof(tmp,","); - Bname=Bname+substring(tmp,tmp1,length(tmp))+Dq+")"; - if(tmp1>0, - Brat=parse(substring(tmp,0,tmp1-1)); - ); - ); - pB=Lcrd(plist_1); pA=Lcrd(plist_2); pC=Lcrd(plist_3); - Ctr=Lcrd(pA); - Out=[]; - Out=append(Out,pA+ra*(pB-pA)/|pB-pA|); - Out=append(Out,pA+ra*(pB-pA)/|pB-pA|+ra*(pC-pA)/|pC-pA|); - Out=append(Out,pA+ra*(pC-pA)/|pC-pA|); - if(length(Bname)>0, - tmp1=pA+Brat*ra*(pB-pA)/|pB-pA|+Brat*ra*(pC-pA)/|pC-pA|; - tmp="Defvar("+Dq+Bpos+"="+Textformat(tmp1,5)+Dq+");"; - parse(tmp); - parse(Bname); - ); - if(Noflg<3, - println("generate paramark "+name); - tmp1=apply(Out,Pcrd(#)); - tmp=name+"="+Textformat(tmp1,5); - parse(tmp); - tmp1=substring(Textformat(plist,5),1,length(Textformat(plist,5))-1); //no ketjs on - tmp=name+"=Paramark("+tmp1+opstr+")"; - GLIST=append(GLIST,tmp); //no ketjs off - ); - if(Noflg<2, - if(isstring(Ltype), - if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on - Texcom("{");Com2nd("Setcolor("+color+")");//180722 - ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); - if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on - Texcom("}");//180722 - ); //no ketjs off - , - if(Noflg==1,Ltype=0); - ); - GCLIST=append(GCLIST,[name,Ltype,opcindy]); - ); - Out; -); -////%Paramark end//// - -////%MakeBowdata start//// -MakeBowdata(pA,pB,Hgt):=( - regional(angle,pB2,pH2,pC2,pC,tmp,Th1,Th2,ra,dMA); - angle=arctan2(pB-pA)+0; - pB2=Rotatepoint(pB,-angle,pA); - tmp=Lcrd(pA); - pH2=[(tmp_1+pB2_1)/2,tmp_2-Hgt]; - dMA=|tmp-pB2|/2; - ra=(dMA^2+Hgt^2)/(2*Hgt); - pC2=[pH2_1,pB2_2+(ra-Hgt)]; - pC=Rotatepoint(pC2,angle,pA); - Th1=arctan2(pA-pC2)+angle; - Th2=arctan2(pB2-pC2)+angle; - [pC,ra,Th1,Th2]; -); -////%MakeBowdata end//// - -////%Bowdata start//// -Bowdata(plist):=Bowdata(plist,[]); -Bowdata(plist,options):=( - regional(nm,tmp); - if(islist(plist), // 16.12.04from - tmp=Textformat(plist,5); - tmp=replace(tmp,",",""); - nm=substring(tmp,1,length(tmp)-1); - Bowdata(nm,plist,options); - , - nm=plist; - tmp=options; - Bowdata(nm,tmp,[]); - ); // 16.12.04until -); -Bowdata(nm,plist,options):=( -//help:Bowdata([C,A],[2,1.2,"Expr=10","da"]); -//help:Bowdata([A,B],["Expr=t0n3,a"]); -//help:Bowdata([A,B],["Exprrot=t0n2r,a"]); - regional(name,Out,pB,pA,pC,ra,tmp,tmp1,tmp2,Ltype,eqL,realL, - Bname,Bpos,Th,Cut,Num,Hgt,opstr,opcindy,Ydata,pC,Msg, - Th1,Th2,Noflg,Bops,Bmov,Tmov,Nmov,rev,color); - name="bw"+nm; - tmp=Divoptions(options); - Ltype=tmp_1; - Noflg=tmp_2; - color=tmp_(length(tmp)-2); - opstr=tmp_(length(tmp)-1); - opcindy=tmp_(length(tmp)); - eqL=tmp_5; - realL=tmp_6; - pA=Lcrd(plist_1); pB=Lcrd(plist_2); - Hgt=1/2*|pB-pA|*0.2; - Cut=0; - Num=24; - Bname=""; - Msg="Y"; //190206 - Tmov=0;//16.11.01from - Nmov=0; - Bmov=""; - rev=0;//16.11.01until - if(length(realL)>0, - Hgt=realL_1*Hgt; // 15.04.12 - if(length(realL)>1,Cut=realL_2); - ); - forall(eqL, - tmp=Strsplit(#,"="); - tmp1=Toupper(substring(tmp_1,0,1)); - if(tmp1=="L", - if(indexof(#,"rot")>0, - Bname="Letterrot("; - , - Bname="Letter("; - ); - Bops=tmp_2; - ); - if(tmp1=="E", - if(indexof(#,"rot")>0, - Bname="Exprrot("; - , - Bname="Expr("; - ); - Bops=tmp_2; - ); - if(tmp1=="M", //190206from - Msg=Toupper(substring(tmp_2,0,1)); - ); //190206to - ); - Ydata=MakeBowdata(pA,pB,Hgt); - pC=Ydata_1; - ra=Ydata_2; - Th=(Ydata_3+Ydata_4)*0.5; - BOWMIDDLE=[pC_1+ra*cos(Th),pC_2+ra*sin(Th)]; - Bpos="md"+name; // 16.10.31from[moved] - tmp="Defvar("+Dq+Bpos+"="+Textformat(BOWMIDDLE,5)+Dq+");"; - parse(tmp);// 16.10.31to[moved] - if(length(Bname)>0, //16.11.01from - tmp=indexof(Bops,","); - if(tmp>0, - tmp1=substring(Bops,0,tmp-1); - if(length(tmp1)>=4 & substring(tmp1,0,1)=="t" & indexof(tmp1,"n")>0, - Bmov=tmp1; - Bops=substring(Bops,tmp,length(Bops)); - ); - ); - if(length(Bmov)>0, - tmp=indexof(Bmov,"t"); - if(tmp>0, - tmp1=indexof(Bmov,"n"); - Tmov=parse(substring(Bmov,tmp,tmp1-1)); - tmp=indexof(Bmov,"r"); - if(tmp>0, - Nmov=parse(substring(Bmov,tmp1,tmp-1)); - rev=1; - , - Nmov=parse(substring(Bmov,tmp1,length(Bmov))); - ); - ); - ); - Bname=Bname+Bpos;//16.11.01 - if(abs(Tmov)+abs(Nmov)>0, - tmp=Pcrd(pA)-Pcrd(pB); - tmp1=1/Norm(tmp)*tmp; - tmp2=[-tmp1_2,tmp1_1]; - tmp=MARKLEN*(Tmov*tmp1+Nmov*tmp2); - tmp=LLcrd(tmp); - Bname=Bname+"+"+text(tmp); - ); - Bname=Bname+","; - if(indexof(Bname,"rot")>0, - if(rev==1,tmp=pB-pA,tmp=pA-pB); - Bname=Bname+Textformat(tmp,5)+","; - , - Bname=Bname+Dq+"c"+Dq+","; - ); - Bname=Bname+Dq+Bops+Dq+")"; - parse(Bname); - );//16.11.01until - if(Cut==0, - Th1=Ydata_3; - Th2=Ydata_4; - Out=[]; - forall(0..Num, - tmp=Th1+#*(Th2-Th1)/Num; - Out=append(Out,pC+ra*[cos(tmp),sin(tmp)]); - ); - , - Th1=Ydata_3; - Th2=Th-Cut/(2*ra); - tmp1=[]; - forall(0..Num/2, - tmp=Th1+#*(Th2-Th1)/(Num/2); - tmp1=append(tmp1,pC+ra*[cos(tmp),sin(tmp)]); - ); - Th1=Th+Cut/(2*ra); - Th2=Ydata_4; - tmp2=[]; - forall(0..Num/2, - tmp=Th1+#*(Th2-Th1)/(Num/2); - tmp2=append(tmp2,pC+ra*[cos(tmp),sin(tmp)]); - ); - Out=[tmp1,tmp2]; - ); - if(Noflg<3, - if(Msg=="Y", //190206 - println("generate bowdata "+name+" and "+Bpos);//16.10.31 - ); - if(Measuredepth(Out)==1,Out=[Out]); - tmp1=[]; - forall(Out,tmp2, - tmp=apply(tmp2,Pcrd(#)); - tmp1=append(tmp1,tmp); - ); - tmp=name+"="+Textformat(tmp1,5); - parse(tmp); - tmp1=substring(Textformat(plist,5),1,length(Textformat(plist,5))-1); //no ketjs on - tmp=name+"=Bowdata("+tmp1+opstr+")"; - GLIST=append(GLIST,tmp); //no ketjs off - ); - if(Noflg<2, - if(isstring(Ltype), - if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on - Texcom("{");Com2nd("Setcolor("+color+")");//180722 - ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); - if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on - Texcom("}");//180722 - ); //no ketjs off - , - if(Noflg==1,Ltype=0); - ); - GCLIST=append(GCLIST,[name,Ltype,opcindy]); - ); -); -////%Bowdata end//// - -////%Bowname start//// -Bowname(str):=Bowname("c",str); -Bowname(dir,str):=( - Expr([BOWMIDDLE,dir,str]); -); -////%Bowname end//// - -////%Bownamerot start//// -Bownamerot(bwdata,str):=Bownamerot(bwdata,0,0,str,1); -Bownamerot(bwdata,str,updown):=Bownamerot(bwdata,0,0,str,updown); -Bownamerot(bwdata,tmov,nmov,str):=Bownamerot(bwdata,tmov,nmov,str,1); -Bownamerot(bwdata,tmov,nmov,str,updown):=( - regional(bdata,tmp); - tmp=Measuredepth(bwdata); - if(tmp==1,bdata=[bwdata],bdata=bwdata); - if(length(bdata)>1, - tmp=Ptend(bdata_2)-Ptstart(bdata_1); - , - tmp=Ptend(bdata_1)-Ptstart(bdata_1); - ); - if(updown<0,tmp=-tmp); - Exprrot(BOWMIDDLE,tmp,tmov,nmov,str); -); -////%Bownamerot end//// - -////%Deqdata start//// -Deqdata(deq,rng,initt,initf,Num):=( //17.10.04 -// Deqdata("[x1,...xn]`=[f1,...fn]","t=[0,20]",0,[...],50); - regional(Eps,Inf,tname,Xname,func,t1,t2,dt,tt,X0,flg, - kl1,kl2,kl3,kl4,pdL,tmp,tmp1,tmp2); - Eps=10^(-3); - Inf=10^3; - tmp=tokenize(deq,"="); - tmp1=replace(tmp_1,"`",""); - tmp1=substring(tmp1,1,length(tmp1)-1); - Xname=tokenize(tmp1,","); - func=tmp_2; - forall(1..(length(Xname)), - func=replace(func,Xname_#,"X_"+text(#)); - ); - tmp=tokenize(rng,"="); - tname=tmp_1; - tmp=parse(tmp_2); - t1=tmp_1; - t2=tmp_2; - tmp="funP("+tname+",X):="+func+";"; - parse(tmp); - tmp="funN("+tname+",X):=-"+func+";"; - parse(tmp); - dt=(t2-t1)/Num; - tt=initt; - X0=Lcrd(initf); - pdL=[flatten([tt,X0])]; - flg=0; - forall(1..floor((t2-initt)/dt), - if(flg==0, - kl1=dt*funP(tt,X0); - kl2=dt*funP(tt+dt/2,X0+kl1/2); - kl3=dt*funP(tt+dt/2,X0+kl2/2); - kl4=dt*funP(tt+dt,X0+kl3); - X0=X0+(kl1+2*kl2+2*kl3+kl4)/6; - tt=initt+#*dt; - tmp=flatten([tt,X0]); - pdL=append(pdL,tmp); - if(|tmp|>Inf,flg=1); - ); - ); - tt=initt; - X0=Lcrd(initf); - flg=0; - forall(1..floor((initt-t1)/dt), - if(flg==0, - kl1=dt*funN(tt,X0); - kl2=dt*funN(tt+dt/2,X0+kl1/2); - kl3=dt*funN(tt+dt/2,X0+kl2/2); - kl4=dt*funN(tt+dt,X0+kl3); - X0=X0+(kl1+2*kl2+2*kl3+kl4)/6; - tt=initt-#*dt; - tmp=flatten([tt,X0]); - pdL=prepend(tmp,pdL); - if(|tmp1|>Inf,flg=1); - ); - ); - pdL; -); -////%Deqdata end//// - -////%Deqplot start//// -Deqplot(nm,deq,rng,initf):=Deqplot(nm,deq,rng,Lcrd(initf)_1,initf,[]); -Deqplot(nm,deq,rng,Arg1,Arg2):=( - regional(initt,initf,options); - if(isreal(Arg1) & !islist(Arg1), - initt=Arg1; - initf=Arg2; - options=[]; - , - initf=Lcrd(Arg1); - initt=initf_1; - options=Arg2; - ); - Deqplot(nm,deq,rng,initt,initf,options); -); -Deqplot(nm,deqorg,rngorg,initt,initf,options):=( //17.10.06 -//help:Deqplot("2","y'=y*(1-y)","x",0, 0.5,["Num=100"]); -//help:Deqplot("1","y''=-y","x",0, [1,0]); -//help:Deqplot("3","[x,y]'=[x*(1-y),0.3*y*(x-1)]","t=[0,20]",0,[1,0.5]); - regional(deq,rng,Ltype,Noflg,eqL,opcindy,Num,name,nn,pdL,phase, - sel,tmp,tmp1,tmp2,tmp3,color); - name="de"+nm; - tmp=Divoptions(options); - Ltype=tmp_1; - Noflg=tmp_2; - eqL=tmp_5; - color=tmp_(length(tmp)-2); - opcindy=tmp_(length(tmp)); - Num=50; - forall(eqL, - tmp=indexof(#,"="); - tmp2=substring(#,0,1); - tmp2=Toupper(tmp2); - tmp1=substring(#,tmp,length(#)); - if(Toupper(substring(#,0,1))=="N", - Num=parse(tmp1); - ); - ); - rng=rngorg; - if(indexof(rng,"=")==0, - rng=rng+"="+Textformat([XMIN,XMAX],6); - ); - deq=replace(deqorg,"‘","`"); //190206 - deq=replace(deq,"'","`"); //180527 - tmp3=indexof(deq,"="); - tmp1=substring(deq,0,tmp3-1); - tmp2=substring(deq,tmp3,length(deq)); - if(indexof(tmp1,"[")==0, - phase=0; - sel=[1,2]; - , - phase=1; - sel=[2,3]; - ); - nn=length(Indexall(tmp1,"`")); - if(nn==0, //190211from - println(" Lhs of equation has no single/back quotation "+tmp1); - ); - if(nn>0, - tmp=Indexall(tmp1,"`"); - if(tmp_(length(tmp))!=tmp3-1, - nn=0; - , - forall(reverse(2..(length(tmp))), - if((nn>0)&(!contains(tmp,tmp_#-1)), - nn=0; - ); - ); - ); - if(nn==0, - println(" Lhs of equation is not correct"); - ); - ); //190211to - if(nn==1, - if(indexof(tmp1,"[")==0, - tmp1="["+replace(tmp1,"`","]`"); - deq=tmp1+"="+tmp2; - ); - ); - if(nn>1, - tmp=indexof(tmp1,"`"); - tmp1=substring(tmp1,0,tmp-1); - deq="["; - forall(1..nn, - deq=deq+tmp1+"N"+text(#)+","; - ); - deq=substring(deq,0,length(deq)-1)+"]`=["; - forall(1..(nn-1), - deq=deq+tmp1+"N"+text(#+1)+","; - ); - forall(reverse(1..(nn)),jj, - tmp=tmp1; - forall(1..jj, - tmp=tmp+"`"; - tmp2=replace(tmp2,tmp,tmp1+"N"+text(#+1)); - ); - ); - tmp2=tmp2+"]"; - forall(1..(length(tmp2)-1), - tmp=substring(tmp2,#-1,#); - if(tmp!=tmp1, - deq=deq+tmp; - , - tmp=substring(tmp2,#,#+1); - if(tmp=="N", - deq=deq+tmp1; - , - deq=deq+tmp1+"N1" - ); - ); - ); - deq=deq+"]"; - ); - if((nn>0)&(Noflg<3), //190211 - pdL=Deqdata(deq,rng,initt,initf,Num); - if(phase==1, - pdL=apply(pdL,#_(2..3)); - ); - tmp1=apply(pdL,Pcrd(#)); - tmp=name+"="+Textformat(tmp1,5); - parse(tmp); - ); - if((nn>0)&(Noflg<1), //190211 //no ketjs on - tmp=Assign(deq); - tmp=replace(deq,"'","`"); - tmp=name+"=Deqplot('"+tmp+"','"+rng+"',"; - tmp=tmp+format(initt,6)+","+Textformat(initf,6); - tmp=tmp+","+text(sel)+",'Num="+text(Num)+"')"; - tmp=RSform(tmp); - GLIST=append(GLIST,tmp); - ); //no ketjs off - if((nn>0)&(Noflg<2), //190211 - if(isstring(Ltype), - if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on - Texcom("{");Com2nd("Setcolor("+color+")");//180722 - ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); - if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on - Texcom("}");//180722 - ); //no ketjs off - , - if(Noflg==1,Ltype=0); - ); - GCLIST=append(GCLIST,[name,Ltype,opcindy]); - ); -); -////%Deqplot end//// - -////////// old enclosing /////////////// - -Enclosing(nm,plist):=EnclosingS(nm,plist); -Enclosing(nm,plist,options):=EnclosingS(nm,plist,options); -EnclosingS(nm,plist):=EnclosingS(nm,plist,[]); -EnclosingS(nm,plist,options):=( -// help:Enclosing("1",["sc2","crAB","sc2","Invert(sc1)"],[pt,"dr"]); - regional(name,AnsL,Start,Eps,EEps,S,Flg,Fdata,Gdata,KL,pt,qt,color - t1,t2,t3,ii,nn,tmp,tmp1,tmp2,Ltype,Noflg,realL,eqL,opstr,opcindy); - name="en"+nm; - tmp=Divoptions(options); - Ltype=tmp_1; - Noflg=tmp_2; - eqL=tmp_5; - realL=tmp_6; - color=tmp_(length(tmp)-2); - opstr=tmp_(length(tmp)-1); - opcindy=tmp_(length(tmp)); - Eps=10^(-5); // 16.12.05 - EEps=0.05; - Start=[]; - Flg=0; - forall(realL, - if(islist(#) % ispoint(#), - Start=Lcrd(#); // 15.09.12 - , - Flg=Flg+1; - if(Flg==1,Eps=#); - if(Flg==2,EEps=#); - ); - ); -// tmp1=concat([Eps,EEps],eqL); // 15.04.06 - Fdata=plist_1; - Gdata=plist_(length(plist)); - KL=IntersectcrvsPp(Fdata,Gdata); - if(length(KL)==1, - pt=KL_1_1; - t1=KL_1_2; - ); - if(length(KL)==0, - if(Numptcrv(Fdata)>Numptcrv(Gdata), - tmp=Nearestpt(Fdata,Gdata); - pt=tmp_1; - t1=tmp_2; - , - tmp=Nearestpt(Gdata,Fdata); - pt=tmp_3; - t1=tmp_4; - ); - ); - if(length(KL)>1, - if(Start==[], - err("No Start Point"); - , - pt=KL_1_1; - t1=KL_1_2; - tmp=Norm(pt-Start); - forall(2..(length(KL)),ii, // 15.04.20 - tmp1=KL_ii_1; - tmp2=Norm(tmp1-Start); // 15.04.20 - if(tmp2<tmp, - pt=tmp1; - t1=KL_ii_2; - tmp=tmp2; - ); - ); - ); - ); -// pt=Pcrd(pt); // 15.09.12 - Start=pt; - AnsL=[]; - forall(1..(length(plist)),nn, - Fdata=plist_nn; - if(nn>1, pt=qt); - if(nn==length(plist), - qt=Start; - , - Flg=0; - Gdata=plist_(nn+1); -// tmp1=concat([Eps,EEps],eqL); // 15.04.06 - KL=IntersectcrvsPp(Gdata,Fdata); - if(length(KL)==1, - tmp=KL_1; - qt=KL_1_1; - t3=KL_1_2; - Flg=10; - ); - if(length(KL)==0,Flg=1); - if(length(KL)>1, - tmp1=KL_1_1; - tmp2=KL_2_1; - tmp=|tmp1-tmp2|; - if(tmp<Eps*10, Flg=1); - ); - if(Flg==1, - if(Numptcrv(Fdata)>Numptcrv(Gdata), - tmp=Nearestpt(Fdata,Gdata); - qt=tmp_1; - t3=tmp_4; - Flg=10; - , - tmp=Nearestpt(Gdata,Fdata); - qt=tmp_3; - t3=tmp_2; - Flg=10; - ); - ); - if(Flg<10, - t2=10^6; //%inf; - forall(1..(length(KL)),ii, - tmp1=KL_ii_1; - tmp=KL_ii_3; - tmp2=Paramoncurve(tmp1,tmp,Fdata); - tmp3=KL_ii_2; - if(tmp2>t1+Eps & tmp2<t2+Eps, - qt=tmp1; - t2=tmp2; - t3=tmp3; - ); - ); - ); - ); - tmp=Partcrv("",pt,qt,Fdata,["nodata"]); - t1=t3; - if(nn==1, - AnsL=tmp; - , - AnsL=concat(AnsL,tmp_(2..(length(tmp)))); - ); - ); - AnsL=apply(AnsL,Pcrd(#)); // 15.09.12 - AnsL_(length(AnsL))=AnsL_1;//16.10.20 - if(Noflg<3, - println("generate Enclosing "+name); - tmp=name+"="+Textformat(AnsL,5); - parse(tmp); - tmp=name+"=Enclosing(";//16.11.07from //no ketjs on - tmp1="list"+PaO(); - forall(plist, - tmp1=tmp1+#+","; - ); - tmp=tmp+substring(tmp1,0,length(tmp1)-1)+")"+opstr+")"; - GLIST=append(GLIST,tmp);//16.11.07to //no ketjs off - ); - if(Noflg<2, - if(isstring(Ltype), - if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on - Texcom("{");Com2nd("Setcolor("+color+")");//180722 - ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); - if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on - Texcom("}");//180722 - ); //no ketjs off - , - if(Noflg==1,Ltype=0); - ); - GCLIST=append(GCLIST,[name,Ltype,opcindy]); - ); - tmp=apply(AnsL,LLcrd(#));//16.10.20 - tmp; -); - -/////////// new enclosing /////////// - -////%Enclosing start//// -Enclosing(nm,plist):=Enclosing2(nm,plist,[]);//180706[2lines] -Enclosing(nm,plistorg,options):=Enclosing2(nm,plistorg,options); -Enclosing2(nm,plist):=Enclosing2(nm,plist,[]); -Enclosing2(nm,plistorg,options):=( -//help:Enclosing("1",["sg2","gr1","Invert(sg2)"]); -//help:Enclosing(options=[startpoint,epspara(1)]); - regional(name,plist,AnsL,Start,Eps,Eps1,Eps2,flg,Fdata,Gdata,KL, - t1,t2,tst,ss,ii,nn,nxtno,Ltype,Noflg,realL,eqL,opstr,opcindy, - tmp,tmp1,tmp2,color,epspara,p1,p2); - name="en"+nm; - plist=plistorg; - tmp=Divoptions(options); - Ltype=tmp_1; - Noflg=tmp_2; - eqL=tmp_5; - realL=tmp_6; - color=tmp_(length(tmp)-2); - opstr=tmp_(length(tmp)-1); - opcindy=tmp_(length(tmp)); - Eps=10^(-5); // 16.12.05 - epspara=1; //180707 - Eps1=0.01; - Eps2=0.1; - Start=[]; - flg=0; - forall(realL, - if(isList(#) % ispoint(#), - Start=Lcrd(#); // 18.02.02 - , - if(flg==0,epspara=#);//180707 - if(flg==1,Eps1=#); - if(flg==2,Eps2=#); - flg=flg+1; - ); - ); - flg=0; - AnsL=[]; - if(length(plist)==1, - Fdata=parse(plist_1); - tmp1=Fdata_1; - tmp2=Fdata_(length(Fdata)); - if(|tmp1-tmp2|<Eps, - AnsL=Fdata; - , - AnsL=append(Fdata,tmp1); - ); - flg=1; - ); - if(flg==0, - Fdata=plist_1; - Gdata=plist_(length(plist)); - KL=IntersectcurvesPp(Fdata,Gdata); - if(length(KL)==0, - tmp=parse(Gdata); - tmp1=LLcrd(Op(length(tmp),tmp)); //18.02.02from - tmp=parse(Fdata); - tmp2=LLcrd(Op(1,tmp)); - tmp=Listplot(name,[tmp1,tmp2],["nodisp"]); - plist=append(plist,"sg"+name); - Start=tmp2; - tst=1; //18.02.02to - p1=Start; - , - if(length(KL)==1, - tst=KL_1_2; - Start=Pointoncurve(tst,Fdata); - ); - if(length(KL)>1, - KL=sort(KL,[#_2]); - if(Start==[], - tst=KL_1_2; - Start=Pointoncurve(tst,Fdata); - , - tmp=apply(KL,|#_1-Start|); - tmp=min(tmp); - tmp1=select(KL,|#_1-Start|<tmp+Eps1);//180718 - tst=tmp1_1_2; - Start=Pointoncurve(tst,Fdata); - ); - ); - ); - ); - if(flg==0, - t1=tst; - p1=Pointoncurve(t1,Fdata); //180713 - println("Start point of enclosing is "+text(Start)); - forall(1..(length(plist)),nn, - Fdata=plist_nn; - if(nn==length(plist),nxtno=1,nxtno=nn+1); - Gdata=plist_nxtno; - KL=IntersectcurvesPp(Fdata,Gdata); - if(length(KL)==0, - tmp1=parse(Fdata); //18.02.02from - tmp2=parse(Gdata); - tmp2=Prepend(Op(length(tmp1),tmp),tmp2); - Gdata=replace(Gdata,"(",""); - Gdata=replace(Gdata,")",""); - tmp=Gdata+"="+Textformat(tmp2,6); - parse(tmp); - plist_nxtno=Gdata; - t2=Length(tmp1); - p2=Pointoncurve(t2,Fdata); //180713 - ss=1; //18.02.02to - , - KL=sort(KL,[#_2]);//180706 - tmp=parse(Fdata); - tmp1=t1+epspara/50*length(tmp); -// KL=select(KL,#_2>t1+epspara/50*length(tmp)); //180707 - KL=select(KL,(#_2>tmp1)%((#_2>t1)&(|#_1-p1|>Eps1))); //180713,16 - t2=KL_1_2; - ss=KL_1_3; - if(abs(t2-t1)<Eps,//180707 - if(length(KL)>1, - t2=KL_2_2; - ss=KL_2_3; - , - println(text(nn)+" and "+text(nxtno)+" not intersect"); - flg=1; - ); - ); - ); - if(flg==0, - tmp=Partcrv("",t1,t2,Fdata,["nodata"]); - if(nn==1, - AnsL=tmp; - , - AnsL=concat(AnsL,tmp_(2..(length(tmp)))); - ); - ); - t1=ss;//180706 - p1=Pointoncurve(t1,Gdata); //180713 - ); - ); - if(flg==0, - AnsL=apply(AnsL,Pcrd(#)); - ); - if(Noflg<3, - println("generate Enclosing "+name); - tmp=name+"="+Textformat(AnsL,5); - parse(tmp); - tmp=name+"=Enclosing2(";//16.11.07from - tmp1="list"+PaO(); - forall(plistorg, //18.02.02 - tmp1=tmp1+#+","; - ); - tmp=tmp+substring(tmp1,0,length(tmp1)-1)+")";//18.0706from //no ketjs on - if(length(Start)>0,tmp=tmp+","+Textformat(Start,6)); - tmp=tmp+","+text(epspara)+")";//18.0706to,180707 - GLIST=append(GLIST,tmp);//16.11.07to //no ketjs off - ); - if(Noflg<2, - if(isstring(Ltype), - if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on - Texcom("{");Com2nd("Setcolor("+color+")");//180722 - ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); - if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on - Texcom("}");//180722 - ); //no ketjs off - , - if(Noflg==1,Ltype=0); - ); - GCLIST=append(GCLIST,[name,Ltype,opcindy]); - ); - tmp=apply(AnsL,LLcrd(#));//16.10.20 - tmp; -); -////%Enclosing end//// - -/////////// end of new enclosing /////////// - -/////////// new Hatchdata(cindy) /////////// - -////%Makehatch start//// -Makehatch(iolistorg,pt,vec,bdylist):=( - regional(Eps,iolist,sg,bdy,out,nb,tenL,ns,ne,ioL, - ii,jj,kk,nvec,nbdy,sgn1,sgn2,flg,rmL,p0,p1,p2,pL, - Scalebkup,tmp,tmp1,tmp2); - Eps=10^(-5); - nvec=[-vec_2,vec_1]; - nvec=nvec/|nvec|; - if(!islist(iolistorg),iolist=[iolistorg],iolist=iolistorg); - forall(1..(length(iolist)), - tmp=replace(iolist_#,"i","1,"); - tmp=replace(tmp,"o","0,"); - tmp="["+substring(tmp,0,length(tmp)-1)+"]"; - iolist_#=parse(tmp); - ); - Scalebkup=[SCALEX,SCALEY];//181020[2lines] - SCALEX=1; - SCALEY=1; - sg=Lineplot("",[pt,pt+vec],["nodata"]); - nb=length(bdylist); - if(nb>0, - tenL=[]; - forall(1..nb,ii, - rmL=[]; - bdy=bdylist_ii; - nbdy=length(bdy)-1; - pL=[]; - forall(1..nbdy,jj, - p1=bdy_jj; - p2=bdy_(mod(jj+1-1,nbdy)+1); - tmp=Intersectseg(sg,[p1,p2],Eps); - if(abs(tmp_1)<Eps, //18.02.01 - p0=tmp_2; t=tmp_3; s=tmp_4; - flg=0; //181003from - forall(pL, - if(flg==0, - if(Norm(#_1-p0)<Eps, - flg=1; - ); - ); - ); - if(flg==0, - pL=append(pL,[p0,t,s,ii]); - ); //181003to - ); - ); - if(length(pL)>0, - pL=sort(pL,[#_2]); - pL=apply(1..(length(pL)),append(pL_#,mod(#,2))); - tenL=concat(tenL,pL); - ); - ); - tenL=sort(tenL,[#_2]); - if(length(tenL)>0, //180619from - tmp1=tenL; tenL=[tmp1_1]; - forall(2..(length(tmp1)),ii, //180717from - tmp=tmp1_ii; - flg=0; - forall(tenL, - if((Norm(tmp_1-#_1)<Eps1)&(tmp_4==#_4), - flg=1; - ); - ); - if(flg==0, - tenL=append(tenL,tmp); - ); - );//180717to - ); //180619to - ioL=apply(1..nb,0); - ns=1; - ne=length(tenL); - if(ne>0,tmp=tenL_1_1,tmp=sg_2); - if(|sg_1-tmp|>Eps, - tmp=[sg_1,-1,1,ioL]; - tenL=prepend(tmp,tenL); - ns=ns+1; - ne=ne+1; - ); - if(|sg_2-tenL_(length(tenL))_1|>Eps, - tmp=[sg_2,-1,2,ioL]; - tenL=append(tenL,tmp); - ); - forall(ns..(ne-1),ii, //180619 ne=>ne-1 - tmp=tenL_ii; - tmp1=tmp_4; - tmp2=tmp_5; - ioL_tmp1=tmp2; - tmp=[tmp_1,tmp_2,tmp_4,ioL]; - tenL_ii=tmp; - ); - out=[]; - forall(1..(length(tenL)-1),ii, - tmp1=tenL_ii; - if(contains(iolist,tmp1_4), - tmp2=tenL_(ii+1); - tmp=Listplot("",[tmp1_1,tmp2_1],["nodata"]); - out=append(out,tmp); - ); - ); - ); - SCALEX=Scalebkup_1; //181020 - SCALEY=Scalebkup_2; - out; -); -////%Makehatch end//// - -////%Anyselected start//// -Anyselected(ptL):=( - regional(tmp,out); - out=false; - forall(ptL, - if(isstring(#),tmp=parse(#),tmp=#); - out=(out)%(isselected(tmp)); - ); - out; -); -////%Anyselected end//// - -////%Hatchdata start//// -Hatchdata(nm,iostr,bdylist):=Hatchdatacindy(nm,iostr,bdylist,[]);//180619 -Hatchdata(nm,iostr,bdylist,optionsorg):=( //181003from - regional(options,tmp,tmp1,tmp2,eqL,strL,chkL,outflg); - options=optionsorg; - tmp=Divoptions(options); - eqL=tmp_5; - strL=tmp_7; - outflg=0; - forall(eqL, - tmp=Strsplit(#,"="); - tmp1=Toupper(tmp_1); - if(substring(tmp1,0,1)=="O", - tmp2=tmp_2; - if(tmp2!="n", - outflg=1; - option=remove(options,[#]); - if((tmp2=="m")%(tmp2=="r"), - options=append(options,tmp2);; - ); - ); - ); - ); - if(outflg==0, - options=remove(options,strL); - Hatchdatacindy(nm,iostr,bdylist,options); - , - HatchdataR(nm,iostr,bdylist,options); - ); -); //181003to -Hatchdatacindy(nm,iostr,bdylist):=Hatchdata(nm,iostr,bdylist,[]); -Hatchdatacindy(nm,iostr,bdylistorg,optionsorg):=( - //help:Hatchdata("1",["ii"],[["ln1","Invert(gr1)"],["gr2","n"]]); -//help:Hatchdata(options=["Not=pointlist","File=y(/m/n)","Max=50","Check=",angle,width]); - regional(name,bdylist,bdynameL,bname,Ltype,Noflg,opstr,opcindy,reL, - options,eqL,maxnum,startP,angle,interval,vec,nvec,ctr,pt,kk,delta,sha,AnsL, - color,tmp,tmp1,tmp2,tmp3,namep,x1,y1,x2,y2,p1,p2, //180717 - fname,fileflg,mkflg,vaL,pL,nL,nn,str,is,ie); //181102 - name="ha"+nm; - fname=Fhead+name+".txt"; - bdylist=[]; - bdynameL=[]; - forall(1..(length(bdylistorg)),kk, - tmp1=bdylistorg_kk; - if(length(tmp1)==1, - bname=tmp1_1; - , - tmp=tmp1_(length(tmp1)); - if(contains(["n","s","e","w"],tmp), - namep=tmp1_1;//180717from - tmp2=parse(namep); - if(substring(namep,0,2)=="ln", //180717from - if(contains(["n","s"],tmp), - x1=tmp2_1_1; y1=tmp2_1_2; x2=tmp2_2_1; y2=tmp2_2_2; - p1=[NE.x,(y2-y1)/(x2-x1)*(NE.x-x1)+y1]; - p2=[SW.x,(y2-y1)/(x2-x1)*(SW.x-x1)+y1]; - Listplot(name+text(kk),[p1,p2],["nodisp"]); - namep="sg"+name+text(kk); - tmp2=parse(namep); - ); - if(contains(["e","w"],tmp), - x1=tmp2_1_1; y1=tmp2_1_2; x2=tmp2_2_1; y2=tmp2_2_2; - p1=[(x2-x1)/(y2-y1)*(NE.y-y1)+x1,NE.y]; - p2=[(x2-x1)/(y2-y1)*(SW.y-y1)+x1,SW.y]; - Listplot(name+text(kk),[p1,p2],["nodisp"]); - namep="sg"+name+text(kk); - tmp2=parse(namep); - ); - );//180717to - if(tmp=="s", - Listplot(name,[LLcrd(tmp2_1),[tmp2_1_1,2*YMIN-YMAX], //180717[2lines] - [tmp2_(length(tmp2))_1,2*YMIN-YMAX],LLcrd(tmp2_(length(tmp2)))], - ["nodisp"]); - Joincrvs(text(kk)+name,[namep,"sg"+name],["nodisp"]);//180717 - bname="join"+text(kk)+name; - ); - if(tmp=="n", - Listplot(name,[LLcrd(tmp2_1),[tmp2_1_1,2*YMAX-YMIN], //180717[2lines] - [tmp2_(length(tmp2))_1,2*YMAX-YMIN],LLcrd(tmp2_(length(tmp2)))], - ["nodisp"]); - Joincrvs(text(kk)+name,[namep,"sg"+name],["nodisp"]); - bname="join"+text(kk)+name; - ); - if(tmp=="e", - Listplot(name,apply([tmp2_1,[XMAX,tmp2_1_2], - [XMAX,tmp2_(length(tmp2))_2],tmp2_(length(tmp2))],LLcrd(#)),["nodisp"]); - Joincrvs(text(kk)+name,[namep,"sg"+name],["nodisp"]);//180717 - bname="join"+text(kk)+name; - ); - if(tmp=="w", - Listplot(name,apply( [tmp2_1,[XMIN,tmp2_1_2], - [XMIN,tmp2_(length(tmp2))_2],tmp2_(length(tmp2))],LLcrd(#)),["nodisp"]); - Joincrvs(text(kk)+name,[namep,"sg"+name],["nodisp"]);//180717 - bname="join"+text(kk)+name; - ); - , - Enclosing2(text(kk)+name,tmp,["nodisp"]);//180619[2lines] - bname="en"+text(kk)+name; - ); - ); - bdylist=append(bdylist,parse(bname)); - bdynameL=append(bdynameL,bname); - ); - options=optionsorg; - tmp=Divoptions(options); - Ltype=tmp_1; - Noflg=tmp_2; - eqL=tmp_5; - reL=tmp_6; - color=tmp_(length(tmp)-2); - opstr=tmp_(length(tmp)-1); - opcindy=tmp_(length(tmp)); - angle=45; -// interval=0.125*1000/2.54/MilliIn; - interval=0.25*1000/2.54/MilliIn; //180706 - startP=[(XMIN+XMAX)/2, (YMIN+YMAX)/2]; - maxnum=[50,0]; //181109changed [first,second] - fileflg="N";//181102from - mkflg=1; - chkL=[]; //181109 - forall(eqL, - tmp=Strsplit(#,"="); - tmp1=Toupper(substring(tmp_1,0,1)); - if(tmp1=="M", - maxnum=parse(tmp_2); - if(!islist(maxnum), - maxnum=[maxnum,0]; - ); - options=remove(options,[#]); - ); - if(tmp1=="F", //181102from - fileflg=Toupper(substring(tmp_2,0,1)); - options=remove(options,[#]); - ); //181102to - if(tmp1=="N", //181103from - tmp=parse(tmp_2); - if(Anyselected(tmp), - mkflg=-1; - ); - options=remove(options,[#]); - ); - if(tmp1=="C", - chkL=parse(tmp_2); - options=remove(options,[#]); - ); - );//181102,03to - tmp1=1; - forall(reL, - if(islist(#), - startP=#; - , - if(tmp1==1, - angle=#; - tmp1=tmp1+1; - , - interval= interval*#; - ); - ); - ); - if((fileflg=="Y")%(fileflg=="M")&(mkflg>-1), //181102from - wflg=1; - varL=flatten(bdylistorg); - varL=select(varL,length(#)>1); - varL=sort(varL); - pL=[]; - forall(1..(length(varL)),nn, - tmp1=varL_nn; - tmp=select(GLIST,substring(#,0,length(tmp1))==tmp1); - str=tmp_1; - varL_nn=str; - tmp1=Bracket(str,"()"); - tmp2=max(apply(tmp1,#_2)); - nL=select(1..(length(tmp1)),tmp1_#_2==tmp2); - forall(nL,nn, - is=tmp1_nn_1; ie=tmp1_(nn+1)_1; - tmp=substring(str,is,ie-1); - tmp=replace(tmp,"'",Dq); - tmp=parse("["+tmp+"]"); - tmp2=flatten(tmp); - tmp2=flatten(tmp2); - tmp2=flatten(tmp2); - forall(tmp2, - if(ispoint(#), - if(!contains(pL,text(#)), - pL=append(pL,text(#)); - ); - ); - ); - ); - ); - forall(chkL, - if(!contains(pL,#),pL=append(pL,#)); - ); - forall(pL, - tmp=#+"="+Textformat(parse(#+".xy"),5); - varL=append(varL,tmp); - ); - tmp="reL="+Textformat(reL,5); - varL=append(varL,tmp); - if(fileflg=="M", - fileflg="Y"; - , - tmp1="hatch"+nm+".txt"; - if(isexists(Dirwork,tmp1), - tmp2=load(tmp1); - tmp2=tokenize(tmp2,"//"); - tmp2=tmp2_(1..(length(tmp2)-1)); - if(tmp2==varL, - wflg=0; - if(isexists(Dirwork,fname), - mkflg=0; - ReadOutData(fname); - tmp=name+"="+Textformat(parse(name),5); - parse(tmp); - ); - ); - ); - ); - ); - if(mkflg==1, //181102to - angle=angle*pi/180; - vec=[cos(angle),sin(angle)]; - nvec=[-sin(angle),cos(angle)]; - AnsL=[]; - ctr=0;//181005[2lines] - forall(0..(maxnum_1), kk, - pt=startP+kk*interval*nvec; - sha=Makehatch(iostr,pt,vec,bdylist); - if((sha!=-1)&(length(sha)>0), - AnsL=concat(AnsL,sha); - ctr=ctr+1; //181005 - ); - ); - maxnum_2=maxnum_2+(maxnum_1-ctr); //181005 - forall(1..(maxnum_2),kk, //181005 - pt=startP-kk*interval*nvec; - sha=Makehatch(iostr,pt,vec,bdylist); - if((sha!=-1)&(length(sha)>0), - AnsL=concat(AnsL,sha); - ); - ); - tmp1=apply(AnsL,Textformat(#,5)); - tmp=name+"="+tmp1; - parse(tmp); - ); - if((Noflg<3)&(mkflg>-1), - if(fileflg!="Y", //181102 - println("generate Hatchdata "+name); - tmp=name+"="+Textformat(AnsL,5); - parse(tmp); - if(!islist(iostr),tmp1=[iostr],tmp1=iostr); //no ketjs on - tmp="c"+PaO(); - forall(tmp1, - tmp=tmp+Dq+#+Dq+","; - ); - tmp=substring(tmp,0,length(tmp)-1)+")"; - tmp2=name+"=Hatchdata("+tmp; - forall(bdynameL, - tmp2=tmp2+",list"+PaO()+#+")"; - ); - tmp2=tmp2+opstr+")"; - GLIST=append(GLIST,tmp2); //no ketjs off - , - GLIST=append(GLIST,"ReadOutData("+Dq+fname+Dq+")");//181102 //no ketjs - ); - ); - if((Noflg<2)&(mkflg>-1), - if(isstring(Ltype), - if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on - Texcom("{");Com2nd("Setcolor("+color+")");//180722 - ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); - if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on - Texcom("}");//180722 - ); //no ketjs off - , - if(Noflg==1,Ltype=0); - ); - GCLIST=append(GCLIST,[name,Ltype,opcindy]); - ); - if(mkflg>-1, - if((fileflg=="Y")&(wflg==1), //181102from - tmp1="hatch"+nm+".txt"; - SCEOUTPUT = openfile(tmp1); - forall(varL, - println(SCEOUTPUT,#+"//"); - ); - closefile(SCEOUTPUT); - WriteOutData(fname,[name,parse(name)]); - ); //181102to - tmp2=[]; - forall(AnsL,tmp1, - tmp=apply(tmp1,LLcrd(#)); - tmp2=append(tmp2,tmp); - ); - tmp2; - ); -); -////%Hatchdata end//// - -////%Shadein start//// -Shadein(pstrorg):=( //190220 - regional(pstr,ptL,pL,crv,nn, - tmp,tmp1,tmp2,pm1,pm2,p1,p2,flg); - if(islist(pstrorg),pstr=pstrorg_1,pstr=pstrorg); - crv=[]; - Framedata(["nodisp"]); - ptL=IntersectcurvesPp(pstr,frwin); - if(length(ptL)>0, - pL=apply(ptL,#_2); - forall(1..(length(pL)),nn, - if(nn<length(pL), - tmp1=pL_nn; - tmp2=pL_(nn+1); - tmp=Pointoncrv((tmp1+tmp2)/2,pstr); - , - tmp1=pL_nn; - tmp2=pL_1; - tmp=parse(pstr); - if(pL_nn==length(tmp), - tmp=tmp_1; - , - tmp=tmp_(length(tmp)); - ); - ); - if(Inwindow(tmp), - tmp=Partcrv("",tmp1,tmp2,pstr,["nodata"]); - , - tmp1=Pointoncrv(tmp1,pstr); - tmp2=Pointoncrv(tmp2,pstr); - pm1=Paramoncrv(tmp1,frwin); - pm2=Paramoncrv(tmp2,frwin); - if(floor(pm1)==floor(pm2), - tmp=Listplot("",[tmp1,tmp2],["nodata"]); - , - tmp=floor(pm1); - p1=Pointoncrv(tmp,"frwin"); - p2=Pointoncrv(mod(tmp,4)+1,"frwin"); - tmp=p1-10*(p2-p1); - Listplot("frwin",[p1,tmp],["nodisp","Msg=n"]); - tmp=IntersectcurvesPp("sgfrwin",pstr); - if(mod(length(tmp),2)==0, //190223from - if(pm2<pm1,pm2=pm2+4); - tmp=[tmp1]; - pm1=floor(pm1)+1; - flg=0; - forall(1..3, - if(flg==0, - if(pm1<pm2, - p1=Pointoncrv(mod(pm1-1,4)+1,"frwin"); - tmp=append(tmp,p1); - pm1=pm1+1; - , - flg=1; - ); - ); - ); - if(pm1-1<pm2,tmp=append(tmp,tmp2)); - , - if(pm2>pm1,pm2=pm2-4); - tmp=[tmp1]; - pm1=floor(pm1); - flg=0; - forall(1..3, - if(flg==0, - if(pm1>pm2, - p1=Pointoncrv(mod(pm1-1,4)+1,"frwin"); - tmp=append(tmp,p1); - pm1=pm1-1; - , - flg=1; - ); - ); - ); - if(pm1+1>pm2,tmp=append(tmp,tmp2)); - ); //190223to - ); - ); - if(length(crv)==0, - crv=tmp; - , - crv=Joincrvs("",[crv,tmp],["nodata"]); - ); - ); - , - if(Inwindow(parse(pstr+"_1")),crv=pstr,crv=frwin); - ); - crv; -); -////%Shadein end//// - -////%Shade start//// -Shade(plist):=Shade(plist,[]); -Shade(Arg1,Arg2):=( - if(!isstring(Arg1), - Shade(text(SHADECTR),Arg1,Arg2); //190222 - , - Shade(Arg1,Arg2,[]); - ); -); -Shade(nm,plistorg,options):=( -//help:Shade(["gr1"],[0.5]); -//help:Shade(["gr1"],["Color=red"]); -//help:Shade(["gr1"],["Trim=y(n)"]); //190224 -// help:Shade(["gr1","sg1"],["Color=[1,0,0]"]); -// help:Shade([[A,B,C,A]]); -//help:Shade(["gr2","Invert(sg1)"],["Enc=y",(Startpoint)]); - regional(name,plist,jj,nn,trim,tmp,tmp1,tmp2, - opstr,opcindy,eqL,reL,Str,G2,flg,encflg,startpt,color,ctr); - name="shade"+nm; - plist=plistorg; - if(isstring(plist_1), // 16.01.24 - println("output Shade of "+plist); - , - println("output Shade of lists"); - ); - tmp=Divoptions(options); - eqL=tmp_5; - reL=tmp_6; - color=tmp_(length(tmp)-2); - opstr=tmp_(length(tmp)-1); - opcindy=tmp_(length(tmp)); - tmp=select(plist,indexof(#,"Invert")>0); //180929from - if(length(tmp)>0,encflg=1,encflg=0); - trim="N"; - forall(eqL, - tmp=Strsplit(#,"="); - tmp1=Toupper(tmp_1); - tmp2=Toupper(tmp_2); - if(substring(tmp1,0,1)=="E", - if(substring(tmp2,0,1)=="Y", - encflg=1; - ); - if(substring(tmp2,0,1)=="N", - encflg=0; - ); - ); - if(substring(tmp1,0,1)=="T", - trim=substring(tmp2,0,1); - ); - ); - startpt=[]; - forall(reL, - if(islist(#), - startpt=#; - ); - ); //180929to - if(length(color)==4, //180602from - tmp=Colorcmyk2rgb(color); - ); - flg=0; ctr=1; - if(encflg==1, //180929from - if(length(startpt)==2, - Enclosing(nm,plist,[startpt,"nodisp"]); - , - Enclosing(nm,plist,["nodisp"]); - ); - plist=["en"+nm]; - ); //180929to - if((length(plist)==1)&(trim=="Y"), //190220from,109224 - plist=[Shadein(plist)]; - ); //190220to - forall(1..(length(plist)),jj, //180613from - if(flg==0, - tmp1=plist_jj; - if(isstring(tmp1),tmp=parse(tmp1),tmp=tmp1); - if(!islist(tmp), - flg=1; - , - if(!isstring(tmp1), - tmp2=[]; - forall(tmp1,if(ispoint(#),tmp=#.xy,tmp=#); - tmp2=append(tmp2,tmp); - ); - tmp1=Dqq("-"+name+text(ctr)); - tmp2=Textformat(tmp2,6)+",["+Dqq("nodisp")+"]"; - tmp=name+text(ctr)+"=Listplot("+tmp1+","+tmp2+")"; - parse(tmp); - plist_jj=name+text(ctr); - ctr=ctr+1; - ); - ); - ); - );//180613to - if(flg==1, - println(" some data not defined properly"); - , - G2=Joincrvs("1",plist,["nodata"]); - G2=apply(G2,Pcrd(#)); - tmp1="fillpoly("+Textformat(G2,5)+opcindy+");"; - parse(tmp1); - ); - Str="Shade("; //no ketjs on - tmp1="list"+PaO(); - forall(plist, - if(isstring(#), // from 16.01.24 - if(length(#)>1, - tmp1=tmp1+#+","; - , - tmp1=tmp1+Dq+#+Dq+","; - ); - , - tmp1=tmp1+"Listplot("+Textformat(#,5)+"),"; - ); //16.01.24to - ); - Str=Str+substring(tmp1,0,length(tmp1)-1)+")"+")"; //180929 - nn=length(COM2ndlist); //190311from - jj=nn; - forall(plist,tmp1, - tmp=select(1..nn,indexof(COM2ndlist_#,tmp1)>0); - jj=min(append(tmp,jj)); - ); - tmp1=["Texcom("+Dqq("{")+")","Setcolor("+color+")",Str,"Texcom("+Dqq("}")+")"]; - tmp2=COM2ndlist_(1..(jj-1)); - tmp=COM2ndlist_(jj..(length(COM2ndlist))); - if(!islist(tmp),tmp=[tmp]); - COM2ndlist=concat(tmp2,tmp1); - COM2ndlist=concat(COM2ndlist,tmp); //190311to - //no ketjs off - SHADECTR=SHADECTR+1; -); -////%Shade end//// - -/////////// end of new Hatchdata(cindy) /////////// - - - - //help:end(); diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic2logr.txt b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic2logr.txt index fb2ec442dcf..35a48c5d4d9 100644 --- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic2logr.txt +++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic2logr.txt @@ -1,3 +1,80 @@ +// 20190531 +// Drawfigures (Drwfigs) changed +// 20190524 +// Anglemark,Paramark changed ( "E/L" option ) +// 20190523 +// Deqdata debugged ( floor => round ) +// Mkcstable added +// Fourierseries changed ( for table data ) +// 20190520 +// Anglemark,Paramark debugged +// Shade changed ( Listplot ) +// 20190512 +// Windispg changed (Dashlinedata) +// 20190511 +// Periodfun changed ( println for debug removed) +// 20190508 +// Changetablestyle debugged +// Tabledatageo majorly changed +// Tseginfo,Tsegrmv removed +// 20190507 +// Tabledata debugged ( for "r_c_c_" ) +// Changetablestyle majorly changed +// 20190505 +// Periodfun changed ( equal option added ) +// text(pt) => pt.name +// 20190504 +// Lightarrowdata changed ("Line=" added ) +// 20190429 +// Pp => pp, Bow => bow +// 20190429 +// Tabledatalight changed ( rng=n when move option used ) +// 20190428 +// Tabledata changed to Tabledatageo +// Tabledata added ( Tabldetadalight if "Geo=n(defalt)", Tabledatageo if "Geo=y") +// Tgrid changed ( TableMove added ) +// Changetablestyle changed ( for multiple tables ) +// 20190427 +// Drawfigures debugged ( N added ) +// Drwxy debugged ( KCOLOR added ) +// 20190426 +// Drawfigures added +// 20190425 +// Rotatedata,Trans,Scale,Reflectdata changed (Msg option added) +// Windispg changed ( for pointdata) +// 20190424 +// Tabledatalight debugged ( tick) +// 20190421 +// Tabledatalight changed ( 0 for notick) +// 20190420 +// Periodfun majorly changed +// Fourierseries changed ( range ) +// 20190419 +// Lightarrowdata added ( only for case of segment) +/ 20190417 +// Arrowdata debugged ( for geo-points ) +// 20190416 +// Deqplot changed ( "`" ) +// Findfun, Extractun, Extractall move to basic3 +// 20190415 +// parse( ..= ) changed ( ; added ) +// Bowdata changed (Bpos) +// 20190414 +// Helplist changed ( for basic3 ) +// 20190412 +// Some functions moved from basic1, moved to basic3 +// Arrowdata debugge ( for Setscaling ) +// 20190409 +// Mkketcindyjs debugged (color option ) +// Expr debugged ( type of pos,dir,text,option added ) +// 20190405 +// Mkketcindyjs changed (size of NE,SW. "Nolabe=all" ) +// 20190329 +// Slider debugged (PTEXCEPTION) +// 20190325 +// Drwxy changed ( Msg=n for Listplot ) +// 20190324 +// Viewtex,Figpdf changed (for tikz ) // 20190301 // MeasureDepth => Measuredepth // 20190228 diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic2r.cs b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic2r.cs index 0ff8a34535b..c1e21281ede 100644 --- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic2r.cs +++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic2r.cs @@ -14,33 +14,2197 @@ // along with this program. If not, see <http://www.gnu.org/licenses/> // -println("ketcindybasic2[20190301] loaded"); +println("ketcindylibbasic2[20190531] loaded"); //help:start(); -////%Dispchoice start//// -Dispchoice():=( - if(islist(Ch), - if(!isreal(ChNum),ChNum=1); - drawtext(mouse().xy,"Ch="+text(Ch)+" N="+text(ChNum),size->24,color->[0,0,1]); +////%Drwfigs start//// 190530 +Drwfigs(nm,figlist):=Drawfigures(nm,figlist,[]); +Drwfigs(nm,figlist,optionlist):=Drawfigures(nm,figlist,optionlist,[]); +Drwfigs(nm,figlist,optionlist,commonops):=Drawfigures(nm,figlist,optionlist,commonops); +////%Drwfigs end//// + +////%Drawfigures start//// 190426 +Drawfigures(nm,figlist):=Drawfigures(nm,figlist,[]); +Drawfigures(nm,figlist,optionlist):=Drawfigures(nm,figlist,optionlist,[]); +Drawfigures(nm,figlistorg,optionlistorg,commonops):=( +//help:Drawfigures(["pt1","cr1"], [["Size=3"],[]],["Msg=n"]); + regional(figlist,name,figL,optionlist,nn,kk,fig,eqL,msg,tmp,tmp1,tmp2); + name="figs"+nm; + tmp=Divoptions(commonops); + eqL=tmp_5; + msg="Y"; + forall(eqL, + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,1)); + if(tmp1=="M", + msg=Toupper(substring(tmp_2,0,1)); + ); + ); + figlist=figlistorg; + if(isstring(figlist),figlist=parse(figlist)); + nn=length(figlist); + optionlist=optionlistorg; + if(length(optionlist)==0, //190531from + optionlist=apply(1..nn,[]); + ); + if(!islist(optionlist_1), + optionlist=apply(1..nn,optionlist); + ); + if(length(optionlist)<nn, + tmp=optionlist_(length(optionlist)); + tmp2=length(optionlist); + tmp1=apply(tmp2..nn,tmp); + optionlist=concat(optionlist,tmp1); + ); //190531to + figL=[]; + forall(1..nn,kk, + fig=figlist_kk; + if(isstring(fig),fig=parse(fig)); + if(length(fig)>0, + if(Measuredepth(fig)==0,fig=[fig]); //190531from + if(Measuredepth(fig)==1,fig=[fig]); + forall(1..(length(fig)), + tmp1=fig_#; + tmp2=name+"n"+text(kk)+"p"+text(#); + if(length(tmp1)==1, + Pointdata(tmp2,tmp1,optionlist_kk); + figL=append(figL,"pt"+tmp2); + , + Listplot("-"+tmp2,tmp1,optionlist_kk); + figL=append(figL,tmp2); //190427 + ); + ); //190531to + ); + ); + tmp=apply(figL,Dqq(#)); + tmp=name+"="+text(tmp)+";"; + parse(tmp); + if(msg=="Y", + println("generate "+name+"="+text(figL)); ); + figL; ); -////%Dispchoice end//// +////%Drawfigures end//// -////%Datetime start//// -Datetime():=( -//help:Datetime(); - regional(names,dt,tmp); - tmp=getdatetime(); - dt=tokenize(tmp," "); - dt=apply(dt,if(!isstring(#),text(#),#)); - names=["Jan","Feb","Mar","Apr","May","Jun", - "Jul","Aug","Sep","Oct","Nov","Dec"]; - tmp=select(1..12,names_#==dt_2); - tmp=text(tmp_1); - tmp=[dt_6+"/"+tmp+"/"+dt_3,dt_4]; +////%Setarrow start//// +Setarrow():=Setarrow([]); +Setarrow(arglist):=( +//help:Setarrow([-1,-1,-1,1,0.3]); +//help:Setarrow([size(1),angle(18),position(1),cut(0),segstyle("dr,1")]); + regional(tmp); + tmp=select(arglist,isreal(#)); + if(length(tmp)==0, + println([YaSize,YaAngle,YaPosition,YaCut,YasenStyle]); + ); + if(length(tmp)>=1, + if((tmp_1>0),YaSize=tmp_1); + ); + if(length(tmp)>=2, + if((tmp_2>0)&(tmp_2<90),YaAngle=tmp_2); + ); + if(length(tmp)>=3, + if((tmp_3>=0)&(tmp_3<=1),YaPosition=tmp_3); + ); + if(length(tmp)>=4, + if((tmp_4>=0)&(tmp_4<1),YaCut=tmp_4); + ); + tmp=select(arglist,isstring(#)); + if(length(tmp)>0, + YasenStyle=tmp_1; + ); + [YaSize,YaAngle,YaPosition,YaCut,YasenStyle]; +); +////%Setarrow end//// + +////%Arrowheaddata start//// +Arrowheaddata(point,direction):=Arrowheaddata(point,direction,[]); +Arrowheaddata(point,direction,options):=( +// help:Arrowheaddata(A,B); +// help:Arrowheaddata(options=[size(1),angle(18), "Coord=phy"]); + regional(list,ookisa,hiraki,Houkou,Str,Flg,Ev,Nv,pA,pB, + reL,eqL,coord,pP,rF,gG,Flg,Nj,Eps,scx,scy,tmp,tmp1,tmp2); + Eps=10^(-3); + coord="P"; + ookisa=0.2*YaSize; + hiraki=YaAngle; + iti=1; + kiri=0; + Futosa=0; + Str=YaStyle; + tmp=Divoptions(options); + eqL=tmp_5; //181018from + reL=tmp_6; + forall(eqL, + tmp=Strsplit(#,"="); + tmp1=substring(tmp_1,0,1); + tmp2=substring(tmp_2,0,1); + if(Toupper(tmp1)=="C", + coord=Touppera(tmp2); + ); + ); //181018to + forall(1..(length(reL)), //181110from + tmp=reL_#; + if(#==1,ookisa=ookisa*tmp); + if(#==2, + if(tmp<5, + hiraki=hiraki*tmp; + , + hiraki=tmp; + ); + ); + ); //181110to + Flg=0; + hiraki=hiraki*pi/180; + if(ispoint(direction),Houkou=direction.xy); //181018 + if(isstring(direction),Houkou=parse(direction),Houkou=direction); + if(Measuredepth(Houkou)==2,Houkou=Houkou_1); + if(coord=="P",//181018from + if(ispoint(point),pP=point.xy,pP=point); + , + pP=Pcrd(point); + if(!islist(Houkou_1), + Houkou=Pcrd(Houkou); + , + Houkou=apply(Houkou,Pcrd(#)); + ); + );//181018to + if(islist(Houkou_1), + tmp=Nearestpt(pP,Houkou); + pP=tmp_1; + rF=floor(tmp_2); + if(rF==1, + if(|Ptend(Houkou)-Ptstart(Houkou)|<Eps, + rF=Numptcrv(Houkou); + ); + ); + gG=apply(0..10,pP+ookisa*cos(hiraki)*[cos(2*pi/10*#),sin(2*pi/10*#)]); + Flg=0; + forall(1..rF,Nj, + if(Flg==0, + pB=Ptcrv(rF+1-Nj,Houkou); + tmp1=apply([pP,pB],LLcrd(#)); + tmp2=apply(gG,LLcrd(#)); + tmp=Intersectcrvspp([pP,pB],gG); + if(length(tmp)>0, + Houkou=pP-Pcrd(tmp_1_1); + Flg=1; + ); + ); + ); + if(Flg==0, + println("Arrowhead may be too large (no intersect)"); + Flg=2; + ); + ); + if(Flg<2, + Ev=-1/|Houkou|*Houkou; + Nv=[-Ev_2, Ev_1]; + if(indexof(Str,"c")>0, + pP=pP-0.5*ookisa*cos(hiraki)*Ev; + ); + if(indexof(Str,"b")>0, + pP=pP-ookisa*cos(hiraki)*Ev; + ); + pA=pP+ookisa*cos(hiraki)*Ev+ookisa*sin(hiraki)*Nv; + pB=pP+ookisa*cos(hiraki)*Ev-ookisa*sin(hiraki)*Nv; + list=[pA,pP,pB]; + list; + ); +); +////%Arrowheaddata end//// + +////%Arrowhead start//// +Arrowhead(point,Houkou):=Arrowhead(point,Houkou,[]); //181018from +Arrowhead(Arg1,Arg2,Arg3):=( + if(isstring(Arg1), + Arrowhead(Arg1,Arg2,Arg3,[]); + , + Arrowhead(text(ArrowheadNumber),Arg1,Arg2,Arg3); + ); +); +Arrowhead(nm,point,direction,optionsorg):=(//181018from +//help:Arrowhead("1",B,B-A); +//help:Arrowhead(options=[size(1),angle(18),position(1),cut(0),"Coord=P(L)"]); +//help:Arrowhead(the default is -1 for numeric option); +//help:Arrowhead(A,"gr1"); + regional(name,Ltype,Noflg,reL,opstr,opcindy,color,eqL,coord, + options,cut,pP,Houkou,ptstr,hostr,tmp,tmp1,tmp2,list); + name="arh"+nm; //181018 + ArrowheadNumber=ArrowheadNumber+1; + options=optionsorg; + tmp=Divoptions(options); + Ltype=tmp_1; + Noflg=tmp_2; + reL=tmp_6; + color=tmp_(length(tmp)-2); + eqL=tmp_5; + coord="P"; + forall(eqL, + tmp=Strsplit(#,"="); + tmp1=substring(tmp_1,0,1); + tmp2=substring(tmp_2,0,1); + if(Toupper(tmp1)=="C", + coord=Toupper(tmp2); + options=remove(options,[#]); + ); + ); //181018to + tmp1=[YaSize,YaAngle,YaPosition,YaCut]; //181214from + forall(1..(length(reL)), + if(reL_#<0, reL_#=tmp1_#); + ); + forall((length(reL)+1)..4, + reL=append(reL,tmp1_#); + ); + cut=reL_4; + tmp=reL_(1..3); + options=select(options,!isreal(#)); + options=concat(options,tmp); //181214to + if(ispoint(direction),Houkou=direction.xy); //181018 + if(isstring(direction),Houkou=parse(direction),Houkou=direction); + if(Measuredepth(Houkou)==2,Houkou=Houkou_1); + if(coord=="P",//181018from + if(ispoint(point),pP=point.xy,pP=point); + , + pP=Pcrd(point); + if(!islist(Houkou_1), + Houkou=Pcrd(Houkou); + , + Houkou=apply(Houkou,Pcrd(#)); + ); + );//181018to + list=Arrowheaddata(pP,Houkou,options); + if(!Inwindow(LLcrd(pP)),Noflg=2);//181018 + if(Noflg<3, + tmp1=apply(list,LLcrd(#)); + tmp=name+"="+Textformat(tmp1,5)+";"; //190415 + parse(tmp); + ); + if(Noflg<2, + if(isstring(Ltype), + Listplot("-arh"+nm,apply(list,LLcrd(#)),concat(options,["notex","Msg=n"])); + ); + ); + if(Noflg==0, + tmp=Divoptions(options); + opstr=tmp_(length(tmp)-1); + opstr=opstr+","+Dqq("Cut="+format(cut,5)); + ptstr=Textformat(LLcrd(pP),5); + if(isstring(direction), //181019 + hostr=direction; + , + if(!islist(Houkou_1), + hostr=format(LLcrd(Houkou),5); + , + hostr=format(apply(Houkou,LLcrd(#)),5); + ); + ); + if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on + Texcom("{");Com2nd("Setcolor("+color+")");//180722 + ); //no ketjs off + Com2nd("Arrowhead("+ptstr+","+hostr+opstr+")"); + if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on + Texcom("}");//180722 + ); //no ketjs off + ); ); -////%Datetime end//// +////%Arrowhead end//// + +////%Arrowdata start//// +Arrowdata(ptlist):=Arrowdata(ptlist,[]); //181110from +Arrowdata(Arg1,Arg2):=( + regional(name); + if(isstring(Arg1), + Arrowdata(Arg1,Arg2,[]); + , + name=""; + forall(Arg1, + if(ispoint(#), + name=name+#.name; //190505 + ); + ); + Arrowdata(name,Arg1,Arg2); + ); +); //181110from +Arrowdata(nm,ptlistorg,optionsorg):=( +//help:Arrowdata("1",[A,B]); +//help:Arrowdata("1",[pt1,pt2]); +//help:Arrowdata(options=[size(1),angle(18),pos(1),cut(0),"Cutend=0,0","Coord=p/l"]); +//help:Arrowdata(optionsadded=["line"]); + regional(options,Ltype,Noflg,name,opstr,opcindy,eqL,reL,strL,color,size,coord, + flg,lineflg,cutend,tmp,tmp1,tmp2,pA,pB,angle,segpos,cut,scaley,ptlist); + name="ar"+nm; + scaley=SCALEY; //190412 + Setscaling(1); //190412 + ptlist=[]; + forall(ptlistorg, + if(ispoint(#),tmp=[#.x, scaley*#.y], tmp=[#_1,scaley*#_2]); + ptlist=append(ptlist,tmp); + ); +// ptlist=apply(ptlistorg,[#_1,scaley*#_2]); //190412 + options=optionsorg; + tmp=select(options,isstring(#)); //181214from + tmp1=select(tmp,contains(["dr","da","do","id"],substring(#,0,2))); + if(length(tmp1)==0,options=append(options,YasenStyle)); //181214to + tmp=Divoptions(options); + Ltype=tmp_1; + Noflg=tmp_2; + eqL=tmp_5; + reL=tmp_6; + strL=tmp_7; + color=tmp_(length(tmp)-2); + opstr=tmp_(length(tmp)-1); + opcindy=tmp_(length(tmp)); + tmp1=[YaSize,YaAngle,YaPosition,YaCut]; //181214from + forall(1..(length(reL)), + if(reL_#<0, reL_#=tmp1_#); + ); + forall((length(reL)+1)..4, + reL=append(reL,tmp1_#); + ); + size=reL_1; + angle=reL_2; + segpos=reL_3; + cut=reL_4; + lineflg=0; + if(contains(strL,"l")%contains(strL,"L"), + lineflg=1; + );//181018from + options=remove(options,strL); + cutend=[0,0];//180719 + coord="P";//181018 + forall(eqL, + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,2)); + tmp2=tmp_2; + if(tmp1=="CU",//180719from + tmp2=replace(tmp2,"[",""); + tmp2=replace(tmp2,"]",""); + cutend=tokenize(tmp2,","); + if(length(cutend)==1,cutend=[cutend_1,cutend_1]); + options=remove(options,[#]); + ); + if(tmp1=="CO",//181018from + coord=Toupper(substring(tmp2,0,1)); + options=remove(options,[#]); + ); + ); + if(|cutend|>0,//181110from + tmp=ptlist_2-ptlist_1; + tmp=tmp/|tmp|; + ptlist_1=ptlist_1+tmp*cutend_1; + ptlist_2=ptlist_2-tmp*cutend_2; + );//181110to + if(coord=="P", + pA=ptlist_1; pB=ptlist_2; + if(ispoint(pA),pA=pA.xy); + if(ispoint(pB),pB=pB.xy); + , + Setscaling(scaley); //190419 + pA=Pcrd(ptlist_1); pB=Pcrd(ptlist_2); + Setscaling(1); //190419 + );//181018to + if(Noflg<3, + println("generate Arrowdata "+name); + tmp=name+"="+Textformat([pA,pB],5)+";"; + parse(tmp); + if(lineflg==0, // 16.04.09 from + tmp=pA-0.2*size/2*(pB-pA)/|pB-pA|; // 15.06.11 + , + tmp=pB; + ); // 16.04.09 until + tmp=format([LLcrd(pA),LLcrd(tmp)],6); + ); + if(Noflg<2, + if(isstring(Ltype), + Listplot("-ar"+nm,[LLcrd(pA),LLcrd(pB)],append(options,"Msg=n")); + Arrowhead(nm,pA+segpos*(pB-pA),pB-pA,options); //181110 + , + if(Noflg==1,Ltype=0); + ); + ); + Setscaling(scaley); //190412 + [Lcrd(pA),Lcrd(pB)]; +); +////%Arrowdata end//// + +////%Lightarrowdata start//// +Lightarrowdata(ptlist):=Lightarrowdata(ptlist,[]); //181110from +Lightarrowdata(Arg1,Arg2):=( + regional(name); + if(isstring(Arg1), + Lightarrowdata(Arg1,Arg2,[]); + , + name=""; + forall(Arg1, + if(ispoint(#), + name=name+#.name; //190505 + ); + ); + Lightarrowdata(name,Arg1,Arg2); + ); +); //181110from +Lightarrowdata(nm,ptlist,optionsorg):=( +//help:Lightarrowdata("1",[pt1,pt2]); +//help:Lightarrowdata(options=[size(1),angle(18),pos(1),cut(0),"Cutend=0,0","Line=y(n)"]); + regional(options,Ltype,Noflg,opstr,opcindy,eqL,reL,strL,color,size,coord,lineflg, + flg,lineflg,cutend,tmp,tmp1,tmp2,pA,pB,angle,segpos,cut,scaley,Ev,Nv,pP); + pA=Pcrd(ptlist_1); pB=Pcrd(ptlist_2); + scaley=SCALEY; //190412 + Setscaling(1); + ptlist=[]; + forall(ptlistorg, + if(ispoint(#),tmp=[#.x, scaley*#.y], tmp=[#_1,scaley*#_2]); + ptlist=append(ptlist,tmp); + ); + options=optionsorg; + tmp=select(options,isstring(#)); //181214from + tmp1=select(tmp,contains(["dr","da","do","id"],substring(#,0,2))); + if(length(tmp1)==0,options=append(options,YasenStyle)); //181214to + tmp=Divoptions(options); + Ltype=tmp_1; + Noflg=tmp_2; + eqL=tmp_5; + reL=tmp_6; + strL=tmp_7; + color=tmp_(length(tmp)-2); + opstr=tmp_(length(tmp)-1); + opcindy=tmp_(length(tmp)); + tmp1=[YaSize,YaAngle,YaPosition,YaCut]; //181214from + forall(1..(length(reL)), + if(reL_#<0, reL_#=tmp1_#); + ); + forall((length(reL)+1)..4, + reL=append(reL,tmp1_#); + ); + size=reL_1; + angle=reL_2; + segpos=reL_3; + cut=reL_4; + lineflg=0; + if(contains(strL,"l")%contains(strL,"L"), + lineflg=1; + );//181018from + options=remove(options,strL); + cutend=[0,0];//180719 + coord="P";//181018 + lineflg=1; //190504 + forall(eqL, + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,2)); + tmp2=tmp_2; + if(tmp1=="CU",//180719from + tmp2=replace(tmp2,"[",""); + tmp2=replace(tmp2,"]",""); + cutend=tokenize(tmp2,","); + if(length(cutend)==1,cutend=[cutend_1,cutend_1]); + options=remove(options,[#]); + ); + if(tmp1=="LI",//190504from + tmp2=Toupper(substring(tmp2,0,1)); + if(tmp2=="N",lineflg=0); + options=remove(options,[#]); + );//190504to + ); + if(Noflg<3, + tmp="ar"+nm+"="+Textformat([pA,pB],5)+";"; + parse(tmp); + ); + if(Noflg<2, + if(isstring(Ltype), + if(lineflg==1, //190504from + Listplot("-ar"+nm,[LLcrd(pA),LLcrd(pB)],append(options,"Msg=n")); + , + tmp=pB; + pB=pA; + pA=pB-tmp; + ); //190504to + size=0.2*size; + angle=angle*pi/180; + pP=pA+segpos*(pB-pA); + Ev=-1/|pB-pA|*(pB-pA); + Nv=[-Ev_2, Ev_1]; + tmp1=pP+size*cos(angle)*Ev+size*sin(angle)*Nv; + tmp2=pP+size*cos(angle)*Ev-size*sin(angle)*Nv; + ArrowheadNumber=ArrowheadNumber+1; + Listplot("-arh"+nm,[tmp1,pP,tmp2],append(options,"Msg=n")); + if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on + Texcom("{");Com2nd("Setcolor("+color+")");//180722 + ); //no ketjs off + Setscaling(scaley); + tmp1=Textformat(LLcrd(pP),5); + tmp2=Textformat(LLcrd(pB-pA),5); + Com2nd("Arrowhead("+tmp1+","+tmp2+opstr+")"); + if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on + Texcom("}");//180722 + ); //no ketjs off + , + if(Noflg==1,Ltype=0); + ); + ); + Setscaling(scaley); //190412 + [Lcrd(pA),Lcrd(pB)]; +); +////%Lightarrowdata end//// + +////%Anglemark start//// +Anglemark(plist):=Anglemark(plist,[]); +Anglemark(Arg1,Arg2):=( // 2015.04.28 from + regional(nm,plist,options,tmp); + if(isstring(Arg1), + nm=Arg1; + plist=Arg2; + Anglemark(nm,plist,[]); + , + plist=Arg1; + options=Arg2; + tmp=Textformat(plist,5); + tmp=replace(tmp,",",""); + nm=substring(tmp,1,length(tmp)-1); + Anglemark(nm,plist,options); + ); +); // to +Anglemark(nm,plist,options):=( +//help([A,B,C],["E=\theta",2]); +//help:Anglemark("1",[A,B,C],["E=1.2,\theta",2]); +// help:Anglemark("1",[A,B,2*pi]); +//help:Anglemark(options=[size,"E/L=(sep,)letter"]); + regional(name,Out,pB,pA,pC,Ctr,ra,sab,sac,ratio,opstr,Bname,Bpos,color, + Brat,tmp,tmp1,tmp2,Num,opcindy,Ltype,eqL,realL,Rg,Th,Noflg,Msg); + name="ag"+nm; + Bpos="md"+name; + ra=0.5; + tmp=Divoptions(options); + Ltype=tmp_1; + Noflg=tmp_2; + color=tmp_(length(tmp)-2); + opcindy=tmp_(length(tmp)); + eqL=tmp_5; + realL=tmp_6; + Bname=""; + Brat=1.2; //180530 + Num=20; + Msg="Y"; + opstr=""; + if(length(realL)>0, + ra=realL_1*ra; + opstr=","+text(realL_1);//180530 + ); + forall(eqL, + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,1)); + if((tmp1=="L")%(tmp1=="E"), + if(tmp1=="L",Bname="Letter("); + if(tmp1=="E",Bname="Expr("); + Bname=Bname+Bpos+","+Dqq("c")+",";//16.10.29 + tmp=tmp_2; //190524from + tmp1=Indexall(tmp,","); + if(length(tmp1)==0, + Bname=Bname+Dqq(tmp); + , + if(length(tmp1)>1, + Brat=parse(substring(tmp,0,tmp1_1-1)); + tmp=substring(tmp,tmp1_1,length(tmp)); + tmp1=Indexall(tmp,","); + , + if(substring(tmp,tmp1_1,tmp1_1+1)!="[", + Brat=parse(substring(tmp,0,tmp1_1-1)); + tmp=substring(tmp,tmp1_1,length(tmp))+",[]"; + tmp1=Indexall(tmp,","); + ); + ); + Bname=Bname+Dqq(substring(tmp,0,tmp1_1-1)); + tmp=substring(tmp,tmp1_1+1,length(tmp)-1); + tmp=Strsplit(tmp,","); + tmp1=apply(tmp,Dqq(#)); + Bname=Bname+","+text(tmp1); + ); + Bname=Bname+");"; //190524to + ); + if(tmp1=="M", //190206from + Msg=Toupper(substring(tmp_2,0,1)); + ); //190206to + ); + pB=Lcrd(plist_1); pA=Lcrd(plist_2); sab=pB-pA; + Ctr=pA; + if((length(plist_3)>1)%(ispoint(plist_3)), //180506from + pC=Lcrd(plist_3); + sac=pC-pA; + Rg=[arctan2(sab)+0,arctan2(sac)+0]; + , + sac=pB-pA; + Rg=[arctan2(sab)+0,arctan2(sab)+plist_3]; + ); //180506to + if(Rg_2<Rg_1,Rg_2=Rg_2+2*pi); + Out=[]; + if(ra>min(|sab|,|sac|), // 16.12.29 + println(" segments too short"); + , + forall(0..Num, + Th=Rg_1+#*(Rg_2-Rg_1)/Num; + Out=append(Out,Ctr+ra*[cos(Th),sin(Th)]); + ); + Th=(Rg_1+Rg_2)/2; //16.10.31from[moved] + tmp1=Ctr+Brat*ra*[cos(Th),sin(Th)]; + tmp="Defvar("+Dq+Bpos+"="; //no ketjs + tmp=tmp+Textformat(tmp1,5)+Dq+")"; //no ketjs +// tmp=Bpos+"="+Textformat(tmp1,5); ; //only ketjs + parse(tmp+";");//16.10.31to[moved] + if(length(Bname)>0, + parse(Bname); + ); + if(Noflg<3, + if(Msg=="Y", //190206 + println("generate anglemark "+name+" and "+Bpos); + ); + tmp1=apply(Out,Pcrd(#)); + tmp=name+"="+Textformat(tmp1,5)+";"; + parse(tmp); + tmp=Textformat(plist,5); //no ketjs on + tmp1=substring(tmp,1,length(tmp)-1); + tmp=name+"=Anglemark("+tmp1+opstr+")"; + GLIST=append(GLIST,tmp); //no ketjs off + ); + if(Noflg<2, + if(isstring(Ltype), + if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on + Texcom("{");Com2nd("Setcolor("+color+")");//180722 + ); //no ketjs off + Ltype=Getlinestyle(text(Noflg)+Ltype,name); + if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on + Texcom("}");//180722 + ); //no ketjs off + , + if(Noflg==1,Ltype=0); + ); + GCLIST=append(GCLIST,[name,Ltype,opcindy]); + ); + ); + Out; +); +////%Anglemark end//// + +////%Paramark start//// +Paramark(plist):=Paramark(plist,[]); +Paramark(Arg1,Arg2):=( // 17.03.27 from + regional(nm,plist,options,tmp); + if(isstring(Arg1), + nm=Arg1; + plist=Arg2; + Paramark(nm,plist,[]); + , + plist=Arg1; + options=Arg2; + tmp=Textformat(plist,5); + tmp=replace(tmp,",",""); + nm=substring(tmp,1,length(tmp)-1); + Paramark(nm,plist,options); + ); +);// to +Paramark(nm,plist,options):=( +//help:Paramark([A,B,C],["E=\theta"]); +//help:Paramark("1",[p1,p2,p3],["E=\theta"]); + regional(name,Out,pB,pA,pC,ra,sab,sac,ratio,opstr,Bname,Bpos, + Brat,tmp,tmp1,tmp2,Ltype,Noflg,eqL,realL,opcindy,color); + name="pm"+nm; + tmp=Divoptions(options); + Ltype=tmp_1; + Noflg=tmp_2; + color=tmp_(length(tmp)-2); + opstr=tmp_(length(tmp)-1); + opcindy=tmp_(length(tmp)); + eqL=tmp_5; + realL=tmp_6; + ra=0.5; + Bname=""; + Brat=1.2; + if(length(realL)>0, + tmp=realL_1; + ra=tmp*ra; + opstr=opstr+","+text(tmp); + ); + forall(eqL, + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,1)); + if((tmp1=="L")%(tmp1=="E"), + if(tmp1=="L",Bname="Letter("); + if(tmp1=="E",Bname="Expr("); + Bname=Bname+Bpos+","+Dqq("c")+",";//16.10.29 + tmp=tmp_2; //190524from + tmp1=Indexall(tmp,","); + if(length(tmp1)==0, + Bname=Bname+Dqq(tmp); + , + if(length(tmp1)>1, + Brat=parse(substring(tmp,0,tmp1_1-1)); + tmp=substring(tmp,tmp1_1,length(tmp)); + tmp1=Indexall(tmp,","); + , + if(substring(tmp,tmp1_1,tmp1_1+1)!="[", + Brat=parse(substring(tmp,0,tmp1_1-1)); + tmp=substring(tmp,tmp1_1,length(tmp))+",[]"; + tmp1=Indexall(tmp,","); + ); + ); + Bname=Bname+Dqq(substring(tmp,0,tmp1_1-1)); + tmp=substring(tmp,tmp1_1+1,length(tmp)-1); + tmp=Strsplit(tmp,","); + tmp1=apply(tmp,Dqq(#)); + Bname=Bname+","+text(tmp1); + ); + Bname=Bname+");"; //190524to + ); + if(tmp1=="M", //190206from + Msg=Toupper(substring(tmp_2,0,1)); + ); //190206to + ); + pB=Lcrd(plist_1); pA=Lcrd(plist_2); pC=Lcrd(plist_3); + Ctr=Lcrd(pA); + Out=[]; + Out=append(Out,pA+ra*(pB-pA)/|pB-pA|); + Out=append(Out,pA+ra*(pB-pA)/|pB-pA|+ra*(pC-pA)/|pC-pA|); + Out=append(Out,pA+ra*(pC-pA)/|pC-pA|); + if(length(Bname)>0, + tmp1=pA+Brat*ra*(pB-pA)/|pB-pA|+Brat*ra*(pC-pA)/|pC-pA|; + tmp="Defvar("+Dq+Bpos+"="+Textformat(tmp1,5)+Dq+")";// no ketjs + tmp=Bpos+"="+Textformat(tmp1,5);// only ketjs + parse(tmp+";"); + parse(Bname+";") //190415; + ); + if(Noflg<3, + println("generate paramark "+name); + tmp1=apply(Out,Pcrd(#)); + tmp=name+"="+Textformat(tmp1,5)+";"; //190415 + parse(tmp); + tmp1=substring(Textformat(plist,5),1,length(Textformat(plist,5))-1); //no ketjs on + tmp=name+"=Paramark("+tmp1+opstr+")"; + GLIST=append(GLIST,tmp); //no ketjs off + ); + if(Noflg<2, + if(isstring(Ltype), + if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on + Texcom("{");Com2nd("Setcolor("+color+")");//180722 + ); //no ketjs off + Ltype=Getlinestyle(text(Noflg)+Ltype,name); + if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on + Texcom("}");//180722 + ); //no ketjs off + , + if(Noflg==1,Ltype=0); + ); + GCLIST=append(GCLIST,[name,Ltype,opcindy]); + ); + Out; +); +////%Paramark end//// + +////%Makebowdata start//// +Makebowdata(pA,pB,Hgt):=( + regional(angle,pB2,pH2,pC2,pC,tmp,Th1,Th2,ra,dMA); + angle=arctan2(pB-pA)+0; + pB2=Rotatepoint(pB,-angle,pA); + tmp=Lcrd(pA); + pH2=[(tmp_1+pB2_1)/2,tmp_2-Hgt]; + dMA=|tmp-pB2|/2; + ra=(dMA^2+Hgt^2)/(2*Hgt); + pC2=[pH2_1,pB2_2+(ra-Hgt)]; + pC=Rotatepoint(pC2,angle,pA); + Th1=arctan2(pA-pC2)+angle; + Th2=arctan2(pB2-pC2)+angle; + [pC,ra,Th1,Th2]; +); +////%Makebowdata end//// + +////%Bowdata start//// +Bowdata(plist):=Bowdata(plist,[]); +Bowdata(plist,options):=( + regional(nm,tmp); + if(islist(plist), // 16.12.04from + tmp=Textformat(plist,5); + tmp=replace(tmp,",",""); + nm=substring(tmp,1,length(tmp)-1); + Bowdata(nm,plist,options); + , + nm=plist; + tmp=options; + Bowdata(nm,tmp,[]); + ); // 16.12.04until +); +Bowdata(nm,plist,options):=( +//help:Bowdata([C,A],[2,1.2,"Expr=10","da"]); +//help:Bowdata([A,B],["Expr=t0n3,a"]); +//help:Bowdata([A,B],["Exprrot=t0n2r,a"]); + regional(name,Out,pB,pA,pC,ra,tmp,tmp1,tmp2,Ltype,eqL,realL, + Bname,Bpos,Th,Cut,Num,Hgt,opstr,opcindy,Ydata,pC,Msg, + Th1,Th2,Noflg,Bops,Bmov,Tmov,Nmov,rev,color); + name="bw"+nm; + tmp=Divoptions(options); + Ltype=tmp_1; + Noflg=tmp_2; + color=tmp_(length(tmp)-2); + opstr=tmp_(length(tmp)-1); + opcindy=tmp_(length(tmp)); + eqL=tmp_5; + realL=tmp_6; + pA=Lcrd(plist_1); pB=Lcrd(plist_2); + Hgt=1/2*|pB-pA|*0.2; + Cut=0; + Num=24; + Bname=""; + Msg="Y"; //190206 + Tmov=0;//161101from + Nmov=0; + Bmov=""; + rev=0;//16.11.01until + if(length(realL)>0, + Hgt=realL_1*Hgt; // 15.04.12 + if(length(realL)>1,Cut=realL_2); + ); + forall(eqL, + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,1)); + if(tmp1=="L", + if(indexof(#,"rot")>0, + Bname="Letterrot("; + , + Bname="Letter("; + ); + Bops=tmp_2; + ); + if(tmp1=="E", + if(indexof(#,"rot")>0, + Bname="Exprrot("; + , + Bname="Expr("; + ); + Bops=tmp_2; + ); + if(tmp1=="M", //190206from + Msg=Toupper(substring(tmp_2,0,1)); + ); //190206to + ); + Ydata=Makebowdata(pA,pB,Hgt); + pC=Ydata_1; + ra=Ydata_2; + Th=(Ydata_3+Ydata_4)*0.5; + BOWMIDDLE=[pC_1+ra*cos(Th),pC_2+ra*sin(Th)]; + Defvar("md"+name,BOWMIDDLE); //190415 + Bpos=Textformat(BOWMIDDLE,5); //190415 + if(length(Bname)>0, //16.11.01from + tmp=indexof(Bops,","); + if(tmp>0, + tmp1=substring(Bops,0,tmp-1); + if(length(tmp1)>=4 & substring(tmp1,0,1)=="t" & indexof(tmp1,"n")>0, + Bmov=tmp1; + Bops=substring(Bops,tmp,length(Bops)); + ); + ); + if(length(Bmov)>0, + tmp=indexof(Bmov,"t"); + if(tmp>0, + tmp1=indexof(Bmov,"n"); + Tmov=parse(substring(Bmov,tmp,tmp1-1)); + tmp=indexof(Bmov,"r"); + if(tmp>0, + Nmov=parse(substring(Bmov,tmp1,tmp-1)); + rev=1; + , + Nmov=parse(substring(Bmov,tmp1,length(Bmov))); + ); + ); + ); + Bname=Bname+Bpos; //190415 + if(abs(Tmov)+abs(Nmov)>0, + tmp=Pcrd(pA)-Pcrd(pB); + tmp1=1/Norm(tmp)*tmp; + tmp2=[-tmp1_2,tmp1_1]; + tmp=MARKLEN*(Tmov*tmp1+Nmov*tmp2); + tmp=LLcrd(tmp); + Bname=Bname+"+"+Textformat(tmp,5); + ); + Bname=Bname+","; + if(indexof(Bname,"rot")>0, + if(rev==1,tmp=pB-pA,tmp=pA-pB); + Bname=Bname+Textformat(tmp,5)+","; + , + Bname=Bname+Dq+"c"+Dq+","; + ); + Bname=Bname+Dqq(Bops)+");"; //190415 + parse(Bname); + );//161101to + if(Cut==0, + Th1=Ydata_3; + Th2=Ydata_4; + Out=[]; + forall(0..Num, + tmp=Th1+#*(Th2-Th1)/Num; + Out=append(Out,pC+ra*[cos(tmp),sin(tmp)]); + ); + , + Th1=Ydata_3; + Th2=Th-Cut/(2*ra); + tmp1=[]; + forall(0..Num/2, + tmp=Th1+#*(Th2-Th1)/(Num/2); + tmp1=append(tmp1,pC+ra*[cos(tmp),sin(tmp)]); + ); + Th1=Th+Cut/(2*ra); + Th2=Ydata_4; + tmp2=[]; + forall(0..Num/2, + tmp=Th1+#*(Th2-Th1)/(Num/2); + tmp2=append(tmp2,pC+ra*[cos(tmp),sin(tmp)]); + ); + Out=[tmp1,tmp2]; + ); + if(Noflg<3, + if(Msg=="Y", //190206 + println("generate bowdata "+name+" and "+Bpos);//16.10.31 + ); + if(Measuredepth(Out)==1,Out=[Out]); + tmp1=[]; + forall(Out,tmp2, + tmp=apply(tmp2,Pcrd(#)); + tmp1=append(tmp1,tmp); + ); + tmp=name+"="+Textformat(tmp1,5)+";"; + parse(tmp); + tmp1=substring(Textformat(plist,5),1,length(Textformat(plist,5))-1); //no ketjs on + tmp=name+"=Bowdata("+tmp1+opstr+")"; + GLIST=append(GLIST,tmp); //no ketjs off + ); + if(Noflg<2, + if(isstring(Ltype), + if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on + Texcom("{");Com2nd("Setcolor("+color+")");//180722 + ); //no ketjs off + Ltype=Getlinestyle(text(Noflg)+Ltype,name); + if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on + Texcom("}");//180722 + ); //no ketjs off + , + if(Noflg==1,Ltype=0); + ); + GCLIST=append(GCLIST,[name,Ltype,opcindy]); + ); +); +////%Bowdata end//// + +////%Bowname start//// +Bowname(str):=Bowname("c",str); +Bowname(dir,str):=( + Expr([BOWMIDDLE,dir,str]); +); +////%Bowname end//// + +////%Bownamerot start//// +Bownamerot(bwdata,str):=Bownamerot(bwdata,0,0,str,1); +Bownamerot(bwdata,str,updown):=Bownamerot(bwdata,0,0,str,updown); +Bownamerot(bwdata,tmov,nmov,str):=Bownamerot(bwdata,tmov,nmov,str,1); +Bownamerot(bwdata,tmov,nmov,str,updown):=( + regional(bdata,tmp); + tmp=Measuredepth(bwdata); + if(tmp==1,bdata=[bwdata],bdata=bwdata); + if(length(bdata)>1, + tmp=Ptend(bdata_2)-Ptstart(bdata_1); + , + tmp=Ptend(bdata_1)-Ptstart(bdata_1); + ); + if(updown<0,tmp=-tmp); + Exprrot(BOWMIDDLE,tmp,tmov,nmov,str); +); +////%Bownamerot end//// + +////%Deqdata start//// +Deqdata(deq,rng,initt,initf,Num):=( //17.10.04 +//help:Deqdata("[x1,...xn]`=[f1,...fn]","t=[0,20]",0,[...],50); + regional(Eps,Inf,tname,Xname,func,t1,t2,dt,tt,X0,flg, + kl1,kl2,kl3,kl4,pdL,tmp,tmp1,tmp2); + Eps=10^(-3); + Inf=10^3; + tmp=tokenize(deq,"="); + tmp1=replace(tmp_1,"`",""); tmp1=replace(tmp1,"'","");//190410 + tmp1=substring(tmp1,1,length(tmp1)-1); + Xname=tokenize(tmp1,","); + func=tmp_2; + forall(1..(length(Xname)), + func=replace(func,Xname_#,"X_"+text(#)); + ); + tmp=tokenize(rng,"="); + tname=tmp_1; + tmp=parse(tmp_2); + t1=tmp_1; + t2=tmp_2; + tmp="funP("+tname+",X):="+func+";"; + parse(tmp); + tmp="funN("+tname+",X):=-"+func+";"; + parse(tmp); + dt=(t2-t1)/Num; + tt=initt; + X0=Lcrd(initf); + pdL=[flatten([tt,X0])]; + flg=0; + forall(1..(round((t2-initt)/dt)), //190523 + if(flg==0, + kl1=dt*funP(tt,X0); + kl2=dt*funP(tt+dt/2,X0+kl1/2); + kl3=dt*funP(tt+dt/2,X0+kl2/2); + kl4=dt*funP(tt+dt,X0+kl3); + X0=X0+(kl1+2*kl2+2*kl3+kl4)/6; + tt=initt+#*dt; + tmp=flatten([tt,X0]); + pdL=append(pdL,tmp); + if(|tmp|>Inf,flg=1); + ); + ); + tt=initt; + X0=Lcrd(initf); + flg=0; + forall(1..(round((initt-t1)/dt)), //190523 + if(flg==0, + kl1=dt*funN(tt,X0); + kl2=dt*funN(tt+dt/2,X0+kl1/2); + kl3=dt*funN(tt+dt/2,X0+kl2/2); + kl4=dt*funN(tt+dt,X0+kl3); + X0=X0+(kl1+2*kl2+2*kl3+kl4)/6; + tt=initt-#*dt; + tmp=flatten([tt,X0]); + pdL=prepend(tmp,pdL); + if(|tmp1|>Inf,flg=1); + ); + ); + pdL; +); +////%Deqdata end//// + +////%Deqplot start//// +Deqplot(nm,deq,rng,initf):=Deqplot(nm,deq,rng,Lcrd(initf)_1,initf,[]); +Deqplot(nm,deq,rng,Arg1,Arg2):=( + regional(initt,initf,options); + if(isreal(Arg1) & !islist(Arg1), + initt=Arg1; + initf=Arg2; + options=[]; + , + initf=Lcrd(Arg1); + initt=initf_1; + options=Arg2; + ); + Deqplot(nm,deq,rng,initt,initf,options); +); +Deqplot(nm,deqorg,rngorg,initt,initf,options):=( //17.10.06 +//help:Deqplot("2","y'=y*(1-y)","x",0, 0.5,["Num=100"]); +//help:Deqplot("1","y''=-y","x",0, [1,0]); +//help:Deqplot("3","[x,y]'=[x*(1-y),0.3*y*(x-1)]","t=[0,20]",0,[1,0.5]); + regional(deq,rng,Ltype,Noflg,eqL,opcindy,Num,name,nn,pdL,phase, + sel,tmp,tmp1,tmp2,tmp3,color); + name="de"+nm; + tmp=Divoptions(options); + Ltype=tmp_1; + Noflg=tmp_2; + eqL=tmp_5; + color=tmp_(length(tmp)-2); + opcindy=tmp_(length(tmp)); + Num=50; + forall(eqL, + tmp=indexof(#,"="); + tmp2=substring(#,0,1); + tmp2=Toupper(tmp2); + tmp1=substring(#,tmp,length(#)); + if(Toupper(substring(#,0,1))=="N", + Num=parse(tmp1); + ); + ); + rng=rngorg; + if(indexof(rng,"=")==0, + rng=rng+"="+Textformat([XMIN,XMAX],6); + ); + deq=replace(deqorg,unicode("2018"),"`"); //190296//0416 + deq=replace(deq,"'","`"); //180527 + tmp3=indexof(deq,"="); + tmp1=substring(deq,0,tmp3-1); + tmp2=substring(deq,tmp3,length(deq)); + if(indexof(tmp1,"[")==0, + phase=0; + sel=[1,2]; + , + phase=1; + sel=[2,3]; + ); + nn=length(Indexall(tmp1,"`")); + if(nn==0, //190211from + println(" Lhs of equation has no single/back quotation "+tmp1); + ); + if(nn>0, + tmp=Indexall(tmp1,"`"); + if(tmp_(length(tmp))!=tmp3-1, + nn=0; + , + forall(reverse(2..(length(tmp))), + if((nn>0)&(!contains(tmp,tmp_#-1)), + nn=0; + ); + ); + ); + if(nn==0, + println(" Lhs of equation is not correct"); + ); + ); //190211to + if(nn==1, + if(indexof(tmp1,"[")==0, + tmp1="["+replace(tmp1,"`","]`"); + deq=tmp1+"="+tmp2; + ); + ); + if(nn>1, + tmp=indexof(tmp1,"`"); + tmp1=substring(tmp1,0,tmp-1); + deq="["; + forall(1..nn, + deq=deq+tmp1+"N"+text(#)+","; + ); + deq=substring(deq,0,length(deq)-1)+"]`=["; + forall(1..(nn-1), + deq=deq+tmp1+"N"+text(#+1)+","; + ); + forall(reverse(1..(nn)),jj, + tmp=tmp1; + forall(1..jj, + tmp=tmp+"`"; + tmp2=replace(tmp2,tmp,tmp1+"N"+text(#+1)); + ); + ); + tmp2=tmp2+"]"; + forall(1..(length(tmp2)-1), + tmp=substring(tmp2,#-1,#); + if(tmp!=tmp1, + deq=deq+tmp; + , + tmp=substring(tmp2,#,#+1); + if(tmp=="N", + deq=deq+tmp1; + , + deq=deq+tmp1+"N1" + ); + ); + ); + deq=deq+"]"; + ); + if((nn>0)&(Noflg<3), //190211 + pdL=Deqdata(deq,rng,initt,initf,Num); + if(phase==1, + pdL=apply(pdL,#_(2..3)); + ); + tmp1=apply(pdL,Pcrd(#)); + tmp=name+"="+Textformat(tmp1,5)+";"; //190415 + parse(tmp); + ); + if((nn>0)&(Noflg<1), //190211 //no ketjs on + tmp=Assign(deq); + tmp=replace(deq,"'","`"); + tmp=name+"=Deqplot('"+tmp+"','"+rng+"',"; + tmp=tmp+format(initt,6)+","+Textformat(initf,6); + tmp=tmp+","+text(sel)+",'Num="+text(Num)+"')"; + tmp=RSform(tmp); + GLIST=append(GLIST,tmp); + ); //no ketjs off + if((nn>0)&(Noflg<2), //190211 + if(isstring(Ltype), + if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on + Texcom("{");Com2nd("Setcolor("+color+")");//180722 + ); //no ketjs off + Ltype=Getlinestyle(text(Noflg)+Ltype,name); + if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on + Texcom("}");//180722 + ); //no ketjs off + , + if(Noflg==1,Ltype=0); + ); + GCLIST=append(GCLIST,[name,Ltype,opcindy]); + ); +); +////%Deqplot end//// + +////////// old enclosing /////////////// + +Enclosing(nm,plist):=EnclosingS(nm,plist); +Enclosing(nm,plist,options):=EnclosingS(nm,plist,options); +EnclosingS(nm,plist):=EnclosingS(nm,plist,[]); +EnclosingS(nm,plist,options):=( +// help:Enclosing("1",["sc2","crAB","sc2","Invert(sc1)"],[pt,"dr"]); + regional(name,AnsL,Start,Eps,EEps,S,Flg,Fdata,Gdata,KL,pt,qt,color + t1,t2,t3,ii,nn,tmp,tmp1,tmp2,Ltype,Noflg,realL,eqL,opstr,opcindy); + name="en"+nm; + tmp=Divoptions(options); + Ltype=tmp_1; + Noflg=tmp_2; + eqL=tmp_5; + realL=tmp_6; + color=tmp_(length(tmp)-2); + opstr=tmp_(length(tmp)-1); + opcindy=tmp_(length(tmp)); + Eps=10^(-5); // 16.12.05 + EEps=0.05; + Start=[]; + Flg=0; + forall(realL, + if(islist(#) % ispoint(#), + Start=Lcrd(#); // 15.09.12 + , + Flg=Flg+1; + if(Flg==1,Eps=#); + if(Flg==2,EEps=#); + ); + ); +// tmp1=concat([Eps,EEps],eqL); // 15.04.06 + Fdata=plist_1; + Gdata=plist_(length(plist)); + KL=Intersectcrvspp(Fdata,Gdata); + if(length(KL)==1, + pt=KL_1_1; + t1=KL_1_2; + ); + if(length(KL)==0, + if(Numptcrv(Fdata)>Numptcrv(Gdata), + tmp=Nearestpt(Fdata,Gdata); + pt=tmp_1; + t1=tmp_2; + , + tmp=Nearestpt(Gdata,Fdata); + pt=tmp_3; + t1=tmp_4; + ); + ); + if(length(KL)>1, + if(Start==[], + err("No Start Point"); + , + pt=KL_1_1; + t1=KL_1_2; + tmp=Norm(pt-Start); + forall(2..(length(KL)),ii, // 15.04.20 + tmp1=KL_ii_1; + tmp2=Norm(tmp1-Start); // 15.04.20 + if(tmp2<tmp, + pt=tmp1; + t1=KL_ii_2; + tmp=tmp2; + ); + ); + ); + ); +// pt=Pcrd(pt); // 15.09.12 + Start=pt; + AnsL=[]; + forall(1..(length(plist)),nn, + Fdata=plist_nn; + if(nn>1, pt=qt); + if(nn==length(plist), + qt=Start; + , + Flg=0; + Gdata=plist_(nn+1); +// tmp1=concat([Eps,EEps],eqL); // 15.04.06 + KL=Intersectcrvspp(Gdata,Fdata); + if(length(KL)==1, + tmp=KL_1; + qt=KL_1_1; + t3=KL_1_2; + Flg=10; + ); + if(length(KL)==0,Flg=1); + if(length(KL)>1, + tmp1=KL_1_1; + tmp2=KL_2_1; + tmp=|tmp1-tmp2|; + if(tmp<Eps*10, Flg=1); + ); + if(Flg==1, + if(Numptcrv(Fdata)>Numptcrv(Gdata), + tmp=Nearestpt(Fdata,Gdata); + qt=tmp_1; + t3=tmp_4; + Flg=10; + , + tmp=Nearestpt(Gdata,Fdata); + qt=tmp_3; + t3=tmp_2; + Flg=10; + ); + ); + if(Flg<10, + t2=10^6; //%inf; + forall(1..(length(KL)),ii, + tmp1=KL_ii_1; + tmp=KL_ii_3; + tmp2=Paramoncurve(tmp1,tmp,Fdata); + tmp3=KL_ii_2; + if(tmp2>t1+Eps & tmp2<t2+Eps, + qt=tmp1; + t2=tmp2; + t3=tmp3; + ); + ); + ); + ); + tmp=Partcrv("",pt,qt,Fdata,["nodata"]); + t1=t3; + if(nn==1, + AnsL=tmp; + , + AnsL=concat(AnsL,tmp_(2..(length(tmp)))); + ); + ); + AnsL=apply(AnsL,Pcrd(#)); // 15.09.12 + AnsL_(length(AnsL))=AnsL_1;//16.10.20 + if(Noflg<3, + println("generate Enclosing "+name); + tmp=name+"="+Textformat(AnsL,5)+";"; + parse(tmp); + tmp=name+"=Enclosing(";//16.11.07from //no ketjs on + tmp1="list"+PaO(); + forall(plist, + tmp1=tmp1+#+","; + ); + tmp=tmp+substring(tmp1,0,length(tmp1)-1)+")"+opstr+")"; + GLIST=append(GLIST,tmp);//16.11.07to //no ketjs off + ); + if(Noflg<2, + if(isstring(Ltype), + if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on + Texcom("{");Com2nd("Setcolor("+color+")");//180722 + ); //no ketjs off + Ltype=Getlinestyle(text(Noflg)+Ltype,name); + if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on + Texcom("}");//180722 + ); //no ketjs off + , + if(Noflg==1,Ltype=0); + ); + GCLIST=append(GCLIST,[name,Ltype,opcindy]); + ); + tmp=apply(AnsL,LLcrd(#));//16.10.20 + tmp; +); + +/////////// new enclosing /////////// + +////%Enclosing start//// +Enclosing(nm,plist):=Enclosing2(nm,plist,[]);//180706[2lines] +Enclosing(nm,plistorg,options):=Enclosing2(nm,plistorg,options); +Enclosing2(nm,plist):=Enclosing2(nm,plist,[]); +Enclosing2(nm,plistorg,options):=( +//help:Enclosing("1",["sg2","gr1","Invert(sg2)"]); +//help:Enclosing(options=[startpoint,epspara(1)]); + regional(name,plist,AnsL,Start,Eps,Eps1,Eps2,flg,Fdata,Gdata,KL, + t1,t2,tst,ss,ii,nn,nxtno,Ltype,Noflg,realL,eqL,opstr,opcindy, + tmp,tmp1,tmp2,color,epspara,p1,p2); + name="en"+nm; + plist=plistorg; + tmp=Divoptions(options); + Ltype=tmp_1; + Noflg=tmp_2; + eqL=tmp_5; + realL=tmp_6; + color=tmp_(length(tmp)-2); + opstr=tmp_(length(tmp)-1); + opcindy=tmp_(length(tmp)); + Eps=10^(-5); // 16.12.05 + epspara=1; //180707 + Eps1=0.01; + Eps2=0.1; + Start=[]; + flg=0; + forall(realL, + if(isList(#) % ispoint(#), + Start=Lcrd(#); // 18.02.02 + , + if(flg==0,epspara=#);//180707 + if(flg==1,Eps1=#); + if(flg==2,Eps2=#); + flg=flg+1; + ); + ); + flg=0; + AnsL=[]; + if(length(plist)==1, + Fdata=parse(plist_1); + tmp1=Fdata_1; + tmp2=Fdata_(length(Fdata)); + if(|tmp1-tmp2|<Eps, + AnsL=Fdata; + , + AnsL=append(Fdata,tmp1); + ); + flg=1; + ); + if(flg==0, + Fdata=plist_1; + Gdata=plist_(length(plist)); + KL=Intersectcurvespp(Fdata,Gdata); + if(length(KL)==0, + tmp=parse(Gdata); + tmp1=LLcrd(Op(length(tmp),tmp)); //18.02.02from + tmp=parse(Fdata); + tmp2=LLcrd(Op(1,tmp)); + tmp=Listplot(name,[tmp1,tmp2],["nodisp"]); + plist=append(plist,"sg"+name); + Start=tmp2; + tst=1; //18.02.02to + p1=Start; + , + if(length(KL)==1, + tst=KL_1_2; + Start=Pointoncurve(tst,Fdata); + ); + if(length(KL)>1, + KL=sort(KL,[#_2]); + if(Start==[], + tst=KL_1_2; + Start=Pointoncurve(tst,Fdata); + , + tmp=apply(KL,|#_1-Start|); + tmp=min(tmp); + tmp1=select(KL,|#_1-Start|<tmp+Eps1);//180718 + tst=tmp1_1_2; + Start=Pointoncurve(tst,Fdata); + ); + ); + ); + ); + if(flg==0, + t1=tst; + p1=Pointoncurve(t1,Fdata); //180713 + println("Start point of enclosing is "+text(Start)); + forall(1..(length(plist)),nn, + Fdata=plist_nn; + if(nn==length(plist),nxtno=1,nxtno=nn+1); + Gdata=plist_nxtno; + KL=Intersectcurvespp(Fdata,Gdata); + if(length(KL)==0, + tmp1=parse(Fdata); //18.02.02from + tmp2=parse(Gdata); + tmp2=Prepend(Op(length(tmp1),tmp),tmp2); + Gdata=replace(Gdata,"(",""); + Gdata=replace(Gdata,")",""); + tmp=Gdata+"="+Textformat(tmp2,6)+";"; //190415 + parse(tmp); + plist_nxtno=Gdata; + t2=Length(tmp1); + p2=Pointoncurve(t2,Fdata); //180713 + ss=1; //18.02.02to + , + KL=sort(KL,[#_2]);//180706 + tmp=parse(Fdata); + tmp1=t1+epspara/50*length(tmp); +// KL=select(KL,#_2>t1+epspara/50*length(tmp)); //180707 + KL=select(KL,(#_2>tmp1)%((#_2>t1)&(|#_1-p1|>Eps1))); //180713,16 + t2=KL_1_2; + ss=KL_1_3; + if(abs(t2-t1)<Eps,//180707 + if(length(KL)>1, + t2=KL_2_2; + ss=KL_2_3; + , + println(text(nn)+" and "+text(nxtno)+" not intersect"); + flg=1; + ); + ); + ); + if(flg==0, + tmp=Partcrv("",t1,t2,Fdata,["nodata"]); + if(nn==1, + AnsL=tmp; + , + AnsL=concat(AnsL,tmp_(2..(length(tmp)))); + ); + ); + t1=ss;//180706 + p1=Pointoncurve(t1,Gdata); //180713 + ); + ); + if(flg==0, + AnsL=apply(AnsL,Pcrd(#)); + ); + if(Noflg<3, + println("generate Enclosing "+name); + tmp=name+"="+Textformat(AnsL,5)+";"; //190415 + parse(tmp); + tmp=name+"=Enclosing2(";//16.11.07from + tmp1="list"+PaO(); + forall(plistorg, //18.02.02 + tmp1=tmp1+#+","; + ); + tmp=tmp+substring(tmp1,0,length(tmp1)-1)+")";//18.0706from //no ketjs on + if(length(Start)>0,tmp=tmp+","+Textformat(Start,6)); + tmp=tmp+","+text(epspara)+")";//18.0706to,180707 + GLIST=append(GLIST,tmp);//16.11.07to //no ketjs off + ); + if(Noflg<2, + if(isstring(Ltype), + if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on + Texcom("{");Com2nd("Setcolor("+color+")");//180722 + ); //no ketjs off + Ltype=Getlinestyle(text(Noflg)+Ltype,name); + if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on + Texcom("}");//180722 + ); //no ketjs off + , + if(Noflg==1,Ltype=0); + ); + GCLIST=append(GCLIST,[name,Ltype,opcindy]); + ); + tmp=apply(AnsL,LLcrd(#));//16.10.20 + tmp; +); +////%Enclosing end//// + +/////////// end of new enclosing /////////// + +/////////// new Hatchdata(cindy) /////////// + +////%Makehatch start//// +Makehatch(iolistorg,pt,vec,bdylist):=( + regional(Eps,iolist,sg,bdy,out,nb,tenL,ns,ne,ioL, + ii,jj,kk,nvec,nbdy,sgn1,sgn2,flg,rmL,p0,p1,p2,pL, + Scalebkup,tmp,tmp1,tmp2); + Eps=10^(-5); + nvec=[-vec_2,vec_1]; + nvec=nvec/|nvec|; + if(!islist(iolistorg),iolist=[iolistorg],iolist=iolistorg); + forall(1..(length(iolist)), + tmp=replace(iolist_#,"i","1,"); + tmp=replace(tmp,"o","0,"); + tmp="["+substring(tmp,0,length(tmp)-1)+"]"; + iolist_#=parse(tmp); + ); + Scalebkup=[SCALEX,SCALEY];//181020[2lines] + SCALEX=1; + SCALEY=1; + sg=Lineplot("",[pt,pt+vec],["nodata"]); + nb=length(bdylist); + if(nb>0, + tenL=[]; + forall(1..nb,ii, + rmL=[]; + bdy=bdylist_ii; + nbdy=length(bdy)-1; + pL=[]; + forall(1..nbdy,jj, + p1=bdy_jj; + p2=bdy_(mod(jj+1-1,nbdy)+1); + tmp=Intersectseg(sg,[p1,p2],Eps); + if(abs(tmp_1)<Eps, //18.02.01 + p0=tmp_2; t=tmp_3; s=tmp_4; + flg=0; //181003from + forall(pL, + if(flg==0, + if(Norm(#_1-p0)<Eps, + flg=1; + ); + ); + ); + if(flg==0, + pL=append(pL,[p0,t,s,ii]); + ); //181003to + ); + ); + if(length(pL)>0, + pL=sort(pL,[#_2]); + pL=apply(1..(length(pL)),append(pL_#,mod(#,2))); + tenL=concat(tenL,pL); + ); + ); + tenL=sort(tenL,[#_2]); + if(length(tenL)>0, //180619from + tmp1=tenL; tenL=[tmp1_1]; + forall(2..(length(tmp1)),ii, //180717from + tmp=tmp1_ii; + flg=0; + forall(tenL, + if((Norm(tmp_1-#_1)<Eps1)&(tmp_4==#_4), + flg=1; + ); + ); + if(flg==0, + tenL=append(tenL,tmp); + ); + );//180717to + ); //180619to + ioL=apply(1..nb,0); + ns=1; + ne=length(tenL); + if(ne>0,tmp=tenL_1_1,tmp=sg_2); + if(|sg_1-tmp|>Eps, + tmp=[sg_1,-1,1,ioL]; + tenL=prepend(tmp,tenL); + ns=ns+1; + ne=ne+1; + ); + if(|sg_2-tenL_(length(tenL))_1|>Eps, + tmp=[sg_2,-1,2,ioL]; + tenL=append(tenL,tmp); + ); + forall(ns..(ne-1),ii, //180619 ne=>ne-1 + tmp=tenL_ii; + tmp1=tmp_4; + tmp2=tmp_5; + ioL_tmp1=tmp2; + tmp=[tmp_1,tmp_2,tmp_4,ioL]; + tenL_ii=tmp; + ); + out=[]; + forall(1..(length(tenL)-1),ii, + tmp1=tenL_ii; + if(contains(iolist,tmp1_4), + tmp2=tenL_(ii+1); + tmp=Listplot("",[tmp1_1,tmp2_1],["nodata"]); + out=append(out,tmp); + ); + ); + ); + SCALEX=Scalebkup_1; //181020 + SCALEY=Scalebkup_2; + out; +); +////%Makehatch end//// + +////%Anyselected start//// +Anyselected(ptL):=( + regional(tmp,out); + out=false; + forall(ptL, + if(isstring(#),tmp=parse(#),tmp=#); + out=(out)%(isselected(tmp)); + ); + out; +); +////%Anyselected end//// + +////%Hatchdata start//// +Hatchdata(nm,iostr,bdylist):=Hatchdatacindy(nm,iostr,bdylist,[]);//180619 +Hatchdata(nm,iostr,bdylist,optionsorg):=( //181003from + regional(options,tmp,tmp1,tmp2,eqL,strL,chkL,outflg); + options=optionsorg; + tmp=Divoptions(options); + eqL=tmp_5; + strL=tmp_7; + outflg=0; + forall(eqL, + tmp=Strsplit(#,"="); + tmp1=Toupper(tmp_1); + if(substring(tmp1,0,1)=="O", + tmp2=tmp_2; + if(tmp2!="n", + outflg=1; + option=remove(options,[#]); + if((tmp2=="m")%(tmp2=="r"), + options=append(options,tmp2);; + ); + ); + ); + ); + if(outflg==0, + options=remove(options,strL); + Hatchdatacindy(nm,iostr,bdylist,options); + , + HatchdataR(nm,iostr,bdylist,options); + ); +); //181003to +Hatchdatacindy(nm,iostr,bdylist):=Hatchdata(nm,iostr,bdylist,[]); +Hatchdatacindy(nm,iostr,bdylistorg,optionsorg):=( + //help:Hatchdata("1",["ii"],[["ln1","Invert(gr1)"],["gr2","n"]]); +//help:Hatchdata(options=["Not=pointlist","File=y(/m/n)","Max=50","Check=",angle,width]); + regional(name,bdylist,bdynameL,bname,Ltype,Noflg,opstr,opcindy,reL, + options,eqL,maxnum,startP,angle,interval,vec,nvec,ctr,pt,kk,delta,sha,AnsL, + color,tmp,tmp1,tmp2,tmp3,namep,x1,y1,x2,y2,p1,p2, //180717 + fname,fileflg,mkflg,vaL,pL,nL,nn,str,is,ie); //181102 + name="ha"+nm; + fname=Fhead+name+".txt"; + bdylist=[]; + bdynameL=[]; + forall(1..(length(bdylistorg)),kk, + tmp1=bdylistorg_kk; + if(length(tmp1)==1, + bname=tmp1_1; + , + tmp=tmp1_(length(tmp1)); + if(contains(["n","s","e","w"],tmp), + namep=tmp1_1;//180717from + tmp2=parse(namep); + if(substring(namep,0,2)=="ln", //180717from + if(contains(["n","s"],tmp), + x1=tmp2_1_1; y1=tmp2_1_2; x2=tmp2_2_1; y2=tmp2_2_2; + p1=[NE.x,(y2-y1)/(x2-x1)*(NE.x-x1)+y1]; + p2=[SW.x,(y2-y1)/(x2-x1)*(SW.x-x1)+y1]; + Listplot(name+text(kk),[p1,p2],["nodisp"]); + namep="sg"+name+text(kk); + tmp2=parse(namep); + ); + if(contains(["e","w"],tmp), + x1=tmp2_1_1; y1=tmp2_1_2; x2=tmp2_2_1; y2=tmp2_2_2; + p1=[(x2-x1)/(y2-y1)*(NE.y-y1)+x1,NE.y]; + p2=[(x2-x1)/(y2-y1)*(SW.y-y1)+x1,SW.y]; + Listplot(name+text(kk),[p1,p2],["nodisp"]); + namep="sg"+name+text(kk); + tmp2=parse(namep); + ); + );//180717to + if(tmp=="s", + Listplot(name,[LLcrd(tmp2_1),[tmp2_1_1,2*YMIN-YMAX], //180717[2lines] + [tmp2_(length(tmp2))_1,2*YMIN-YMAX],LLcrd(tmp2_(length(tmp2)))], + ["nodisp"]); + Joincrvs(text(kk)+name,[namep,"sg"+name],["nodisp"]);//180717 + bname="join"+text(kk)+name; + ); + if(tmp=="n", + Listplot(name,[LLcrd(tmp2_1),[tmp2_1_1,2*YMAX-YMIN], //180717[2lines] + [tmp2_(length(tmp2))_1,2*YMAX-YMIN],LLcrd(tmp2_(length(tmp2)))], + ["nodisp"]); + Joincrvs(text(kk)+name,[namep,"sg"+name],["nodisp"]); + bname="join"+text(kk)+name; + ); + if(tmp=="e", + Listplot(name,apply([tmp2_1,[XMAX,tmp2_1_2], + [XMAX,tmp2_(length(tmp2))_2],tmp2_(length(tmp2))],LLcrd(#)),["nodisp"]); + Joincrvs(text(kk)+name,[namep,"sg"+name],["nodisp"]);//180717 + bname="join"+text(kk)+name; + ); + if(tmp=="w", + Listplot(name,apply( [tmp2_1,[XMIN,tmp2_1_2], + [XMIN,tmp2_(length(tmp2))_2],tmp2_(length(tmp2))],LLcrd(#)),["nodisp"]); + Joincrvs(text(kk)+name,[namep,"sg"+name],["nodisp"]);//180717 + bname="join"+text(kk)+name; + ); + , + Enclosing2(text(kk)+name,tmp,["nodisp"]);//180619[2lines] + bname="en"+text(kk)+name; + ); + ); + bdylist=append(bdylist,parse(bname)); + bdynameL=append(bdynameL,bname); + ); + options=optionsorg; + tmp=Divoptions(options); + Ltype=tmp_1; + Noflg=tmp_2; + eqL=tmp_5; + reL=tmp_6; + color=tmp_(length(tmp)-2); + opstr=tmp_(length(tmp)-1); + opcindy=tmp_(length(tmp)); + angle=45; +// interval=0.125*1000/2.54/MilliIn; + interval=0.25*1000/2.54/MilliIn; //180706 + startP=[(XMIN+XMAX)/2, (YMIN+YMAX)/2]; + maxnum=[50,0]; //181109changed [first,second] + fileflg="N";//181102from + mkflg=1; + chkL=[]; //181109 + forall(eqL, + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,1)); + if(tmp1=="M", + maxnum=parse(tmp_2); + if(!islist(maxnum), + maxnum=[maxnum,0]; + ); + options=remove(options,[#]); + ); + if(tmp1=="F", //181102from + fileflg=Toupper(substring(tmp_2,0,1)); + options=remove(options,[#]); + ); //181102to + if(tmp1=="N", //181103from + tmp=parse(tmp_2); + if(Anyselected(tmp), + mkflg=-1; + ); + options=remove(options,[#]); + ); + if(tmp1=="C", + chkL=parse(tmp_2); + options=remove(options,[#]); + ); + );//181102,03to + tmp1=1; + forall(reL, + if(islist(#), + startP=#; + , + if(tmp1==1, + angle=#; + tmp1=tmp1+1; + , + interval= interval*#; + ); + ); + ); + if((fileflg=="Y")%(fileflg=="M")&(mkflg>-1), //181102from + wflg=1; + varL=flatten(bdylistorg); + varL=select(varL,length(#)>1); + varL=sort(varL); + pL=[]; + forall(1..(length(varL)),nn, + tmp1=varL_nn; + tmp=select(GLIST,substring(#,0,length(tmp1))==tmp1); + str=tmp_1; + varL_nn=str; + tmp1=Bracket(str,"()"); + tmp2=max(apply(tmp1,#_2)); + nL=select(1..(length(tmp1)),tmp1_#_2==tmp2); + forall(nL,nn, + is=tmp1_nn_1; ie=tmp1_(nn+1)_1; + tmp=substring(str,is,ie-1); + tmp=replace(tmp,"'",Dq); + tmp=parse("["+tmp+"]"); + tmp2=flatten(tmp); + tmp2=flatten(tmp2); + tmp2=flatten(tmp2); + forall(tmp2, + if(ispoint(#), + if(!contains(pL,#.name), //190505 + pL=append(pL,#.name); //190505 + ); + ); + ); + ); + ); + forall(chkL, + if(!contains(pL,#),pL=append(pL,#)); + ); + forall(pL, + tmp=#+"="+Textformat(parse(#+".xy"),5); + varL=append(varL,tmp); + ); + tmp="reL="+Textformat(reL,5); + varL=append(varL,tmp); + if(fileflg=="M", + fileflg="Y"; + , + tmp1="hatch"+nm+".txt"; + if(isexists(Dirwork,tmp1), + tmp2=load(tmp1); + tmp2=tokenize(tmp2,"//"); + tmp2=tmp2_(1..(length(tmp2)-1)); + if(tmp2==varL, + wflg=0; + if(isexists(Dirwork,fname), + mkflg=0; + ReadOutData(fname); + tmp=name+"="+Textformat(parse(name),5)+";"; //190415 + parse(tmp); + ); + ); + ); + ); + ); + if(mkflg==1, //181102to + angle=angle*pi/180; + vec=[cos(angle),sin(angle)]; + nvec=[-sin(angle),cos(angle)]; + AnsL=[]; + ctr=0;//181005[2lines] + forall(0..(maxnum_1), kk, + pt=startP+kk*interval*nvec; + sha=Makehatch(iostr,pt,vec,bdylist); + if((sha!=-1)&(length(sha)>0), + AnsL=concat(AnsL,sha); + ctr=ctr+1; //181005 + ); + ); + maxnum_2=maxnum_2+(maxnum_1-ctr); //181005 + forall(1..(maxnum_2),kk, //181005 + pt=startP-kk*interval*nvec; + sha=Makehatch(iostr,pt,vec,bdylist); + if((sha!=-1)&(length(sha)>0), + AnsL=concat(AnsL,sha); + ); + ); + tmp1=apply(AnsL,Textformat(#,5)); + tmp=name+"="+tmp1+";"; //190415 + parse(tmp); + ); + if((Noflg<3)&(mkflg>-1), + if(fileflg!="Y", //181102 + println("generate Hatchdata "+name); + tmp=name+"="+Textformat(AnsL,5)+";"; //190415 + parse(tmp); + if(!islist(iostr),tmp1=[iostr],tmp1=iostr); //no ketjs on + tmp="c"+PaO(); + forall(tmp1, + tmp=tmp+Dq+#+Dq+","; + ); + tmp=substring(tmp,0,length(tmp)-1)+")"; + tmp2=name+"=Hatchdata("+tmp; + forall(bdynameL, + tmp2=tmp2+",list"+PaO()+#+")"; + ); + tmp2=tmp2+opstr+")"; + GLIST=append(GLIST,tmp2); //no ketjs off + , + GLIST=append(GLIST,"ReadOutData("+Dq+fname+Dq+")");//181102 //no ketjs + ); + ); + if((Noflg<2)&(mkflg>-1), + if(isstring(Ltype), + if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on + Texcom("{");Com2nd("Setcolor("+color+")");//180722 + ); //no ketjs off + Ltype=Getlinestyle(text(Noflg)+Ltype,name); + if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on + Texcom("}");//180722 + ); //no ketjs off + , + if(Noflg==1,Ltype=0); + ); + GCLIST=append(GCLIST,[name,Ltype,opcindy]); + ); + if(mkflg>-1, + if((fileflg=="Y")&(wflg==1), //181102from + tmp1="hatch"+nm+".txt"; + SCEOUTPUT = openfile(tmp1); + forall(varL, + println(SCEOUTPUT,#+"//"); + ); + closefile(SCEOUTPUT); + WriteOutData(fname,[name,parse(name)]); + ); //181102to + tmp2=[]; + forall(AnsL,tmp1, + tmp=apply(tmp1,LLcrd(#)); + tmp2=append(tmp2,tmp); + ); + tmp2; + ); +); +////%Hatchdata end//// + +////%Shadein start//// +Shadein(pstrorg):=( //190220 + regional(pstr,ptL,pL,crv,nn, + tmp,tmp1,tmp2,pm1,pm2,p1,p2,flg); + if(islist(pstrorg),pstr=pstrorg_1,pstr=pstrorg); + crv=[]; + Framedata(["nodisp"]); + ptL=Intersectcurvespp(pstr,frwin); + if(length(ptL)>0, + pL=apply(ptL,#_2); + forall(1..(length(pL)),nn, + if(nn<length(pL), + tmp1=pL_nn; + tmp2=pL_(nn+1); + tmp=Pointoncrv((tmp1+tmp2)/2,pstr); + , + tmp1=pL_nn; + tmp2=pL_1; + tmp=parse(pstr); + if(pL_nn==length(tmp), + tmp=tmp_1; + , + tmp=tmp_(length(tmp)); + ); + ); + if(Inwindow(tmp), + tmp=Partcrv("",tmp1,tmp2,pstr,["nodata"]); + , + tmp1=Pointoncrv(tmp1,pstr); + tmp2=Pointoncrv(tmp2,pstr); + pm1=Paramoncrv(tmp1,frwin); + pm2=Paramoncrv(tmp2,frwin); + if(floor(pm1)==floor(pm2), + tmp=Listplot("",[tmp1,tmp2],["nodata"]); + , + tmp=floor(pm1); + p1=Pointoncrv(tmp,"frwin"); + p2=Pointoncrv(mod(tmp,4)+1,"frwin"); + tmp=p1-10*(p2-p1); + Listplot("frwin",[p1,tmp],["nodisp","Msg=n"]); + tmp=Intersectcurvespp("sgfrwin",pstr); + if(mod(length(tmp),2)==0, //190223from + if(pm2<pm1,pm2=pm2+4); + tmp=[tmp1]; + pm1=floor(pm1)+1; + flg=0; + forall(1..3, + if(flg==0, + if(pm1<pm2, + p1=Pointoncrv(mod(pm1-1,4)+1,"frwin"); + tmp=append(tmp,p1); + pm1=pm1+1; + , + flg=1; + ); + ); + ); + if(pm1-1<pm2,tmp=append(tmp,tmp2)); + , + if(pm2>pm1,pm2=pm2-4); + tmp=[tmp1]; + pm1=floor(pm1); + flg=0; + forall(1..3, + if(flg==0, + if(pm1>pm2, + p1=Pointoncrv(mod(pm1-1,4)+1,"frwin"); + tmp=append(tmp,p1); + pm1=pm1-1; + , + flg=1; + ); + ); + ); + if(pm1+1>pm2,tmp=append(tmp,tmp2)); + ); //190223to + ); + ); + if(length(crv)==0, + crv=tmp; + , + crv=Joincrvs("",[crv,tmp],["nodata"]); + ); + ); + , + if(Inwindow(parse(pstr+"_1")),crv=pstr,crv=frwin); + ); + crv; +); +////%Shadein end//// + +////%Shade start//// +Shade(plist):=Shade(plist,[]); +Shade(Arg1,Arg2):=( + if(!isstring(Arg1), + Shade(text(SHADECTR),Arg1,Arg2); //190222 + , + Shade(Arg1,Arg2,[]); + ); +); +Shade(nm,plistorg,options):=( +//help:Shade(["gr1"],[0.5]); +//help:Shade(["gr1"],["Color=red"]); +//help:Shade(["gr1"],["Trim=y(n)"]); //190224 +// help:Shade(["gr1","sg1"],["Color=[1,0,0]"]); +// help:Shade([[A,B,C,A]]); +//help:Shade(["gr2","Invert(sg1)"],["Enc=y",(Startpoint)]); + regional(name,plist,jj,nn,trim,tmp,tmp1,tmp2, + opstr,opcindy,eqL,reL,Str,G2,flg,encflg,startpt,color,ctr); + name="shade"+nm; + plist=plistorg; + if(isstring(plist_1), // 16.01.24 + println("output Shade of "+plist); + , + println("output Shade of lists"); + ); + tmp=Divoptions(options); + eqL=tmp_5; + reL=tmp_6; + color=tmp_(length(tmp)-2); + opstr=tmp_(length(tmp)-1); + opcindy=tmp_(length(tmp)); + tmp=select(plist,indexof(#,"Invert")>0); //180929from + if(length(tmp)>0,encflg=1,encflg=0); + trim="N"; + forall(eqL, + tmp=Strsplit(#,"="); + tmp1=Toupper(tmp_1); + tmp2=Toupper(tmp_2); + if(substring(tmp1,0,1)=="E", + if(substring(tmp2,0,1)=="Y", + encflg=1; + ); + if(substring(tmp2,0,1)=="N", + encflg=0; + ); + ); + if(substring(tmp1,0,1)=="T", + trim=substring(tmp2,0,1); + ); + ); + startpt=[]; + forall(reL, + if(islist(#), + startpt=#; + ); + ); //180929to + if(length(color)==4, //180602from + tmp=Colorcmyk2rgb(color); + ); + flg=0; ctr=1; + if(encflg==1, //180929from + if(length(startpt)==2, + Enclosing(nm,plist,[startpt,"nodisp"]); + , + Enclosing(nm,plist,["nodisp"]); + ); + plist=["en"+nm]; + ); //180929to + if((length(plist)==1)&(trim=="Y"), //190220from,109224 + plist=[Shadein(plist)]; + ); //190220to + forall(1..(length(plist)),jj, //180613from + if(flg==0, + tmp1=plist_jj; + if(isstring(tmp1),tmp=parse(tmp1),tmp=tmp1); + if(!islist(tmp), + flg=1; + , + if(!isstring(tmp1), + tmp2=[]; + forall(tmp1,if(ispoint(#),tmp=#.xy,tmp=#); + tmp2=append(tmp2,tmp); + ); + Listplot("-"+name+text(ctr),tmp2,["nodisp"]); //190520 +// tmp1=Dqq("-"+name+text(ctr)); +// tmp2=Textformat(tmp2,6)+",["+Dqq("nodisp")+"]"; +// tmp=name+text(ctr)+"=Listplot("+tmp1+","+tmp2+");";parse(tmp); + plist_jj=name+text(ctr); + ctr=ctr+1; + ); + ); + ); + );//180613to + if(flg==1, + println(" some data not defined properly"); + , + G2=Joincrvs("1",plist,["nodata"]); + G2=apply(G2,Pcrd(#)); + tmp1="fillpoly("+Textformat(G2,5)+opcindy+");"; + parse(tmp1); + ); + Str="Shade("; //no ketjs on + tmp1="list"+PaO(); + forall(plist, + if(isstring(#), // from 16.01.24 + if(length(#)>1, + tmp1=tmp1+#+","; + , + tmp1=tmp1+Dq+#+Dq+","; + ); + , + tmp1=tmp1+"Listplot("+Textformat(#,5)+"),"; + ); //16.01.24to + ); + Str=Str+substring(tmp1,0,length(tmp1)-1)+")"+")"; //180929 + nn=length(COM2ndlist); //190311from + jj=nn; + forall(plist,tmp1, + tmp=select(1..nn,indexof(COM2ndlist_#,tmp1)>0); + jj=min(append(tmp,jj)); + ); + tmp1=["Texcom("+Dqq("{")+")","Setcolor("+color+")",Str,"Texcom("+Dqq("}")+")"]; + tmp2=COM2ndlist_(1..(jj-1)); + tmp=COM2ndlist_(jj..(length(COM2ndlist))); + if(!islist(tmp),tmp=[tmp]); + COM2ndlist=concat(tmp2,tmp1); + COM2ndlist=concat(COM2ndlist,tmp); //190311to + //no ketjs off + SHADECTR=SHADECTR+1; +); +////%Shade end//// + +/////////// end of new Hatchdata(cindy) /////////// ////%Rotatepoint start//// Rotatepoint(point,Theta,ctr):=( @@ -115,20 +2279,31 @@ Reflectpoint(point,symL):=( ////%Rotatedata start//// Rotatedata(nm,plist,Theta):=Rotatedata(nm,plist,Theta,[]); -Rotatedata(nm,plist,angle,options):=( +Rotatedata(nm,plist,angle,optionorg):=( //help:Rotatedata("1",["crAB","pt1"],pi/3,[[1,5],"dr,2"]); //help:Rotatedata("1",[[A.xy],[B.xy]],pi/3,[[1,5],"dr,2"]); - regional(tmp,tmp1,tmp2,pdata,Theta,Pt,Cx,Cy,PdLL,PdL, - opcindy,Nj,Njj,Kj,Mj,X1,Y1,X2,Y2,Ltype,Noflg,name,color); + regional(tmp,tmp1,tmp2,pdata,Theta,Pt,Cx,Cy,PdLL,PdL,options, + opcindy,eqL,msgflg,Nj,Njj,Kj,Mj,X1,Y1,X2,Y2,Ltype,Noflg,name,color); name="rt"+nm; + options=optionorg; Pt=[0,0]; tmp=Divoptions(options); Ltype=tmp_1; Noflg=tmp_2; + eqL=tmp_5; color=tmp_(length(tmp)-2); opcindy=tmp_(length(tmp)); tmp1=tmp_6; if(length(tmp1)>0,Pt=Lcrd(tmp1_1)); + msgflg="Y"; //190425from + forall(eqL, + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,1)); + if(tmp1=="M", + msgflg=Toupper(substring(tmp_2,0,1)); + options=remove(options,[#]); + ); + ); //190425to pdata=plist; if(isstring(pdata),pdata=[pdata]); if(!isstring(pdata_1) & Measuredepth(pdata)==1, @@ -157,14 +2332,16 @@ Rotatedata(nm,plist,angle,options):=( PdL=concat(PdL,tmp2); ); if(Noflg<3, - println("generate Rotatedata "+name); + if(msgflg=="Y", + println("generate Rotatedata "+name); + ); tmp1=[]; forall(PdL,tmp2, tmp=apply(tmp2,Pcrd(#)); tmp1=append(tmp1,tmp); ); if(length(tmp1)==1,tmp1=tmp1_1); - tmp=name+"="+Textformat(tmp1,5); + tmp=name+"="+Textformat(tmp1,5)+";"; //190415 parse(tmp); tmp1=text(plist); //no ketjs on tmp1=RSform(tmp1,1);// 180602 @@ -177,7 +2354,7 @@ Rotatedata(nm,plist,angle,options):=( if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on Texcom("}");//180722 ); //no ketjs off @@ -192,16 +2369,27 @@ Rotatedata(nm,plist,angle,options):=( ////%Translatedata start//// Translatedata(nm,plist,mov):=Translatedata(nm,plist,mov,[]); -Translatedata(nm,plist,mov,options):=( +Translatedata(nm,plist,mov,optionorg):=( //help:Translatedata("1",["gr1","pt1"],[1,2]); - regional(tmp,tmp1,tmp2,pdata,Cx,Cy,PdL,Nj,Njj,Kj, - opcindy,X2,Y2,Ltype,Noflg,name,color,leveL); + regional(options,tmp,tmp1,tmp2,pdata,Cx,Cy,PdL,Nj,Njj,Kj,eqL, + opcindy,X2,Y2,Ltype,Noflg,name,color,leveL,msgflg); name="tr"+nm; + options=optionorg; //190425 tmp=Divoptions(options); Ltype=tmp_1; Noflg=tmp_2; + eqL=tmp_5; //190424 color=tmp_(length(tmp)-2); opcindy=tmp_(length(tmp)); + msgflg="Y"; //190425from + forall(eqL, + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,1)); + if(tmp1=="M", + msgflg=Toupper(substring(tmp_2,0,1)); + options=remove(options,[#]); + ); + ); //190425to pdata=plist; if(isstring(pdata),pdata=[pdata]); if(!isstring(pdata_1) & Measuredepth(pdata)==1, @@ -227,14 +2415,16 @@ Translatedata(nm,plist,mov,options):=( PdL=concat(PdL,tmp2); ); if(Noflg<3, - println("generate Translatedata "+name); + if(msgflg=="Y", //190425 + println("generate Translatedata "+name); + ); tmp1=[]; forall(PdL,tmp2, tmp=apply(tmp2,Pcrd(#)); tmp1=append(tmp1,tmp); ); if(length(tmp1)==1,tmp1=tmp1_1); - tmp=name+"="+Textformat(tmp1,5); + tmp=name+"="+Textformat(tmp1,5)+";"; //190415 parse(tmp); tmp1=text(plist); //no ketjs on tmp1=RSform(tmp1,1);// 180602 @@ -246,7 +2436,7 @@ Translatedata(nm,plist,mov,options):=( if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on Texcom("}");//180722 ); //no ketjs off @@ -281,20 +2471,31 @@ Scaledata(nm,plist,Arg1,Arg2):=( Scaledata(nm,plist,Arg1,Arg2,[]); ); ); -Scaledata(nm,plist,rx,ry,options):=( - regional(tmp,tmp1,tmp2,pdata,Theta,Pt,Cx,Cy,PdL, - opcindy,Nj,Njj,Kj,X2,Y2,Ltype,Noflg,name,color); +Scaledata(nm,plist,rx,ry,optionorg):=( + regional(tmp,tmp1,tmp2,pdata,Theta,Pt,Cx,Cy,PdL,options,eqL, + opcindy,Nj,Njj,Kj,X2,Y2,Ltype,Noflg,name,color,msgflg); name="sc"+nm; + options=optionorg; Pt=[0,0]; tmp=Divoptions(options); Ltype=tmp_1; Noflg=tmp_2; + eqL=tmp_5; color=tmp_(length(tmp)-2); opcindy=tmp_(length(tmp)); tmp1=tmp_6; if(length(tmp1)>0, Pt=Lcrd(tmp1_1); ); + msgflg="Y"; //190425from + forall(eqL, + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,1)); + if(tmp1=="M", + msgflg=Toupper(substring(tmp_2,0,1)); + options=remove(options,[#]); + ); + ); //190425to pdata=plist; if(isstring(pdata),pdata=[pdata]); if(!isstring(pdata_1) & Measuredepth(pdata)==1, @@ -319,14 +2520,16 @@ Scaledata(nm,plist,rx,ry,options):=( PdL=concat(PdL,tmp2); ); if(Noflg<3, - println("generate Scaledata "+name); + if(msgflg=="Y", + println("generate Scaledata "+name); + ); tmp1=[]; forall(PdL,tmp2, tmp=apply(tmp2,Pcrd(#)); tmp1=append(tmp1,tmp); ); if(length(tmp1)==1,tmp1=tmp1_1); - tmp=name+"="+Textformat(tmp1,5); + tmp=name+"="+Textformat(tmp1,5)+";"; //190415 parse(tmp); tmp1=text(plist); //no ketjs on tmp1=RSform(tmp1,1); // 180602 @@ -339,7 +2542,7 @@ Scaledata(nm,plist,rx,ry,options):=( if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on Texcom("}");//180722 ); //no ketjs off @@ -354,17 +2557,28 @@ Scaledata(nm,plist,rx,ry,options):=( ////%Reflectdata start//// Reflectdata(nm,plist,symL):=Reflectdata(nm,plist,symL,[]); -Reflectdata(nm,plist,symL,options):=( +Reflectdata(nm,plist,symL,optionorg):=( //help:Reflectdata("1",["crAB"],[C]); - regional(tmp,tmp1,tmp2,pdata,Us,Vs,Pt1,Pt2,Cx,Cy,PdL, + regional(tmp,tmp1,tmp2,pdata,Us,Vs,Pt1,Pt2,Cx,Cy,PdL,options,eqL, opcindy,Nj,Njj,Kj,X1,Y1,X2,Y2,Ltype,Noflg,name,color); name="re"+nm; + options=optionorg; Pt=[0,0]; tmp=Divoptions(options); Ltype=tmp_1; Noflg=tmp_2; + eqL=tmp_5; color=tmp_(length(tmp)-2); opcindy=tmp_(length(tmp)); + msgflg="Y"; //190425from + forall(eqL, + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,1)); + if(tmp1=="M", + msgflg=Toupper(substring(tmp_2,0,1)); + options=remove(options,[#]); + ); + ); //190425to pdata=plist; if(isstring(pdata),pdata=[pdata]); if(!isstring(pdata_1) & Measuredepth(pdata)==1, @@ -405,14 +2619,16 @@ Reflectdata(nm,plist,symL,options):=( PdL=concat(PdL,tmp2); ); if(Noflg<3, - println("generate Reflectdata "+name); + if(msgflg=="Y", + println("generate Reflectdata "+name); + ); tmp1=[]; forall(PdL,tmp2, tmp=apply(tmp2,Pcrd(#)); tmp1=append(tmp1,tmp); ); if(length(tmp1)==1,tmp1=tmp1_1); - tmp=name+"="+Textformat(tmp1,5); + tmp=name+"="+Textformat(tmp1,5)+";"; //190415 parse(tmp); tmp1=text(plist); //no ketjs on tmp1=RSform(tmp1,1);// 180602 @@ -424,7 +2640,7 @@ Reflectdata(nm,plist,symL,options):=( if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on Texcom("}");//180722 ); //no ketjs off @@ -628,10 +2844,12 @@ Drwxy(add,optionsorg):=( //190103to yrng=[YMIN,YMAX]; //190103 ax=AXSTYLE; linesty=ax_8; - if(isstring(ax_9),colorax=ax_9,colorax=text(ax_9)); - if(length(colorax)>0, - colorax="Color="+colorax; + if(length(ax_9)>0, //190427 + if(isstring(ax_9),colorax=ax_9,colorax=text(ax_9)); + , + colorax=KCOLOR; //190427 ); + colorax="Color="+colorax; //190427[if removed] if(isstring(ax_10),colorla=ax_10,colorla=text(ax_10)); if(length(colorla)>0, //181217from colorla="Color="+colorla; @@ -679,15 +2897,15 @@ Drwxy(add,optionsorg):=( //190103to if(length(tmp)>0,size=parse(tmp),size=YaSize); tmp1=concat(options,[size,YaAngle,YaPosition,YaCut,colorax]);//181216 tmp=[[xrng_1,org_2],[xrng_2,org_2]]; - Arrowdata("axx"+text(AXCOUNT),tmp,tmp1); + Lightarrowdata("axx"+text(AXCOUNT),tmp,tmp1); tmp=[[org_1,yrng_1],[org_1,yrng_2]]; - Arrowdata("axy"+text(AXCOUNT),tmp,tmp1); + Lightarrowdata("axy"+text(AXCOUNT),tmp,tmp1); //190419 , tmp=[[xrng_1,org_2],[xrng_2,org_2]]; - tmp1=append(options,colorax);//181216 - Listplot("axx"+text(AXCOUNT),tmp,tmp1); + tmp1=concat(options,[colorax,"Msg=n"]);//181216,190325 + Listplot("-axx"+text(AXCOUNT),tmp,tmp1); tmp=[[org_1,yrng_1],[org_1,yrng_2]]; - Listplot("axy"+text(AXCOUNT),tmp,tmp1); + Listplot("-axy"+text(AXCOUNT),tmp,tmp1); ); AXCOUNT=AXCOUNT+1; Expr([[xrng_2,org_2],ax_3,ax_2],[colorla]);//181216[3lines] @@ -753,6 +2971,7 @@ Addax(param):=( ////%Expr start//// Expr(Pt,Dr,St):=Expr([Pt,Dr,St]); Expr(list):=Expr(list,[]); +Expr(Pt,Dr,St,options):=Expr([Pt,Dr,St],options); //190409 Expr(listorg,options):=( //16.10.09 //help:Expr([A,"e","f(x)=x^2"]); //help:Expr([A,"e","f(x)=x^2"],["size->24"]); @@ -1006,7 +3225,7 @@ Slider(ptstr,p1,p2,options):=(//190120 tmp=pC+"l"+pC+pC+"r"; Listplot(tmp,[p1,p2],["Msg=n","notex",color,size]); Putonseg(pC,parse("sg"+tmp)); - PTEXCEPTION=concat(TEXCEPTION,[pC]); + PTEXCEPTION=concat(PTEXCEPTION,[pC]); //190329 ); //190209to ); ////%Slider end//// @@ -1016,13 +3235,13 @@ Putpoint(name,Pt):=Putpoint(name,Pt,Pt); Putpoint(name,Ptinit,Pt):=( //help:Putpoint("A",[1,2],[1,A.y]); regional(ptstr); - ptstr=apply(allpoints(),#.name);//16.10.06 + ptstr=apply(allpoints(),#.name); //no ketjs on if(!contains(ptstr,name), createpoint(name,Pcrd([Ptinit_1,Ptinit_2])); - , - ptstr=name+".xy="+Textformat(Pcrd(Pt),5); + , //no ketjs off + ptstr=name+".xy="+Textformat(Pcrd(Pt),5)+";"; parse(ptstr); - ); + ); //no ketjs ); ////%Putpoint end//// @@ -1035,7 +3254,7 @@ Putpoint(name,Ptinit,Pt):=( if(!contains(ptstr,name), createpoint(name,Pcrd([Ptinit_1,Ptinit_2])); , - ptstr=name+".xy="+Textformat(Pcrd(Pt),5); + ptstr=name+".xy="+Textformat(Pcrd(Pt),5)+";"; parse(ptstr); ); ); @@ -1071,23 +3290,24 @@ Bezierpt(t,ptlist,ctrlist):=( ////%Bezierpt end//// ////%Bezier start//// -Bezier(ptctrlist):=BezierCurve(ptctrlist_3,ptctrlist_1,ptctrlist_2,[]); +Bezier(ptctrlist):=Beziercurve(ptctrlist_3,ptctrlist_1,ptctrlist_2,[]); Bezier(Arg1,Arg2):=( //190202from regional(nm,ptctrlist,options); if(islist(Arg1), ptctrlist=Arg1; options=Arg2; - BezierCurve(ptctrlist_3,ptctrlist_1,ptctrlist_2,options); + Beziercurve(ptctrlist_3,ptctrlist_1,ptctrlist_2,options); , nm=Arg1; ptctrlist=Arg2; - BezierCurve(nm,ptctrlist_1,ptctrlist_2,[]); + Beziercurve(nm,ptctrlist_1,ptctrlist_2,[]); ); ); //190202to -Bezier(nm,ptlist,ctrlist):=BezierCurve(nm,ptlist,ctrlist,[]); -Bezier(nm,ptlist,ctrlist,options):=BezierCurve(nm,ptlist,ctrlist,options); +Bezier(nm,ptlist,ctrlist):=Beziercurve(nm,ptlist,ctrlist,[]); +Bezier(nm,ptlist,ctrlist,options):=Beziercurve(nm,ptlist,ctrlist,options); ////%Bezier end//// -////%BezierCurve start//// -BezierCurve(nm,ptlist,ctrlist):=BezierCurve(nm,ptlist,ctrlist,[]); -BezierCurve(nm,ptlistorg,ctrlistorg,options):=( + +////%Beziercurve start//// +Beziercurve(nm,ptlist,ctrlist):=Beziercurve(nm,ptlist,ctrlist,[]); +Beziercurve(nm,ptlistorg,ctrlistorg,options):=( //help:Bezier("1",[A,D],[B,C]); //help:Bezier(options=["Num=10"]); regional(name,Ltype,Noflg,opstr,opcindy,Num, @@ -1139,7 +3359,7 @@ BezierCurve(nm,ptlistorg,ctrlistorg,options):=( if(Noflg<3, println("generate Bezier "+name); out=apply(list,Pcrd(#)); - tmp=name+"="+Textformat(out,5); + tmp=name+"="+Textformat(out,5)+";"; //190415 parse(tmp); tmp1=Textformat(ptlist,5); //no ketjs on tmp1=RSform(tmp1,2); //17.12.23 @@ -1152,7 +3372,7 @@ BezierCurve(nm,ptlistorg,ctrlistorg,options):=( if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on Texcom("}");//180722 ); //no ketjs off @@ -1164,84 +3384,32 @@ BezierCurve(nm,ptlistorg,ctrlistorg,options):=( BezierCtrL=ctrlist; //181001 list; ); -////%BezierCurve end//// - -////%Readcsvsla start//// -Readcsvsla(fname):=Readplotdigdata(fname,[]); -Readcsvsla(fname,options):=Readplotdigdata(fname,options); -Readplotdigdata(fname):=Readplotdigdata(fname,[]); -Readplotdigdata(fname,options):=( - regional(fsc,mv,cmdall,dataL,nd,npt,ptdata,ii,tmp,tmp1,tmp2,tmp3); - tmp=Divoptions(options); - tmp1=tmp_6; - sc=1;//10; - mv=[0,0];//[5,5]; - forall(tmp1, - if(!islist(#),sc=#,mv=#); - ); - if(indexof(fname,".")>0, - tmp=load(fname); - , - tmp=load(fname+".txt"); - ); - cmdall=tokenize(tmp,"//"); - dataL=[]; - forall(2..length(cmdall),ii, - tmp1=parse("["+cmdall_ii+"]"); - dataL=append(dataL,tmp1); - ); - if(length(dataL_(length(dataL)))<2, - dataL=dataL_(1..(length(dataL)-1)); - ); - nd=length(dataL_1)/2; - npt=length(dataL); - ptdata=[]; - forall(1..nd,ii, - tmp3=[]; - forall(1..npt, - tmp1=dataL_#_(2*ii-1); - tmp2=dataL_#_(2*ii); - if(isreal(tmp1), - tmp3=append(tmp3,[tmp1,tmp2]); - ); - ); - ptdata=append(ptdata,tmp3); - ); - tmp1=[]; - forall(ptdata, - tmp=#/sc; - tmp=Translatedata("1",[tmp],-mv,["nodata"]); - tmp1=append(tmp1,tmp); - ); - ptdata=tmp1; - ptdata; -); -////%Readcsvsla end//// +////%Beziercurve end//// ////%Putbezierdata start//// Putbezierdata(name,ptL):=Putbezierdata(name,ptL,[]); Putbezierdata(name,ptL,options):=( regional(psize,Deg,tmp,tmp1,tmp2,p1,p2,pts,ctrs); tmp=Divoptions(options); - psize=3; + psize=3; //no ketjs Deg=3; tmp1=tmp_5; forall(tmp1, - if(substring(#,0,1)=="D", + if(substring(#,0,1)=="D", //no ketjs on tmp=indexof(#,"="); Deg=parse(substring(#,tmp,length(#))); ); if(substring(#,0,1)=="S", tmp=indexof(#,"="); psize=parse(substring(#,tmp,length(#))); - ); + ); //no ketjs off ); pts=[]; ctrs=[]; forall(1..length(ptL), p2=ptL_#; // 16.08.16 if(ispoint(p2), - tmp1=text(p2); + tmp1=p2.name; //190505 , tmp1=name+text(#); Putpoint(tmp1,p2,Lcrd(parse(tmp1))); // 16.08.16 @@ -1298,11 +3466,11 @@ Mkbezierptcrv(ptdata,options):=( //help:Mkbezierptcrv(options=["Num=10"]); // global BezierNumber regional(ptlist,Out,tmp,tmp1,tmp2); - if(isstring(ptdata), + if(isstring(ptdata), //no ketjs on ptlist=Readcsvsla(ptdata,options); - , + , //no ketjs off ptlist=ptdata; - ); + ); //no ketjs if(Measuredepth(ptlist)==1,ptlist=[ptlist]); Out=[]; forall(1..length(ptlist), @@ -1335,108 +3503,6 @@ Mkbeziercrv(nm,ptctrL,options):=( ); ////%Mkbeziercrv end//// -////%Writebezier start//// -Writebezier():=Writebezier(Fhead,"all"); -Writebezier(head):=Writebezier(head,"all"); -Writebezier(head,seL):=( -//help:Writebezier(file); -//help:Writebezier(file,"acd"); - regional(bz,dt,name,tmp,tmp1,tmp2); - bz=select(GLIST,indexof(#,"=Bezier")>0); - tmp1=[]; // 16.04.22from - if(seL!="all", - forall(1..length(seL), - tmp=substring(seL,#-1,#); - tmp=select(bz,indexof(#,"bz"+tmp)>0); - tmp1=concat(tmp1,tmp); - ); - bz=tmp1;// 16.04.22until - ); - dt=[head+"n",[[length(bz),0]]]; - forall(1..length(bz), - tmp=indexof(bz_#,"="); - name=substring(bz_#,0,tmp-1); - tmp=indexof(bz_#,","+Dq); - if(tmp>0, - tmp1=substring(bz_#,0,tmp-1)+")"; - , - tmp1=bz_#; - ); - tmp1=replace(tmp1,"Bezier(","["); - tmp1=replace(tmp1,"list"+PaO(),"["); - tmp1=replace(tmp1,")","]"); - tmp1=replace(tmp1,",",".xy,"); - tmp1=replace(tmp1,"]",".xy]"); - tmp1=replace(tmp1,".xy,[",",["); - tmp1=replace(tmp1,"].xy","]"); - tmp1=replace(tmp1,name,head+text(#)); - parse(tmp1); - tmp=parse(head+text(#)+"_1"); - dt=concat(dt,[head+text(#)+"k",tmp]); - tmp=parse(head+text(#)+"_2"); - dt=concat(dt,[head+text(#)+"c",tmp]); - ); - WriteOutData(head+".txt",dt); - dt; -); -////%Writebezier end//// - -////%Readbezier start//// -Readbezier(file):=Readbezier(file,[]); -Readbezier(file,optionorg):=( -//help:Readbezier("xsr"); -//help:Readbezier(options=["Num=10","nogeo"]); - regional(nn,options,stL,geo,nc,alpha,out,tmp,tmp1,tmp2,tmp3); - options=optionorg; - tmp=Divoptions(options); - stL=tmp_7; - geo=0; - forall(stL, - tmp=Toupper(substring(#,0,1)); - if(tmp=="G",geo=1); - options=remove(options,[#]); - ); - ReadOutData(file); - tmp=file+"n_1_1"; - nn=parse(tmp); - out=[]; - forall(1..nn,nc, - tmp=file+text(nc); - tmp1=parse(tmp+"k"); - tmp2=parse(tmp+"c"); - if(Measuredepth(tmp2)==1,tmp2=[tmp2]); // 16.04.22from - if(geo==1, - alpha="abcdefghijklmnopqrstuvwxyz"; - forall(1..length(tmp1), - tmp="k"+BezierNumber+"n"+text(nc)+substring(alpha,#-1,#); - Putpoint(tmp,tmp1_#,parse(tmp+".xy")); - inspect(parse(tmp),"labeled",false); - inspect(parse(tmp),"ptsize",3); - tmp1_#=parse(tmp+".xy"); - ); - forall(1..length(tmp2), - tmp="c"+BezierNumber+"n"+text(nc)+substring(alpha,#-1,#)+"1"; - Putpoint(tmp,tmp2_#_1,parse(tmp+".xy")); - inspect(parse(tmp),"labeled",false); - inspect(parse(tmp),"color",4); - inspect(parse(tmp),"ptsize",3); - tmp2_#_1=parse(tmp+".xy"); - tmp="c"+BezierNumber+"no"+text(nc)+substring(alpha,#-1,#)+"2"; - Putpoint(tmp,tmp2_#_2,parse(tmp+".xy")); - inspect(parse(tmp),"labeled",false); - inspect(parse(tmp),"color",4); - inspect(parse(tmp),"ptsize",3); - tmp2_#_2=parse(tmp+".xy"); - ); - BezierNumber=BezierNumber+1; - ); - Bezier(file+text(nc),tmp1,tmp2,options);// 16.04.22until - out=append(out,"bz"+tmp); - ); - out; -); -////%Readbezier end//// - ////%Ospline start//// Ospline(nm,ptlist):=Ospline(nm,ptlist,[]); Ospline(nm,ptlist,options):=( @@ -1637,7 +3703,7 @@ Bzsspline(nm,ptLorg,options):=( if(#<length(ptL) % cflg==1, pt=ptL_#; pt1=parse("C"+text(#-1)+"q"); - tmp2="C"+text(#)+"p=2*pt-pt1"; + tmp2="C"+text(#)+"p=2*pt-pt1;"; //190415 parse(tmp2); ); ); @@ -1651,7 +3717,7 @@ Bzsspline(nm,ptLorg,options):=( if(cflg==1, pt=ptL_1; pt1=Lcrd(parse("C"+text(length(ptL)-1)+"q")); // 16.08.16 - tmp1="Putpoint("+Dq+"C1p"+Dq+",2*pt-pt1)"; // 16.08.16 + tmp1="Putpoint("+Dq+"C1p"+Dq+",2*pt-pt1);"; // 16.08.16//190415 parse(tmp1); ); ctrlist=[]; @@ -1699,8 +3765,8 @@ Bspline(nm,ctrL,options):=( ); ////%Bspline end//// -////%MeetCurve start//// -MeetCurve(Crv,Xorg,Yorg):=( +////%Meetcurve start//// +Meetcurve(Crv,Xorg,Yorg):=( regional(Cv,tmp,tmp1,tmp2,X0,Y0,x1,x2,y1,y2,Ylist,Ban,Tate); if(isstring(Crv),Cv=parse(Crv),Cv=Crv); if(Measuredepth(Cv)==2,Cv=Cv_1); @@ -1761,7 +3827,7 @@ MeetCurve(Crv,Xorg,Yorg):=( tmp=sort(Ylist,abs(#_1-Y0)); [X0,tmp_1]; ); -////%MeetCurve end//// +////%Meetcurve end//// ////%Putonline start//// Putonline(name,linestr):=Putonline(name,linestr,[]); //190216from @@ -1816,13 +3882,13 @@ Putonseg(name,p1org,p2org,options):=( if(p_1<p1_1,parse(name+".xy="+Textformat(p1,5));p=p1); if(p_1>p2_1,parse(name+".xy="+Textformat(p2,5));p=p2); tmp=(p2_2-p1_2)/(p2_1-p1_1)*(p_1-p1_1)+p1_2; - parse(name+".y="+tmp); + parse(name+".y="+tmp+";"); //190415 , if(p1_2>p2_2,tmp=p1;p1=p2;p2=tmp); if(p_2<p1_2,parse(name+".xy="+Textformat(p1,5));p=p1); if(p_2>p2_2,parse(name+".xy="+Textformat(p2,5));p=p2); tmp=(p2_1-p1_1)/(p2_2-p1_2)*(p_2-p1_2)+p1_1; - parse(name+".x="+tmp); + parse(name+".x="+tmp+";"); //190415 ); //190120to ); ////%Putonseg end//// @@ -1854,14 +3920,14 @@ Putoncurve(pn,crvorg,options):=( p2=crv_1; Putonseg(pn,p1,p2); , - parse(pn+".xy="+Textformat(Ptend(crv),5)); + parse(pn+".xy="+Textformat(Ptend(crv),5)+";"); //190415 ); ); ); ////%Putoncurve end//// -////%CrossPoint start//// -CrossPoint(name,Crv1,Crv2,range):=( +////%Crosspoint start//// +Crosspoint(name,Crv1,Crv2,range):=( regional(Mx1,Mx2,Mx3,tmp,Crs1,Crs2,Crs3,Crs4,df1,df2); Mx1=range_1; Mx2=range_2; repeat(15, @@ -1880,151 +3946,307 @@ CrossPoint(name,Crv1,Crv2,range):=( ); Putpoint(name,Crs1); ); -////%CrossPoint end//// +////%Crosspoint end//// ////%Periodfun start//// -Periodfun(defL,rep):=Periodfun(defL,rep,[]); -Periodfun(defL,reporg,optionorg):=( // 16.11.24 -//help:Periodfun(["0",[-1,0],1(Num=),"1",[0,1],1(Num)],2(repeat count),options); -//help:Periodfun(repeat count=n or [repeatL,repeatR]); -//help:Periodfun(options=["Con(nect)=da,Color=red"]);//180725 -//help:Periodfun(defL=[function string, range, devision number,...]); - regional(nn,fun,range,num,options,nr,maxfun,rep,np, - tmp,tmp1,tmp2,eqL,connect,minx,maxx,pdata,Eps,prept); - rep=reporg; - if(length(rep)==1,rep=[rep,rep]);//180724 +Periodfun(defL,rng):=Periodfun(defL,rng,[]); +Periodfun(Arg1,Arg2,Arg3):=( //190419from + regional(nm,defL,,rng,options); + if(isstring(Arg1), + nm=Arg1; defL=Arg2; rng=Arg3; + Periodfun(nm,defL,rng,[]); + , + defL=Arg1; rng=Arg2; options=Arg3; + Periodfun("",defL,rng,options); //190421 + ); +); +Periodfun(nm,defL,rng,optionorg):=( //190420[new] +//help:Periodfun("1",defL,"x=range",options); +//help:Periodfun(defL=[function string,range(with equal option),devision number,...]); +//help:Periodfun(equal option "l","r","b","n"); +//help:Periodfun(options=["Connect)=da,Color=red"]);//180725 + regional(name,range,nr,nn,eqL,options,connect,Eps,fun,scaley,interval, + mxfun,var,left,right,period,cL,crL,sL,sdL,flg,equal,tmp,tmp1,tmp2); + Eps=10^(-2); + name="pe"+nm; + var="x"; + nr=3*floor(length(defL)/3); + left=defL_2_1; + if(isstring(left),left=parse(left)); //190505 + right=defL_(nr-1)_2; + if(isstring(right),right=parse(right)); ///190505 + period=right-left; + if(isstring(rng), + tmp=Strsplit(rng,"="); + var=tmp_1; + if(length(tmp)>1, + range=parse(tmp_2); + , + range=[XMIN,XMAX]; + ); + , + range=[left-rng*period,right+rng*period]; //190421 + ); options=optionorg; -// tmp=Divoptions(options); - eqL=options; - connect=["da"];//180725 + tmp=Divoptions(options); + eqL=tmp_5; + connect="da"; forall(eqL, - tmp=indexof(#,"=");//180725from - tmp=[substring(#,0,tmp-1),substring(#,tmp,length(#))]; - if(Toupper(substring(tmp_1,0,3))=="CON", - tmp1=Toupper(Op(1,tmp_2)); + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,3)); + tmp2=tmp_2; + if(tmp1=="CON", + tmp1=Toupper(substring(tmp2,0,1)); if(tmp1=="N", - connect=[]; + connect=""; , if(tmp1!="Y", - connect=tokenize(tmp_2,","); + connect=tmp2; ); - );//180725to + ); options=remove(options,[#]); ); ); - minx=10000; - maxx=-10000; + scaley=SCALEY; + Setscaling(1); mxfun=""; - pdata=[]; - forall(1..(length(defL)/3),nn, + cL=[]; + forall(1..(nr/3),nn, + nst=text(nn); fun=defL_(3*nn-2); - range=defL_(3*nn-1); - tmp1=if(isstring(range_1),parse(range_1),range_1); //17.06.11[2lines] - tmp2=if(isstring(range_2),parse(range_2),range_2); - minx=min(minx,tmp1); - maxx=max(maxx,tmp2); - num=defL_(3*nn); - options=append(options,"Num="+text(num)); - Plotdata("pe"+text(nn),fun, - "x="+Textformat([tmp1,tmp2],5),options); - pdata=append(pdata,"grpe"+text(nn)); - tmp1=range_1; //17.06.11[4lines] - if(isstring(tmp1),tmp1=replace(tmp1,"pi","%pi"),tmp1=format(tmp1,5)); - tmp2=range_2; - if(isstring(tmp2),tmp2=replace(tmp2,"pi","%pi"),tmp2=format(tmp2,5)); - mxfun=mxfun+"elseif ("+tmp1+ - "<=x and x<"+tmp2+") then "+fun+" "; - ); - per=maxx-minx; - tmp1=[]; - forall(1..(rep_1),nr, //180724from - forall(reverse(1..(length(pdata))),np, - Translatedata("m"+np+text(nr),pdata_np,[-per*nr,0],options); - tmp1=concat(["trm"+np+text(nr)],tmp1); - ); - ); - tmp2=[]; - forall(1..(rep_2),nr, - forall(1..(length(pdata)),np, - Translatedata("p"+np+text(nr),pdata_np,[per*nr,0],options); - tmp2=concat(tmp2,["trp"+np+text(nr)]); - ); - );//180724to - pdata=concat(tmp1,pdata); - pdata=concat(pdata,tmp2); - if(length(connect)>0, //180725 - connect=append(connect,"Msg=n"); //180725 - Eps=10^(-5); - pdata=sort(pdata,[parse(#)_1_1]); - prept=parse(pdata_1)_1; - forall(1..(length(pdata)), - tmp=parse(pdata_#); - tmp1=tmp_1; - tmp2=tmp_(length(tmp)); - if(|prept-tmp1|>Eps, - Listplot("con"+text(#),[prept,tmp1],concat([],connect));//180725 + interval=defL_(3*nn-1); //190505from + equal="l"; + if(length(interval)>2, + equal=substring(interval_3,0,1); + interval=interval_(1..2); + ); + tmp=apply(interval,if(isstring(#),parse(#),#)); + tmp1=var+"="+Textformat(tmp,5); + tmp2="Num="+text(defL_(3*nn)); + tmp=Plotdata("",fun,tmp1,[tmp2,"nodata","Msg=n"]); + cL=append(cL,tmp); + if(equal=="l",equal=["<=","<"]); + if(equal=="r",equal=["<","<="]); + if(equal=="b",equal=["<=","<="]); + if(equal=="n",equal=["<","<"]); + mxfun=mxfun+"elseif ("+interval_1+ + equal_1+var+" and "+var+equal_2+interval_2+") then "+fun+" "; + ); + crL=cL; + flg=0; + forall(1..10,nn, + if(flg==0, + if(crL_1_1_1<=range_1, + flg=1; + , + tmp=Translatedata("",cL,[-nn*period,0],["nodata","Msg=n"]); + crL=concat(tmp,crL); ); - prept=tmp_(length(tmp)); ); ); + flg=0; + forall(1..10,nn, + if(flg==0, + tmp1=crL_(length(crL)); + tmp2=tmp1_(length(tmp1)); + if(range_2<=tmp2_1, + flg=1; + , + tmp=Translatedata("",cL,[nn*period,0],["nodata","Msg=n"]); + crL=concat(crL,tmp); + ); + ); + ); + Setscaling(scaley); + sL=[]; + sdL=[]; + forall(1..(length(crL)),nn, + tmp=concat(options,["Msg=n"]); + Listplot("-"+name+text(nn),crL_nn,tmp); + sL=append(sL,name+text(nn)); + if(nn<length(crL), + tmp1=crL_nn_(length(crL_nn)); + tmp2=crL_(nn+1)_1; + if(Norm(tmp2-tmp1)>Eps, + tmp=concat(options,[connect,"Msg=n"]); + Listplot("-"+name+"dc"+text(nn),[tmp1,tmp2],tmp); + sdL=append(sdL,name+"dc"+text(nn)); + ); + ); + ); + tmp=name+"="+Textformat(sL,5)+";"; + parse(tmp); + tmp=name+"dc="+Textformat(sdL,5)+";"; + parse(tmp); + println(" generate "+name+","+name+"dc"); mxfun=substring(mxfun,4,length(mxfun)-1); - [mxfun,per]; + println(" return [mxfun,period]"); + [mxfun,period]; ); ////%Periodfun end//// +////%Mkcstable start//// +Mkcstable(nterm,num):=( //190523 +//help:Mkcstable(number of terms, division number) + regional(cosL,sinL,dL,jj,x,tmp); + cosL=[]; + sinL=[]; + forall(0..num,jj, + x=-pi+2*pi/num*jj; + dL=apply(1..nterm,cos(#*x)); + cosL=append(cosL,dL); + dL=apply(1..nterm,sin(#*x)); + sinL=append(sinL,dL); + ); + tmp="Costable="+Textformat(cosL,6); + parse(tmp); + tmp="Sintable="+Textformat(sinL,6); + parse(tmp); +); +////%Mkcstable end//// + ////%Fourierseries start//// Fourierseries(nm,coeff,per,nterm):= Fourierseries(nm,coeff,per,nterm,[]); // 16.11.24 -Fourierseries(nm,coeff,per,nterm,options):=( -//help:Fourierseries("1",[c0,cn,sn],period,numterm,options); - regional(c0,cn,sn,fs,tmp,tmp1,tmp2); +Fourierseries(nm,coeff,per,nterm,Arg1):=( //190420from + if(isstring(Arg1), + Fourierseries(nm,coeff,per,nterm,Arg1,[]); + , + Fourierseries(nm,coeff,per,nterm,"x=[XMIN,XMAX]",Arg1); + ); +); +Fourierseries(nm,coefforg,per,nterm,range,optionorg):=( +//help:Fourierseries("1",[c0,cn,sn],period,numterm,"x=range",options); +//help:Fourierseries("1","[c0,cn,sn]",period,numterm,"x=range",options); +//help:Fourierseries(options2=["Table=n/y"]); + regional(options,eqL,num,coeff,c0,cn,sn,fs,tbflg,jj,dL, + tmp,tmp1,tmp2); + options=optionorg; //190523from + tmp=Divoptions(options); + eqL=tmp_5; + tbflg="N"; + num=100; + forall(eqL, + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,1)); + if(tmp1=="T", + tbflg=Toupper(substring(tmp_2,0,1)); + options=remove(options,[#]); + ); + if(tmp1=="N", + num=parse(tmp_2); + options=remove(options,[#]); + ); + ); //190523to + coeff=coefforg; + if(isstring(coeff), + tmp=substring(coeff,1,length(coeff)-1); + coeff=tokenize(tmp,","); + ); + coeff=apply(coeff, + if(isstring(#),replace(#,"%pi","pi"),format(#,5)) + ); c0=coeff_1; - if(!isstring(c0),c0=format(c0,5)); - c0=replace(c0,"%pi","pi"); cn=coeff_2; - if(!isstring(cn),cn=format(cn,5)); - cn=replace(cn,"%pi","pi"); sn=coeff_3; - if(!isstring(sn),sn=format(sn,5)); - sn=replace(sn,"%pi","pi"); fs=c0; - forall(1..nterm, - tmp=parse(Assign(cn,["n",#])); - tmp1=Assign("("+format(tmp,5)+")*cos(n*2*pi/per*x)", - ["n",#,"per",per]); - tmp=parse(Assign(sn,["n",#])); - tmp2=Assign("("+format(tmp,5)+")*sin(n*2*pi/per*x)", - ["n",#,"per",per]); - fs=fs+"+"+tmp1+"+"+tmp2; - ); - Plotdata("four"+nm,fs,"x",options); + if(tbflg=="N", //190523 + forall(1..nterm, + tmp=parse(Assign(cn,["n",#])); + tmp1=Assign("("+format(tmp,5)+")*cos(n*2*pi/per*x)", + ["n",#,"per",per]); + tmp=parse(Assign(sn,["n",#])); + tmp2=Assign("("+format(tmp,5)+")*sin(n*2*pi/per*x)", + ["n",#,"per",per]); + fs=fs+"+"+tmp1+"+"+tmp2; + ); + Plotdata("-four"+nm,fs,range,append(options,"Num="+Num)); + , + c0=parse(c0); //190523from + cn=apply(1..nterm,parse(Assign(cn,["n",#]))); + sn=apply(1..nterm,parse(Assign(sn,["n",#]))); + dL=[]; //1900523from + forall(0..num,jj, + x=-per/2+per/num*jj; + fs=c0; + forall(1..nterm, + fs=fs+cn_#*Costable_(jj+1)_#+sn_#*Sintable_(jj+1)_#; + ); + dL=append(dL,[x,fs]); + ); + Listplot("-four"+nm,dL,options); + ); //190523to ); ////%Fourierseries end//// +////%Tabledata start//// //190428from +Tabledata(xLst,yLst,rmvL):=Tabledata("",xLst,yLst,rmvL); +Tabledata(Arg1,Arg2,Arg3,Arg4):=( + if(isstring(Arg1), + Tabledata(Arg1,Arg2,Arg3,Arg4,[]); + , + Tabledata("",Arg1,Arg2,Arg3,Arg4); + ); +); //190428to +Tabledata(nm,xL,yL,rmvL,optionorg):=( +//help:Tabledata(xL,yL,rmvL,["Geo=n"]); +//help:Tabledata(options=[2(tick,0 for no tick),"Setwin=y","Move=[0,0]"]); //190428 + regional(options,geo,tmp,tmp1,tmp2); + options=optionorg; + tmp=Divoptions(options); + eqL=tmp_5; + tmp=select(tmp_5,indexof(Toupper(#),"GEO")>0); + if(length(tmp)>0, + options=remove(options,tmp); + Tabledatageo(nm,xL,yL,rmvL,options); + , + Tabledatalight(nm,xL,yL,rmvL,options); + ); +); +////% Tabledata end//// + ////%Tabledatalight start//// -Tabledatalight(nm,xLst,yLst,rmvL):=Tabledatalight(nm,xLst,yLst,rmvL,[]); +Tabledatalight(xLst,yLst,rmvL):=Tabledatalight("",xLst,yLst,rmvL); //190428from +Tabledatalight(Arg1,Arg2,Arg3,Arg4):=( + if(isstring(Arg1), + Tabledatalight(Arg1,Arg2,Arg3,Arg4,[]); + , + Tabledatalight("",Arg1,Arg2,Arg3,Arg4); + ); +); //190428to Tabledatalight(nm,xLst,yLst,rmvL,optionorg):=( -//help:Tabledatalight("",xLst,yLst,rmvL,[2,"Rng=y"]); +//help:Tabledatalight(xLst,yLst,rmvL,[0(notick)]); +//help:Tabledatalight(xLst,yLst,rmvL,[2,"Setwindow=y","Move=[0,0]"]); //190428 regional(options,rng,name,upleft,ul,flg,tick,eqL,reL,n,m,xsize,ysize, - rlist,clist,Tb,tmp,tmp1,tmp2,tmp3,Eps); -// name="tb"+nm; - name="tb"; + rlist,clist,Tb,jj,kk,tmp,tmp1,tmp2,tmp3,Eps); + // TableMove is global for Table + TABLECOUNT=TABLECOUNT+1; //190428from + TableMove=GENTEN; //190428to + name="tb"+text(TABLECOUNT); //190428to options=optionorg; tmp=Divoptions(options); eqL=tmp_5; //16.12.16from reL=tmp_6; rng="Y"; forall(eqL, - tmp=indexof(#,"="); - tmp1=Toupper(substring(#,0,1)); //181111 - tmp2=Toupper(substring(#,tmp,tmp+1)); - if(tmp1=="R", - rng=tmp2; + tmp=Strsplit(#,"="); //190428from + tmp1=Toupper(substring(tmp_1,0,2)); + if(tmp1=="RN", + rng=Toupper(substring(tmp_2,0,1)); options=remove(options,[#]); ); - );//16.12.16until - tick=1; - flg=0; + if(tmp1=="MO", + TableMove=parse(tmp_2); + rng="N"; //190429 + options=remove(options,[#]); + ); + if(tmp1=="SE", + rng=Toupper(substring(tmp_2,0,1)); + options=remove(options,[#]); + ); + ); //190428to + tick=1; + flg=0; //190424 forall(reL, if(flg==0, tick=#; @@ -2036,7 +4258,7 @@ Tabledatalight(nm,xLst,yLst,rmvL,optionorg):=( tmp=sum(yLst); upleft=[0,tmp]; TableOptions=options; // 16.11.28 - println("Tabledatalight "+name+" generated"); + println("generate Tabledatalight "+name); //190428 ul=upleft/10; m=length(xLst); n=length(yLst); @@ -2052,28 +4274,48 @@ Tabledatalight(nm,xLst,yLst,rmvL,optionorg):=( tmp1=rlist_(#)_2-yLst_#/10; rlist=append(rlist,[0,tmp1]); ); - Tb=[clist,rlist]; - tmp=name+"="+Tb; + Tb=[clist,rlist]; //190427 + tmp=name+"="+Tb+";"; //190415 parse(tmp); - forall(0..m, - tmp1="c"+text(#)+"r0"; - tmp2="c"+text(#)+"r"+text(n); - Tlistplot("c"+text(#)+"r0r"+text(n),[tmp1,tmp2],options); - if(mod(#,tick)==0 % #==m, - tmp=clist_(#+1); - drawtext(clist_(#+1)-[0.04,-0.1],"c"+text(#)); + forall(0..m,jj, //190507from + tmp3="c"+text(jj); + if(length(rmvL)>=0, + tmp1="r"+text(0); + tmp2="r"+text(n); + Tlistplot("-"+name+tmp3+tmp1+tmp2,[tmp3+tmp1,tmp3+tmp2],options); + , + forall(0..(n-1), + tmp1="r"+text(#); + tmp2="r"+text(#+1); + Tlistplot("-"+name+tmp3+tmp1+tmp2,[tmp3+tmp1,tmp3+tmp2],options); + ); + ); //190507to + if(tick!=0, //190421 + if(mod(jj,tick)==0 % #==m, + drawtext(clist_(jj+1)+TableMove-[0.04,-0.1],"c"+text(jj)); //190428 + ); ); - ); - forall(0..n, - tmp1="c0r"+text(#); - tmp2="c"+text(m)+"r"+text(#); - Tlistplot("r"+text(#)+"c0c"+text(m),[tmp1,tmp2],options); - if(mod(#,tick)==0 % #==n, - tmp=rlist_(#+1); - drawtext(rlist_(#+1)-[0.4,0.1],"r"+text(#)); + ); //190507 + forall(0..n,jj, + tmp3="r"+text(jj); + if(length(rmvL)>=0, + tmp1="c"+text(0); + tmp2="c"+text(m); + Tlistplot("-"+name+tmp3+tmp1+tmp2,[tmp1+tmp3,tmp2+tmp3],options); + , + forall(0..(m-1), + tmp1="c"+text(#); + tmp2="c"+text(#+1); + Tlistplot("-"+name+tmp3+tmp1+tmp2,[tmp1+tmp3,tmp2+tmp3],options); + ); + ); + if(tick!=0, //190421 + if(mod(jj,tick)==0 % #==n, + drawtext(rlist_(jj+1)+TableMove-[0.4,0.1],"r"+text(jj)); //190428 + ); ); ); - Tsegrmv(rmvL,options); + Changetablestyle(rmvL,["nodisp"]); //190428 Addax(0); Eps=10^(-3); tmp1=clist_(length(clist)); @@ -2086,56 +4328,27 @@ Tabledatalight(nm,xLst,yLst,rmvL,optionorg):=( ); ////%Tabledatalight end//// -////%Tabledata start//// -Tabledata(nm,n,m,xsize,ysize,rmvL):= - Tabledata(nm,n,m,xsize,ysize,rmvL,[]); -Tabledata(nm,n,m,xsize,ysize,rmvL,options):=( - regional(Tb,name,tmp,xLst,yLst); - name="tb"+nm; - xLst=apply(1..n,xsize/n); - yLst=apply(1..m,ysize/m); - Tabledata(nm,xLst,yLst,rmvL,options) -); -Tabledata(nm,xLst,yLst,rmvL):=Tabledata(nm,xLst,yLst,rmvL,[]); -Tabledata(nm,xLst,yLst,rmvL,optionorg):=( -//help:Tabledata("",xLst,yLst,rmvL,[2,"Rng=y"]); - regional(name,options,eqL,reL,rng,upleft,ul,flg,tick,n,m,xsize,ysize, - rlist,clist,Tb,tmp,tmp1,tmp2,tmp3,Eps); -// name="tb"+nm; - name="tb"; - tmp=sum(yLst); - upleft=[0,tmp]; - options=optionorg; +////%Tabledatageo start//// //190428(renamed) +Tabledatageo(nm,xLstorg,yLstorg,rmvL,options):=( + regional(eqL,ul,n,m,Tb,xLst,yLst, + rlist,clist,tmp,tmp1,tmp2); + xLst=xLstorg; + yLst=yLstorg; tmp=Divoptions(options); - eqL=tmp_5; //16.12.16from - reL=tmp_6; - rng="Y"; + eqL=tmp_5; + TableMove=[0,0]; forall(eqL, - tmp=indexof(#,"="); - tmp1=Toupper(substring(#,0,1)); //181111 - tmp2=Toupper(substring(#,tmp,tmp+1)); - if(tmp1=="R", - rng=tmp2; - options=remove(options,[#]); - ); - );//16.12.16until - tick=1; - flg=0; - forall(reL, - if(flg==0, - tick=#; - flg=flg+1; - , - upleft=tmp_6_1; + tmp=Strsplit(#,"=");; + tmp1=Toupper(substring(tmp_1,0,2)); + tmp2=Toupper(substring(tmp_2,0,1)); + if(tmp1=="MO", + TableMove=parse(tmp_2); ); ); - TableOptions=options; // 16.11.28 - println("Tabledata "+name+" generated"); - ul=upleft/10; + tmp=sum(yLst); + ul=[0,tmp]/10; m=length(xLst); n=length(yLst); - xsize=sum(xLst); - ysize=sum(yLst); clist=[ul]; rlist=[ul]; forall(1..m, @@ -2146,154 +4359,47 @@ Tabledata(nm,xLst,yLst,rmvL,optionorg):=( tmp1=rlist_(#)_2-yLst_#/10; rlist=append(rlist,[0,tmp1]); ); - Tb=[clist,rlist]; - tmp=name+"="+Tb; - parse(tmp); forall(0..m, tmp="C"+text(#); - tmp1="c"+text(#)+"r0"; + tmp1=TableMove+clist_(#+1); if(#==0, - Putpoint(tmp,Tgrid(tmp1)); + Putpoint(tmp,tmp1); , - Putpoint(tmp,Tgrid(tmp1),[parse(tmp+".x"),C0.y]); - clist_(#+1)=parse(tmp+".xy"); + Putpoint(tmp,tmp1,[parse(tmp+".x"),tmp1_2]); ); inspect(parse(tmp),"ptsize",3); inspect(parse(tmp),"labeled",false); - if(mod(#,tick)==0 % #==m, - tmp=clist_(#+1); - drawtext(clist_(#+1)-[0.04,-0.1],"c"+text(#)); - ); ); - forall(0..n, + forall(1..n, tmp="R"+text(#); - tmp1="c0r"+text(#); - if(#==0, - Putpoint(tmp,Tgrid(tmp1)); - , - Putpoint(tmp,Tgrid(tmp1),[R0.x,parse(tmp+".y")]); - rlist_(#+1)=parse(tmp+".xy"); //no ketjs - ); - Putpoint(tmp,Tgrid(tmp1),[R0.x,parse(tmp+".y")]); + tmp1=TableMove+rlist_(#+1); + Putpoint(tmp,tmp1,[tmp1_1,parse(tmp+".y")]); inspect(parse(tmp),"ptsize",3); inspect(parse(tmp),"labeled",false); - if(mod(#,tick)==0 % #==n, - tmp=rlist_(#+1); - drawtext(rlist_(#+1)-[0.4,0.1],"r"+text(#)); - ); ); - Tb=[clist,rlist]; - tmp=name+"="+Tb; - parse(tmp); - forall(0..m, - tmp1="c"+text(#)+"r0"; - tmp2="c"+text(#)+"r"+text(n); - Tlistplot("c"+text(#)+"r0r"+text(n),[tmp1,tmp2],options); - if(#<m, - tmp1=parse("C"+text(#)); - tmp2=parse("C"+text(#+1)); - tmp=(tmp1.xy+tmp2.xy)/2; - drawtext(tmp+[-0.2,0.5],text((tmp2.x-tmp1.x)*10)); - ); - ); - forall(0..n, - tmp1="c0r"+text(#); - tmp2="c"+text(m)+"r"+text(#); - Tlistplot("r"+text(#)+"c0c"+text(m),[tmp1,tmp2],options); - if(#<n, - tmp1=parse("R"+text(#)); - tmp2=parse("R"+text(#+1)); - tmp=(tmp1.xy+tmp2.xy)/2; - drawtext(tmp-[1.2,0.1],text(abs(tmp1.y-tmp2.y)*10)); - ); - ); - Tsegrmv(rmvL,options); - Addax(0); - Eps=10^(-3); - tmp1=clist_(length(clist)); - tmp2=rlist_1; - tmp3=rlist_(length(rlist)); // 15.06.11 - if(rng=="Y", // 16.12.16 - Setwindow([0-Eps,tmp1_1+Eps],[tmp3_2-Eps,tmp2_2+Eps]); - ); - Tb; -); -////%Tabledata end//// - -////%Tseginfo start//// -Tseginfo(seg):=( - regional(cr,tp,tpc,n1,n2,n3,tmp,tmp1,tmp2); - if(substring(seg,0,2)=="sg", - cr=substring(seg,2,length(seg)); - , - cr=seg; + tmp1=0; + forall(1..m, + tmp=parse("C"+text(#)+".x")-TableMove_1; + tmp=tmp*10; + xLst_#=tmp-tmp1; + tmp1=tmp; ); - tp=substring(cr,0,1); - if(tp=="c", - tpc="r"; - , - tpc="c"; - ); - tmp1=indexof(cr,tpc); - tmp=substring(cr,tmp1,length(cr)); - tmp2=tmp1+indexof(tmp,tpc); - n1=substring(cr,1,tmp1-1); - n2=substring(cr,tmp1,tmp2-1); - n3=substring(cr,tmp2,length(cr)); - [tp+n1,tpc,parse(n2),parse(n3)]; -); -////%Tseginfo end//// - -////%Tsegrmv start//// -Tsegrmv(rmvL):=Tsegrmv(rmvL,[]); -Tsegrmv(rmvL,options):=( - regional(cr,gcL,flg,gc,hd,tail,tpc,m1,m2,n1,n2,tmp,tmp1,tmp2); - forall(rmvL,cr, - tmp1=Tseginfo(cr); - hd=tmp1_1; - tpc=tmp1_2; - m1=tmp1_3; - m2=tmp1_4; - gcL=select(GCLIST,Tseginfo(#_1)_1==tmp1_1); - flg=0; - forall(gcL, - if(flg==0, - tmp=Tseginfo(#_1); - n1=tmp_3; - n2=tmp_4; - if(m1>=n1 & m2<=n2, - gc=#; - flg=1; - ); - ); - ); - if(flg==1, - Changestyle([gc_1],["nodisp"]); - tail=""; - if(indexof(hd,"r")>0, - tail=hd; hd=""; - ); - if(n1<m1, - tmp1=tpc+text(n1); - tmp2=tpc+text(m1); - tmp=hd+tail+tmp1+tmp2; - Tlistplot(tmp,[hd+tmp1+tail,hd+tmp2+tail],options); - ); - if(m2<n2, - tmp1=tpc+text(m2); - tmp2=tpc+text(n2); - tmp=hd+tail+tmp1+tmp2; - Tlistplot(tmp,[hd+tmp1+tail,hd+tmp2+tail],options); - ); - ); + tmp1=C0.y*10; + forall(1..n, + tmp=parse("R"+text(#)+".y")-TableMove_2; + tmp=tmp*10; + yLst_#=tmp1-tmp; + tmp1=tmp; ); + Tb=Tabledatalight(nm,xLst,yLst,rmvL,options); + Tb; ); -////%Tsegrmv end//// +////%Tabledatageo end//// ////%Tgrid start//// Tgrid(ptstr):=( //help:Tgrid("c2r5"); - regional(tmp,tmp1,tmp2); + regional(tb,tmp,tmp1,tmp2); tmp=parse(ptstr); if(islist(tmp), tmp; @@ -2303,7 +4409,8 @@ Tgrid(ptstr):=( tmp1=parse(tmp1); tmp2=substring(ptstr,tmp,length(ptstr)); tmp2=parse(tmp2); - [tb_1_(tmp1+1)_1,tb_2_(tmp2+1)_2]; + tb=parse("tb"+text(TABLECOUNT)); //190428 + [tb_1_(tmp1+1)_1,tb_2_(tmp2+1)_2]+TableMove; //190428 ); ); ////%Tgrid end//// @@ -2341,62 +4448,97 @@ Tlistplot(nm,ptL,options):=( ); ////%Tlistplot end//// -////%ChangeTablestyle start//// -ChangeTablestyle(nameL,style):=( -////help:ChangeTablestyle(["r0c0c3"],["da"]); - regional(nmL,grid,head,sb,tmp,tmp1,tmp2, - tsg,segall,sg,str); +////%Changetablestyle start//// +Changetablestyle(nameL,style):=( +//help:Changetablestyle(["r0c0c3"],["da"]); + regional(nmL,nametb, name,grid,head,sb,tmp,tmp1,tmp2,tmp3, + tsg,pts,p1,p2,names,name,name1,nn,mm,gname,flg); + nametb="tb"+text(TABLECOUNT); //190428 if(islist(nameL),nmL=nameL,nmL=[nameL]); forall(nmL,grid, if(substring(grid,0,1)=="r",sb="c",sb="r"); + tmp=indexof(grid,sb); + head=substring(grid,0,tmp-1); + if(sb=="r", //190507from + pts=head+sb+"x"; + , + pts=sb+"x"+head; + ); + names=nametb+head+sb+"x"+sb+"y";//190507to + tmp3=apply(GCLIST,#_1); // 161206from + tmp3=select(tmp3,indexof(#,nametb)>0); + tmp3=apply(tmp3,substring(#,length(nametb),length(#))); //190507from + tmp3=select(tmp3,substring(#,0,length(head))==head); tmp=Indexall(grid,sb); - head=substring(grid,0,tmp_1-1); tmp1=substring(grid,tmp_1,tmp_2-1); tmp2=substring(grid,tmp_2,length(grid)); tsg=apply([tmp1,tmp2],parse(#)); - tmp1=apply(GCLIST,#_1); // 16.12.06from - segall=[]; - forall(tmp1, - tmp2=substring(#,2,length(#)); - tmp=indexof(tmp2,sb); - tmp2=substring(tmp2,0,tmp-1); - if(head==tmp2,segall=append(segall,#)); - );// 16.12.06until - sg=[]; - forall(segall, - tmp=Indexall(#,sb); - tmp1=substring(#,tmp_1,tmp_2-1); - tmp2=substring(#,tmp_2,length(#)); - tmp=apply([tmp1,tmp2],parse(#)); - if((tsg_1>=tmp_1) & (tsg_2<=tmp_2), - sg=tmp; - Changestyle(#,["nodisp"]); - ); - ); - if(length(sg)==0, - println("No segment includes "+grid); - , - if(sb=="c",str=sb+"no"+head,str=head+sb+"no"); - if(sg_1<tsg_1, - tmp1=replace(str,"no",text(sg_1)); - tmp2=replace(str,"no",text(tsg_1)); - tmp=head+sb+text(sg_1)+"c"+text(tsg_1); - Tlistplot(tmp,[tmp1,tmp2],TableOptions); - ); - tmp1=replace(str,"no",text(tsg_1)); - tmp2=replace(str,"no",text(tsg_2)); - tmp=head+"c"+text(tsg_1)+"c"+text(tsg_2); - Tlistplot(tmp,[tmp1,tmp2],style); - if(tsg_2<sg_2, - tmp1=replace(str,"no",text(tsg_2)); - tmp2=replace(str,"no",text(sg_2)); - tmp=head+"c"+text(tsg_2)+"c"+text(sg_2); - Tlistplot(tmp,[tmp1,tmp2],TableOptions); + flg=0; + forall(tmp3,gname, + if(flg==0, + tmp=Indexall(gname,sb); + tmp1=parse(substring(gname,tmp_1,tmp_2-1)); + tmp2=parse(substring(gname,tmp_2,length(gname))); + if((tmp1<=tsg_1)&(tsg_2<=tmp2), + flg=1; + if(tmp1==tsg_1, + if(tsg_2==tmp2, + name=Replaceall(names,["x",tsg_1,"y",tsg_2]); + Changestyle(name,style); + , + name=Replaceall(names,["x",tsg_2,"y",tmp2]); + name1=Replaceall(names,["x",tmp1,"y",tmp2]); //190508from + p1=Replaceall(pts,["x",tsg_2]); + p2=Replaceall(pts,["x",tmp2]); + Tlistplot("-"+name,[p1,p2],["notex"]); + GCLIST=GCLIST_(1..(length(GCLIST)-1)); + nn=select(1..(length(GCLIST)),indexof(GCLIST_#_1,name1)>0); + nn=nn_1; + tmp=GCLIST_nn; + tmp=tmp_[2,3]; + GCLIST_nn=prepend(name,tmp); + nn=select(1..(length(GLIST)),indexof(GLIST_#,name1)>0); + nn=nn_1; + GLIST_nn=replace(GLIST_nn,name1,name); + mm=select(1..(length(COM2ndlist)),indexof(COM2ndlist_#,name1)>0); + mm=mm_1; + COM2ndlist_mm=replace(COM2ndlist_mm,name1,name); //190508to + ); + , + name=Replaceall(names,["x",tmp1,"y",tsg_1]); + name1=Replaceall(names,["x",tmp1,"y",tmp2]); //190508from + p1=Replaceall(pts,["x",tmp1]); + p2=Replaceall(pts,["x",tsg_1]); + Tlistplot("-"+name,[p1,p2],["notex"]); + nn=select(1..(length(GCLIST)),indexof(GCLIST_#_1,name1)>0); + GCLIST=GCLIST_(1..(length(GCLIST)-1)); + nn=nn_1; + tmp=GCLIST_nn; + tmp=tmp_[2,3]; + GCLIST_nn=prepend(name,tmp); + nn=select(1..(length(GLIST)),indexof(GLIST_#,name1)>0); + nn=nn_1; + GLIST_nn=replace(GLIST_nn,name1,name); + mm=select(1..(length(COM2ndlist)),indexof(COM2ndlist_#,name1)>0); + mm=mm_1; + COM2ndlist_mm=replace(COM2ndlist_mm,name1,name); //190508to + if(tsg_2<tmp2, + p1=Replaceall(pts,["x",tsg_2]); + p2=Replaceall(pts,["x",tmp2]); + name=Replaceall(names,["x",tsg_2,"y",tmp2]); + Tlistplot("-"+name,[p1,p2]); + ); + ); + ); ); - ); - ); + ); + name=Replaceall(names,["x",tsg_1,"y",tsg_2]); + p1=Replaceall(pts,["x",tsg_1]); + p2=Replaceall(pts,["x",tsg_2]); + Tlistplot("-"+name,[p1,p2],style); + ); //170507to ); -////%ChangeTablestyle end//// +////%Changetablestyle end//// ////%Findcell start//// Findcell(pos1,pos2):=Findcell("",pos1,pos2); @@ -2519,8 +4661,8 @@ Putrowexpr(Tbdata,nrow,dir,exL,options):=( ); //190228to ////%Putrowexpr end//// -////%PutcoL start//// -PutcoL(mcol,dir,lttrL):=PutcoL("",mcol,dir,lttrL,[]); //190228from +////%Putcol start//// +Putcol(mcol,dir,lttrL):=Putcol("",mcol,dir,lttrL,[]); //190228from Putcellexpr(Arg1,Arg2,Arg3,Arg4):=( if(islist(Arg4), Putcellexpr("",Arg1,Arg2,Arg3,Arg4); @@ -2528,7 +4670,7 @@ Putcellexpr(Arg1,Arg2,Arg3,Arg4):=( Putcellexpr(Arg1,Arg2,Arg3,Arg4,[]); ); ); -PutcoL(Tbdata,mcol,dir,lttrL,options):=( +Putcol(Tbdata,mcol,dir,lttrL,options):=( //help:PutcoL(1,"c",["x","y","z"]); regional(tmp,tmp1,nrow); nrow=length(lttrL); @@ -2536,10 +4678,10 @@ PutcoL(Tbdata,mcol,dir,lttrL,options):=( Putcell(Tbdata,mcol,#,dir,lttrL_#,options); ); ); //190228to -////%PutcoL end//// +////%Putcol end//// -////%PutcoLexpr start//// -PutcoLexpr(mcol,dir,exL):=PutcoLexpr("",mcol,dir,exL,[]); //190228from +////%Putcolexpr start//// +Putcolexpr(mcol,dir,exL):=Putcolexpr("",mcol,dir,exL,[]); //190228from Putcellexpr(Arg1,Arg2,Arg3,Arg4):=( if(islist(Arg4), Putcellexpr("",Arg1,Arg2,Arg3,Arg4); @@ -2547,13 +4689,13 @@ Putcellexpr(Arg1,Arg2,Arg3,Arg4):=( Putcellexpr(Arg1,Arg2,Arg3,Arg4,[]); ); ); -PutcoLexpr(Tbdata,mcol,dir,exL,options):=( -//help:PutcoLexpr(2,"r",["x","y","z"]); +Putcolexpr(Tbdata,mcol,dir,exL,options):=( +//help:Putcolexpr(2,"r",["x","y","z"]); regional(lttrL); lttrL=apply(exL,"$"+#+"$"); - PutcoL(Tbdata,mcol,dir,lttrL,options); + Putcol(Tbdata,mcol,dir,lttrL,options); ); //190228to -////%PutcoLexpr end//// +////%Putcolexpr end//// ////%Setrange start//// Setrange():=( @@ -2565,242 +4707,6 @@ Setrange():=( ); ////%Setrange end//// -////%RSform start//// -RSform(str):=RSform(str,3); -RSform(str,listfrom):=( -//help:RSform(string,listfrom); - regional(posL,mxlv,rep1,rep2,rep3,prev,out, - tmp,tmp1,tmp2); - rep1="c"+PaO(); rep2="c"+PaO(); rep3="list"+PaO(); - if(listfrom<3,rep2="list"+PaO()); - if(listfrom==1,rep1="list"+PaO()); - posL=Bracket(str,"[]"); - tmp=apply(posL,#_2); - mxlv=max(tmp); - out=""; - prev=0; - forall(posL, - out=out+substring(str,prev,#_1-1); - prev=#_1; - if(#_2>0, - tmp1=select(posL,tmp,(tmp_2<0)&(tmp_1>#_1)); - tmp1=tmp1_1_1; - tmp=substring(str,#_1,tmp1); - if(#_2==mxlv,out=out+rep1); - if(#_2==mxlv-1,out=out+rep2); - if(#_2<=mxlv-2,out=out+rep3); - , - out=out+")"; - ); - ); - out=out+substring(str,prev,length(str)); - out=replace(out,".xy",""); - out=replace(out,".x","[1]"); - out=replace(out,".y","[2]"); - out=replace(out,"c"+PPa("1"),"[1]");//17.10.06[2lines] - out=replace(out,"c"+PPa("2"),"[2]"); - out; -); -////%RSform end//// - -////%RSslash start//// -RSslash(str):=( //17.09.24 - regional(tmp); - tmp=replace(str,"\","\\"); -// tmp=replace(tmp,"\\\\","\\"); - tmp; -); -////%RSslash end//// - -////%Rform start//// -Rform(list):=( - regional(plotlist,comp,pos,out,strL,tmp,tmp1,tmp2,tmp3,Nj); - out=list; - out=replace(out,"[[[","list"+PaO()+"[["); - out=replace(out,"[","c"+PaO()); - out=replace(out,"]",")"); - out=replace(out,".xy",""); - out=replace(out,".x","[1]"); - out=replace(out,".y","[2]"); - out; -); -////%Rform end//// - -////%Defvar start//// -Defvar(varstr):=( - regional(name,value,tmp,tmp1); - if(isstring(varstr), - parse(varstr); - tmp=indexof(varstr,"="); - name=substring(varstr,0,tmp-1); - value=substring(varstr,tmp,length(varstr)); - value=parse(value); - tmp1=select(1..length(VLIST),VLIST_#_1==name); - if(length(tmp1)>0, - tmp=tmp1_1; - VLIST_tmp=[name,value]; - , - VLIST=prepend([name,value],VLIST); - ); - , - forall(1..(length(varstr)/2), // 16.11.16from - name=varstr_(2*#-1); - value=varstr_(2*#); - Defvar(name,value); - ); // 16.11.16until - ); -); -Defvar(name,value):=( -//help:Defvar("a",0.3); -//help:Defvar(["a",0.3,"b",2]); - regional(tmp,tmp1); - if(islist(value), - tmp1="["; - forall(value, - if(isstring(#), // 16.11.14 - tmp1=tmp1+Dq+#+Dq+","; // 16.11.14 - , - tmp1=tmp1+format(#,5)+","; - ); - ); - tmp1=substring(tmp1,0,length(tmp1)-1)+"]"; - , - tmp1=format(value,5); - ); - tmp=name+"="+tmp1; // 15.02.06 - parse(tmp); - VLIST=select(VLIST,#_1!=name); // 15.02.08 - VLIST=prepend([name,value],VLIST); -); -////%Defvar end//// - -////%IftoR start//// -IftoR(strorg):=( //180802 - regional(str,ifL,ppL,cpL,kk,sL,out, - tmp,tmp1,tmp2,tmp3,tmp4); - str=replace(strorg,LFmark,""); - ifL=Indexall(str,"if"+PaO()); - ppL=Bracket(str,"()"); - cpL=Indexall(str,","); - tmp1=Bracket(str,"[]"); - forall(1..(length(tmp1)/2),kk, - cpL=select(cpL,#<tmp1_(2*kk-1)_1%#_1>tmp1_(2*kk)_1); - ); - forall(1..length(ifL),kk, - tmp=select(ppL,#_1>ifL_kk); - tmp1=tmp_1; - tmp2=select(tmp,#_2==-tmp1_2); - tmp2=tmp2_1; - tmp3=select(cpL,#>tmp1_1 & #<tmp2_1); - ifL_kk=[tmp1_1,tmp2_1,tmp1_2,tmp3]; - ); - forall(1..length(cpL),kk, - tmp=select(1..length(ifL),contains(ifL_#_4,cpL_kk)); - tmp1=tmp_(length(tmp)); - cpL_kk=[cpL_kk,tmp1]; - ); - sL=apply(1..length(str),substring(str,#-1,#)); - forall(1..length(ifL),kk, - tmp1=ifL_kk_1; - tmp2=ifL_kk_2; - tmp=select(cpL,#_2==kk); - tmp3=apply(tmp,#_1); - sL_tmp1="("; - sL_tmp2="}"; - sL_(tmp3_1)="){"; - if(length(tmp3)>1, - sL_(tmp3_2)="}else{"; - ); - ); - out=sum(sL); - out; -); -////%IftoR end//// - -////%FortoR start//// -FortoR(strorg):=( - regional(str,pre,post,sub,ppL,forstr,out,tmp,tmp1,tmp2); - str=strorg; - forstr=indexof(str,"forall("); - if(forstr==0, - out=str; - , - pre=substring(str,0,forstr-1)+"for"+PaO(); - ppL=Bracket(str,"()"); - tmp1=forstr+6; - tmp=select(ppL,#_1==tmp1); - tmp=select(ppL,#_2==-tmp_1_2); - tmp2=tmp_1_1; - sub=substring(str,tmp1,tmp2-1); - post="}"+substring(str,tmp2,length(str)); - tmp=indexof(sub,","); - tmp1=substring(sub,0,tmp-1); - tmp2=substring(sub,tmp,length(sub)); - sub=tmp1+"){"+tmp2; - tmp1=indexof(sub,"{"); - tmp2=indexof(sub,","); - tmp=substring(sub,tmp1,tmp2-1); - pre=pre+tmp+" in "+substring(sub,0,tmp1-1)+"{"; - sub=substring(sub,tmp2,length(sub)); - tmp=FortoR(sub); - out=pre+tmp+"}"; - ); - out=replace(out,"..",":"); - out; -); -////%FortoR end//// - -////%Deffun start//// -Deffun(name,bodylist):=( -//help:Deffun("f(x)",["regional(y)","y=x^2*(x-3)","y"]); - regional(funstr,str,Pos,nbody,bdy,ppL,bpL,excma,tmp,tmp1,tmp2); - funstr=name+":=("; - forall(bodylist, - funstr=funstr+#+";"; - ); - funstr=funstr+");"; - parse(funstr); - tmp=indexof(name,"("); - str=substring(name,0,tmp-1)+"<-function"+PaO(); - str=str+substring(name,tmp,length(name))+"{"; - forall(1..(length(bodylist)-1),nbody, - bdy=bodylist_nbody; - Pos=indexof(bdy,"regional")+indexof(bdy,"local"); - if(Pos==0, - bdy=replace(bdy,LFmark,""); - bdy=replace(bdy," ",""); - ppL=Bracket(bdy,"()"); - bpL=Bracket(bdy,"[]"); - tmp1=select(bpL,#_2==1); - tmp2=select(bpL,#_2==-1); - excma=[]; - forall(1..(length(tmp1)), - excma=append(excma,[tmp1_#_1,tmp2_#_1]); - ); - tmp1=Indexall(bdy,","); - forall(tmp1,cma, - tmp=select(excma,(#_1<cma)&(cma<#_2)); - if(length(tmp)>0, - bdy=substring(bdy,0,cma-1)+"'"+substring(bdy,cma,length(bdy)); - ); - ); - tmp=indexof(bdy,"forall"); - if(tmp>0, - bdy=FortoR(bdy); - ); - tmp=indexof(bdy,"if("); - if(tmp>0, - bdy=IftoR(bdy); - ); - bdy=RSform(replace(bdy,"'",",")); - str=str+bdy+";"; - ); - ); - str=str+"return"+PaO()+bodylist_(length(bodylist))+")}"; - FUNLIST=append(FUNLIST,str); -); -////%Deffun end//// - ////%Inwindow start//// Inwindow(point):=Inwindow(point,[XMIN,XMAX],[YMIN,YMAX]); Inwindow(point,xrng,yrng):=( @@ -2935,7 +4841,7 @@ Windispg(gcLorg):=( //190125 parse(tmp); , if(tmp1==1, - tmp4=Dashlinedata(Nk,2.5,2.5,0); + tmp=tokenize(Nj_2_2,",");tmp4=Dashlinedata(Nk,tmp_1,tmp_2,0); //190512 forall(tmp4, tmp="connect("+Textformat(#,5)+tmp3+");"; parse(tmp); @@ -2948,9 +4854,12 @@ Windispg(gcLorg):=( //190125 ); ); ); - , - tmp="draw("+text(Nk_1)+opcindy+");"; // 14.12.31 - parse(tmp); + , + if(indexof(opcindy,"size")==0, //190425from + opcindy=opciny+",size->"+text(TenSize/TenSizeInit); + ); //190425to + tmp="draw("+text(Nk_1)+opcindy+");"; + parse(tmp); ); //190126to ); ); @@ -2961,242 +4870,6 @@ Windispg(gcLorg):=( //190125 ); ////%Windispg end//// -////%WritetoRS start//// -WritetoSci():=WritetoRS(); //17.12.19 -WritetoSci(Arg):=WritetoRS(Arg);//180619 -WritetoRS():=WritetoRS(FnameR);// 17.09.17from -WritetoRS(Arg):=( - regional(string,filename,shch,tmp1,tmp2); - if(isstring(Arg), - string=Arg; - if(indexof(string,".r")>0, - filename=string; - shch=""; - , - filename=FnameR; - shch=string; - ); - WritetoRS(filename,shch); - , - if(Arg<=1,WritetoRS(FnameR,"all")); - if(Arg==2,WritetoRS(FnameR,"sh")); - ); -); -WritetoRS(filename,shchoice):=( - regional(Plist,Pos,GrL,str,tmp,tmp1,tmp2,cmd,ns,spos,epos); - //help:WritetoRS(2); - println("Write to R "+filename); - Plist=[]; - Pnamelist=[]; - forall(remove(allpoints(),[SW,NE]), - if(indexof(#.name,"[")==0, //181106 - tmp=Lcrd(#); - tmp1=format(re(tmp_1),6);// 15.02.05 - tmp2=format(re(tmp_2),6); - tmp=#.name+"="+"c("+tmp1+","+tmp2+");"; - tmp=tmp+"Assignadd('"+#.name+"',"+#.name+")"; - Plist=append(Plist,tmp); - , - println("Remove the abnormal poiint "+#.name); //181106 - ); - ); - SCEOUTPUT = openfile(filename); - tmp=Datetime(); - println(SCEOUTPUT,"# date time="+tmp_1+" "+tmp_2); - if(isstring(CindyName), // 16.12.25from - if(length(CindyPathName)>0, - println(SCEOUTPUT, - "# path file="+CindyPathName+" "+CindyFileName+".cdy"); - , - println(SCEOUTPUT,""); - ); - , - println(SCEOUTPUT,""); - ); - if(iswindows(), - println(SCEOUTPUT,"options"+PaO()+"encoding='UTF-8')"); //190111 - ); - tmp1=replace(Dirwork,"\","/"); - if((iswindows())&(indexof(tmp1,"Users")>0), - tmp=Indexall(tmp1,"/"); - tmp2=substring(tmp1,tmp_3-1,length(tmp1)); - tmp1=substring(tmp1,0,tmp_3-1); - println(SCEOUTPUT,"Drv=shell"+PaO()+"'echo %HOMEDRIVE%',intern=TRUE)"); //190111 - println(SCEOUTPUT,"Drv=Drv[length"+PaO()+"Drv)]"); - println(SCEOUTPUT,"Hpath=shell"+PaO()+"'echo %HOMEPATH%',intern=TRUE)"); - println(SCEOUTPUT,"Hpath=Hpath[length"+PaO()+"Hpath)]"); - println(SCEOUTPUT,"Rest="+Dqq(tmp2)); - println(SCEOUTPUT,"Path=paste"+PaO()+"Drv,Hpath,Rest,sep='')"); - println(SCEOUTPUT,"Path=gsub"+PaO()+"'\\','/',Path,fixed=TRUE)"); //180610 - println(SCEOUTPUT,"setwd"+PaO()+"Path)"); - , - println(SCEOUTPUT,"setwd"+PaO()+"'"+tmp1+"')"); - );//180409to - tmp=replace(Libname,"\","/"); //17.09.24from - println(SCEOUTPUT,"source"+PaO()+"'"+tmp+".r')"); //181213 - if((indexof(PathT,"pdflatex")>0)%(indexof(PathT,"lualatex")>0), - if(GPACK=="tpic",GPACK="pict2e"); - ); - if(GPACK=="pict2e", // 180817 - tmp=replace(tmp+"_rep2e","\","/"); - println(SCEOUTPUT,"source('"+tmp+".r')"); - ); - if(GPACK=="tikz", //181213from - tmp=replace(tmp+"_reptikz","\","/"); - println(SCEOUTPUT,"source"+PaO()+"'"+tmp+".r')"); - ); //181213to - println(SCEOUTPUT,"Ketinit"+PPa("")); - println(SCEOUTPUT,"cat"+PaO()+"ThisVersion,'\n')"); - println(SCEOUTPUT,"Fnametex='"+Fnametex+"'"); - println(SCEOUTPUT,"FnameR='"+FnameR+"'"); - println(SCEOUTPUT,"Fnameout='"+Fnameout+"'"); - println(SCEOUTPUT,"arccos=acos; arcsin=asin; arctan=atan"); - println(SCEOUTPUT,"Acos<- function"+PPa("x")+"{acos"+PaO()+"max"+PaO()+"-1,min"+PaO()+"1,x)))}"); - println(SCEOUTPUT,"Asin<- function"+PPa("x")+"{asin"+PaO()+"max"+PaO()+"-1,min"+PaO()+"1,x)))}"); - println(SCEOUTPUT,"Atan=atan"); - println(SCEOUTPUT,"Sqr<- function"+PPa("x")+"{if"+PaO()+"x>=0){sqrt"+PaO()+"x)}else{0}}"); - println(SCEOUTPUT,"Factorial=factorial"); - println(SCEOUTPUT,"Norm<- function"+PPa("x")+"{norm"+PaO()+"matrix"+PaO()+"x,nrow=1),"+Dqq("2")+")}"); - println(SCEOUTPUT,""); - forall(COM0thlist, - if(indexof(#,"Texcom")==0, //17.09.22 - println(SCEOUTPUT,RSform(#)); - , - println(SCEOUTPUT,#); - ); - ); - println(SCEOUTPUT, - "Setwindow(c"+PaO()+XMIN+","+XMAX+"), c"+PaO()+YMIN+","+YMAX+"))"); - forall(Plist, - println(SCEOUTPUT,#); - ); - VLIST=select(VLIST,substring(#_1,0,1)!="["); //181107 - forall(VLIST, - tmp=#_1; - tmp1=#_2; - if(!isstring(tmp1), - if(islist(tmp1), - tmp2="["; - forall(tmp1, - tmp2=tmp2+Textformat(#,6)+","; - ); - tmp1=substring(tmp2,0,length(tmp2)-1)+"]"; - , - tmp1=format(tmp1,6); - ); - ); - tmp1=RSform(tmp1); - print(SCEOUTPUT,tmp+"="+tmp1+";"); //17.09.22 -// tmp=substring(tmp,0,length(tmp)-1); - println(SCEOUTPUT,"Assignadd"+PaO()+"'"+tmp+"',"+tmp+")"); - ); - forall(FUNLIST, - println(SCEOUTPUT,#); - ); - forall(GLIST, //no ketjs on - println(SCEOUTPUT,RSform(#)); - ); //no ketjs off - tmp=text(Pnamelist); - tmp=replace(tmp,"[","list"+PaO()); - Pnamelist=replace(tmp,"]",")"); - println(SCEOUTPUT,"PtL="+Pnamelist); - tmp=select(GCLIST,#_2==-1); - GrL=apply(tmp,#_1); - tmp=text(GrL); - tmp=replace(tmp,"[","list"+PaO()); - tmp=replace(tmp,"]",")"); - println(SCEOUTPUT,"GrL="+tmp); - tmp1=""; - if(length(tmp1)>0, - tmp1="WriteOutData"+PaO()+"Fnameout"+tmp1+");"; - println(SCEOUTPUT,tmp1); - ); - forall(COM1stlist, - if(indexof(#,"Texcom")==0, //17.09.22 - println(SCEOUTPUT,RSform(#)); - , - println(SCEOUTPUT,#); - ); - ); - println(SCEOUTPUT,""); - println(SCEOUTPUT,"# Windisp"+PPa("GrL")); - println(SCEOUTPUT,""); - println(SCEOUTPUT,"if"+PaO()+"1==1){"); - println(SCEOUTPUT,""); - tmp1=replace(Dirwork,"\","/"); //180408to - if((iswindows())&(indexof(tmp1,"Users")>0), - println(SCEOUTPUT,"Path=paste"+PaO()+"Path,"+Dqq("/"+Fnametex)+",sep='')"); - tmp="Openfile(Path,'"+ULEN+"'"; - , - tmp="Openfile('"+tmp1+"/"+Fnametex+"','"+ULEN+"'"; - ); - tmp=tmp+",'Cdy="+Cindyname()+".cdy"; //180404 - tmp=replace(tmp,"\","\\"); - println(SCEOUTPUT,tmp+"')"); - forall(COM2ndlistb, //180613from - if(indexof(#,"Texcom")==0, - println(SCEOUTPUT,RSform(#)); - , - println(SCEOUTPUT,#); - ); - );//180613to - forall(COM2ndlist,cmd, - tmp=substring(cmd,0,4); - if(contains(["Lett","Expr"],tmp), //180721from - tmp1=Indexall(cmd,Dq); - tmp2=length(tmp1)/4; - str=""; ns=0; - forall(tmp2, - spos=tmp1_(4*#-1); epos=tmp1_(4*#); - str=str+RSform(substring(cmd,ns,spos-1)); - str=str+substring(cmd,spos-1,epos); - ns=epos; - ); - str=str+substring(cmd,ns,length(cmd)); - println(SCEOUTPUT,str); - , - if(indexof(cmd,"Texcom")==0, - println(SCEOUTPUT,RSform(cmd)); - , - println(SCEOUTPUT,cmd); - ); - ); //180721to - ); - if(length(GrL)>0, - println(SCEOUTPUT," Drwline"+PPa("GrL")); - ); - // println(SCEOUTPUT,"Closefile"+PaO()+"'"+ADDAXES+"')"); //181224(2line) - println(SCEOUTPUT,"Closefile"+PaO()+""+Dqq("0")+")"); - println(SCEOUTPUT,""); - println(SCEOUTPUT,"}"); - if(shchoice=="sh", - println(SCEOUTPUT,""); - println(SCEOUTPUT,"quit"+PPa("")); - , - println(SCEOUTPUT,""); - println(SCEOUTPUT,"#quit"+PPa("")); - ); - closefile(SCEOUTPUT); - if(iswindows(), //180513from - SCEOUTPUT = openfile("execsrc.r");//180514 - tmp1=replace(Dirwork,"\","/"); - if(indexof(tmp1,"Users")>0, - tmp=Indexall(tmp1,"/"); - tmp2=substring(tmp1,tmp_3-1,length(tmp1)); - tmp1=substring(tmp1,0,tmp_3-1); - println(SCEOUTPUT,"Drv=shell"+PaO()+"'echo %HOMEDRIVE%',intern=TRUE)"); - println(SCEOUTPUT,"Drv=Drv[length"+PaO()+"Drv)]"); - println(SCEOUTPUT,"Hpath=shell"+PaO()+"'echo %HOMEPATH%',intern=TRUE)"); - println(SCEOUTPUT,"Hpath=Hpath[length"+PaO()+"Hpath)]"); - println(SCEOUTPUT,"Rest="+Dqq(tmp2)); - println(SCEOUTPUT,"Path=paste"+PaO()+"Drv,Hpath,Rest,sep='')"); - println(SCEOUTPUT,"setwd"+PaO()+"Path)"); - println(SCEOUTPUT,"source"+PaO()+"'"+filename+"',encoding='UTF-8')"); - ); - closefile(SCEOUTPUT); - ); //180513to -); -////%WritetoRS end//// ////%Extractdata start//// Extractdata(name):=Extractdata(1,name,[]); @@ -3245,7 +4918,7 @@ Extractdata(number,name,options):=( if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on Texcom("{");Com2nd("Setcolor("+color+")");//180722 ); //no ketjs off - Ltype=GetLinestyle(text(Noflg)+Ltype,name); + Ltype=Getlinestyle(text(Noflg)+Ltype,name); if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on Texcom("}");//180722 ); //no ketjs off @@ -3258,8 +4931,8 @@ Extractdata(number,name,options):=( ); ////%Extractdata end//// -////%RemoveOut start//// -RemoveOut(pltlist):=( +////%Removeout start//// +Removeout(pltlist):=( regional(name,tmp,tmp1,tmp2); forall(pltlist,name, tmp1=[]; @@ -3270,604 +4943,7 @@ RemoveOut(pltlist):=( GOUTLIST=tmp1; ); ); -////%RemoveOut end//// - -////%ReadOutData start//// -ReadOutData():=ReadOutData(Fnameout); -ReadOutData(filename):=ReadOutData("",filename); //16.03.07 -ReadOutData(Arg1,Arg2):=( //181030from - if(islist(Arg2), - ReadOutData("",Arg1,Arg2); - , - ReadOutData(Arg1,Arg2,[]); - ); -); //181030to -ReadOutData(pathorg,filenameorg,optionsorg):=( -//help:ReadOutData(); -//help:ReadOutData("file.txt"); -//help:ReadOutData("/datafolder","file.txt"); -//help:ReadOutdata(options=["Disp=n(/y)]"); - regional(options,path,filename,varname,varL,ptL,pts,tmp,tmp1,tmp2,tmp3,tmp4, - nmbr,cmdall,cmd,cmdorg,outdt,goutdt,eqL,dispflg); - options=optionsorg; - dispflg=1; - tmp=Divoptions(options); //181024from - eqL=tmp_5; - forall(eqL, - tmp=Strsplit(#,"="); - tmp1=substring(tmp_1,0,1); tmp1=Toupper(tmp1); - tmp2=substring(tmp_2,0,1); tmp2=Toupper(tmp2); - if(tmp1=="D", - if(tmp2=="N",dispflg=0); - options=remove(options,[#]); //181030 - ); - ); //181024to - path=pathorg; //16.03.07 from - if(length(path)>0, - setdirectory(path); - if(indexof(path,"\")>0,tmp1="\",tmp1="/"); - tmp=substring(path,length(path)-1,length(path)); - if(tmp!=tmp1,path=path+tmp1); - ); //16.03.07to - filename=filenameorg; // 16.04.17 - if(indexof(filename,".")==0,filename=filename+".txt"); - tmp=load(filename); - cmdall=tokenize(tmp,"//"); - varname=cmdall_1; - cmdall=cmdall_(2..length(cmdall)); - outdt=[]; - varL=[varname]; - ptL=[]; - forall(cmdall,cmdorg, - cmd=replace(cmdorg,LFmark,""); - if(length(cmd)>0, - if(cmd=="start" % cmd=="end" % substring(cmd,0,1)=="[", - if(cmd=="start", - pts=[]; - ); - if(cmd=="end", - ptL=append(ptL,pts); - ); - if(substring(cmd,0,1)=="[", - tmp1=parse(cmd); - if(length(tmp1_1)==2, - tmp1=apply(tmp1,Pcrd(#)); - ); - pts=concat(pts,tmp1); - ); - , - if(length(ptL)>0, - if(length(ptL)==1, - ptL=ptL_1; - tmp=apply(ptL,Textformat(#,6)); - , - tmp="["; - forall(ptL,tmp1, - tmp=tmp+apply(tmp1,Textformat(#,6))+","; - ); - tmp=substring(tmp,0,length(tmp)-1)+"]"; - ); - , - tmp="[]"; - ); - parse(varname+"="+tmp); - outdt=append(outdt,ptL); - ptL=[]; - varname=cmd; - varL=append(varL,varname); - ); - ); - ); - if(length(ptL)>0, - if(length(ptL)==1, - ptL=ptL_1; - tmp=apply(ptL,Textformat(#,6)); - , - tmp="["; - forall(ptL,tmp1, - tmp=tmp+apply(tmp1,Textformat(#,6))+","; - ); - tmp=substring(tmp,0,length(tmp)-1)+"]"; - ); - , - tmp="[]"; - ); - parse(varname+"="+tmp); - outdt=append(outdt,ptL); - if(path=="",tmp=filename,tmp=path+filename); //16.03.07 - GOUTLIST=append(GOUTLIST,[tmp,varL]); - if(length(path)>0, // 16.03.09 - setdirectory(Dirwork); // 16.03.07 - ); - print("readoutdata from "+tmp+" : "); - if(dispflg==1, //181024from - println(varL); - , - println(""); - ); //181024to - varL; -); -////%ReadOutData end//// - -////%WriteOutData start//// -WriteOutData(filename,ptlist):=( -//help:WriteOutData("file.txt",["g1",gr1,"sg",sgAB]); -//help:Writeoutdata("file.txt",["g1",gr1,"sg",sgAB]); - regional(nn,Gname,Gdata,Str,Gstr,Gj,Pt,Flg,tmp,tmp1,loopend); - Flg=0; - if(isstring(ptlist_(length(ptlist))), - Flg=1; - ); - SCEOUTPUT = openfile(filename); - if(Flg==0, - loopend=length(ptlist)/2; - , - loopend=length(ptlist); - ); - Gstr="["; - forall(1..loopend,nn, - if(Flg==0, - Gname=ptlist_(2*nn-1); - , - Gname=ptlist_nn; - ); - Gstr=Gstr+Gname+","; - println(SCEOUTPUT,Gname+"//"); - if(Flg==0, - Gdata=ptlist_(2*nn); - , - Gdata=parse(Gname); - ); - Gdata=Flattenlist(Gdata); - if(Measuredepth(Gdata)==1,Gdata=[Gdata]); - forall(Gdata,Gj, - println(SCEOUTPUT,"start//"); - Str=""; - forall(Gj,Pt, - if(length(Str)>0, - Str=Str+"," - ); - Str=Str+"["+format(Pt_1,5)+","; - Str=Str+format(Pt_2,5); - if(length(Pt)<3, - Str=Str+"]"; - , - Str=Str+","+format(Pt_3,5)+"]"; - ); - if(length(Str)>80, - println(SCEOUTPUT,"["+Str+"]//"); - Str=""; - ); - ); - if(length(Str)>0, - println(SCEOUTPUT,"["+Str+"]//"); - ); - if((nn==loopend) & (Gj==Gdata_(length(Gdata))), - println(SCEOUTPUT,"end////"); - , - println(SCEOUTPUT,"end//"); - ); - ); - ); - closefile(SCEOUTPUT); - Gstr=substring(Gstr,0,length(Gstr)-1)+"]"; - println("writeoutdata "+filename+":"+Gstr); -); -////%WriteOutData end//// - -////%Makeshell start//// -Makeshell():=( - if(length(Texmain)>0, - Texparent=Texmain; - ); - if(length(Texparent)>0, - Makeshell(Texparent); - if(length(FigPdfList)>0, - SCEOUTPUT=openfile(Texparent+".tex"); - forall(FigPdfList,println(SCEOUTPUT,#)); - closefile(SCEOUTPUT); - ); - , - Makeshell(Fhead+"main"); - ); -); -Makeshell(texmainfile):=Makeshell(texmainfile,"rtv"); -Makeshell(texmainfile,flow):=( - regional(parent,tmp,tmp1,tmp2,tmp3,flg,tex,path,shnm); - parent=Dirwork+Shellparent; // 16.05.29 - kc():=( - println("kc : "+kc(Dirwork+Shellparent,Mackc+Dirlib,Fnametex)); // 16.06.04,06.07 - ); - tmp1=""; -// tmp2=parent; - flg=0; - forall(reverse(1..length(parent)), - if(flg==0, - tmp=substring(parent,#-1,#); - if(tmp=="/" % tmp=="\", // 14.01.15 - tmp1=substring(parent,0,#-1); - tmp2=substring(parent,#,length(parent)); - flg=1; - ); - ); - ); - if(length(tmp1)>0, - setdirectory(tmp1); - ); - SCEOUTPUT = openfile(tmp2); - println(SCEOUTPUT,"#!/bin/sh"); - println(SCEOUTPUT,"cd "+Dq+Dirwork+Dq); // 15.07.16 - tmp1=" "+Dq+Fhead+Dq+" "+Dq+texmainfile+Dq; // 15.12.11 - flg=0; - forall(reverse(1..length(PathT)), - if(flg==0, - if(substring(PathT,#-1,#)=="/", - tex=substring(PathT,#,length(PathT)); - path=substring(PathT,0,#-1); - flg=1; - ); - ); - ); - if(flg==0, // 17.10.13[Norbert] - tex=PathT; - path=""; - ); - if(indexof(flow,"r")>0, - tmp=Dq+PathR+Dq+" --vanilla --slave < "+Fhead+".r"; - // 17.09.14 - println(SCEOUTPUT,tmp); - ); - if(tex=="latex" % tex=="platex" % tex=="uplatex", //17.08.13 - tmp=Dq+PathT+Dq+" "+texmainfile+".tex"; - println(SCEOUTPUT,tmp); - if(indexof(flow,"tt")>0,println(SCEOUTPUT,tmp)); //17.10.14 - tmp=replace(Dq+PathT+Dq,tex,"dvipdfmx")+" "+texmainfile+".dvi"; - println(SCEOUTPUT,tmp); - tmp="rm "+texmainfile+".dvi"; - println(SCEOUTPUT,tmp); - ); - if(tex=="xelatex", - tmp="export PATH="+path+":${PATH}"; - println(SCEOUTPUT,tmp); - tmp="xelatex"+" "+texmainfile+".tex"; - println(SCEOUTPUT,tmp); - if(indexof(flow,"tt")>0,println(SCEOUTPUT,tmp)); //17.10.14 - tmp="rm "+texmainfile+".dvi"; - println(SCEOUTPUT,tmp); - ); - if(tex=="pdflatex" % tex=="pdftex",//16.11.22from - tmp=Dq+PathT+Dq+" "+texmainfile+".tex"; - println(SCEOUTPUT,tmp); - if(indexof(flow,"tt")>0,println(SCEOUTPUT,tmp)); //17.10.14 - );//16.11.22until - if(tex=="lualatex",//16.12.16 - tmp=Dq+PathT+Dq+" "+texmainfile+".tex"; - println(SCEOUTPUT,tmp); - if(indexof(flow,"tt")>0,println(SCEOUTPUT,tmp)); //17.10.14 - );//16.12.16 - if(!isstring(Pathpdf), - tmp="preview"; - , - tmp=Pathpdf; - ); - if(tmp=="preview" % tmp=="skim", // 16.09.09from,16.10.20 - tmp="open -a "+Dq+tmp+Dq+" "+texmainfile+".pdf"; - , - tmp=Dq+tmp+Dq+" "+texmainfile+".pdf"; - );// 16.09.09until - println(SCEOUTPUT,tmp); // 16.07.21until - println(SCEOUTPUT,"exit 0"); - closefile(SCEOUTPUT); - setdirectory(Dirwork); -); -////%Makeshell end//// - -////%Convsjiswin start//// -Convsjiswin(dir,fname,ext):=( //180401 - regional(ctr,flg,mx,tmp); - mx=200; - ctr=0;flg=0; - nkfwin(dir,fname,ext); - while((!isexists(dir,fname+".out"))&(ctr<mx), - wait(100);ctr=ctr+1; - ); - if(ctr==mx,flg=1); - if(flg==0, - wait(100);ctr=0; - nkfcpdel(dir,fname,ext); - while((isexists(dir,fname+".out"))&(ctr<mx), - wait(100);ctr=ctr+1; - ); - if(ctr==mx,flg=2); - ); - tmp=dir+pathsep()+fname+"."+ext; - if(flg==0, - tmp= - println(tmp+" converted"); - , - println(tmp+" not converted "+text(flg)); - ); -); -////%Convsjiswin end//// - -////%Makebat start//// -Makebat():=( - if(length(Texmain)>0, - Texparent=Texmain; - ); - if(length(Texparent)>0, - Makebat(Texparent); - if(length(FigPdfList)>0, - SCEOUTPUT=openfile(Texparent+".tex"); - forall(FigPdfList,println(SCEOUTPUT,#)); - closefile(SCEOUTPUT); - ); - , - Makebat(Fhead+"main"); - ); -); -Makebat(texmainfile):=Makebat(texmainfile,"rtv"); -Makebat(texmainfile,flow):=( - regional(drive,fname,tmp,tmp1,tmp2,tmp3,flg,tex,path,batnm); - drive="C:"; - fname=Dirwork+Batparent; - kc():=( - println("kc : "+kc(Dirwork+Batparent,Dirlib,Fnametex)); // 16.06.04 - ); - tmp=indexof(fname,":"); - if(tmp>0, - drive=substring(fname,0,tmp); - fname=substring(fname,tmp,length(fname)); - ); - tmp1=""; - tmp2=fname; - flg=0; - forall(reverse(1..length(fname)), - if(flg==0, - tmp=substring(fname,#-1,#); - if(tmp=="/" % tmp=="\" % tmp=="\", // 14.01.15 - tmp1=substring(fname,0,#-1); - tmp2=substring(fname,#,length(fname)); - flg=1; - ); - ); - ); - if(length(tmp1)>0, - setdirectory(drive+tmp1); - ); - SCEOUTPUT = openfile(tmp2); - fname=replace(Dirwork,"/","\"); - tmp=indexof(fname,":"); - if(tmp>0, - drive=substring(Dirwork,0,tmp); - fname=substring(Dirwork,tmp,length(Dirwork)); - println(SCEOUTPUT,drive); - ); - tmp=Dirwork;//180408form - if(iswindows(), - if((isincludefull(Dirwork))&(isexists(Dirwork,"sjis.txt")), - import("sjis.txt"); - ); - ); -// tmp=replace(tmp,"\","/"); //180408 -// println(SCEOUTPUT,"cd "+Dq+tmp+Dq); //180408 - tmp1=indexof(fname,"Users");//180409from - tmp2=indexof(fname,Homehead); - if((tmp1>0)%(tmp2>0), - if(tmp1>0, - fname=substring(fname,tmp1+length("Users")-1,length(fname)); - , - fname=substring(fname,tmp2+length(Homehead)-1,length(fname)); - ); - tmp=Indexall(fname,"\");//180403from - fname=substring(fname,tmp_2,length(fname)); - fname="%HOMEPATH%\"+fname; - );//180403to - println(SCEOUTPUT,"cd "+Dq+fname+Dq);//180409to - flg=0; - tmp=replace(PathT,"\","/"); - forall(reverse(1..length(PathT)), - if(flg==0, - if(substring(tmp,#-1,#)=="/", - tex=substring(PathT,#,length(PathT)); - path=substring(PathT,0,#-1); - flg=1; - ); - ); - ); - if(flg==0, // 17.10.13[Norbert] - tex=PathT; - path=""; - ); - if(indexof(flow,"r")>0, - if(indexof(Dirwork,"Users")>0, //180917from - tmp=Dq+PathR+"\R"+Dq+" --vanilla --slave < execsrc.r";//180514 - , - tmp=Dq+PathR+"\R"+Dq+" --vanilla --slave < "+Fhead+".r"; - ); //180917to - println(SCEOUTPUT,tmp); - ); - if(tex=="latex" % tex=="platex" % tex=="uplatex", //17.08.13 - tmp=Dq+PathT+Dq+" "+texmainfile+".tex"; - println(SCEOUTPUT,tmp); - if(indexof(flow,"tt")>0,println(SCEOUTPUT,tmp)); //17.10.14 - tmp=replace(Dq+PathT+Dq,tex,"dvipdfmx")+" "+texmainfile+".dvi"; - println(SCEOUTPUT,tmp); - tmp="del "+texmainfile+".dvi"; - println(SCEOUTPUT,tmp); - ); - if(tex=="xelatex", - tmp="set Path = %Path%;"+Dq+path+Dq; - println(SCEOUTPUT,tmp); - if(indexof(flow,"tt")>0,println(SCEOUTPUT,tmp)); //17.10.14 - tmp="xelatex"+" "+texmainfile+".tex"; - println(SCEOUTPUT,tmp); - tmp="del "+texmainfile+".dvi"; - println(SCEOUTPUT,tmp); - ); - if(tex=="pdflatex" % tex=="pdftex",//16.11.22from - tmp=Dq+PathT+Dq+" "+texmainfile+".tex"; - println(SCEOUTPUT,tmp); - if(indexof(flow,"tt")>0,println(SCEOUTPUT,tmp)); //17.10.14 - );//16.11.22until - if(tex=="lualatex",//16.12.16 - tmp=Dq+PathT+Dq+" "+texmainfile+".tex"; - println(SCEOUTPUT,tmp); - if(indexof(flow,"tt")>0,println(SCEOUTPUT,tmp)); //17.10.14 - );//16.12.16 - if(!isstring(Pathpdf), - tmp=indexof(PathS,"\scilab");// 15.12.12 - tmp=substring(PathS,0,tmp-1)+"\SumatraPDF\SumatraPDF.exe"; - , - tmp=Pathpdf; - ); - tmp=Dq+tmp+Dq+" "+texmainfile+".pdf"; - println(SCEOUTPUT,tmp); - println(SCEOUTPUT,"exit 0"); - closefile(SCEOUTPUT); - if(indexof(Dirwork,":")==0, // 14.01.15 - drive="C:"; - , - drive=""; - ); - setdirectory(drive+Dirwork); -); -////%Makebat end//// - -////%Addpackage start//// -Addpackage(packorg):=( -//help:Addpackage("bm"); -//help:Addpackage(["bm","enumerate"]); -//help:Addpackage(["bm","[c]{somepackage}"]); - regional(packL,tmp); - packL=packorg; //17.06.25from - if(!islist(packL),packL=[packL]); - packL=apply(packL,replace(#,"\","/")); - forall(1..(length(packL)), - tmp=packL_#; - if(substring(tmp,0,11)=="ketpicstyle", - tmp=replace(Dirhead+"/"+tmp,"\","/"); - ); - if(indexof(tmp,"[")==0, - packL_#="{"+tmp+"}"; - ); - ); - ADDPACK=concat(ADDPACK,packL); //17.06.25to -); -////%Addpackage end//// - -////%Usegraphics start//// -Usegraphics(gpack):=( //180817 -//help:Usegraphics("pict2e"); - if(!contains(ADDPACK,gpack), - if(gpack =="tikz", //181213from - Addpackage(["pgf","tikz"]); //190101 - , - Addpackage([gpack]); - ); //181213to - ); - GPACK=gpack; -); -////%Usegraphics end//// - -////%Viewtex start//// -Viewtex():=( - regional(texfile,tmp,tmp1,sep); - texfile=Fhead+"main"; -// if(iswindows(),sep="\",sep="/"); // 17.04.07 -// sep="/"; - SCEOUTPUT=openfile(texfile+".tex"); - tmp="\documentclass{article}"; // 16.06.09from - if(indexof(PathT,"platex")>0, - if(GPACK=="tikz", - tmp="\documentclass[dvipdfmx]{article}"; // 190101 - , - tmp=replace(tmp,"article","jarticle"); - if(indexof(PathT,"uplatex")>0, //17.08.13from - tmp=replace(tmp,"jarticle","ujarticle"); - );//17.08.13to - ); - ); // 16.06.09to - println(SCEOUTPUT,tmp); - if((indexof(PathT,"pdflatex")>0)%(indexof(PathT,"lualatex")>0), //181213from - if(GPACK=="tpic", GPACK="pict2e"); - ); - if(GPACK=="tpic", - tmp=replace(Dirhead,"\","/"); - println(SCEOUTPUT,"\usepackage{ketpic,ketlayer}"); - ); - if(GPACK=="pict2e", - println(SCEOUTPUT,"\usepackage{pict2e}"); - println(SCEOUTPUT,"\usepackage{ketpic2e,ketlayer2e}"); - if(indexof(PathT,"lualatex")>0, - println(SCEOUTPUT,"\usepackage{luatexja}"); - ); - ); - if(GPACK=="tikz", -// println(SCEOUTPUT,"\usepackage{pgf,tikz}");//190101 - println(SCEOUTPUT,"\usepackage{ketpic,ketlayer}"); - if(indexof(PathT,"lualatex")>0, - println(SCEOUTPUT,"\usepackage{luatexja}"); - ); - );//181213to - println(SCEOUTPUT,"\usepackage{amsmath,amssymb}"); - println(SCEOUTPUT,"\usepackage{graphicx}"); - println(SCEOUTPUT,"\usepackage{color}"); - forall(ADDPACK, // 16.05.16from - println(SCEOUTPUT,"\usepackage"+#); //17.05.25 - );// 16.05.16until - println(SCEOUTPUT,""); -// println(SCEOUTPUT,"\def\ketcindy{{K\kern-.20em%"); // deleted 16.11.27,recovered11.29 redeleted17.04.07 -// println(SCEOUTPUT,"\lower.5ex\hbox{E}\kern-.125em{TCindy}}}"); -// println(SCEOUTPUT,""); - println(SCEOUTPUT,"\setmargin{20}{20}{20}{20}"); - println(SCEOUTPUT,""); - println(SCEOUTPUT,"\begin{document}"); - println(SCEOUTPUT,""); - println(SCEOUTPUT,"\verb|"+Fhead+"| by \ketcindy");// 16.01.12, 18, 16.04.08 -// println(SCEOUTPUT,"\verb|"+Fhead+"| by KeTCindy");// 16.11.29 temporarily - println(SCEOUTPUT,"\vspace{5mm}"); - println(SCEOUTPUT,""); - println(SCEOUTPUT,"\input{"+Fhead+".tex}"); - println(SCEOUTPUT,""); - println(SCEOUTPUT,"\end{document}"); - closefile(SCEOUTPUT); - if(iswindows(), - kc():=( - println("kc : "+kc(Dirwork+Batparent,Dirlib,Fnametex)); // 16.06.04 - ); - Makebat(texfile); - , - kc():=( - println("kc : "+kc(Dirwork+Shellparent,Mackc+Dirlib,Fnametex)); // 16.06.04 - ); - Makeshell(texfile); - ); - WritetoRS(2); //17.09.19 -); -////%Viewtex end//// - -////%Viewparent start//// -Viewparent():=( //17.04.13 - if(!isexists(Dirwork,Texparent+".tex"), - if(isstring(Texparent), - drawtext(mouse().xy,Texparent+".tex not exist", - size->24,color->[1,0,0]); - , - drawtext(mouse().xy,"Texparent not defined", - size->24,color->[1,0,0]); - ); - , - if(iswindows(), - Makebat(); - , - Makeshell(); - ); - WritetoRS(2); //17.09.29 - kc(); - ); -); -////%Viewparent end//// +////%Removeout end//// ////%Makecmdlist start//// Makecmdlist(libname):=( @@ -3968,127 +5044,6 @@ Lessstr(st1,st2):=( ); ////%Lessstr end//// -////%Figpdf start//// -Figpdf():=Figpdf(Texparent,[]); -Figpdf(Arg1):=( - if(isstring(Arg1), - Figpdf(Arg1,[]); - , - Figpdf(Texparent,Arg1); - ); -); -Figpdf(fnameorg,optionorg):=( -//help:Figpdf(); -//help:Figpdf([10,,10,,[0,2] ]);(margin(4),move) -//help:Figpdf([[0,0]]);(move) -//help:Figpdf(options=[5,5,5,5,[0,0]]]); - regional(options,fname,mar,pos,dp,sc,tmp,tmp1,tmp2,sep); - fname=fnameorg; - if(indexof(fnameorg,".")==0, - fname=fnameorg+".tex"; - ); - tmp=apply(optionorg,if(isstring(#),parse("["+#+"]"),#)); // 16.04.07 - tmp=select(tmp,#!=[]); - options=optionorg;//16.11.08from -// mar=[5,5,5,5]; - dp=[0,-3]; - tmp=select(options,islist(#)); - if(length(tmp)>0, - dp=tmp_1; - options=remove(options,tmp); - ); - tmp=4-length(options); - tmp1=apply(1..tmp,5); - mar=concat(options,tmp1); - mar=apply(mar,if(length(#)==0,5,#));//16.11.08until - pos=[mar_1+dp_1,mar_3+dp_2]; - sc=10; - tmp=indexof(ULEN,"cm"); - if(tmp>0, - tmp1=Removespace(substring(ULEN,0,tmp-1)); - sc=parse(tmp1)*10; - ); - tmp=indexof(ULEN,"mm"); - if(tmp>0, - tmp1=Removespace(substring(ULEN,0,tmp-1)); - sc=parse(tmp1); - ); - tmp="\documentclass{article}"; // 16.06.09from - if(indexof(PathT,"platex")>0, - tmp=replace(tmp,"article","jarticle"); - if(indexof(PathT,"uplatex")>0, //17.08.13from - tmp=replace(tmp,"jarticle","ujarticle"); - );//17.08.13until - ); - FigPdfList=append(FigPdfList,tmp); // 16.06.09until - tmp1="\special{papersize=W mm,H mm}"; - tmp=(XMAX-XMIN)*sc+(mar_1+mar_2); - tmp1=replace(tmp1,"W",text(tmp)); - tmp=(YMAX-YMIN)*sc+(mar_3+mar_4); - tmp1=replace(tmp1,"H",text(tmp)); -// if(iswindows(),sep="\",sep="/");//17.04.08 -// sep="/"; - FigPdfList=append(FigPdfList,tmp1); - if(indexof(PathT,"pdflatex")+indexof(PathT,"lualatex")>0, //17.11.05from - FigPdfList=append(FigPdfList, - "\usepackage{pict2e}"); - tmp=replace(Dirhead,"\","/"); - tmp=replace(tmp,"scripts","tex/latex"); - if(isexists(tmp,""), - FigPdfList=append(FigPdfList, - "\usepackage{ketpic2e,ketlayer2e}"); - , - tmp=replace(Dirhead+"/ketpicstyle","\","/"); - FigPdfList=concat(FigPdfList, - ["\usepackage{"+tmp+"/ketpic2e}", - "\usepackage{"+tmp+"/ketlayer2e}"]); - ); - , - tmp=replace(Dirhead,"\","/"); - tmp=replace(tmp,"scripts","tex/latex"); - if(isexists(tmp,""), - FigPdfList=append(FigPdfList, - "\usepackage{ketpic,ketlayer}"); - , - tmp=replace(Dirhead+"/ketpicstyle","\","/"); - FigPdfList=concat(FigPdfList, - ["\usepackage{"+tmp+"/ketpic}", - "\usepackage{"+tmp+"/ketlayer}"]); - ); - );//17.11.05until - FigPdfList=append(FigPdfList, - "\usepackage{amsmath,amssymb}"); - FigPdfList=append(FigPdfList, - "\usepackage{graphicx,color}"); - forall(ADDPACK, // 16.05.16from - tmp1="\usepackage"+#; //17.07.10 - FigPdfList=append(FigPdfList,tmp1); // 16.09.05until - ); - FigPdfList=append(FigPdfList,""); - FigPdfList=append(FigPdfList, - "\setmargin{0}{0}{0}{0}"); - FigPdfList=append(FigPdfList,""); - FigPdfList=append(FigPdfList,"\begin{document}"); - FigPdfList=append(FigPdfList,""); - FigPdfList=append(FigPdfList, - "\begin{layer}{50}{0}"); - tmp1="\putnotese{X}{Y}{\input{"; - tmp1=replace(tmp1,"X",text(pos_1)); - tmp1=replace(tmp1,"Y",text(pos_2)); - FigPdfList=append(FigPdfList,tmp1+Fhead+".tex}}"); - FigPdfList=append(FigPdfList,""); - FigPdfList=append(FigPdfList,"\end{layer}"); - FigPdfList=append(FigPdfList,""); - FigPdfList=append(FigPdfList,"\end{document}"); - if(fnameorg!=Texparent, - SCEOUTPUT=openfile(fname); - forall(FigPdfList,println(SCEOUTPUT,#)); - closefile(SCEOUTPUT); - ); - FigPdfList; -); -////%Figpdf end//// - ////%Makehelplist start//// Makehelplist(libname):=( regional(cmdall,cmd,flg,lev,tmp,tmp1,out); @@ -4169,7 +5124,7 @@ Helplist(dir,files,help):=( setdirectory(dir); if(contains(files,"+"), tmp=remove(files,["+"]); - ketfiles=concat(["+basic1","+basic2","+out"],tmp); + ketfiles=concat(["+basic1","+basic2","+basic3","+out"],tmp); //190414 , ketfiles=files; ); @@ -4272,1355 +5227,6 @@ Helpkey(str1,str2):=( ); ////%Helpkey end//// -////%Slidework start//// -Slidework():=Slidework(Dirwork); // 16.06.10 -Slidework(dirorg):=( -//help:Slidework(directory); - regional(dir,tmp); // 16.06.25 - dir=replace(dirorg,unicode("000a"),""); // 16.06.25 - dir=replace(dir,"/",pathsep());//17.11.20from - dir=replace(dir,"\",pathsep()); - tmp=length(dir); - if(substring(dir,tmp-1,tmp)==pathsep(), - dir=substring(dir,0,tmp-1); - );//17.11.20until - if(isexists(dir,""), // 16.12.20 - Changework(dir); - println(makedir(dir,"fig"));//17.11.23 - tmp=dir+pathsep()+"fig"; //17.04.16from - Changework(tmp);// 17.02.19until - , - println(dir+ " not exists"); - ); -); -////%Slidework end//// - -////%Setslidemargin start//// -Setslidemargin(marginlist):=( // 180908 -//help:Setslidemargin([+5,-10]); - SlideMargin=marginlist; -); -////%Setslidemargin end//// - -////%Setslidepage start//// -Setslidepage():=( // 17.03.05 - regional(tmp1,tmp2,tmp3); - tmp1=["letterc","boxc","framec","shadowc","xpos","size"]; - tmp2=apply([1,2,4,5,7,8],SlideColorList_#); - tmp3=apply(1..(length(tmp1)),tmp1_#+"="+tmp2_#); - println(tmp3); -); -Setslidepage(list):=( // 16.12.22 -//help:Setslidepage([letterc,boxc,framec,shadowc,xpos,size]); - regional(numlist,tmp,tmp1,letterc,boxc,shadowc,mboxc); - letterc=[0.98,0.13,0,0.43]; boxc=[0,0.32,0.52,0]; - shadowc=[0,0,0,0.5]; mboxc="yellow"; - if(!islist(SlideColorList), - SlideColorList=[letterc,boxc,boxc,boxc,shadowc,shadowc,6,1.3, - letterc,mboxc,mboxc,mboxc,62,2,letterc]; - ); - numlist=[1,2,4,5,7,8]; - forall(1..(length(list)), - if(length(list_#)>0, - tmp=numlist_#; - SlideColorList_tmp=list_#; - ); - ); - SlideColorList_3=SlideColorList_2; - SlideColorList_6=SlideColorList_5; -); -////%Setslidepage end//// - -////%Setslidemain start//// -Setslidemain():=( // 17.03.05 - regional(tmp1,tmp2,tmp3); - tmp1=["letterc","boxc","framec","xpos","size"]; - tmp2=apply([9,10,12,13,14],SlideColorList_#); - tmp3=apply(1..(length(tmp1)),tmp1_#+"="+tmp2_#); - println(tmp3); -); -Setslidemain(list):=( // 16.12.22 -//help:Setslidemain([letterc,boxc,framec,xpos,size]); - regional(numlist,tmp,tmp1,letterc,boxc,shadowc,mboxc); - letterc=[0.98,0.13,0,0.43]; boxc=[0,0.32,0.52,0]; - shadowc=[0,0,0,0.5]; mboxc="yellow"; - if(!islist(SlideColorList), - SlideColorList=[letterc,boxc,boxc,boxc,shadowc,shadowc,6,1.3, - letterc,mboxc,mboxc,mboxc,62,2,letterc]; - ); - numlist=[9,10,12,13,14]; - forall(1..(length(list)), - if(length(list_#)>0, //17.01.04 - tmp=numlist_#; - SlideColorList_tmp=list_#; - ); - ); - SlideColorList_11=SlideColorList_10; -); -////%Setslidemain end//// - -////%Setslidebody start//// -Setslidebody():=( // 17.03.05 - regional(tmp1,tmp2,tmp3); - tmp1=["letterc","style","thindense"]; - tmp2=[SlideColorList_(15),BodyStyle,ThinDense]; - tmp3=apply(1..(length(tmp1)),tmp1_#+"="+tmp2_#); - println(tmp3); -); -Setslidebody(str):=( - regional(clr,style,thin); - if(isstring(str), - Setslidebody(str,"\Large\bf\boldmath",0.1); - , - if(length(str)==1,Setslidebody(str_1)); - if(length(str)==2,Setslidebody(str_1,str_2)); - if(length(str)==3,Setslidebody(str_1,str_2,str_3)); - ); -); -Setslidebody(str,Arg):=( //17.01.08 - if(isstring(Arg), - Setslidebody(str,Arg,0.1); - , - Setslidebody(str,"\Large\bf\boldmath",Arg); - ); -); -Setslidebody(str,style,density):=( // 16.12.22,17.01.06,01.08 -//help:Setslidebody(["black",,0]); -//help:Setslidebody(["blue","\Large\bf\boldmath",0.1]); - regional(numlist,tmp,tmp1,letterc,boxc,shadowc,mboxc); - letterc=[0.98,0.13,0,0.43]; boxc=[0,0.32,0.52,0]; - shadowc=[0,0,0,0.5]; mboxc="yellow"; - if(!islist(SlideColorList), - SlideColorList=[letterc,boxc,boxc,boxc,shadowc,shadowc,6,1.3, - letterc,mboxc,mboxc,mboxc,62,2,letterc]; - ); - if(length(str)>0,SlideColorList_(15)=str); - if(length(style)>0,BodyStyle=style); - ThinDense=density;//17.01.08 -); -////%Setslidebody end//// - -////%Setslidehyper start//// -Setslidehyper():=( 17.12.16from - Setslidehyper(["cl=true,lc=blue,fc=blue",125,70,1]); -); -Setslidehyper(Arg):=( - if(isstring(Arg), - Setslidehyper(Arg,["cl=true,lc=blue,fc=blue",125,70,1]); - , - Setslidehyper("",Arg); - ); -); -Setslidehyper(driverorg,options):=( -//help:Setslidehyper(); -//help:Setslidehyper("dvipdfmx",["cl=true,lc=blue,fc=blue","Pos=[125,73]","Size=1"]); - regional(driver,eqL,reL,stL,,str,tmp,tmp1,tmp2); - driver=driverorg; - if(length(driver)==0, - if(indexof(PathT,"pdflatex")+indexof(PathT,"lualatex")==0, - driver="dvipdfmx"; - ); - ); - tmp=Divoptions(options); - eqL=tmp_5; - reL=tmp_6; - stL=tmp_7; - tmp1=select(eqL,length(Indexall(#,"="))>1); //180813from - eqL=remove(eqL,tmp1); - stL=concat(stL,tmp1); //180813to - if(length(stL)>0, - str=stL_1; - , - str=""; - ); - if(length(str)==0, - str="cl=true,lc=blue,fc=blue"; - ); - if(length(driver)==0, - tmp1="["+str+"]"; - , - tmp1="["+driver+","+str+"]"; - ); - tmp1=replace(tmp1,"cl=","colorlinks="); - tmp1=replace(tmp1,"lc=","linkcolor="); - tmp1=replace(tmp1,"fc=","filecolor="); - tmp1=replace(tmp1,"uc=","urlcolor="); - ADDPACK=select(ADDPACK,indexof(#,"hyperref")==0); - Addpackage(tmp1+"{hyperref}"); - tmp=indexof(tmp1,"linkcolor=");//180813from - tmp1=substring(tmp1,tmp-1,length(tmp1)); - tmp=indexof(tmp1,"="); - tmp1=substring(tmp1,tmp,length(tmp1)); - tmp=indexof(tmp1,","); - if(length(tmp)>0, - tmp1=substring(tmp1,0,tmp-1); - );//180813to - LinkColor=tmp1; - LinkPosH=125; - LinkPosV=73;//180524 - LinkSize=1; -// if(length(reL)>0, -// LinkPosH=reL_1; -// if(length(reL)>1,LinkPosV=reL_2); -// if(length(reL)>2,LinkSize=max(reL_3,0.1)); -// ); - forall(eqL, - tmp=Indexall(#,"=");//180524from - if(length(tmp)==1, - tmp1=Toupper(substring(#,0,1)); - tmp2=substring(#,tmp_1,length(#)); - tmp2=parse(tmp2); - if(tmp1=="P", - LinkPosH=tmp2_1; - LinkPosV=tmp2_2; - ); - if(tmp1=="S", - LinkSize=max(tmp2,0.1); - ); - );//180524to - ); -); //17.12.16to -////%Setslidehyper end//// - -////%Settitle start//// -Settitle(cmdL):=Settitle("",cmdL,[]); // 180608from -Settitle(Arg1,Arg2):=( - if(isstring(Arg1), - Settitle(Arg1,Arg2,[]); - , - Settitle("",Arg1,Arg2); - ); -); // 180608to -Settitle(titleold,cmdL,options):=( -//help:Settitle(cmdL); -//help:Settitle(name,cmdL); -//help:Settitle(options=["Title=slide0","Layery=0","Color=blue"]); - regional(tmp,tmp1,tmp2,eqL,layery,color,size,font); - TitleName="slide0"; //180330 - if(length(titleold)>0,TitleName=titleold);//180608 - layery="0"; - color="blue"; - size="\Large"; - font="\bf"; -// tmp=Divoptions(options); -// eqL=tmp_5; - eqL=options; //180602 - forall(eqL, - tmp1=Toupper(substring(#,0,1)); - tmp=indexof(#,"="); - tmp2=substring(#,tmp,length(#)); - if(tmp1=="L", - layery=tmp2; - ); - if(tmp1=="C", - color=tmp2; - ); - if(tmp1=="S", - size=tmp2; - if(substring(size,0,1)!="\",size="\"+size); - ); - if(tmp1=="F", - font=tmp2; - if(substring(font,0,1)!="\",font="\"+font); - ); - if(tmp1=="T", //180330 - TitleName=tmp2; - ); - ); - TitleCmdL=["{"+size+font]; - if(indexof(color,"[")>0, - tmp=replace(color,"[","{"); - tmp=replace(tmp,"]","}"); - tmp1=Indexall(tmp,","); - if(length(tmp1)>=3, - tmp="\color[cmyk]"+tmp; - , - tmp="\color[rgb]"+tmp; - ); - , - tmp="\color{"+color+"}"; - ); - TitleCmdL=append(TitleCmdL,tmp); - TitleCmdL=concat(TitleCmdL,["","\begin{layer}{120}{"+layery+"}"]); - forall(1..(length(cmdL)), - tmp=cmdL_#; - if(length(tmp)>0, - if(#==1, - tmp="{\Huge \putnote"+tmp+"}" - , - tmp="\putnote"+tmp; - ); - TitleCmdL=append(TitleCmdL,tmp); - ); - ); - TitleCmdL=concat(TitleCmdL,["\end{layer}","","}"]); -); -////%Settitle end//// - -////%Maketitle start//// -Maketitle():=( - if(!isstring(TitleName), //17.04.13from - drawtext(mouse().xy,"Settitle not defined", - size->24,color->[1,0,0]); - , //17.04.13until - Maketitle(TitleName); - ); -); -Maketitle(name):=( -//help:Maketitle(); - regional(texfile,texmain,tmp,tmp1,sep,txtfile); - texfile=name; - texmain=name+"main"; - SCEOUTPUT=openfile(texfile+".tex"); - forall(TitleCmdL, - println(SCEOUTPUT,#); - ); - closefile(SCEOUTPUT); - SCEOUTPUT=openfile(texmain+".tex"); - tmp="\documentclass[landscape,10pt]{article}"; - if(indexof(PathT,"platex")>0, - tmp=replace(tmp,"article","jarticle"); - if(indexof(PathT,"uplatex")>0, //17.08.13from - tmp=replace(tmp,"jarticle","ujarticle"); - );//17.08.13until - ); - println(SCEOUTPUT,tmp); - tmp="\special{papersize=\the\paperwidth,\the\paperheight}"; - println(SCEOUTPUT,tmp); - tmp=replace(Dirhead,"\","/");//17.11.01from - tmp=replace(tmp,"scripts","tex/latex"); - if(isexists(tmp,""), - println(SCEOUTPUT,"\usepackage{ketpic,ketlayer,ketslide}"); - , - tmp=replace(Dirhead+"/ketpicstyle","\","/"); - println(SCEOUTPUT,"\usepackage{"+tmp+"/ketpic}"); - println(SCEOUTPUT,"\usepackage{"+tmp+"/ketlayer}"); - println(SCEOUTPUT,"\usepackage{"+tmp+"/ketslide}"); - );//17.11.01until - println(SCEOUTPUT,"\usepackage{amsmath,amssymb}"); - println(SCEOUTPUT,"\usepackage{bm,enumerate}"); - if((indexof(PathT,"pdflatex")>0)%(indexof(PathT,"lualatex")>0), - println(SCEOUTPUT,"\usepackage{graphicx}"); - , - println(SCEOUTPUT,"\usepackage[dvipdfmx]{graphicx}"); - ); - println(SCEOUTPUT,"\usepackage[usenames]{color}"); //190222 - forall(ADDPACK, -// if(indexof(#,"[")==0, -// println(SCEOUTPUT,"\usepackage{"+#+"}"); -// , - println(SCEOUTPUT,"\usepackage"+#); // 17.07.10 -// ); - ); - if(indexof(PathT,"platex")>0,tmp="\ketmarginJ",tmp="\ketmarginE"); - println(SCEOUTPUT,tmp); - println(SCEOUTPUT,"\ketslideinit"); - println(SCEOUTPUT,""); - println(SCEOUTPUT,"\begin{document}"); - println(SCEOUTPUT,""); - println(SCEOUTPUT,"\input{"+texfile+".tex}"); - println(SCEOUTPUT,""); - println(SCEOUTPUT,"\end{document}"); - closefile(SCEOUTPUT); - if(iswindows(), - Makebat(texmain,"tv"); - , - Makeshell(texmain,"tv"); - ); - kc(); - txtfile=Cindyname()+".txt"; //180815from - if(!isexists(Dircdy,txtfile), - setdirectory(Dircdy); - SCEOUTPUT=openfile(txtfile); - println(SCEOUTPUT,"title::"+name+"//"); - println(SCEOUTPUT,""); - println(SCEOUTPUT,"%%%%%%%%%%%%%%%%//"); - println(SCEOUTPUT,"main::"+PaO()+"title)//"); - println(SCEOUTPUT,"\slidepage[m]//"); - println(SCEOUTPUT,""); - println(SCEOUTPUT,"%%%%%%%%%%%%%%%%//"); - println(SCEOUTPUT,"new::"+PaO()+"title)//"); - println(SCEOUTPUT,"%repeat=1,para//"); - println(SCEOUTPUT,"\slidepage//"); - println(SCEOUTPUT,""); - println(SCEOUTPUT,"layer::{120}{0}//"); - println(SCEOUTPUT,"%%putnote::s{65}{5}:://"); - println(SCEOUTPUT,"end//"); - println(SCEOUTPUT,""); - println(SCEOUTPUT,"itemize//"); - println(SCEOUTPUT,"item//"); - println(SCEOUTPUT,"end//"); - closefile(SCEOUTPUT); - setdirectory(Dirwork); //180815to - ); -); -////%Maketitle end//// - -////%Repeatsameslide start//// -Repeatsameslide(repeatflg,sestr,addedL):=( - regional(seL,flg1,ss,nn,nrep,tmp,tmp1,tmp2,tmp3,str,j,k); - // global RepeatList, SCEOUTPUT, NonThinFlg - nrep=length(RepeatList); - flg1=0; - forall(addedL,ss, - if(repeatflg==0, - if(substring(ss,0,1)!="%", //16.01.04 - println(SCEOUTPUT,ss); - );//16.01.04 - , - forall(1..nrep,nn, - if(sestr=="", - RepeatList_nn=append(RepeatList_nn,ss); - ); - ); - if(sestr=="", - seL=[1]; - , - tmp1=substring(sestr,1,length(sestr)-1); - tmp1=replace(tmp1,",-",".."+text(nrep)); - tmp1=replace(tmp1,"-,","1.."); - tmp1="["+tmp1+"]"; //17.01.03 - seL=flatten(parse(tmp1)); //17.01.03 - ); - if(contains(seL,1), - if(substring(ss,0,1)!="%", //16.01.04 - println(SCEOUTPUT,ss); - ); - seL=remove(seL,[1]); - flg1=1; - ); - forall(1..(length(seL)),nn, - tmp=seL_nn; - if(tmp<=length(RepeatList), //17.01.12from - RepeatList_tmp=append( RepeatList_tmp,ss); - , - println(" "+sestr+" : "+text(tmp)+" > "+text(length(RepeatList))); - ); - ); - if(ThinFlg==1,//16.01.05from - if(flg1==1,seL=append(seL,1)); - seL=remove(1..nrep,seL); - str=ss; // 17.05.28from - if(substring(str,0,16)=="\begin{minipage}",MiniFlg=1);//180526 - repeat(10, - tmp1=Indexall(str,"{\color"); - if(length(tmp1)>0, - tmp2=Indexall(str,"}"); - tmp=select(tmp2,tmp1_1<#); - tmp=substring(str,tmp1_1,tmp_1); - str=replace(str,tmp+" ",""); - str=replace(str,tmp,""); - ); - );//17.05.28to - if(contains(seL,1), - if(substring(str,0,1)!="%", - if(NonThinFlg==0, - if(!contains(["\begi","\end{"],substring(str,0,5)),//17.01.15 - if(MiniFlg==0, //180526from - println(SCEOUTPUT,"{\color[cmyk]{\thin,\thin,\thin,\thin}%");//180701 - println(SCEOUTPUT,str); - println(SCEOUTPUT,"}%"); - , - println(SCEOUTPUT,str); - if(indexof(str,"\end{minipage}")>0, //180526from - println(SCEOUTPUT,"}%"); - ); - ); //180526to - , - println(SCEOUTPUT,str); - if(indexof(str,"\end{minipage}")>0, //180526from - println(SCEOUTPUT,"}%"); - MiniFlg=0; - ); - ); - ); - if(NonThinFlg==1, - if(!contains(["\begi","\end{"],substring(str,0,5)),//17.01.15 - println(SCEOUTPUT,"{\color[cmyk]{\thin,\thin,\thin,\thin}%");//180701 - println(SCEOUTPUT,str); - , - println(SCEOUTPUT,str); - if(indexof(str,"\end{minipage}")>0, //180526from - println(SCEOUTPUT,"}%"); - MiniFlg=0; - ); - ); - ); - if(NonThinFlg==2, - println(SCEOUTPUT,str); - if(!contains(["\begi","\end{"],substring(str,0,5)),//17.01.15 - println(SCEOUTPUT,"}%"); - , //180526from - if(indexof(str,"\end{minipage}")>0, - println(SCEOUTPUT,"}%"); - MiniFlg=0; - ); //180526from - ); - ); - seL=remove(seL,[1]); - ); - ); - if(substring(ss,0,1)!="%", //16.01.04 - forall(1..(length(seL)),nn, - if(substring(str,0,16)=="\begin{minipage}",MiniFlg=1);//180526 - tmp=seL_nn; - if(NonThinFlg==0, - if(!contains(["\begi","\end{"],substring(str,0,5)),//180526from - if(MiniFlg==0, - tmp1="{\color[cmyk]{\thin,\thin,\thin,\thin}%";//180701 - tmp1=[tmp1,str,"}%"]; - , - tmp1=[str]; - if(indexof(str,"\end{minipage}")>0, //180526from - tmp1=append(tmp1,"}%"); - ); - ); - , - tmp1=[str]; - if(indexof(str,"\end{minipage}")>0, - tmp1=append(tmp1,"}%"); - MiniFlg=0; - ); - ); - ); - if(NonThinFlg==1, - if(!contains(["\begi","\end{"],substring(str,0,5)),//17.01.15 - tmp1="{\color[cmyk]{\thin,\thin,\thin,\thin}%";//180701 - tmp1=[tmp1,str]; - , - tmp1=[str]; - if(indexof(str,"\end{minipage}")>0, - tmp1=append(tmp1,"}%"); - MiniFlg=0; - ); - ); - ); - if(NonThinFlg==2, - tmp1=[str]; - if(!contains(["\begi","\end{"],substring(str,0,5)), - tmp1=append(tmp1,"}%"); - , - if(indexof(str,"\end{minipage}")>0, - tmp1=append(tmp1,"}%"); - MiniFlg=0; - ); - ); - ); - RepeatList_tmp=concat( RepeatList_tmp,tmp1); - ); - ); - );//16.01.05to - ); - );//16.12.05to -); -////%Repeatsameslide end//// - -////%Presentation start//// -Presentation(texfile):=Presentation(texfile,texfile); -Presentation(texfile,txtfile):=( -//help:Presentation(texfile,txtfile); - regional(file,flgL,flg,verbflg,slideL,ns,slideorgL,wall,sld,slidecmd,tmp,tmp0,tmp1, - tmp2,tmp3,tmp4,tmp5,newoption,top,repeatflg,nrep,nrepprev,,repstr, - sestr,npara,paradt,parafiles,hyperflg,paractr, - letterc,boxc,shadowc,mboxc,sep); - MiniFlg=0;//180526 - slidecmd=["\ketcletter","\ketcbox","\ketdbox","\ketcframe", - "\ketcshadow","\ketdshadow","\slidetitlex","\slidetitlesize", - "\mketcletter","\mketcbox","\mketdbox","\mketcframe", - "\mslidetitlex","\mslidetitlesize"]; - if(!isstring(BodyStyle),//17.01.06 - BodyStyle="\Large\bf\boldmath"; - ); - repeatflg=0; - RepeatList=[]; - paractr=0; //16.12.31 - if(indexof(texfile,".")==0,file=texfile+".tex",file=texfile); - if(indexof(txtfile,".")==0,tmp1=txtfile+".txt",tmp1=txtfile); -// tmp=load(tmp1); //181125from - tmp=readfile2str(Dirwork,tmp1); - tmp=replace(tmp,"////","||||"); - tmp=replace(tmp,"/L"+"F/::","::"); - tmp=replace(tmp,"///L"+"F/","/L"+"F/"); - slideL=tokenize(tmp,"/L"+"F/"); //181125to - slideorgL=slideL; // 16.07.11 - slideL=apply(slideL,Removespace(#)); - tmp=select(1..length(slideL),length(slideL_#)>0); // 16.07.11from - slideL=apply(tmp,slideL_#); - slideorgL=apply(tmp,slideorgL_#); -// slideL=select(slideL,length(#)>0); // 16.07.11until - flg=0; // 16.06.09from - forall(1..10, - if(flg==0, - if(substring(slideL_1,0,1)!="%", - flg=1; - , - slideL=slideL_(2..length(slideL)); - slideorgL=slideorgL_(2..length(slideorgL)); - ); - ); - ); // 16.06.09until - flgL=[]; - SCEOUTPUT = openfile(file); - tmp=tokenize(slideL_1,"::"); - tmp1=tmp_1; - if(length(tmp)>1, - tmp2=tmp_2; - tmp3=tmp_(3..length(tmp));//16.06.25 - , - tmp2=""; - tmp3=tmp_(2..length(tmp));//16.06.25 - ); - wall=""; // 16.06.10 - if(length(tmp3)>0,//16.06.25from - tmp=substring(tmp3_1,0,1);//180330 - if((tmp!="\")&(tmp!="%")&(indexof(tmp3_1,"=")==0), //180330 - wall=tmp3_1; - tmp3=tmp3_(2..length(tmp3)); - ); - );//16.06.25until - tmp="%%% "+tmp1+" "+txtfile;// 16.06.09from - println(SCEOUTPUT,tmp); - tmp="\documentclass[landscape,10pt]{article}"; - if(indexof(PathT,"platex")>0, - tmp=replace(tmp,"article","jarticle"); - if(indexof(PathT,"uplatex")>0, //17.08.13from - tmp=replace(tmp,"jarticle","ujarticle"); - );//17.08.13until - ); - println(SCEOUTPUT,tmp);// 16.06.09from - tmp=select(1..(length(tmp3)),indexof(tmp3_#,"\usepackage")>0);//17.06.18from - forall(tmp, - println(SCEOUTPUT,tmp3_#); - ); - tmp=remove(1..(length(tmp3)),tmp); - tmp3=tmp3_tmp;//17.06.18until -// if(iswindows(),sep="\",sep="/"); // 17.04.08 -// sep="/"; - if((indexof(PathT,"pdflatex")>0)%(indexof(PathT,"lualatex")>0), - if(indexof(PathT,"lualatex")>0, - println(SCEOUTPUT,"\usepackage{luatexja}"); - ); - println(SCEOUTPUT,"\usepackage{pict2e}"); - println(SCEOUTPUT,"\usepackage{ketpic2e,ketlayer2e}");// 17.04.08from - , - println(SCEOUTPUT,"\special{papersize=\the\paperwidth,\the\paperheight}"); - );// 17.04.08until - tmp=replace(Dirhead,"\","/");//17.11.01from - tmp=replace(tmp,"scripts","tex/latex"); - if(isexists(tmp,""), - println(SCEOUTPUT,"\usepackage{ketpic,ketlayer}"); - , - tmp=replace(Dirhead+"/ketpicstyle","\","/"); - println(SCEOUTPUT,"\usepackage{"+tmp+"/ketpic}"); - println(SCEOUTPUT,"\usepackage{"+tmp+"/ketlayer}"); - ); - if(length(wall)==0, - tmp=replace(Dirhead,"\","/");//17.11.01from - tmp=replace(tmp,"scripts","tex/latex"); - if(isexists(tmp,""), - println(SCEOUTPUT,"\usepackage{ketslide}"); - , - tmp=replace(Dirhead+"/ketpicstyle","\","/"); - println(SCEOUTPUT,"\usepackage{"+tmp+"/ketslide}"); - ); - , - tmp=replace(Dirhead,"\","/"); - tmp=replace(tmp,"scripts","tex/latex"); - if(isexists(tmp,""), - println(SCEOUTPUT,"\usepackage{ketslide2}"); - , - tmp=replace(Dirhead+"/ketpicstyle","\","/"); - println(SCEOUTPUT,"\usepackage{"+tmp+"/ketslide2}"); - ); - );//17.04.08until - println(SCEOUTPUT,"\usepackage{amsmath,amssymb}"); - println(SCEOUTPUT,"\usepackage{bm,enumerate}"); - if((indexof(PathT,"pdflatex")>0)%(indexof(PathT,"lualatex")>0), - println(SCEOUTPUT,"\usepackage{graphicx}"); - , - println(SCEOUTPUT,"\usepackage[dvipdfmx]{graphicx}"); - ); - println(SCEOUTPUT,"\usepackage{color}");//190222 - letterc=[0.98,0.13,0,0.43]; boxc=[0,0.32,0.52,0]; - shadowc=[0,0,0,0.5]; mboxc="yellow"; - tmp4="abcdefghijklmno"; - forall(1..15, - tmp=SlideColorList_#; - if(islist(tmp), - tmp=text(tmp); - tmp=substring(tmp,1,length(tmp)-1); - if(length(SlideColorList_#)==4,//17.01.07from - println(SCEOUTPUT,"\definecolor{slidecolor"+tmp4_#+"}{cmyk}{"+tmp+"}"); - ); - if(length(SlideColorList_#)==3, - println(SCEOUTPUT,"\definecolor{slidecolor"+tmp4_#+"}{rgb}{"+tmp+"}"); - );//17.01.07until - SlideColorList_#="slidecolor"+tmp4_#; - ); - ); - println(SCEOUTPUT,"\def\setthin#1{\def\thin{#1}}");//17.08.23 - println(SCEOUTPUT,"\setthin{"+text(ThinDense)+"}");//17.08.23 - println(SCEOUTPUT,"\newcommand{\slidepage}[1][s]{%");//180524from - println(SCEOUTPUT,"\setcounter{ketpicctra}{18}%"); - println(SCEOUTPUT,"\if#1m \setcounter{ketpicctra}{1}\fi"); - println(SCEOUTPUT,"\hypersetup{linkcolor=black}%"); - println(SCEOUTPUT,"");//180908 - println(SCEOUTPUT,"\begin{layer}{118}{0}"); - println(SCEOUTPUT,"\putnotee{122}{-\theketpicctra.05}{\small\thepage/\pageref{pageend}}"); - println(SCEOUTPUT,"\end{layer}\hypersetup{linkcolor="+LinkColor+"}"); - println(SCEOUTPUT,"");//180908 - println(SCEOUTPUT,"}");//189524to - forall(ADDPACK,// 16.06.09from - println(SCEOUTPUT,"\usepackage"+#); - );// 16.06.09to - tmp=select(ADDPACK,indexof(#,"{hyperref}")>0);//16.12.31from - if(length(tmp)>0, - hyperflg=1; - , - hyperflg=0; //16.12.31until - ); - forall(tmp3, - println(SCEOUTPUT,#); - ); - if(indexof(PathT,"platex")>0, //180903,180908from - tmp="\setmargin{"+text(25+SlideMargin_1)+"}{"; - tmp=tmp+text(145-SlideMargin_1)+"}{"; - tmp=tmp+text(15+SlideMargin_2)+"}{"; - tmp=tmp+text(100-SlideMargin_2)+"}"; - , - tmp="\setmargin{"+text(20+SlideMargin_1)+"}{"; - tmp=tmp+text(135-SlideMargin_1)+"}{"; - tmp=tmp+text(15+SlideMargin_2)+"}{"; - tmp=tmp+text(100-SlideMargin_2)+"}"; - ); // 180903,180908to - println(SCEOUTPUT,""); - println(SCEOUTPUT,tmp); - println(SCEOUTPUT,""); - println(SCEOUTPUT,"\ketslideinit"); - println(SCEOUTPUT,""); - forall(tmp, // 15.07.21 - if(substring(#,0,1)=="\", println(SCEOUTPUT,#)); - ); -// if(!isstring(PageStyle),PageStyle="headings");//180524from -// println(SCEOUTPUT,"\pagestyle{"+PageStyle+"}"); - println(SCEOUTPUT,"\pagestyle{empty}");//180524to - println(SCEOUTPUT,""); - println(SCEOUTPUT,"\begin{document}"); - println(SCEOUTPUT,""); - if(length(wall)>0, - println(SCEOUTPUT,"\input{fig/"+wall+".tex}"); - println(SCEOUTPUT,""); - ); - if(length(tmp2)>0, - if(indexof(tmp2," no")==0, // 16.11.11from - println(SCEOUTPUT,"\begin{layer}{120}{0}"); - if(substring(tmp2,0,1)!="\", - tmp2="\putnotese{0}{0}{\input{fig/"+tmp2+".tex}}";//16.12.27 - ); - println(SCEOUTPUT,tmp2); - println(SCEOUTPUT,"\end{layer}"); - println(SCEOUTPUT,""); - , - tmp=indexof(tmp2,"="); - if(tmp==0, - top="10mm"; - , - top=substring(tmp2,tmp,length(tmp2)); - ); - println(SCEOUTPUT,""); - println(SCEOUTPUT,"\vspace*{"+top+"}"); - println(SCEOUTPUT,""); - ); // 16.11.11until - ); - println(SCEOUTPUT,"\def\mainslidetitley{22}"); - forall(1..14, //16.12.22from - tmp=SlideColorList_#; - if(!isstring(tmp),tmp=text(tmp)); - if(length(tmp)>0, - tmp="\def"+slidecmd_#+"{"+tmp+"}"; - println(SCEOUTPUT,tmp); - ); - );//16.12.22until - println(SCEOUTPUT,""); - println(SCEOUTPUT,"\color{"+SlideColorList_(15)+"}"); - println(SCEOUTPUT,BodyStyle);//17.01.07 -// println(SCEOUTPUT,"\thispagestyle{empty}");//180524 - println(SCEOUTPUT,"\addtocounter{page}{-1}");//17.01.29 - println(SCEOUTPUT,""); - verbflg=0; //16.06.28 - repeatflg=0;//16.12.02 - nrep=0;//16.12.27 - nrepprev=0;//17.01.03 - npara=0;//16.12.27 - forall(2..length(slideL),ns, - ThinFlg=0; - NonThinFlg=0; - flg=0; - tmp1=""; - tmp2=""; - tmp3=""; - sld=Removespace(slideL_ns); // 16.06.28 - sestr=""; - if((substring(sld,0,1)=="%") & (substring(sld,0,2)!="%%"), // 17.06.23 - Repeatsameslide(repeatflg,"",[slideL_ns]); - if(repeatflg>0, - tmp=indexof(sld,"]::"); - if(tmp>0, - if(substring(sld,1,2)!="%",//17.05.31 - if(substring(sld,1,5)=="thin", - ThinFlg=1; - ); - sestr=substring(sld,1,tmp); - sld=substring(sld,tmp+2,length(sld)); - tmp=indexof(sestr,"["); - sestr=substring(sestr,tmp-1,length(sestr));//17.01.05 - ); - ); - ); - if(substring(sld,1,7)=="repeat", // 16.12.09from - tmp=indexof(sld,"="); - tmp5=substring(sld,tmp,length(sld)); - tmp=indexof(tmp5,","); - if(tmp>0,//17.01.03from - tmp5=substring(tmp5,0,tmp-1); - );//17.01.03until - repeatflg=1; - if(length(tmp5)>0, - nrep=parse(tmp5); - tmp=[]; - if(length(wall)>0, - tmp=["","\input{fig/"+wall+".tex}"]; - ); - tmp=concat(tmp, - ["","\sameslide"+NewSlideOption,"","\vspace*{18mm}",""]);//180524 - RepeatList=apply(1..nrep,if(#==1,[],tmp)); - ); - if(sestr=="",flg=1); - tmp=indexof(sld,",");//17.01.03from - if(tmp>0, - sld="%"+substring(sld,tmp,length(sld)); - if(indexof(sld,"=")==0,sld=sld+"="); - );//17.01.03until - ); - if(substring(sld,1,5)=="para", - paractr=paractr+1; - repeatflg=1; - tmp=indexof(sld,"="); - tmp=substring(sld,tmp,length(sld)); - if(length(tmp)==0, //17.01.03 - npara=0; - , - paradt=tokenize(tmp,":"); - tmp=fileslist(Dirwork+"/fig/"+paradt_1); - if(length(tmp)>0, - parafiles=tokenize(tmp,","); - if(indexof(paradt_4,"input")>0, - tmp0=indexof(paradt_4,",");//17.01.29from - if(tmp0>0, - paradt=append(paradt,substring(paradt_4,tmp0,length(paradt_4))); - paradt_4=substring(paradt_4,0,tmp0-1); - );//17.01.29until - parafiles=select(parafiles,indexof(#,".tex")>0); - parafiles=sort(parafiles); //180627 - if(indexof(paradt_4,"\input")==0,paradt_4="\"+paradt_4);//16.12.17 - ); - if(indexof(paradt_4,"include")>0, - parafiles=select(parafiles,indexof(#,".pdf")>0); - parafiles=sort(parafiles); //180627 - ); - npara=length(parafiles); - , - println(Dirwork+"/fig/"+paradt_1+" not found"); - parafiles=[]; - npara=0; - ); - if(nrep==0, - nrep=npara; - if(length(wall)>0, - tmp=["","\input{fig/"+wall+".tex}"]; - ); - tmp=concat(tmp, - ["","\sameslide"+NewSlideOption,"","\vspace*{18mm}",""]);//180524 - RepeatList=apply(1..nrep,if(#==1,[],tmp)); - ); - ); - forall(1..nrep, //16.12.28 - tmp4=[]; //16.12.31from - if(hyperflg>0, - tmp4=["\hypertarget{para"+text(paractr)+"pg"+text(#)+"}{}"]; - );//16.12.31to - if(npara>0, //17.01.03 - tmp4=concat(tmp4,["","\begin{layer}{120}"+paradt_2]); - if(#<=npara, //16.12.28from - tmp=parafiles_#; - , - tmp=parafiles_npara; - ); - tmp="{"+paradt_4+"{fig/"+paradt_1+"/"+tmp+"}}"; - if(length(paradt)>=5, - tmp="{\scalebox{"+text(paradt_5)+"}"+tmp+"}"; - ); - if(substring(paradt_3,0,1)=="\", - tmp=paradt_3+tmp; - , - tmp="\putnote"+paradt_3+tmp; - ); - tmp4=concat(tmp4,[tmp]);//16.12.31 - , - tmp4=concat(tmp4,["","\begin{layer}{120}{0}"]); - ); - if((hyperflg>0) & (LinkSize>0.15), - tmp="{"+text(LinkPosV)+"}{\hyperlink{para"; // 17.01.12from - tmp1=tmp+text(paractr)+"pg"; - tmp2=tmp+text(paractr-1)+"pg"+text(nrepprev); - tmp=tmp2; //180526from - tmp3=[text(LinkPosH-29*LinkSize)+"}"+tmp+"}{\fbox{\Ctab{" - +text(2.5*LinkSize)+"mm}{\scalebox{"+text(LinkSize) - +"}{\scriptsize $\mathstrut||\!\lhd$}}}}}"]; - if(nrep>1,//180526 - tmp="{"+text(LinkPosV)+"}{\hyperlink{para"; // 17.01.12from - tmp1=tmp+text(paractr)+"pg"; - tmp2=tmp+text(paractr-1)+"pg"+text(nrepprev); - tmp=tmp1+text(1); - tmp3=append(tmp3, - text(LinkPosH-24*LinkSize)+"}"+tmp+"}{\fbox{\Ctab{" - +text(2.5*LinkSize)+"mm}{\scalebox{"+text(LinkSize) - +"}{\scriptsize $\mathstrut|\!\lhd$}}}}}"); //180526to - if(#>1,tmp=tmp1+text(#-1),tmp=tmp2); - tmp3=append(tmp3, - text(LinkPosH-17*LinkSize)+"}"+tmp+"}{\fbox{\Ctab{" - +text(4.5*LinkSize)+"mm}{\scalebox{"+text(LinkSize) - +"}{\scriptsize $\mathstrut\!\!\lhd\!\!$}}}}}"); - if(#<nrep,tmp=tmp1+text(#+1),tmp=tmp1+text(nrep)); - tmp3=append(tmp3, - text(LinkPosH-10*LinkSize)+"}"+tmp+"}{\fbox{\Ctab{" - +text(4.5*LinkSize)+"mm}{\scalebox{"+text(LinkSize) - +"}{\scriptsize $\mathstrut\!\rhd\!$}}}}}"); - tmp=tmp1+text(nrep); //180526from - tmp3=append(tmp3, - text(LinkPosH-5*LinkSize)+"}"+tmp+"}{\fbox{\Ctab{" // 17.01.19 - +text(2.5*LinkSize)+"mm}{\scalebox{"+text(LinkSize) - +"}{\scriptsize $\mathstrut \!\rhd\!\!|$}}}}}"); - ); - tmp="{"+text(LinkPosV)+"}{\hyperlink{para"; //180529[2lines] - tmp=tmp+text(paractr+1)+"pg"+text(1); - tmp3=append(tmp3, - text(LinkPosH)+"}"+tmp+"}{\fbox{\Ctab{" // 17.01.19 - +text(2.5*LinkSize)+"mm}{\scalebox{"+text(LinkSize) - +"}{\scriptsize $\mathstrut \!\rhd\!\!||$}}}}}"); //180526to - ); - tmp3=apply(tmp3,tmp,"\putnotew{"+tmp); - tmp4=concat(tmp4,tmp3);// 17.01.12to - tmp="\putnotee{"+text(LinkPosH+1)+"}{"+text(LinkPosV)+"}";//180524 - tmp=tmp+"{\scriptsize\color{blue} "+text(#)+"/"+text(nrep)+"}"; //180524[blue] - tmp4=append(tmp4,tmp); - tmp4=concat(tmp4,["\end{layer}",""]);//16.12.31until - Repeatsameslide(repeatflg,text([#]),tmp4); - ); - ); - ); - if(substring(sld,0,2)=="%%", //17.06.23from - println(SCEOUTPUT,sld); - flg=1; - ); //17.06.23to - if(flg==0, - if(indexof(sld,"\begin{verbatim}")==1, // 16.06.28from - Repeatsameslide(repeatflg,sestr,[slideL_ns]); - verbflg=1; - flg=1; - ); // 16.06.28 - if(indexof(sld,"\end{verbatim}")==1, - Repeatsameslide(repeatflg,sestr,[slideL_ns]); - verbflg=0; - flg=1; - ); // 16.06.28until - if(flg==0, - tmp=replace(sld,"||||","//"); // 16.05.11 - tmp=tokenize(tmp,"::"); // 16.05.11 - tmp1=tmp_1; - if(length(tmp)>1,tmp2=tmp_2,tmp2=""); - if(length(tmp)>2,tmp3=tmp_3,tmp3=""); - if(length(tmp)>3,tmp4=tmp_4,tmp4=""); - if(length(tmp)>4,tmp5=tmp_5,tmp5=""); - if(contains(["main","new","same"],tmp1), - if(tmp1=="new", // 16.11.09from - newoption=""; - if(substring(tmp2,0,1)=="[",newoption=tmp2); - ); - if(tmp1=="same", - if(length(tmp2)==0,tmp2=newoption); - );// 16.11.09until - println(SCEOUTPUT,""); - println(SCEOUTPUT,"%%%%%%%%%%%%%%%%%%%%"); - println(SCEOUTPUT,""); - ); - ); - if(flg==0&tmp1=="main", - if(repeatflg==1, - forall(2..(length(RepeatList)),nrep, - tmp=RepeatList_nrep; - forall(tmp, - if(substring(#,0,1)!="%", //16.01.04 - println(SCEOUTPUT,#); - ); - ); - ); - println(SCEOUTPUT,""); - repeatflg=0;RepeatList=[]; - nrepprev=nrep;//17.01.03 - nrep=0;//16.12.27 - npara=0;//16.12.27 - ); - if(length(wall)>0, - println(SCEOUTPUT,"\input{fig/"+wall+".tex}"); - ); - println(SCEOUTPUT,"\mainslide{"+tmp2+"}"); - println(SCEOUTPUT,""); - println(SCEOUTPUT,""); - tmp2=""; - flg=1; - ); - if(flg==0&tmp1=="new", - if(repeatflg==1, - forall(2..(length(RepeatList)),nrep, - tmp=RepeatList_nrep; - forall(tmp, - if(substring(#,0,1)!="%", //16.01.04 - println(SCEOUTPUT,#); - ); - ); - ); - println(SCEOUTPUT,""); - repeatflg=0;RepeatList=[]; - nrepprev=nrep;//17.01.03 - nrep=0; - npara=0; - ); - if(length(wall)>0, - Repeatsameslide(repeatflg,sestr,["\input{fig/"+wall+".tex}"]); - ); - tmp="\newslide"; - NewSlideOption=""; //17.01.04 - if(substring(tmp2,0,1)=="[", - NewSlideOption=tmp2; //17.01.04 - tmp=tmp+tmp2; - tmp2=tmp3; - tmp3=tmp4; - tmp4=tmp5; - ); - tmp=tmp+"{"+tmp2+"}"; - Repeatsameslide(repeatflg,sestr,[tmp,"","\vspace*{18mm}",""]);//180524 - tmp2=""; - flg=1; - ); - if(flg==0&tmp1=="same", - if(repeatflg==1, - forall(2..(length(RepeatList)),nrep, - tmp=RepeatList_nrep; - forall(tmp, - if(substring(#,0,1)!="%", //16.01.04 - println(SCEOUTPUT,#); - ); - ); - ); - println(SCEOUTPUT,""); - repeatflg=0;RepeatList=[]; - nrepprev=nrep;//17.01.03 - nrep=0; - npara=0; - ); - if(length(wall)>0, - println(SCEOUTPUT,"\input{fig/"+wall+".tex}"); - ); - tmp="\sameslide"+NewSlideOption; //17.01.04; -// if(substring(tmp2,0,1)=="[", -// tmp=tmp+tmp2; -// tmp2=tmp3; -// tmp3=tmp4; -// ); - println(SCEOUTPUT,tmp); - println(SCEOUTPUT,""); //180524 - println(SCEOUTPUT,"\vspace*{18mm}"); - println(SCEOUTPUT,""); - tmp4=tmp3; - tmp3=tmp2; - tmp2=""; - flg=1; - ); - if(flg==0&tmp1=="itemize", - Repeatsameslide(repeatflg,sestr,["\begin{itemize}"]); - flgL=append(flgL,"i"); - tmp2=""; - tmp3=""; - flg=1; - ); - if(flg==0&tmp1=="enumerate", - Repeatsameslide(repeatflg,sestr,["\begin{enumerate}"+tmp2]); - flgL=append(flgL,"e"); - tmp2=""; - tmp3=""; - flg=1; - ); - if(flg==0&tmp1=="verbatim", //16.06.28from - Repeatsameslide(repeatflg,sestr,["\begin{verbatim}"]); - flgL=append(flgL,"v"); - tmp1=""; - tmp2=""; - tmp3=""; - verbflg=1; - flg=1; - ); //16.06.28until - if(flg==0&tmp1=="layer", - Repeatsameslide(repeatflg,sestr,[""]); - tmp="\begin{layer}"; - if(length(tmp2)>0, - tmp=tmp+tmp2; - , - tmp=tmp+"{120}{0}"; - ); - Repeatsameslide(repeatflg,sestr,[tmp]); - flgL=append(flgL,"l"); - tmp2=""; - tmp3=""; - flg=1; - ); - if(flg==0&tmp1=="putnote", - tmp="\putnote"+tmp2+"{"; - if(indexof(tmp3,"include")==0, - tmp1=indexof(tmp3,","); - if(tmp1==0, - tmp=tmp+"\input{fig/"+tmp3+".tex}}"; - , - tmp2=substring(tmp3,tmp1,length(tmp3)); - tmp3=substring(tmp3,0,tmp1-1); - tmp=tmp+"\scalebox{"+tmp2+"}{\input{fig/"+tmp3+".tex}}}"; - ); - , - tmp2=indexof(tmp3,"["); - tmp3=substring(tmp3,tmp2-1,length(tmp3)); - tmp=tmp+"\includegraphics"+tmp3+"{fig/"+tmp4+"}}"; - ); - Repeatsameslide(repeatflg,sestr,[tmp]); - tmp2=""; - tmp3=""; - flg=1; - ); - if(flg==0&tmp1=="item", - NonThinFlg=1; - Repeatsameslide(repeatflg,sestr,["\item"]); - tmp3=""; - flg=1; - ); - if(flg==0&tmp1=="end"&(length(flgL)>0), //180526 - tmp=flgL_(length(flgL)); - if(tmp=="i", - Repeatsameslide(repeatflg,sestr,["\end{itemize}"]); - ); - if(tmp=="e", - Repeatsameslide(repeatflg,sestr,["\end{enumerate}"]); - ); - if(tmp=="l", - Repeatsameslide(repeatflg,sestr,["\end{layer}",""]); - ); - if(tmp=="v", // 16.06.28from - Repeatsameslide(repeatflg,sestr,["\end{verbatim}",""]); - verbflg=0; - ); // 16.06.28until - flgL=flgL_(1..(length(flgL)-1)); - tmp2=""; - tmp3=""; - flg=1; - ); - if(flg==0, // 16.06.28from - if(verbflg==0, - tmp2=tmp1; - , - tmp2=slideorgL_ns; // 16.07.11 - tmp2=replace(tmp2,"||","//"); // 16.07.10 - tmp3=""; - ); - ); // 16.06.28until - if(length(tmp2)>0, - if(tmp2=="...", tmp2=""); - if(NonThinFlg==1,NonThinFlg=2); - Repeatsameslide(repeatflg,sestr,[tmp2]); - ); - if(length(tmp3)>0, - Repeatsameslide(repeatflg,sestr,["\begin{layer}{120}{0}"]); - if(substring(tmp3,0,1)=="{", - tmp=tmp3; - tmp3=tmp4; - , - tmp="{60}{0}"; - ); - tmp1=indexof(tmp3,","); - if(tmp1==0, - tmp3="\putnotes"+tmp+"{\input{fig/"+tmp3+".tex}}"; - , - tmp2=substring(tmp3,tmp1,length(tmp3)); - tmp3=substring(tmp3,0,tmp1-1); - tmp3="\putnotes"+tmp+"{\scalebox{"+tmp2+"} - {\input{fig/"+tmp3+".tex}}}"; - ); - Repeatsameslide(repeatflg,sestr,[tmp3,"\end{layer}",""]); - ); - ); - ); - if(repeatflg==1, - forall(2..(length(RepeatList)),nrep, - tmp=RepeatList_nrep; - forall(tmp, - if(substring(#,0,1)!="%", //16.01.04 - println(SCEOUTPUT,#); - ); - ); - ); -// println(SCEOUTPUT,""); - ); - println(SCEOUTPUT,"\label{pageend}\mbox{}"); //180529 - println(SCEOUTPUT,""); - println(SCEOUTPUT,"\end{document}"); - closefile(SCEOUTPUT); -); -////%Presentation end//// - -////%Mkslides start//// -Mkslides():=( - regional(store,sep,parent,texparentorg,tmp,tmp1,tmp2,tmp3,tmp4,flg); - store=Fillblack();//181125 - tmp4=Fhead; - Fhead=""; - if(!iswindows(), //17.10.13 - Dirwork=replace(Dirwork,"\",pathsep()); - parent=replace(Dirwork+Shellparent,"\",pathsep()); - , - Dirwork=replace(Dirwork,"/",pathsep()); - parent=replace(Dirwork+Batparent,"/",pathsep());// 16.05.29 - ); - tmp=replace(Dirwork,pathsep()+"fig","");//180604[2lines] - Changework(tmp); - Setdirectory(Dirwork); - if(!iswindows(), //180604from - println(setexec(Dirwork,Shellparent)); - ); //180604to - if(length(Texmain)>0, // 15.08.14 from - Texparent=Texmain; - ); - texparentorg=Texparent; //17.04.10from - if(isstring(Slidename), // 15.08.14 from - Texparent=Slidename; - );//17.04.10until - if(!isexists(Dirwork,Texparent+".txt"), // 17.04.12from - drawtext(mouse().xy,Texparent+".txt not exist in "+Dirwork, - size->24,color->[1,0,0]); - , // 17.04.12until - Presentation(Texparent); // 15.08.14to - if(iswindows(), - tmp2=Batparent; - parent=replace(Dirwork+Batparent,sep+"fig","");// 16.05.29 - if(indexof(Pathpdf,"Adobe")>0, //17.12.09from - Makebat(Texparent,"ttv"); - , - Makebat(Texparent,"tv"); - ); //17.12.09until - kc():=( - println("kc : "+kc(parent,Dirlib,Fnametex)); // 16.06.10, 17.02.19 - ); - kc(); - Batparent=tmp2; - , - tmp2=Shellparent; - parent=replace(Dirwork+Shellparent,sep+"fig","");// 16.05.29 - Shellparent=replace(Shellparent,sep+"fig",""); - if(indexof(Pathpdf,"Adobe")>0, //17.12.09from - Makeshell(Texparent,"ttv"); - , - Makeshell(Texparent,"tv"); - ); //17.12.09until - kc():=( - println("kc : "+kc(parent,Mackc+Dirlib,Fnametex)); // 16.06.10 - ); - kc(); - Shellparent=tmp2; - ); - ); - Dirwork=Dirwork+pathsep()+"fig"; //17.10.16 - setdirectory(Dirwork); - Fhead=tmp4; - Texparent=texparentorg;//17.04.10 - Fillrestore(store);//181125 -); -////%Mkslides end//// - -////%Mkslidesummary start//// -Mkslidesummary():=( // 17.10.26 for R - regional(texparentorg); - texparentorg=Texparent; - if(isstring(Slidename), - Texparent=Slidename; - ); - Mkslidesummary(Texparent,Texparent+"digest",["m","Wait=3"]); - Texparent=texparentorg; -); -Mkslidesummary(fin,fout):= - Mkslidesummary(fin,fout,["m","Wait=3"]); -Mkslidesummary(inputfile,outputfile,options):=( -//help:Mkslidesummary(fin,fout,options); - regional(store,fin,fout,out,figflg,dirworkorg,dirtop,tmp); - store=Fillblack();//181125 - dirworkorg=Dirwork;//17.04.10from - dirtop=replace(Dirwork,pathsep()+"fig",""); - Changework(dirtop);//17.04.10uptp - if(ismacosx(), //180604from - println(setexec(Dirwork,Shellparent)); - ); //180604to - fin=inputfile; - if(indexof(fin,".")==0,fin=fin+".tex"); - fout=outputfile; - if(indexof(fout,".")==0,fout=fout+".tex"); - cmdL=[ - "Dt=readLines"+PaO()+"'"+fin+"',encoding='UTF-8')",[], - "num=grep"+PaO()+"'hypertarget',Dt,fixed=TRUE)",[], //180412 - "Dt=Dt[setdiff"+PaO()+"1:length"+PaO()+"Dt),num)]",[], - "Smain=c"+PPa("")+";Snew=c"+PPa("")+";Ssame=c"+PPa(""),[], - "for"+PaO()+"J in 1:length"+PaO()+"Dt)){",[], - " Tmp=length"+PaO()+"grep"+PaO()+"'mainslide{',Dt[J],fixed=TRUE))",[], //180412 - " if"+PaO()+"Tmp>0){Smain=c"+PaO()+"Smain,1)}else{Smain=c"+PaO()+"Smain,0)}",[], - " Tmp=length"+PaO()+"grep"+PaO()+"'newslide{',Dt[J],fixed=TRUE))",[], //180412 - " if"+PaO()+"Tmp>0){Snew=c"+PaO()+"Snew,1)}else{Snew=c"+PaO()+"Snew,0)}",[], - " Tmp=length"+PaO()+"grep"+PaO()+"'sameslide',Dt[J],fixed=TRUE))",[], //180412 - " if"+PaO()+"Tmp>0){Ssame=c"+PaO()+"Ssame,1)}else{Ssame=c"+PaO()+"Ssame,0)}",[], - "}",[], - "Nnew=c"+PPa("")+";Nsame=c"+PPa(""),[], - "for"+PaO()+"J in 1:length"+PaO()+"Dt)){",[], - " if"+PaO(2)+"Snew[J]==1)|"+PaO()+"Smain[J]==1)){Nnew=c"+PaO()+"Nnew,J)}",[], - " if"+PaO()+"Ssame[J]==1){Nsame=c"+PaO()+"Nsame,J)}",[], - "}",[], - "Out=Dt[1:Nnew[1]]",[], - "for"+PaO()+"J in Looprange"+PaO()+"2,length"+PaO()+"Nnew))){",[], - " Tmp=max"+PaO()+"c"+PaO()+"1,Nsame[Nsame<Nnew[J]]))",[], - " Tmp=max"+PaO()+"c"+PaO()+"Tmp,Nnew[J-1]))+1",[], - " Out=c"+PaO()+"Out,Dt[Tmp:Nnew[J]])",[], - "}",[], - "Tmp=max"+PaO()+"c"+PaO()+"Nsame[-1],Nnew[-1]))+1",[], - "Out=c"+PaO()+"Out,Dt[Tmp:length"+PaO()+"Dt)])",[], - "writeLines"+PaO()+"Out,'"+fout+"',sep='\n')",[] //180412[2lines removed] - ]; - CalcbyR("",cmdL,append(options,"Cat=n"));//180412 - wait(1000); - Changework(dirtop);//17.04.10 - tmp=replace(fout,".tex",""); - if(iswindows(), - Makebat(tmp,"tv"); - , - Makeshell(tmp,"tv"); - ); - kc(); - Changework(dirworkorg);//17.04.10 - Fillstore(store);//181125 -); -////%Mkslidesummary end//// - ////%Example start//// Example(exorg):=Example(exorg,""); Example(exorg,suborg):=( @@ -5649,787 +5255,6 @@ Example(exorg,suborg):=( ); ////%Example end//// -////%BBdata start//// -BBdata():=BBdata(BBTarget,0); -BBdata(fname):=BBdata(fname,0); // 16.04.09 -BBdata(fname,optionorg):=( -//help:BBdata(filename); -//help:BBdata(options=0(automatic),1(make),"w=","h="); - regional(fout,flg,path,file,kcfile,options,eqL,reL,stL, - waiting,addop,tmp,tmp1,tmp2); - path=""; - file=fname; - flg=0; - waiting=2; - forall(reverse(1..length(fname)), - if(flg==0, - tmp=substring(fname,#-1,#); - if(tmp=="/" % tmp=="\", // 14.01.15 - path=substring(fname,0,#-1); - file=substring(fname,#,length(fname)); - flg=1; - ); - ); - ); - if(path=="",path=Dirwork);//16.10.05 - if(indexof(file,".")==0,file=file+".pdf"); - if(islist(optionorg),options=optionorg,options=[optionorg]); - tmp=Divoptions(options); - eqL=tmp_5; - reL=tmp_6; - stL=tmp_7; - flg=0; - addop=""; - if(length(reL)>0, - tmp=reL_1; - if(tmp==1,flg=1); - ); - forall(stL, - tmp=Toupper(substring(#,0,1)); - if(tmp=="M",flg=1); - ); - forall(eqL, - tmp=indexof(#,"="); - tmp1=Toupper(substring(#,0,1)); //181111 - tmp2=substring(#,tmp,length(#)); - if(tmp1=="W", - addop=addop+",width="+tmp2; - options=remove(options,[#]); - ); - if(tmp1=="H", - addop=addop+",height="+tmp2; - options=remove(options,[#]); - ); - ); - tmp=indexof(file,"."); - tmp1=substring(file,0,tmp-1); - fout=tmp1+".txt"; - if(iswindows(), - kcfile="kc.bat"; - , - if(ismacosx(), //181219 - kcfile="kc.command"; - , - kcfile="kc.sh"; - ); - ); - if(flg==0, - tmp=load(fout); // - if(length(tmp)==0, - flg=1; - , - tmp=tokenize(tmp,"%%"); - tmp=tmp_2; - tmp1=indexof(tmp,":"); - tmp=substring(tmp,tmp1,length(tmp)); - tmp=Removespace(tmp); - if(tmp!=file,flg=1); - ); - ); - if(length(path)==0, - path=Dirwork; - ); - if(flg==1, - setdirectory(path); - tmp=load(file); - setdirectory(Dirwork); - if(length(tmp)==0, - println(" => "+file+" not exists"); - flg=-1; - ); - ); - if(flg==1, - SCEOUTPUT = openfile(kcfile); - if(!iswindows(), - println(SCEOUTPUT,"#!/bin/sh"); - ); - println(SCEOUTPUT,"cd "+Dq+path+Dq); - tmp=replace(PathT,"pdflatex","extractbb"); //16.11.22 - tmp=replace(tmp,"pdftex","extractbb"); //16.11.22 - tmp=replace(tmp,"xelatex","extractbb"); - tmp=replace(tmp,"uplatex","extractbb"); //17.09.20 - tmp=replace(tmp,"platex","extractbb"); - tmp=replace(tmp,"latex","extractbb"); - tmp=tmp+" -O "+file; - if(iswindows(), - tmp=tmp+" > "+Dirwork+"\"+fout; - , - tmp=tmp+" > "+Dirwork+"/"+fout; - ); - println(SCEOUTPUT,tmp); - println(SCEOUTPUT,"exit 0"); - closefile(SCEOUTPUT); - kc(Dirwork+"/"+kcfile,Mackc+Dirlib,Fnametex); // 16.06.07 - ); - if(flg>=0, - tmp1=0; - repeat(floor(waiting*1000/WaitUnit), - if(tmp1==0, - wait(10); - tmp=load(fout); - if(indexof(tmp,"CreationDate")>0, - tmp1=1; - ); - ); - ); - if(length(tmp)==0, - println(fout+" not generated. Maybe "+kcfile+" not run."); - , - tmp=tokenize(tmp,"%%"); - tmp=select(tmp,indexof(#,"Bounding")>0); - tmp=tmp_2; // - tmp1=indexof(tmp,":"); - tmp=substring(tmp,tmp1,length(tmp)); - tmp=Removespace(tmp); - tmp=tokenize(tmp," "); - tmp1=""; - forall(tmp, - tmp1=tmp1+Sprintf(#,2)+" "; - ); - tmp1=Removespace(tmp1)+addop; - tmp2="\includegraphics[bb="+tmp1+"]{"+file+"}"; - println(tmp2); - ); - ); -// setdirectory(Dirwork); - tmp2; // 16.04.25 -); -////%BBdata end//// - -////%Findfun start//// -Findfun(name,lineorg):=( - regional(line,sep,pL,jj,kk,flg,rmv,out,tmp,tmp1,tmp2); - line=Removespace(lineorg); - rmv=[name,"regional","forall","if","text","curkernel","append","concat"]; - rmv=concat(rmv,["append","apply","allelements","indexof"]); - rmv=concat(rmv,["substring","select","isstring","length"]); - rmv=concat(rmv,["round","unicode","openfile","closefile","println","replace"]); - rmv=concat(rmv,["setdirectory","parse","tokenize","import","load","ispoint"]); - rmv=concat(rmv,["isreal","layer","autoclearlayer","drawpoly","allcircles"]); - rmv=concat(rmv,["floor","flatten","prepend","islist","print","mod","abs","sum"]); - rmv=concat(rmv,["cos","sin","tan","arccos","arcsin","arctan","sqrt","reverse","re"]); - rmv=concat(rmv,["sort","contains","max","min","allpoints","isselected","common"]); - rmv=concat(rmv,["inspect","iscircle","alllines","repeat","remove","format"]); - rmv=concat(rmv,["ceil","while","dist","det","exp","err","arctan2","fillpoly"]); - rmv=concat(rmv,["drawtext","mouse","allsegments","createpoint","create"]); - rmv=concat(rmv,["gsave","connect","draw","grestore","wait"]); - -// rmv=concat(rmv,["d","list","c","funN","funP","function","for","return"]); // in string (for R) -// rmv=concat(rmv,["gsub","cat"]); // in string (for R) -// rmv=concat(rmv,["options"]); // written for Windows -// rmv=concat(rmv,["isexists"]); // java functions - - sep=[""," ",",","=","(","+","-","*","/","^","_","[",".","!","&","%",Dq,";",">","<",unicode("0009")]; - out=[]; - if(substring(line,0,2)!="//", - pL=Indexall(line,"("); - forall(pL,jj, - flg=0; - if(contains(pL,jj-1), flg=1); - forall(reverse(1..(jj-1)), - if(flg==0, - if(#==1, - tmp=substring(line,0,1); - if(contains(sep,tmp), - tmp=substring(line,1,jj-1); - , - tmp=substring(line,0,jj-1); - ); - flg=1; - ); - ); - if(flg==0, - tmp=substring(line,#-1,#); - if(contains(sep,tmp), - tmp=substring(line,#,jj-1); - if(indexof(substring(line,0,#-1),"//")==0, - flg=1; - ); - ); - ); - ); - if((flg==1)&(length(tmp)>0), - out=append(out,tmp); - ); - ); - ); - out=remove(out,rmv); - tmp=out; - out=[]; - forall(tmp, - if(!contains(out,#),out=append(out,#)); - ); - out; -); -////%Findfun end//// - -////%Extractfun start//// -Extractfun(strL):=( - regional(nL,str,str2,start,sep,out,tmp,tmp1,tmp2); - out=[]; - forall(strL,str, - nL=Indexall(str,Dq); - str2=""; - start=0; - forall(1..(length(nL)/2), - tmp1=nL_(2*#-1); - str2=str2+substring(str,start,tmp1-1); - start=nL_(2*#); - ); - str2=str2+substring(str,start,length(str)); - fL=Findfun("csdraw",str2); - out=remove(out,fL); - out=concat(out,fL); - ); -); -////%Extractfun end//// - -//DL1=Readcsv(Dirhead+pathsep()+"ketcindyjs","basic1list.txt"); -//DL2=Readcsv(Dirhead+pathsep()+"ketcindyjs","basic2list.txt"); -//DL=concat(DL1,DL2); -//Out=[]; - -////%Extractall start//// -Extractall(name):=( - regional(fL,jj,tmp,tmp1,tmp2,tmp3); - fL=apply(Out,#_1); - tmp1=select(DL,#_1==name); - if(length(tmp1)>0, - tmp1=tmp1_1; - if(!contains(fL,tmp1), - Out=append(Out,tmp1); - fL=append(fL,tmp1_1); - if(length(tmp1)>=5, - forall(5..(length(tmp1)),jj, - tmp=tmp1_jj; - if(!contains(fL,tmp), - Extractall(tmp); - ); - ); - ); - ); - ); - tmp1=Out; - Out=[]; - forall(1..(length(tmp1)), - if(!contains(Out,tmp1_#), - Out=append(Out,tmp1_#); - ); - ); - Out; -); -////%Extractall end//// - -////%Copyketcindyjs start//// 190128 -Copyketcindyjs():=( - regional(tmp,tmp1,tmp2,drive,fname); - if(iswindows(), - drive="C:"; - fname=Dirhead; - tmp=indexof(fname,":"); - if(tmp>0, - drive=substring(Dirwork,0,tmp); - fname=substring(fname,tmp,length(fname)); - ); - kc():=( - println("kc : "+kc(Dirwork+Batparent,Dirlib,Fnametex)); // 16.06.04 - ); - SCEOUTPUT = openfile(Batparent); - println(SCEOUTPUT,drive); - println(SCEOUTPUT,"cd "+Dqq(fname)); - println(SCEOUTPUT,"set xcp="+Dqq("\Windows\System32\xcopy")); - tmp1=Dqq("%xcp%")+" /Y /Q /S /E /R "+Dqq("ketcindyjs\"); - tmp2=" "+Dqq(Dircdy+"ketcindyjs\"); - println(SCEOUTPUT,tmp1+"Cindy.js.map"+tmp2); - println(SCEOUTPUT,tmp1+"webfont.js"+tmp2); - println(SCEOUTPUT,tmp1+"katex-plugin.js"+tmp2); - println(SCEOUTPUT,tmp1+"Cindy.js"+tmp2); - println(SCEOUTPUT,tmp1+"CindyJS.css"+tmp2); - tmp1=Dqq("%xcp%")+" /Y /Q /S /E /R "+Dqq("ketcindyjs\katex\"); - tmp2=" "+Dqq(Dircdy+"ketcindyjs\katex\"); - println(SCEOUTPUT,tmp1+"katex.min.css"+tmp2); - println(SCEOUTPUT,tmp1+"katex.min.js"+tmp2); - tmp1=Dqq("%xcp%")+" /Y /Q /S /E /R "+Dqq("ketcindyjs\katex\fonts\"); - tmp2=" "+Dqq(Dircdy+"ketcindyjs\katex\fonts\"); - println(SCEOUTPUT,tmp1+"KaTeX_Main-Regular.ttf"+tmp2); - println(SCEOUTPUT,tmp1+"KaTeX_Main-Regular.woff"+tmp2); - println(SCEOUTPUT,tmp1+"KaTeX_Main-Regular.woff2"+tmp2); - println(SCEOUTPUT,tmp1+"KaTeX_Math-Italic.ttf"+tmp2); - println(SCEOUTPUT,tmp1+"KaTeX_Math-Italic.woff"+tmp2); - println(SCEOUTPUT,tmp1+"KaTeX_Math-Italic.woff2"+tmp2); - println(SCEOUTPUT,"exit 0"); - closefile(SCEOUTPUT); - , - kc():=( - println("kc : "+kc(Dirwork+Shellparent,Mackc+Dirlib,Fnametex)); - ); - tmp1=Dircdy; //190214from - if(substring(tmp1,length(tmp1)-1,length(tmp1))=="/", - tmp1=substring(tmp1,0,length(tmp1)-1); - ); //190214to - SCEOUTPUT = openfile(Shellparent); - println(SCEOUTPUT,"#!/bin/sh"); - println(SCEOUTPUT,"cd "+Dqq(tmp1)); //190214from - println(SCEOUTPUT,"mkdir ketcindyjs"); - println(SCEOUTPUT,"cd "+Dqq(Dirhead+"/ketcindyjs")); - println(SCEOUTPUT,"cp -r -p katex "+tmp1+"/ketcindyjs"); - println(SCEOUTPUT,"cp -p Cindy.js "+tmp1+"/ketcindyjs"); - println(SCEOUTPUT,"cp -p Cindy.js.map "+tmp1+"/ketcindyjs"); - println(SCEOUTPUT,"cp -p CindyJS.css "+tmp1+"/ketcindyjs"); - println(SCEOUTPUT,"cp -p katex-plugin.js "+tmp1+"/ketcindyjs"); - println(SCEOUTPUT,"cp -p webfont.js "+tmp1+"/ketcindyjs"); //190214to - println(SCEOUTPUT,"exit 0"); - closefile(SCEOUTPUT); - ); - kc(); -); -////%Coptketcindyjs end//// - -////%Ketjsoption start//// 190201 -Ketjsoption():=Setketcindyjs(); -Ketjsoption(list):=Setketcindyjs(list); -////%Ketjsoption end//// - -////%Setketcindyjs start//// 190201 -Setketcindyjs():=( - KETJSOP; -); -Setketcindyjs(list):=( -//help:Setketcindyjs(); -//help:Setketcindyjs(["Local=(n)","Scale=(1)","Nolabel=[]"]); - regional(eqL,color,tmp); - tmp=Divoptions(list); - eqL=tmp_5; - tmp=tmp_(length(tmp)); - tmp=substring(tmp,1,length(tmp)); - tmp=replace(tmp,"->","="); - parse(tmp); - tmp=round(255*color); - if(color!=[0,0,0],eqL=append(eqL,"Color="+text(tmp))); - KETJSOP=eqL; - KETJSOP; -); -////%Setketcindyjs end//// - -////%Mkketcindyjs start//// 190115 -Mkketcindyjs():=Mkketcindyjs(KETJSOP); //190129 -Mkketcindyjs(options):=( //17.11.18 -//help:Mkketcindyjs(); -//help:Mkketcindyjs(options=["Local=(y)","Scale=(1)","Nolabel=[]","Color=","Grid="]); -//help:Mkketcindyjs(optionsadd=["Web=(y)","Path=Dircdy"]); - regional(webflg,localflg,htm,htmorg,from,upto,flg,fL,fun,jj,tmp,tmp1,tmp2,tmp3, - libnameL,libL,lib,jc,nn,name,partL,toppart,lastpart,path,ketflg,flg,cmdL,scale, - nolabel,color,grid,out,igL,DL,Out); - libnameL=["basic1","basic2","3d"]; - webflg="Y"; //190128 texflg removed - localflg="Y"; //190209,0215 - scale=1; //190129 - nolabel=["SW","NE"]; //190129 - color=""; - grid=""; - path=Dircdy; - forall(options, - tmp=Strsplit(#,"="); - tmp1=Toupper(substring(tmp_1,0,1)); - tmp2=tmp_2; - if(tmp1=="W", - if(length(tmp2)>0, //190209 - webflg=Toupper(substring(tmp2,0,1)); - ); - ); - if(tmp1=="L", - if(length(tmp2)>0, //190209 - localflg=Toupper(substring(tmp2,0,1)); - ); - ); - if(tmp1=="S", - if(length(tmp2)>0, //190209 - scale=parse(tmp2); - ); - ); - if(tmp1=="N", - if(length(tmp2)>0, //190209 - tmp=tmp2; - if(indexof(tmp2,"[")>0, - tmp=substring(tmp2,1,length(tmp2)-1); - ); - tmp=tokenize(tmp,","); - nolabel=concat(nolabe,tmp); - ); - ); - if(tmp1=="C", //190209 - if(length(tmp2)>0, - color=tmp2; - if(substring(color,0,1)=="[", //190130from - color=substring(color,1,length(color)-1); - ); //190130to - ); - ); - if(tmp1=="G", - if(length(tmp2)>0, - grid=tmp2; - ); - ); - if(tmp1=="P", - if(!tmp2="Dircdy", - path=tmp2; - ); - ); - ); - if((webflg=="N")&(localflg=="Y"), - if(!isexists(Dircdy,"ketcindyjs"), - Copyketcindyjs(); - println("ketcindyjs has been copied"); - ); - ); - if(!isexists(Dircdy,Fhead+".html"), - drawtext(mouse().xy-[0,1],"'Write/Rewrite to CindyJS' at first",size->24,color->[1,0,0]); - wait(3000); - , - htmorg=Readlines(Dircdy,Fhead+".html"); - tmp=select(1..(length(htmorg)),indexof(htmorg_#,"id="+Dqq("csinit"))>0); //190206from - from=tmp_1+5; - flg=0; - forall(from..(length(htmorg)), - if(flg==0, - if(indexof(htmorg_#,"</script>")>0, - upto=#-1; - flg=1; - ); - ); - ); - tmp2=[]; - ketflg="off"; - forall(htmorg_(from..upto), - if(indexof(#,"no ketjs")>0, - if(indexof(#,"no ketjs on")>0, - ketflg="on"; - ); - if(indexof(#,"no ketjs off")>0, - ketflg="off"; - ); - , - if(ketflg=="off", - tmp=Removespace(#); - if(substring(tmp,0,2)!="//", - tmp2=append(tmp2,#); - ); - ); - ); - ); - tmp=select(1..(length(htmorg)),indexof(htmorg_#,"id="+Dqq("csdraw"))>0); - from=tmp_1+1; - flg=0; - forall(from..(length(htmorg)), - if(flg==0, - if(indexof(htmorg_#,"</script>")>0, - upto=#-1; - flg=1; - ); - ); - ); - ketflg="off"; - forall(htmorg_(from..upto), - if(indexof(#,"no ketjs")>0, - if(indexof(#,"no ketjs on")>0, - ketflg="on"; - ); - if(indexof(#,"no ketjs off")>0, - ketflg="off"; - ); - , - if(ketflg=="off", - tmp=Removespace(#); - if(substring(tmp,0,2)!="//", - tmp2=append(tmp2,#); - ); - ); - ); - ); - fL=Extractfun(tmp2); //190206to - DL=[]; - forall(libnameL,name, //190209from - tmp2=Readlines(Dirhead+pathsep()+"ketcindyjs",name+"list.txt"); - tmp1=[]; - forall(1..(length(tmp2)),nn, - tmp=Indexall(tmp2_nn,","); - from=0; - tmp3=[]; - forall(tmp, - tmp3=append(tmp3,substring(tmp2_nn,from,#-1)); - from=#; - ); - tmp3=append(tmp3,substring(tmp2_nn,from,length(tmp2_nn))); - tmp1=append(tmp1,tmp3); - ); - DL=concat(DL,tmp1); //DL and Out are necessary for Extractall - ); //190209to - Out=[]; - forall(fL,fun, - Extractall(fun); - ); - tmp=Readlines(Dirhead+pathsep()+"ketcindyjs","ignoredfun.txt"); - tmp=apply(tmp,Removespace(#)); //190131 - igL=select(tmp,(length(#)>0)&(substring(#,0,2)!="//")); //190131 - tmp1=select(Out,contains(igL,#_1)); - Out=remove(Out,tmp1); USEDFUN=apply(Out,#_1); //190130 - tmp1=select(1..(length(htmorg)),indexof(htmorg_#,"script id=")>0); - partL=[]; - forall(tmp1,nn, - from=nn; - tmp2=htmorg_from; - tmp=Indexall(tmp2,Dq); - name=substring(tmp2,tmp_1,tmp_2-1); - tmp=select((from+1)..(length(htmorg)),indexof(htmorg_#,"</script>")>0); - upto=tmp_1; - partL=append(partL,[name,from,upto]); - ); - tmp=apply(partL,#_2); - tmp=min(tmp)-1; - toppart=[1,tmp]; - tmp=apply(partL,#_3); - tmp=max(tmp)+1; - lastpart=[tmp,length(htmorg)]; - if(webflg=="Y", - tmp1=Fhead+"json.html"; - , - tmp1=Fhead+"jsoff.html"; - if(localflg=="Y",tmp1=replace(tmp1,"off.","offL.")); //190209 - ); - setdirectory(path); - SCEOUTPUT = openfile(tmp1); - tmp1=htmorg_((toppart_1)..(toppart_2)); - if(webflg=="N", - if(localflg=="N", //190128 - tmp3=replace(Dirhead+"/ketcindyjs/",pathsep(),"/"); - tmp= " <link rel="+Dqq("stylesheet")+" href="; - tmp=tmp+Dq+"file:///"+tmp3+"CindyJS.css"+Dq+">"; - tmp1_(length(tmp1)-2)=tmp; - tmp= " <script type="+Dqq("text/javascript")+" src="; - tmp=tmp+Dq+"file:///"+tmp3+"Cindy.js"+Dq+"></script>"; - tmp1_(length(tmp1)-1)=tmp; - tmp=" <script type="+Dqq("text/javascript")+" src="; //190117from - tmp1_(length(tmp1))=""; //190120 - , - tmp1_(length(tmp1)-2)= //190128from - " <link rel="+Dqq("stylesheet")+" href="+Dqq("ketcindyjs/CindyJS.css")+">"; //190203 - tmp1_(length(tmp1)-1)= - " <script type="+Dqq("text/javascript")+" src="+Dqq("ketcindyjs/Cindy.js")+"></script>"; //190203 - tmp1_(length(tmp1))=""; //190128to - ); - , - tmp1_(length(tmp1))=""; //190117to - ); - forall(tmp1, - println(SCEOUTPUT,#); - ); - tmp="<script id="+Dqq("csinit")+" type="; - tmp=tmp+Dqq("text/x-cindyscript")+">"; - println(SCEOUTPUT,tmp); - tmp=Readlines(Dirhead+pathsep()+"ketcindyjs","commonused.txt"); - forall(tmp, - println(SCEOUTPUT,#); - ); - libL=[]; //190209from - forall(libnameL, - tmp=Readlines(Dirhead+"/ketlib","ketcindylib"+#+"r.cs"); - libL=append(libL,tmp); - ); //190209to - forall(Out,fun, - libf=fun_2;from=parse(fun_3);upto=parse(fun_4); - tmp=select(1..(length(libnameL)),indexof(libf,libnameL_#)>0); //190209from - tmp=tmp_1; - lib=libL_tmp; - tmp1=lib_(from..upto); //190209from - ketflg="off"; //190122from - forall(tmp1, - if(indexof(#,"no ketjs")>0, - if(indexof(#,"no ketjs on")>0, - ketflg="on"; - ); - if(indexof(#,"no ketjs off")>0, - ketflg="off"; - ); - , - if(ketflg=="off", - tmp=Removespace(#); - if(substring(tmp,0,2)!="//", - println(SCEOUTPUT,#); - ); - ); //190122to - ); - ); - ); - tmp=select(partL,#_1=="csinit"); - if(length(tmp)>0, - tmp=tmp_1; - from=tmp_2+5; //190206 - upto=tmp_3; - tmp1=htmorg_((from+1)..(upto-1)); //190119 - kettef="off"; //190206from - forall(tmp1, - if(indexof(#,"no ketjs")>0, - if(indexof(#,"no ketjs on")>0, - ketflg="on"; - ); - if(indexof(#,"no ketjs off")>0, - ketflg="off"; - ); - , - if(ketflg=="off", - tmp=Removespace(#); - if(substring(tmp,0,2)!="//", - println(SCEOUTPUT,#); - , - tmp1=indexof(tmp,"only ketjs"); //19020l6from - if(tmp1>0, - println(SCEOUTPUT,substring(tmp,2,tmp1-1)); - ); //190206to - ); - ); - ); - ); - ); - println(SCEOUTPUT,"</script>"); - tmp=select(partL,#_1=="csdraw"); - tmp=tmp_1; - from=tmp_2; - upto=tmp_3; - tmp1=htmorg_(from..upto); - ketflg="off"; //190202from - forall(tmp1, - if(indexof(#,"no ketjs")>0, - if(indexof(#,"no ketjs on")>0, - ketflg="on"; - ); - if(indexof(#,"no ketjs off")>0, - ketflg="off"; - ); - , - if(ketflg=="off", - tmp=Removespace(#); - if(substring(tmp,0,2)!="//", - println(SCEOUTPUT,#); - , - tmp1=indexof(tmp,"only ketjs"); //19020l6from - if(tmp1>0, - println(SCEOUTPUT,substring(tmp,2,tmp1-1)); - ); //190206to - ); - ); - ); - ); //190206to - tmp1=htmorg_((lastpart_1)..(lastpart_2)); - tmp=select(1..(length(tmp1)),indexof(tmp1_#,Dqq("cs*"))>0); - tmp=tmp_1; - forall(1..tmp, //190117from - println(SCEOUTPUT,tmp1_#); - ); - from=tmp+1; //190117to - tmp=" use: ["+Dqq("katex")+"],"; - println(SCEOUTPUT,tmp); - out=[]; //190129 - forall(from..(length(tmp1)),jj, - flg=0; //190126from - tmp2=["Figure","Parent","ParaF","Anime","Flip","Title","Slide","Digest", - "KeTJS","KeTJSoff","Objview"]; - if(indexof(tmp1_jj,"type: "+Dqq("Button"))>0, - nn=indexof(tmp1_jj,"text: "); - tmp=substring(tmp1_jj,nn-1,length(tmp1_jj)); - nn=Indexall(tmp,Dq); - tmp=substring(tmp,nn_1,nn_2-1); - if(!contains(tmp2,tmp), - out=append(out,tmp1_jj); //190129 - ); - flg=1; - ); - if(flg==0, - tmp=Indexof(tmp1_jj,"labeled: "); //190225 - if(tmp>0, - tmp2=tmp1_jj; - tmp=Indexall(tmp2,Dq); //190129from - tmp=substring(tmp2,tmp_1,tmp_2-1); - if(contains(nolabel,tmp), - if(indexof(tmp2,"labeled: true")>0, - tmp2=replace(tmp2,"labeled: true","labeled: false"); - ); - ); - if(indexof(tmp2,"size:")==0, - tmp2=replace(tmp2,"}",", size: 3.0}"); - out=append(out,tmp2); //190129 - , - out=append(out,tmp2); //190129 - ); //190129to - flg=1; - ); - ); - if(flg==0, - out=append(out,tmp1_jj); //190129 - ); //190126to - ); - tmp=select(1..(length(out)),indexof(out_#," ],")>0); //190129from - tmp=tmp_1; - tmp1=out_(tmp-1); - if(substring(tmp1,length(tmp1)-1,length(tmp1))==",", //190201from - out_(tmp-1)=substring(tmp1,0,length(tmp1)-1); - ); //190201to - tmp=select(1..(length(out)),indexof(out_#,"width:")>0); - jj=tmp_1; - tmp1=out_jj; - flg=0; - forall(1..(length(tmp1)-1), - if(flg==0, - tmp=substring(tmp1,#-1,#); - if(tmp==":", - tmp2=substring(tmp1,#+1,length(tmp1)-1); - flg=1; - ); - ); - ); - tmp=round(scale*parse(tmp2)); - out_jj=" width: "+text(tmp)+","; - tmp=select(1..(length(out)),indexof(out_#,"height:")>0); - jj=tmp_1; - tmp1=out_jj; - flg=0; - forall(1..(length(tmp1)-1), - if(flg==0, - tmp=substring(tmp1,#-1,#); - if(tmp==":", - tmp2=substring(tmp1,#+1,length(tmp1)-1); - flg=1; - ); - ); - ); - tmp=round(scale*parse(tmp2)); - out_jj=" height: "+text(tmp)+","; - if(length(color)>0, - tmp=select(1..(length(out)),indexof(out_#,"background: ")>0); - jj=tmp_1; - tmp=indexof(out_jj,")"); //190130from - tmp=substring(out_jj,tmp-1,length(out_jj)); - out_jj=" background: "+Dq+"rgb("+color+tmp; //190130to - ); - if(length(grid)>0, - tmp=select(1..(length(out)),indexof(out_#,"grid:")>0); - jj=tmp_1; - tmp1=" grid: "+grid; - if(indexof(out_jj,",")>0, - tmp1=tmp1+","; - ); - out_jj=tmp1; - ); - forall(out, - println(SCEOUTPUT,#); - ); //190129to - closefile(SCEOUTPUT); - setdirectory(Dirwork); - if(webflg=="Y",tmp="json",tmp="jsoff"); - drawtext(mouse().xy-[0,1],tmp+"in "+path,size->20,color->[1,0,0]); - wait(1000); - ); -); -////%Mkketcindyjs end//// //help:end(); diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic3logr.txt b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic3logr.txt new file mode 100644 index 00000000000..439a6342477 --- /dev/null +++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic3logr.txt @@ -0,0 +1,61 @@ +// 20190623 +// Fracform,Gcd added +// 20190618 +// Mkketcindyjs changed (Error message) +// 20190615 +// WritetoRS,Usegraphics,Viewtex,Figpdf changed ( indexof for pict2e,tikz ) +// 20190604 +// Mkketcindyjs changed ( eqflg added ) +// 20190528 +// Animationparam changed ( stop => rng) +// 20190524 +// Animationparam added +// 20190522 +// Textedit2value changed +// Tocindyform,Tocindyformpart debugged +// Toctexform,Totexformpart debugged +// 20190521 +// Textedit2value added +// Tocindyform,Tocindyformpart adde +// Totexform changed (pi => \pi, case without "()") +// 20190515 +// Totexform,Totexformpart changed(enhanced) +// 20190514 +// Totexform,Totexformpart added +// Copyketcindyjs debugged ( "/" added for "cd") +// 20190506 +// Setketcindyjs,Mkketcindyjs debugged (color) +// 20190504 +// Mkketcindyjs changed ( rmptL,REMOVEPTJS,border,"z" ) +// 20190502 +// Mkketcindyjs changed ( only ketjs on/off added ) +// 20190430 +// Textedit added +// Mkketcindyjs debugged ( only ketjs) +// 20190428 +// Mkketcindyjs debugged ( basic3d => basic3 ) +// Tenkeybrd, Getkey changed +// 20190427 +// Tenkeybrd, Getkey added +// 20190423 +// Ketcindyjsdata and Mkketcindyjs changed +// 20190422 +// Ketcindyjsdata added +// Setketcindyjs, Mkketcindyjs changed ( for Ketcindyjsdata ) +// 20190419 +// Findfun debugged ( inside of "" removed ) +// 20190417 +// Mkketcindyjs changed ( Ignore options ) +// 20190416 +// Findfun, Extractun, Extractall moved from basic2 +// Mkketcindyjs, Extractall debugged ( IgnoreList, DL globalized ) +// 20190415 +// Makeshell debugged ( Dq -> Dqq ) +// Makebat debugged ( tex,path (\) ) +// parse( ..= ) changed ( ; added ) +// 20190414 +// Makeshell Makebat changed ( Dqq(fname ) +// 20190412 +// newly generated +// Some functions moved from basic2 +// Figpdf debugged (SCALEY) diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic3r.cs b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic3r.cs new file mode 100644 index 00000000000..8a953f20a95 --- /dev/null +++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic3r.cs @@ -0,0 +1,4162 @@ +// Copyright (C) 2014 Setsuo Takato, KETCindy Japan project team +// +//This program 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 of the License, or +// (at your option) any later version. +// +// This program 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 this program. If not, see <http://www.gnu.org/licenses/> +// + +println("ketcindylibbasic3[20190623] loaded"); + +//help:start(); + +////%Tenkeybrd start//// +Tenkeybrd(pLB):=Tenkeybrd(pLB,[]); +Tenkeybrd(pLB,options):=( +//help:Tenkeybrd([2,1],"Size=1.5"); +//help: Tenkeybrd(Buttons shoud be given) + regional(axes,xL,yL,size,shade,color,tmp,tmp1); + size="Size=1.5"; + shade="Y"; + color="Color=[0,0,0.2,0]"; + forall(options, + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,2)); + if(tmp1=="SI", + size=#; + ); + if(tmp1=="SH", + shade=Toupper(substring(tmp_2,0,1)); + ); + if(tmp1=="CO", + color=#; + ); + ); + axes=ADDAXES; + cell=8; + if(shade=="Y", + Framedata2("tenkey",[pLB,pLB+cell/10*[3,5]]); + Shade(["frtenkey"],[color]); + ); + xL=apply(1..3,cell); + yL=apply(1..5,cell); + Tabledata(xL,yL,[],[0,"Setw=n","Move="+text(pLB)]); + Addax(axes); + [tmp1,tmp2]; +); +////%Tenkeybrd end//// + +////%Keyaction start//// +Keyaction(key):=( + regional(kL,kstr,endflg,sign); +//help:Keyaction(key); +//help:Getkey(Tenkeys should be given in advance) + endflg=0; + sign=1; + if(indexof(Tenkeys,"-")>0, + sign=-1; + Tenkeys=replace(Tenkeys,"-",""); + ); + kstr=Tenkeys; + if((key=="C")%(key=="A")%(key=="=")%(indexof(key,"-")>0), + if(key=="C",kstr=substring(kstr,0,length(kstr)-1)); + if(key=="A",sign=1;kstr=""); + if(key=="=",endflg=1); + if(indexof(key,"-")>0,sign=-sign); + , + kstr=kstr+key; + ); + if(substring(kstr,0,1)==".",kstr="0"+kstr); + if(sign==-1, + kstr="-"+kstr; + ); + Tenkeys=kstr; + endflg; +); +////%Keyaction end//// + +////%Dispchoice start//// +Dispchoice():=( + if(islist(Ch), + if(!isreal(ChNum),ChNum=1); + drawtext(mouse().xy,"Ch="+text(Ch)+" N="+text(ChNum),size->24,color->[0,0,1]); + ); +); +////%Dispchoice end//// + +////%Datetime start//// +Datetime():=( +//help:Datetime(); + regional(names,dt,tmp); + tmp=getdatetime(); + dt=tokenize(tmp," "); + dt=apply(dt,if(!isstring(#),text(#),#)); + names=["Jan","Feb","Mar","Apr","May","Jun", + "Jul","Aug","Sep","Oct","Nov","Dec"]; + tmp=select(1..12,names_#==dt_2); + tmp=text(tmp_1); + tmp=[dt_6+"/"+tmp+"/"+dt_3,dt_4]; +); +////%Datetime end//// + +////%Readcsvsla start//// +Readcsvsla(fname):=Readplotdigdata(fname,[]); +Readcsvsla(fname,options):=Readplotdigdata(fname,options); +Readplotdigdata(fname):=Readplotdigdata(fname,[]); +Readplotdigdata(fname,options):=( + regional(fsc,mv,cmdall,dataL,nd,npt,ptdata,ii,tmp,tmp1,tmp2,tmp3); + tmp=Divoptions(options); + tmp1=tmp_6; + sc=1;//10; + mv=[0,0];//[5,5]; + forall(tmp1, + if(!islist(#),sc=#,mv=#); + ); + if(indexof(fname,".")>0, + tmp=load(fname); + , + tmp=load(fname+".txt"); + ); + cmdall=tokenize(tmp,"//"); + dataL=[]; + forall(2..length(cmdall),ii, + tmp1=parse("["+cmdall_ii+"]"); + dataL=append(dataL,tmp1); + ); + if(length(dataL_(length(dataL)))<2, + dataL=dataL_(1..(length(dataL)-1)); + ); + nd=length(dataL_1)/2; + npt=length(dataL); + ptdata=[]; + forall(1..nd,ii, + tmp3=[]; + forall(1..npt, + tmp1=dataL_#_(2*ii-1); + tmp2=dataL_#_(2*ii); + if(isreal(tmp1), + tmp3=append(tmp3,[tmp1,tmp2]); + ); + ); + ptdata=append(ptdata,tmp3); + ); + tmp1=[]; + forall(ptdata, + tmp=#/sc; + tmp=Translatedata("1",[tmp],-mv,["nodata"]); + tmp1=append(tmp1,tmp); + ); + ptdata=tmp1; + ptdata; +); +////%Readcsvsla end//// + +////%Writebezier start//// +Writebezier():=Writebezier(Fhead,"all"); +Writebezier(head):=Writebezier(head,"all"); +Writebezier(head,seL):=( +//help:Writebezier(file); +//help:Writebezier(file,"acd"); + regional(bz,dt,name,tmp,tmp1,tmp2); + bz=select(GLIST,indexof(#,"=Bezier")>0); + tmp1=[]; // 16.04.22from + if(seL!="all", + forall(1..length(seL), + tmp=substring(seL,#-1,#); + tmp=select(bz,indexof(#,"bz"+tmp)>0); + tmp1=concat(tmp1,tmp); + ); + bz=tmp1;// 16.04.22until + ); + dt=[head+"n",[[length(bz),0]]]; + forall(1..length(bz), + tmp=indexof(bz_#,"="); + name=substring(bz_#,0,tmp-1); + tmp=indexof(bz_#,","+Dq); + if(tmp>0, + tmp1=substring(bz_#,0,tmp-1)+")"; + , + tmp1=bz_#; + ); + tmp1=replace(tmp1,"Bezier(","["); + tmp1=replace(tmp1,"list"+PaO(),"["); + tmp1=replace(tmp1,")","]"); + tmp1=replace(tmp1,",",".xy,"); + tmp1=replace(tmp1,"]",".xy]"); + tmp1=replace(tmp1,".xy,[",",["); + tmp1=replace(tmp1,"].xy","]"); + tmp1=replace(tmp1,name,head+text(#))+";"; //190415 + parse(tmp1); + tmp=parse(head+text(#)+"_1"); + dt=concat(dt,[head+text(#)+"k",tmp]); + tmp=parse(head+text(#)+"_2"); + dt=concat(dt,[head+text(#)+"c",tmp]); + ); + WriteOutData(head+".txt",dt); + dt; +); +////%Writebezier end//// + +////%Readbezier start//// +Readbezier(file):=Readbezier(file,[]); +Readbezier(file,optionorg):=( +//help:Readbezier("xsr"); +//help:Readbezier(options=["Num=10","nogeo"]); + regional(nn,options,stL,geo,nc,alpha,out,tmp,tmp1,tmp2,tmp3); + options=optionorg; + tmp=Divoptions(options); + stL=tmp_7; + geo=0; + forall(stL, + tmp=Toupper(substring(#,0,1)); + if(tmp=="G",geo=1); + options=remove(options,[#]); + ); + Readoutdata(file); + tmp=file+"n_1_1"; + nn=parse(tmp); + out=[]; + forall(1..nn,nc, + tmp=file+text(nc); + tmp1=parse(tmp+"k"); + tmp2=parse(tmp+"c"); + if(Measuredepth(tmp2)==1,tmp2=[tmp2]); // 16.04.22from + if(geo==1, + alpha="abcdefghijklmnopqrstuvwxyz"; + forall(1..length(tmp1), + tmp="k"+BezierNumber+"n"+text(nc)+substring(alpha,#-1,#); + Putpoint(tmp,tmp1_#,parse(tmp+".xy")); + inspect(parse(tmp),"labeled",false); + inspect(parse(tmp),"ptsize",3); + tmp1_#=parse(tmp+".xy"); + ); + forall(1..length(tmp2), + tmp="c"+BezierNumber+"n"+text(nc)+substring(alpha,#-1,#)+"1"; + Putpoint(tmp,tmp2_#_1,parse(tmp+".xy")); + inspect(parse(tmp),"labeled",false); + inspect(parse(tmp),"color",4); + inspect(parse(tmp),"ptsize",3); + tmp2_#_1=parse(tmp+".xy"); + tmp="c"+BezierNumber+"no"+text(nc)+substring(alpha,#-1,#)+"2"; + Putpoint(tmp,tmp2_#_2,parse(tmp+".xy")); + inspect(parse(tmp),"labeled",false); + inspect(parse(tmp),"color",4); + inspect(parse(tmp),"ptsize",3); + tmp2_#_2=parse(tmp+".xy"); + ); + BezierNumber=BezierNumber+1; + ); + Bezier(file+text(nc),tmp1,tmp2,options);// 16.04.22until + out=append(out,"bz"+tmp); + ); + out; +); +////%Readbezier end//// + +////%RSform start//// +RSform(str):=RSform(str,3); +RSform(str,listfrom):=( +//help:RSform(string,listfrom); + regional(posL,mxlv,rep1,rep2,rep3,prev,out, + tmp,tmp1,tmp2); + rep1="c"+PaO(); rep2="c"+PaO(); rep3="list"+PaO(); + if(listfrom<3,rep2="list"+PaO()); + if(listfrom==1,rep1="list"+PaO()); + posL=Bracket(str,"[]"); + tmp=apply(posL,#_2); + mxlv=max(tmp); + out=""; + prev=0; + forall(posL, + out=out+substring(str,prev,#_1-1); + prev=#_1; + if(#_2>0, + tmp1=select(posL,tmp,(tmp_2<0)&(tmp_1>#_1)); + tmp1=tmp1_1_1; + tmp=substring(str,#_1,tmp1); + if(#_2==mxlv,out=out+rep1); + if(#_2==mxlv-1,out=out+rep2); + if(#_2<=mxlv-2,out=out+rep3); + , + out=out+")"; + ); + ); + out=out+substring(str,prev,length(str)); + out=replace(out,".xy",""); + out=replace(out,".x","[1]"); + out=replace(out,".y","[2]"); + out=replace(out,"c"+PPa("1"),"[1]");//17.10.06[2lines] + out=replace(out,"c"+PPa("2"),"[2]"); + out; +); +////%RSform end//// + +////%RSslash start//// +RSslash(str):=( //17.09.24 + regional(tmp); + tmp=replace(str,"\","\\"); +// tmp=replace(tmp,"\\\\","\\"); + tmp; +); +////%RSslash end//// + +////%Rform start//// +Rform(list):=( + regional(plotlist,comp,pos,out,strL,tmp,tmp1,tmp2,tmp3,Nj); + out=list; + out=replace(out,"[[[","list"+PaO()+"[["); + out=replace(out,"[","c"+PaO()); + out=replace(out,"]",")"); + out=replace(out,".xy",""); + out=replace(out,".x","[1]"); + out=replace(out,".y","[2]"); + out; +); +////%Rform end//// + +////%Defvar start//// +Defvar(varstr):=( + regional(name,value,tmp,tmp1); + if(isstring(varstr), + parse(varstr+";"); + tmp=indexof(varstr,"="); + name=substring(varstr,0,tmp-1); + value=substring(varstr,tmp,length(varstr)); + value=parse(value); + tmp1=select(1..length(VLIST),VLIST_#_1==name); + if(length(tmp1)>0, + tmp=tmp1_1; + VLIST_tmp=[name,value]; + , + VLIST=prepend([name,value],VLIST); + ); + , + forall(1..(length(varstr)/2), // 16.11.16from + name=varstr_(2*#-1); + value=varstr_(2*#); + Defvar(name,value); + ); // 16.11.16until + ); +); +Defvar(name,value):=( +//help:Defvar("a",0.3); +//help:Defvar(["a",0.3,"b",2]); + regional(tmp,tmp1); + if(islist(value), + tmp1="["; + forall(value, + if(isstring(#), // 16.11.14 + tmp1=tmp1+Dq+#+Dq+","; // 16.11.14 + , + tmp1=tmp1+format(#,5)+","; + ); + ); + tmp1=substring(tmp1,0,length(tmp1)-1)+"]"; + , + tmp1=format(value,5); + ); + tmp=name+"="+tmp1+";"; // 15.02.06//190415 + parse(tmp); + VLIST=select(VLIST,#_1!=name); // 15.02.08 + VLIST=prepend([name,value],VLIST); +); +////%Defvar end//// + +////%IftoR start//// +IftoR(strorg):=( //180802 + regional(str,ifL,ppL,cpL,kk,sL,out, + tmp,tmp1,tmp2,tmp3,tmp4); + str=replace(strorg,LFmark,""); + ifL=Indexall(str,"if"+PaO()); + ppL=Bracket(str,"()"); + cpL=Indexall(str,","); + tmp1=Bracket(str,"[]"); + forall(1..(length(tmp1)/2),kk, + cpL=select(cpL,#<tmp1_(2*kk-1)_1%#_1>tmp1_(2*kk)_1); + ); + forall(1..length(ifL),kk, + tmp=select(ppL,#_1>ifL_kk); + tmp1=tmp_1; + tmp2=select(tmp,#_2==-tmp1_2); + tmp2=tmp2_1; + tmp3=select(cpL,#>tmp1_1 & #<tmp2_1); + ifL_kk=[tmp1_1,tmp2_1,tmp1_2,tmp3]; + ); + forall(1..length(cpL),kk, + tmp=select(1..length(ifL),contains(ifL_#_4,cpL_kk)); + tmp1=tmp_(length(tmp)); + cpL_kk=[cpL_kk,tmp1]; + ); + sL=apply(1..length(str),substring(str,#-1,#)); + forall(1..length(ifL),kk, + tmp1=ifL_kk_1; + tmp2=ifL_kk_2; + tmp=select(cpL,#_2==kk); + tmp3=apply(tmp,#_1); + sL_tmp1="("; + sL_tmp2="}"; + sL_(tmp3_1)="){"; + if(length(tmp3)>1, + sL_(tmp3_2)="}else{"; + ); + ); + out=sum(sL); + out; +); +////%IftoR end//// + +////%FortoR start//// +FortoR(strorg):=( + regional(str,pre,post,sub,ppL,forstr,out,tmp,tmp1,tmp2); + str=strorg; + forstr=indexof(str,"forall("); + if(forstr==0, + out=str; + , + pre=substring(str,0,forstr-1)+"for"+PaO(); + ppL=Bracket(str,"()"); + tmp1=forstr+6; + tmp=select(ppL,#_1==tmp1); + tmp=select(ppL,#_2==-tmp_1_2); + tmp2=tmp_1_1; + sub=substring(str,tmp1,tmp2-1); + post="}"+substring(str,tmp2,length(str)); + tmp=indexof(sub,","); + tmp1=substring(sub,0,tmp-1); + tmp2=substring(sub,tmp,length(sub)); + sub=tmp1+"){"+tmp2; + tmp1=indexof(sub,"{"); + tmp2=indexof(sub,","); + tmp=substring(sub,tmp1,tmp2-1); + pre=pre+tmp+" in "+substring(sub,0,tmp1-1)+"{"; + sub=substring(sub,tmp2,length(sub)); + tmp=FortoR(sub); + out=pre+tmp+"}"; + ); + out=replace(out,"..",":"); + out; +); +////%FortoR end//// + +////%Deffun start//// +Deffun(name,bodylist):=( +//help:Deffun("f(x)",["regional(y)","y=x^2*(x-3)","y"]); + regional(funstr,str,Pos,nbody,bdy,ppL,bpL,excma,tmp,tmp1,tmp2); + funstr=name+":=("; + forall(bodylist, + funstr=funstr+#+";"; + ); + funstr=funstr+");"; + parse(funstr); + tmp=indexof(name,"("); + str=substring(name,0,tmp-1)+"<-function"+PaO(); + str=str+substring(name,tmp,length(name))+"{"; + forall(1..(length(bodylist)-1),nbody, + bdy=bodylist_nbody; + Pos=indexof(bdy,"regional")+indexof(bdy,"local"); + if(Pos==0, + bdy=replace(bdy,LFmark,""); + bdy=replace(bdy," ",""); + ppL=Bracket(bdy,"()"); + bpL=Bracket(bdy,"[]"); + tmp1=select(bpL,#_2==1); + tmp2=select(bpL,#_2==-1); + excma=[]; + forall(1..(length(tmp1)), + excma=append(excma,[tmp1_#_1,tmp2_#_1]); + ); + tmp1=Indexall(bdy,","); + forall(tmp1,cma, + tmp=select(excma,(#_1<cma)&(cma<#_2)); + if(length(tmp)>0, + bdy=substring(bdy,0,cma-1)+"'"+substring(bdy,cma,length(bdy)); + ); + ); + tmp=indexof(bdy,"forall"); + if(tmp>0, + bdy=FortoR(bdy); + ); + tmp=indexof(bdy,"if("); + if(tmp>0, + bdy=IftoR(bdy); + ); + bdy=RSform(replace(bdy,"'",",")); + str=str+bdy+";"; + ); + ); + str=str+"return"+PaO()+bodylist_(length(bodylist))+")}"; + FUNLIST=append(FUNLIST,str); +); +////%Deffun end//// + +////%WritetoRS start//// +WritetoSci():=WritetoRS(); //17.12.19 +WritetoSci(Arg):=WritetoRS(Arg);//180619 +WritetoRS():=WritetoRS(FnameR);// 17.09.17from +WritetoRS(Arg):=( + regional(string,filename,shch,tmp1,tmp2); + if(isstring(Arg), + string=Arg; + if(indexof(string,".r")>0, + filename=string; + shch=""; + , + filename=FnameR; + shch=string; + ); + WritetoRS(filename,shch); + , + if(Arg<=1,WritetoRS(FnameR,"all")); + if(Arg==2,WritetoRS(FnameR,"sh")); + ); +); +WritetoRS(filename,shchoice):=( + regional(Plist,Pos,GrL,str,tmp,tmp1,tmp2,cmd,ns,spos,epos); + //help:WritetoRS(2); + println("Write to R "+filename); + Plist=[]; + Pnamelist=[]; + forall(remove(allpoints(),[SW,NE]), + if(indexof(#.name,"[")==0, //181106 + tmp=Lcrd(#); + tmp1=format(re(tmp_1),6);// 15.02.05 + tmp2=format(re(tmp_2),6); + tmp=#.name+"="+"c("+tmp1+","+tmp2+");"; + tmp=tmp+"Assignadd('"+#.name+"',"+#.name+")"; + Plist=append(Plist,tmp); + , + println("Remove the abnormal poiint "+#.name); //181106 + ); + ); + SCEOUTPUT = openfile(filename); + tmp=Datetime(); + println(SCEOUTPUT,"# date time="+tmp_1+" "+tmp_2); + if(isstring(CindyName), // 16.12.25from + if(length(CindyPathName)>0, + println(SCEOUTPUT, + "# path file="+CindyPathName+" "+CindyFileName+".cdy"); + , + println(SCEOUTPUT,""); + ); + , + println(SCEOUTPUT,""); + ); + if(iswindows(), + println(SCEOUTPUT,"options"+PaO()+"encoding='UTF-8')"); //190111 + ); + tmp1=replace(Dirwork,"\","/"); + if((iswindows())&(indexof(tmp1,"Users")>0), + tmp=Indexall(tmp1,"/"); + tmp2=substring(tmp1,tmp_3-1,length(tmp1)); + tmp1=substring(tmp1,0,tmp_3-1); + println(SCEOUTPUT,"Drv=shell"+PaO()+"'echo %HOMEDRIVE%',intern=TRUE)"); //190111 + println(SCEOUTPUT,"Drv=Drv[length"+PaO()+"Drv)]"); + println(SCEOUTPUT,"Hpath=shell"+PaO()+"'echo %HOMEPATH%',intern=TRUE)"); + println(SCEOUTPUT,"Hpath=Hpath[length"+PaO()+"Hpath)]"); + println(SCEOUTPUT,"Rest="+Dqq(tmp2)); + println(SCEOUTPUT,"Path=paste"+PaO()+"Drv,Hpath,Rest,sep='')"); + println(SCEOUTPUT,"Path=gsub"+PaO()+"'\\','/',Path,fixed=TRUE)"); //180610 + println(SCEOUTPUT,"setwd"+PaO()+"Path)"); + , + println(SCEOUTPUT,"setwd"+PaO()+"'"+tmp1+"')"); + );//180409to + tmp=replace(Libname,"\","/"); //17.09.24from + println(SCEOUTPUT,"source"+PaO()+"'"+tmp+".r')"); //181213 + if((indexof(PathT,"pdflatex")>0)%(indexof(PathT,"lualatex")>0), + if(GPACK=="tpic",GPACK="pict2e"); + ); + if(indexof(GPACK,"pict2e")>0, // 190615 + tmp=replace(tmp+"_rep2e","\","/"); + println(SCEOUTPUT,"source('"+tmp+".r')"); + ); + if(indexof(GPACK,"tikz")>0, //181213from //190615 + tmp=replace(tmp+"_reptikz","\","/"); + println(SCEOUTPUT,"source"+PaO()+"'"+tmp+".r')"); + ); //181213to + println(SCEOUTPUT,"Ketinit"+PPa("")); + println(SCEOUTPUT,"cat"+PaO()+"ThisVersion,'\n')"); + println(SCEOUTPUT,"Fnametex='"+Fnametex+"'"); + println(SCEOUTPUT,"FnameR='"+FnameR+"'"); + println(SCEOUTPUT,"Fnameout='"+Fnameout+"'"); + println(SCEOUTPUT,"arccos=acos; arcsin=asin; arctan=atan"); + println(SCEOUTPUT,"Acos<- function"+PPa("x")+"{acos"+PaO()+"max"+PaO()+"-1,min"+PaO()+"1,x)))}"); + println(SCEOUTPUT,"Asin<- function"+PPa("x")+"{asin"+PaO()+"max"+PaO()+"-1,min"+PaO()+"1,x)))}"); + println(SCEOUTPUT,"Atan=atan"); + println(SCEOUTPUT,"Sqr<- function"+PPa("x")+"{if"+PaO()+"x>=0){sqrt"+PaO()+"x)}else{0}}"); + println(SCEOUTPUT,"Factorial=factorial"); + println(SCEOUTPUT,"Norm<- function"+PPa("x")+"{norm"+PaO()+"matrix"+PaO()+"x,nrow=1),"+Dqq("2")+")}"); + println(SCEOUTPUT,""); + forall(COM0thlist, + if(indexof(#,"Texcom")==0, //17.09.22 + println(SCEOUTPUT,RSform(#)); + , + println(SCEOUTPUT,#); + ); + ); + println(SCEOUTPUT, + "Setwindow(c"+PaO()+XMIN+","+XMAX+"), c"+PaO()+YMIN+","+YMAX+"))"); + forall(Plist, + println(SCEOUTPUT,#); + ); + VLIST=select(VLIST,substring(#_1,0,1)!="["); //181107 + forall(VLIST, + tmp=#_1; + tmp1=#_2; + if(!isstring(tmp1), + if(islist(tmp1), + tmp2="["; + forall(tmp1, + tmp2=tmp2+Textformat(#,6)+","; + ); + tmp1=substring(tmp2,0,length(tmp2)-1)+"]"; + , + tmp1=format(tmp1,6); + ); + ); + tmp1=RSform(tmp1); + print(SCEOUTPUT,tmp+"="+tmp1+";"); //17.09.22 +// tmp=substring(tmp,0,length(tmp)-1); + println(SCEOUTPUT,"Assignadd"+PaO()+"'"+tmp+"',"+tmp+")"); + ); + forall(FUNLIST, + println(SCEOUTPUT,#); + ); + forall(GLIST, //no ketjs on + println(SCEOUTPUT,RSform(#)); + ); //no ketjs off + tmp=text(Pnamelist); + tmp=replace(tmp,"[","list"+PaO()); + Pnamelist=replace(tmp,"]",")"); + println(SCEOUTPUT,"PtL="+Pnamelist); + tmp=select(GCLIST,#_2==-1); + GrL=apply(tmp,#_1); + tmp=text(GrL); + tmp=replace(tmp,"[","list"+PaO()); + tmp=replace(tmp,"]",")"); + println(SCEOUTPUT,"GrL="+tmp); + tmp1=""; + if(length(tmp1)>0, + tmp1="WriteOutData"+PaO()+"Fnameout"+tmp1+");"; + println(SCEOUTPUT,tmp1); + ); + forall(COM1stlist, + if(indexof(#,"Texcom")==0, //17.09.22 + println(SCEOUTPUT,RSform(#)); + , + println(SCEOUTPUT,#); + ); + ); + println(SCEOUTPUT,""); + println(SCEOUTPUT,"# Windisp"+PPa("GrL")); + println(SCEOUTPUT,""); + println(SCEOUTPUT,"if"+PaO()+"1==1){"); + println(SCEOUTPUT,""); + tmp1=replace(Dirwork,"\","/"); //180408to + if((iswindows())&(indexof(tmp1,"Users")>0), + println(SCEOUTPUT,"Path=paste"+PaO()+"Path,"+Dqq("/"+Fnametex)+",sep='')"); + tmp="Openfile(Path,'"+ULEN+"'"; + , + tmp="Openfile('"+tmp1+"/"+Fnametex+"','"+ULEN+"'"; + ); + tmp=tmp+",'Cdy="+Cindyname()+".cdy"; //180404 + tmp=replace(tmp,"\","\\"); + println(SCEOUTPUT,tmp+"')"); + forall(COM2ndlistb, //180613from + if(indexof(#,"Texcom")==0, + println(SCEOUTPUT,RSform(#)); + , + println(SCEOUTPUT,#); + ); + );//180613to + forall(COM2ndlist,cmd, + tmp=substring(cmd,0,4); + if(contains(["Lett","Expr"],tmp), //180721from + tmp1=Indexall(cmd,Dq); + tmp2=length(tmp1)/4; + str=""; ns=0; + forall(tmp2, + spos=tmp1_(4*#-1); epos=tmp1_(4*#); + str=str+RSform(substring(cmd,ns,spos-1)); + str=str+substring(cmd,spos-1,epos); + ns=epos; + ); + str=str+substring(cmd,ns,length(cmd)); + println(SCEOUTPUT,str); + , + if(indexof(cmd,"Texcom")==0, + println(SCEOUTPUT,RSform(cmd)); + , + println(SCEOUTPUT,cmd); + ); + ); //180721to + ); + if(length(GrL)>0, + println(SCEOUTPUT," Drwline"+PPa("GrL")); + ); + // println(SCEOUTPUT,"Closefile"+PaO()+"'"+ADDAXES+"')"); //181224(2line) + println(SCEOUTPUT,"Closefile"+PaO()+""+Dqq("0")+")"); + println(SCEOUTPUT,""); + println(SCEOUTPUT,"}"); + if(shchoice=="sh", + println(SCEOUTPUT,""); + println(SCEOUTPUT,"quit"+PPa("")); + , + println(SCEOUTPUT,""); + println(SCEOUTPUT,"#quit"+PPa("")); + ); + closefile(SCEOUTPUT); + if(iswindows(), //180513from + SCEOUTPUT = openfile("execsrc.r");//180514 + tmp1=replace(Dirwork,"\","/"); + if(indexof(tmp1,"Users")>0, + tmp=Indexall(tmp1,"/"); + tmp2=substring(tmp1,tmp_3-1,length(tmp1)); + tmp1=substring(tmp1,0,tmp_3-1); + println(SCEOUTPUT,"Drv=shell"+PaO()+"'echo %HOMEDRIVE%',intern=TRUE)"); + println(SCEOUTPUT,"Drv=Drv[length"+PaO()+"Drv)]"); + println(SCEOUTPUT,"Hpath=shell"+PaO()+"'echo %HOMEPATH%',intern=TRUE)"); + println(SCEOUTPUT,"Hpath=Hpath[length"+PaO()+"Hpath)]"); + println(SCEOUTPUT,"Rest="+Dqq(tmp2)); + println(SCEOUTPUT,"Path=paste"+PaO()+"Drv,Hpath,Rest,sep='')"); + println(SCEOUTPUT,"setwd"+PaO()+"Path)"); + println(SCEOUTPUT,"source"+PaO()+"'"+filename+"',encoding='UTF-8')"); + ); + closefile(SCEOUTPUT); + ); //180513to +); +////%WritetoRS end//// + +////%Readoutdata start//// +Readoutdata():=Readoutdata(Fnameout); +Readoutdata(filename):=Readoutdata("",filename); //16.03.07 +Readoutdata(Arg1,Arg2):=( //181030from + if(islist(Arg2), + Readoutdata("",Arg1,Arg2); + , + Readoutdata(Arg1,Arg2,[]); + ); +); //181030to +Readoutdata(pathorg,filenameorg,optionsorg):=( +//help:Readoutdata(); +//help:Readoutdata("file.txt"); +//help:Readoutdata("/datafolder","file.txt"); +//help:Readoutdata(options=["Disp=n(/y)]"); + regional(options,path,filename,varname,varL,ptL,pts,tmp,tmp1,tmp2,tmp3,tmp4, + nmbr,cmdall,cmd,cmdorg,outdt,goutdt,eqL,dispflg); + options=optionsorg; + dispflg=1; + tmp=Divoptions(options); //181024from + eqL=tmp_5; + forall(eqL, + tmp=Strsplit(#,"="); + tmp1=substring(tmp_1,0,1); tmp1=Toupper(tmp1); + tmp2=substring(tmp_2,0,1); tmp2=Toupper(tmp2); + if(tmp1=="D", + if(tmp2=="N",dispflg=0); + options=remove(options,[#]); //181030 + ); + ); //181024to + path=pathorg; //16.03.07 from + if(length(path)>0, + setdirectory(path); + if(indexof(path,"\")>0,tmp1="\",tmp1="/"); + tmp=substring(path,length(path)-1,length(path)); + if(tmp!=tmp1,path=path+tmp1); + ); //16.03.07to + filename=filenameorg; // 16.04.17 + if(indexof(filename,".")==0,filename=filename+".txt"); + tmp=load(filename); + cmdall=tokenize(tmp,"//"); + varname=cmdall_1; + cmdall=cmdall_(2..length(cmdall)); + outdt=[]; + varL=[varname]; + ptL=[]; + forall(cmdall,cmdorg, + cmd=replace(cmdorg,LFmark,""); + if(length(cmd)>0, + if(cmd=="start" % cmd=="end" % substring(cmd,0,1)=="[", + if(cmd=="start", + pts=[]; + ); + if(cmd=="end", + ptL=append(ptL,pts); + ); + if(substring(cmd,0,1)=="[", + tmp1=parse(cmd); + if(length(tmp1_1)==2, + tmp1=apply(tmp1,Pcrd(#)); + ); + pts=concat(pts,tmp1); + ); + , + if(length(ptL)>0, + if(length(ptL)==1, + ptL=ptL_1; + tmp=apply(ptL,Textformat(#,6)); + , + tmp="["; + forall(ptL,tmp1, + tmp=tmp+apply(tmp1,Textformat(#,6))+","; + ); + tmp=substring(tmp,0,length(tmp)-1)+"]"; + ); + , + tmp="[]"; + ); + parse(varname+"="+tmp+";"); //190415 + outdt=append(outdt,ptL); + ptL=[]; + varname=cmd; + varL=append(varL,varname); + ); + ); + ); + if(length(ptL)>0, + if(length(ptL)==1, + ptL=ptL_1; + tmp=apply(ptL,Textformat(#,6)); + , + tmp="["; + forall(ptL,tmp1, + tmp=tmp+apply(tmp1,Textformat(#,6))+","; + ); + tmp=substring(tmp,0,length(tmp)-1)+"]"; + ); + , + tmp="[]"; + ); + parse(varname+"="+tmp+";"); //190415 + outdt=append(outdt,ptL); + if(path=="",tmp=filename,tmp=path+filename); //16.03.07 + GOUTLIST=append(GOUTLIST,[tmp,varL]); + if(length(path)>0, // 16.03.09 + setdirectory(Dirwork); // 16.03.07 + ); + print("readoutdata from "+tmp+" : "); + if(dispflg==1, //181024from + println(varL); + , + println(""); + ); //181024to + varL; +); +////%Readoutdata end//// + +////%Writeoutdata start//// +Writeoutdata(filename,ptlist):=( +//help:Writeoutdata("file.txt",["g1",gr1,"sg",sgAB]); +//help:Writeoutdata("file.txt",["g1",gr1,"sg",sgAB]); + regional(nn,Gname,Gdata,Str,Gstr,Gj,Pt,Flg,tmp,tmp1,loopend); + Flg=0; + if(isstring(ptlist_(length(ptlist))), + Flg=1; + ); + SCEOUTPUT = openfile(filename); + if(Flg==0, + loopend=length(ptlist)/2; + , + loopend=length(ptlist); + ); + Gstr="["; + forall(1..loopend,nn, + if(Flg==0, + Gname=ptlist_(2*nn-1); + , + Gname=ptlist_nn; + ); + Gstr=Gstr+Gname+","; + println(SCEOUTPUT,Gname+"//"); + if(Flg==0, + Gdata=ptlist_(2*nn); + , + Gdata=parse(Gname); + ); + Gdata=Flattenlist(Gdata); + if(Measuredepth(Gdata)==1,Gdata=[Gdata]); + forall(Gdata,Gj, + println(SCEOUTPUT,"start//"); + Str=""; + forall(Gj,Pt, + if(length(Str)>0, + Str=Str+"," + ); + Str=Str+"["+format(Pt_1,5)+","; + Str=Str+format(Pt_2,5); + if(length(Pt)<3, + Str=Str+"]"; + , + Str=Str+","+format(Pt_3,5)+"]"; + ); + if(length(Str)>80, + println(SCEOUTPUT,"["+Str+"]//"); + Str=""; + ); + ); + if(length(Str)>0, + println(SCEOUTPUT,"["+Str+"]//"); + ); + if((nn==loopend) & (Gj==Gdata_(length(Gdata))), + println(SCEOUTPUT,"end////"); + , + println(SCEOUTPUT,"end//"); + ); + ); + ); + closefile(SCEOUTPUT); + Gstr=substring(Gstr,0,length(Gstr)-1)+"]"; + println("writeoutdata "+filename+":"+Gstr); +); +////%Writeoutdata end//// + +////%Makeshell start//// +Makeshell():=( + if(length(Texmain)>0, + Texparent=Texmain; + ); + if(length(Texparent)>0, + Makeshell(Texparent); + if(length(FigPdfList)>0, + SCEOUTPUT=openfile(Texparent+".tex"); + forall(FigPdfList,println(SCEOUTPUT,#)); + closefile(SCEOUTPUT); + ); + , + Makeshell(Fhead+"main"); + ); +); +Makeshell(texmainfile):=Makeshell(texmainfile,"rtv"); +Makeshell(texmainfile,flow):=( + regional(parent,tmp,tmp1,tmp2,tmp3,flg,tex,path,shnm); + parent=Dirwork+Shellparent; // 16.05.29 + kc():=( + println("kc : "+kc(Dirwork+Shellparent,Mackc+Dirlib,Fnametex)); // 16.06.04,06.07 + ); + tmp1=""; +// tmp2=parent; + flg=0; + forall(reverse(1..length(parent)), + if(flg==0, + tmp=substring(parent,#-1,#); + if(tmp=="/" % tmp=="\", // 14.01.15 + tmp1=substring(parent,0,#-1); + tmp2=substring(parent,#,length(parent)); + flg=1; + ); + ); + ); + if(length(tmp1)>0, + setdirectory(tmp1); + ); + SCEOUTPUT = openfile(tmp2); + println(SCEOUTPUT,"#!/bin/sh"); + println(SCEOUTPUT,"cd "+Dqq(Dirwork)); // 15.07.16 + tmp1=" "+Dqq(Fhead)+" "+Dqq(texmainfile); // 15.12.11 //190415from + tmp=Indexall(PathT,"/"); + flg=length(tmp); + if(flg>0, + tmp=tmp_(length(tmp)); + tex=substring(PathT,tmp,length(PathT)); + path=substring(PathT,0,tmp-1); + ); //190415to + if(flg==0, // 17.10.13[Norbert] + tex=PathT; + path=""; + ); + if(indexof(flow,"r")>0, + tmp=Dqq(PathR)+" --vanilla --slave < "+Dqq(Fhead+".r"); //190414 + // 17.09.14 + println(SCEOUTPUT,tmp); + ); + if(tex=="latex" % tex=="platex" % tex=="uplatex", //17.08.13 + tmp=Dqq(PathT)+" "+Dqq(texmainfile+".tex"); //190415 + println(SCEOUTPUT,tmp); + if(indexof(flow,"tt")>0,println(SCEOUTPUT,tmp)); //17.10.14 + tmp=replace(Dqq(PathT),tex,"dvipdfmx")+" "+Dqq(texmainfile+".dvi"); //190415 + println(SCEOUTPUT,tmp); + tmp="rm "+Dqq(texmainfile+".dvi"); //190414 + println(SCEOUTPUT,tmp); + ); + if(tex=="xelatex", + tmp="export PATH="+path+":${PATH}"; + println(SCEOUTPUT,tmp); + tmp="xelatex"+" "+Dqq(texmainfile+".tex"); //190414 + println(SCEOUTPUT,tmp); + if(indexof(flow,"tt")>0,println(SCEOUTPUT,tmp)); //17.10.14 + tmp="rm "+Dqq(texmainfile+".dvi"); //190414 + println(SCEOUTPUT,tmp); + ); + if(tex=="pdflatex" % tex=="pdftex",//16.11.22from + tmp=Dqq(PathT)+" "+Dqq(texmainfile+".tex"); //190414 + println(SCEOUTPUT,tmp); + if(indexof(flow,"tt")>0,println(SCEOUTPUT,tmp)); //17.10.14 + );//16.11.22until + if(tex=="lualatex",//16.12.16 + tmp=Dqq(PathT)+" "+Dqq(texmainfile+".tex"); //190414 + println(SCEOUTPUT,tmp); + if(indexof(flow,"tt")>0,println(SCEOUTPUT,tmp)); //17.10.14 + );//16.12.16 + if(!isstring(Pathpdf), + tmp="preview"; + , + tmp=Pathpdf; + ); + if(tmp=="preview" % tmp=="skim", // 16.09.09from,16.10.20 + tmp="open -a "+Dqq(tmp)+" "+Dqq(texmainfile+".pdf"); //190414 + , + tmp=Dqq(tmp)+" "+Dqq(texmainfile+".pdf"); //190414 + );// 16.09.09until + println(SCEOUTPUT,tmp); // 16.07.21until + println(SCEOUTPUT,"exit 0"); + closefile(SCEOUTPUT); + setdirectory(Dirwork); +); +////%Makeshell end//// + +////%Convsjiswin start//// +Convsjiswin(dir,fname,ext):=( //180401 + regional(ctr,flg,mx,tmp); + mx=200; + ctr=0;flg=0; + nkfwin(dir,fname,ext); + while((!isexists(dir,fname+".out"))&(ctr<mx), + wait(100);ctr=ctr+1; + ); + if(ctr==mx,flg=1); + if(flg==0, + wait(100);ctr=0; + nkfcpdel(dir,fname,ext); + while((isexists(dir,fname+".out"))&(ctr<mx), + wait(100);ctr=ctr+1; + ); + if(ctr==mx,flg=2); + ); + tmp=dir+pathsep()+fname+"."+ext; + if(flg==0, + tmp= + println(tmp+" converted"); + , + println(tmp+" not converted "+text(flg)); + ); +); +////%Convsjiswin end//// + +////%Makebat start//// +Makebat():=( + if(length(Texmain)>0, + Texparent=Texmain; + ); + if(length(Texparent)>0, + Makebat(Texparent); + if(length(FigPdfList)>0, + SCEOUTPUT=openfile(Texparent+".tex"); + forall(FigPdfList,println(SCEOUTPUT,#)); + closefile(SCEOUTPUT); + ); + , + Makebat(Fhead+"main"); + ); +); +Makebat(texmainfile):=Makebat(texmainfile,"rtv"); +Makebat(texmainfile,flow):=( + regional(drive,fname,tmp,tmp1,tmp2,tmp3,flg,tex,path,batnm); + drive="C:"; + fname=Dirwork+Batparent; + kc():=( + println("kc : "+kc(Dirwork+Batparent,Dirlib,Fnametex)); // 16.06.04 + ); + tmp=indexof(fname,":"); + if(tmp>0, + drive=substring(fname,0,tmp); + fname=substring(fname,tmp,length(fname)); + ); + tmp1=""; + tmp2=fname; + flg=0; + forall(reverse(1..length(fname)), + if(flg==0, + tmp=substring(fname,#-1,#); + if(tmp=="/" % tmp=="\" % tmp=="\", // 14.01.15 + tmp1=substring(fname,0,#-1); + tmp2=substring(fname,#,length(fname)); + flg=1; + ); + ); + ); + if(length(tmp1)>0, + setdirectory(drive+tmp1); + ); + SCEOUTPUT = openfile(tmp2); + fname=replace(Dirwork,"/","\"); + tmp=indexof(fname,":"); + if(tmp>0, + drive=substring(Dirwork,0,tmp); + fname=substring(Dirwork,tmp,length(Dirwork)); + println(SCEOUTPUT,drive); + ); + tmp=Dirwork;//180408form + if(iswindows(), + if((isincludefull(Dirwork))&(isexists(Dirwork,"sjis.txt")), + import("sjis.txt"); + ); + ); +// tmp=replace(tmp,"\","/"); //180408 +// println(SCEOUTPUT,"cd "+Dqq(tmp)); //180408 + tmp1=indexof(fname,"Users");//180409from + tmp2=indexof(fname,Homehead); + if((tmp1>0)%(tmp2>0), + if(tmp1>0, + fname=substring(fname,tmp1+length("Users")-1,length(fname)); + , + fname=substring(fname,tmp2+length(Homehead)-1,length(fname)); + ); + tmp=Indexall(fname,"\");//180403from + fname=substring(fname,tmp_2,length(fname)); + fname="%HOMEPATH%\"+fname; + );//180403to + println(SCEOUTPUT,"cd "+Dqq(fname));//180409to //190414 + tmp1=Indexall(PathT,"/"); //190415from + tmp2=Indexall(PathT,"\"); + tmp=concat(tmp1,tmp2); + flg=length(tmp); + if(flg>0, + tmp=tmp_(length(tmp)); + tex=substring(PathT,tmp,length(PathT)); + path=substring(PathT,0,tmp-1); + ); //190415to + if(flg==0, // 17.10.13[Norbert] + tex=PathT; + path=""; + ); + if(indexof(flow,"r")>0, + if(indexof(Dirwork,"Users")>0, //180917from + tmp=Dqq(PathR+"\R")+" --vanilla --slave < execsrc.r";//180514 + , + tmp=Dqq(PathR+"\R")+" --vanilla --slave < "+Dqq(Fhead+".r"); //190414 + ); //180917to + println(SCEOUTPUT,tmp); + ); + if(tex=="latex" % tex=="platex" % tex=="uplatex", //17.08.13 + tmp=Dqq(PathT)+" "+Dqq(texmainfile+".tex"); //190414 + println(SCEOUTPUT,tmp); + if(indexof(flow,"tt")>0,println(SCEOUTPUT,tmp)); //17.10.14 + tmp=replace(Dqq(PathT),tex,"dvipdfmx")+" "+Dqq(texmainfile+".dvi"); //190414 + println(SCEOUTPUT,tmp); + tmp="del "+Dqq(texmainfile+".dvi"); //190414 + println(SCEOUTPUT,tmp); + ); + if(tex=="xelatex", + tmp="set Path = %Path%;"+Dqq(path); //190414 + println(SCEOUTPUT,tmp); + if(indexof(flow,"tt")>0,println(SCEOUTPUT,tmp)); //17.10.14 + tmp="xelatex"+" "+texmainfile+".tex"; + println(SCEOUTPUT,tmp); + tmp="del "+Dqq(texmainfile+".dvi"); + println(SCEOUTPUT,tmp); + ); + if(tex=="pdflatex" % tex=="pdftex",//16.11.22from + tmp=Dqq(PathT)+" "+Dqq(texmainfile+".tex"); + println(SCEOUTPUT,tmp); + if(indexof(flow,"tt")>0,println(SCEOUTPUT,tmp)); //17.10.14 + );//16.11.22until + if(tex=="lualatex",//16.12.16 + tmp=Dqq(PathT)+" "+Dqq(texmainfile+".tex"); //190414 + println(SCEOUTPUT,tmp); + if(indexof(flow,"tt")>0,println(SCEOUTPUT,tmp)); //17.10.14 + );//16.12.16 + if(!isstring(Pathpdf), + tmp=indexof(PathS,"\scilab");// 15.12.12 + tmp=substring(PathS,0,tmp-1)+"\SumatraPDF\SumatraPDF.exe"; + , + tmp=Pathpdf; + ); + tmp=Dqq(tmp)+" "+Dqq(texmainfile+".pdf"); //190414 + println(SCEOUTPUT,tmp); + println(SCEOUTPUT,"exit 0"); + closefile(SCEOUTPUT); + if(indexof(Dirwork,":")==0, // 14.01.15 + drive="C:"; + , + drive=""; + ); + setdirectory(drive+Dirwork); +); +////%Makebat end//// + +////%Addpackage start//// +Addpackage(packorg):=( +//help:Addpackage("bm"); +//help:Addpackage(["bm","enumerate"]); +//help:Addpackage(["bm","[c]{somepackage}"]); + regional(packL,tmp); + packL=packorg; //17.06.25from + if(!islist(packL),packL=[packL]); + packL=apply(packL,replace(#,"\","/")); + forall(1..(length(packL)), + tmp=packL_#; + if(substring(tmp,0,11)=="ketpicstyle", + tmp=replace(Dirhead+"/"+tmp,"\","/"); + ); + if(indexof(tmp,"[")==0, + packL_#="{"+tmp+"}"; + ); + ); + ADDPACK=concat(ADDPACK,packL); //17.06.25to +); +////%Addpackage end//// + +////%Usegraphics start//// +Usegraphics(gpack):=( //180817 +//help:Usegraphics("pict2e"); + if(!contains(ADDPACK,gpack), + if(indexof(gpack,"tikz")>0, //181213from //190615 + Addpackage(["pgf","tikz"]); //190101 + , + Addpackage([gpack]); + ); //181213to + ); + GPACK=gpack; +); +////%Usegraphics end//// + +////%Viewtex start//// +Viewtex():=( + regional(texfile,tmp,tmp1,sep); + texfile=Fhead+"main"; +// if(iswindows(),sep="\",sep="/"); // 17.04.07 +// sep="/"; + SCEOUTPUT=openfile(texfile+".tex"); + tmp="\documentclass{article}"; + if(indexof(GPACK,"tikz")>0, //190324from //190615 + if(indexof(PathT,"pdflatex")+indexof(PathT,"lualatex")==0, + tmp="\documentclass[dvipdfmx]{article}"; + ); //190324to + ); + if(indexof(PathT,"platex")>0, + tmp=replace(tmp,"article","jarticle"); + if(indexof(PathT,"uplatex")>0, //17.08.13from + tmp=replace(tmp,"jarticle","ujarticle"); + );//17.08.13to + ); + println(SCEOUTPUT,tmp); + if((indexof(PathT,"pdflatex")>0)%(indexof(PathT,"lualatex")>0), //181213from + if(GPACK=="tpic", GPACK="pict2e"); + ); + if(GPACK=="tpic", + tmp=replace(Dirhead,"\","/"); + println(SCEOUTPUT,"\usepackage{ketpic,ketlayer}"); + ); + if(indexof(GPACK,"pict2e")>0, //190615 +// println(SCEOUTPUT,"\usepackage{pict2e}"); //190615 + println(SCEOUTPUT,"\usepackage{ketpic2e,ketlayer2e}"); + if(indexof(PathT,"lualatex")>0, + println(SCEOUTPUT,"\usepackage{luatexja}"); + ); + ); + if(indexof(GPACK,"tikz")>0, //190615 + println(SCEOUTPUT,"\usepackage{pict2e}"); //190615 + println(SCEOUTPUT,"\usepackage{ketpic2e,ketlayer2e}"); //190615 + if(indexof(PathT,"lualatex")>0, + println(SCEOUTPUT,"\usepackage{luatexja}"); + ); + );//181213to + println(SCEOUTPUT,"\usepackage{amsmath,amssymb}"); + println(SCEOUTPUT,"\usepackage{graphicx}"); + println(SCEOUTPUT,"\usepackage{color}"); + forall(ADDPACK, // 16.05.16from + println(SCEOUTPUT,"\usepackage"+#); //17.05.25 + );// 16.05.16until + println(SCEOUTPUT,""); +// println(SCEOUTPUT,"\def\ketcindy{{K\kern-.20em%"); // deleted 16.11.27,recovered11.29 redeleted17.04.07 +// println(SCEOUTPUT,"\lower.5ex\hbox{E}\kern-.125em{TCindy}}}"); +// println(SCEOUTPUT,""); + println(SCEOUTPUT,"\setmargin{20}{20}{20}{20}"); + println(SCEOUTPUT,""); + println(SCEOUTPUT,"\begin{document}"); + println(SCEOUTPUT,""); + println(SCEOUTPUT,"\verb|"+Fhead+"| by \ketcindy");// 16.01.12, 18, 16.04.08 +// println(SCEOUTPUT,"\verb|"+Fhead+"| by KeTCindy");// 16.11.29 temporarily + println(SCEOUTPUT,"\vspace{5mm}"); + println(SCEOUTPUT,""); + println(SCEOUTPUT,"\input{"+Fhead+".tex}"); + println(SCEOUTPUT,""); + println(SCEOUTPUT,"\end{document}"); + closefile(SCEOUTPUT); + if(iswindows(), + kc():=( + println("kc : "+kc(Dirwork+Batparent,Dirlib,Fnametex)); // 16.06.04 + ); + Makebat(texfile); + , + kc():=( + println("kc : "+kc(Dirwork+Shellparent,Mackc+Dirlib,Fnametex)); // 16.06.04 + ); + Makeshell(texfile); + ); + WritetoRS(2); //17.09.19 +); +////%Viewtex end//// + +////%Viewparent start//// +Viewparent():=( //17.04.13 + if(!isexists(Dirwork,Texparent+".tex"), + if(isstring(Texparent), + drawtext(mouse().xy,Texparent+".tex not exist", + size->24,color->[1,0,0]); + , + drawtext(mouse().xy,"Texparent not defined", + size->24,color->[1,0,0]); + ); + , + if(iswindows(), + Makebat(); + , + Makeshell(); + ); + WritetoRS(2); //17.09.29 + kc(); + ); +); +////%Viewparent end//// + +////%Figpdf start//// +Figpdf():=Figpdf(Texparent,[]); +Figpdf(Arg1):=( + if(isstring(Arg1), + Figpdf(Arg1,[]); + , + Figpdf(Texparent,Arg1); + ); +); +Figpdf(fnameorg,optionorg):=( +//help:Figpdf(); +//help:Figpdf([10,,10,,[0,2] ]);(margin(4),move) +//help:Figpdf([[0,0]]);(move) +//help:Figpdf(options=[5,5,5,5,[0,0]]]); + regional(options,fname,mar,pos,dp,sc,tmp,tmp1,tmp2,sep); + fname=fnameorg; + if(indexof(fnameorg,".")==0, + fname=fnameorg+".tex"; + ); + tmp=apply(optionorg,if(isstring(#),parse("["+#+"]"),#)); // 16.04.07 + tmp=select(tmp,#!=[]); + options=optionorg;//16.11.08from +// mar=[5,5,5,5]; + dp=[0,-3]; + tmp=select(options,islist(#)); + if(length(tmp)>0, + dp=tmp_1; + options=remove(options,tmp); + ); + tmp=4-length(options); + tmp1=apply(1..tmp,5); + mar=concat(options,tmp1); + mar=apply(mar,if(length(#)==0,5,#));//16.11.08until + pos=[mar_1+dp_1,mar_3+dp_2]; + sc=10; + tmp=indexof(ULEN,"cm"); + if(tmp>0, + tmp1=Removespace(substring(ULEN,0,tmp-1)); + sc=parse(tmp1)*10; + ); + tmp=indexof(ULEN,"mm"); + if(tmp>0, + tmp1=Removespace(substring(ULEN,0,tmp-1)); + sc=parse(tmp1); + ); + tmp="\documentclass{article}"; + if(indexof(GPACK,"tikz")>0, //190324from //190615 + if(indexof(PathT,"pdflatex")+indexof(PathT,"lualatex")==0, + tmp="\documentclass[dvipdfmx]{article}"; + ); //190324to + ); + if(indexof(PathT,"platex")>0, + tmp=replace(tmp,"article","jarticle"); + if(indexof(PathT,"uplatex")>0, //170813from + tmp=replace(tmp,"jarticle","ujarticle"); + );//170813to + ); + FigPdfList=append(FigPdfList,tmp); // 16.06.09until + tmp1="\special{papersize=W mm,H mm}"; + tmp=(XMAX-XMIN)*sc+(mar_1+mar_2); + tmp1=replace(tmp1,"W",text(tmp)); + tmp=SCALEY*(YMAX-YMIN)*sc+(mar_3+mar_4); //190412 + tmp1=replace(tmp1,"H",text(tmp)); + FigPdfList=append(FigPdfList,tmp1); + if(indexof(PathT,"pdflatex")+indexof(PathT,"lualatex")>0, //17.11.05from + FigPdfList=append(FigPdfList, + "\usepackage{pict2e}"); + tmp=replace(Dirhead,"\","/"); + tmp=replace(tmp,"scripts","tex/latex"); + if(isexists(tmp,""), + FigPdfList=append(FigPdfList, + "\usepackage{ketpic2e,ketlayer2e}"); + , + tmp=replace(Dirhead+"/ketpicstyle","\","/"); + FigPdfList=concat(FigPdfList, + ["\usepackage{"+tmp+"/ketpic2e}", + "\usepackage{"+tmp+"/ketlayer2e}"]); + ); + , + tmp=replace(Dirhead,"\","/"); + tmp=replace(tmp,"scripts","tex/latex"); + if(isexists(tmp,""), + FigPdfList=append(FigPdfList, + "\usepackage{ketpic,ketlayer}"); + , + tmp=replace(Dirhead+"/ketpicstyle","\","/"); + FigPdfList=concat(FigPdfList, + ["\usepackage{"+tmp+"/ketpic}", + "\usepackage{"+tmp+"/ketlayer}"]); + ); + );//17.11.05until + FigPdfList=append(FigPdfList, + "\usepackage{amsmath,amssymb}"); + FigPdfList=append(FigPdfList, + "\usepackage{graphicx,color}"); + forall(ADDPACK, // 16.05.16from + tmp1="\usepackage"+#; //17.07.10 + FigPdfList=append(FigPdfList,tmp1); // 16.09.05until + ); + FigPdfList=append(FigPdfList,""); + FigPdfList=append(FigPdfList, + "\setmargin{0}{0}{0}{0}"); + FigPdfList=append(FigPdfList,""); + FigPdfList=append(FigPdfList,"\begin{document}"); + FigPdfList=append(FigPdfList,""); + FigPdfList=append(FigPdfList, + "\begin{layer}{50}{0}"); + tmp1="\putnotese{X}{Y}{\input{"; + tmp1=replace(tmp1,"X",text(pos_1)); + tmp1=replace(tmp1,"Y",text(pos_2)); + FigPdfList=append(FigPdfList,tmp1+Fhead+".tex}}"); + FigPdfList=append(FigPdfList,""); + FigPdfList=append(FigPdfList,"\end{layer}"); + FigPdfList=append(FigPdfList,""); + FigPdfList=append(FigPdfList,"\end{document}"); + if(fnameorg!=Texparent, + SCEOUTPUT=openfile(fname); + forall(FigPdfList,println(SCEOUTPUT,#)); + closefile(SCEOUTPUT); + ); + FigPdfList; +); +////%Figpdf end//// + +////%Slidework start//// +Slidework():=Slidework(Dirwork); // 16.06.10 +Slidework(dirorg):=( +//help:Slidework(directory); + regional(dir,tmp); // 16.06.25 + dir=replace(dirorg,unicode("000a"),""); // 16.06.25 + dir=replace(dir,"/",pathsep());//17.11.20from + dir=replace(dir,"\",pathsep()); + tmp=length(dir); + if(substring(dir,tmp-1,tmp)==pathsep(), + dir=substring(dir,0,tmp-1); + );//17.11.20until + if(isexists(dir,""), // 16.12.20 + Changework(dir); + println(makedir(dir,"fig"));//17.11.23 + tmp=dir+pathsep()+"fig"; //17.04.16from + Changework(tmp);// 17.02.19until + , + println(dir+ " not exists"); + ); +); +////%Slidework end//// + +////%Setslidemargin start//// +Setslidemargin(marginlist):=( // 180908 +//help:Setslidemargin([+5,-10]); + SlideMargin=marginlist; +); +////%Setslidemargin end//// + +////%Setslidepage start//// +Setslidepage():=( // 17.03.05 + regional(tmp1,tmp2,tmp3); + tmp1=["letterc","boxc","framec","shadowc","xpos","size"]; + tmp2=apply([1,2,4,5,7,8],SlideColorList_#); + tmp3=apply(1..(length(tmp1)),tmp1_#+"="+tmp2_#); + println(tmp3); +); +Setslidepage(list):=( // 16.12.22 +//help:Setslidepage([letterc,boxc,framec,shadowc,xpos,size]); + regional(numlist,tmp,tmp1,letterc,boxc,shadowc,mboxc); + letterc=[0.98,0.13,0,0.43]; boxc=[0,0.32,0.52,0]; + shadowc=[0,0,0,0.5]; mboxc="yellow"; + if(!islist(SlideColorList), + SlideColorList=[letterc,boxc,boxc,boxc,shadowc,shadowc,6,1.3, + letterc,mboxc,mboxc,mboxc,62,2,letterc]; + ); + numlist=[1,2,4,5,7,8]; + forall(1..(length(list)), + if(length(list_#)>0, + tmp=numlist_#; + SlideColorList_tmp=list_#; + ); + ); + SlideColorList_3=SlideColorList_2; + SlideColorList_6=SlideColorList_5; +); +////%Setslidepage end//// + +////%Setslidemain start//// +Setslidemain():=( // 17.03.05 + regional(tmp1,tmp2,tmp3); + tmp1=["letterc","boxc","framec","xpos","size"]; + tmp2=apply([9,10,12,13,14],SlideColorList_#); + tmp3=apply(1..(length(tmp1)),tmp1_#+"="+tmp2_#); + println(tmp3); +); +Setslidemain(list):=( // 16.12.22 +//help:Setslidemain([letterc,boxc,framec,xpos,size]); + regional(numlist,tmp,tmp1,letterc,boxc,shadowc,mboxc); + letterc=[0.98,0.13,0,0.43]; boxc=[0,0.32,0.52,0]; + shadowc=[0,0,0,0.5]; mboxc="yellow"; + if(!islist(SlideColorList), + SlideColorList=[letterc,boxc,boxc,boxc,shadowc,shadowc,6,1.3, + letterc,mboxc,mboxc,mboxc,62,2,letterc]; + ); + numlist=[9,10,12,13,14]; + forall(1..(length(list)), + if(length(list_#)>0, //17.01.04 + tmp=numlist_#; + SlideColorList_tmp=list_#; + ); + ); + SlideColorList_11=SlideColorList_10; +); +////%Setslidemain end//// + +////%Setslidebody start//// +Setslidebody():=( // 17.03.05 + regional(tmp1,tmp2,tmp3); + tmp1=["letterc","style","thindense"]; + tmp2=[SlideColorList_(15),BodyStyle,ThinDense]; + tmp3=apply(1..(length(tmp1)),tmp1_#+"="+tmp2_#); + println(tmp3); +); +Setslidebody(str):=( + regional(clr,style,thin); + if(isstring(str), + Setslidebody(str,"\Large\bf\boldmath",0.1); + , + if(length(str)==1,Setslidebody(str_1)); + if(length(str)==2,Setslidebody(str_1,str_2)); + if(length(str)==3,Setslidebody(str_1,str_2,str_3)); + ); +); +Setslidebody(str,Arg):=( //17.01.08 + if(isstring(Arg), + Setslidebody(str,Arg,0.1); + , + Setslidebody(str,"\Large\bf\boldmath",Arg); + ); +); +Setslidebody(str,style,density):=( // 16.12.22,17.01.06,01.08 +//help:Setslidebody(["black",,0]); +//help:Setslidebody(["blue","\Large\bf\boldmath",0.1]); + regional(numlist,tmp,tmp1,letterc,boxc,shadowc,mboxc); + letterc=[0.98,0.13,0,0.43]; boxc=[0,0.32,0.52,0]; + shadowc=[0,0,0,0.5]; mboxc="yellow"; + if(!islist(SlideColorList), + SlideColorList=[letterc,boxc,boxc,boxc,shadowc,shadowc,6,1.3, + letterc,mboxc,mboxc,mboxc,62,2,letterc]; + ); + if(length(str)>0,SlideColorList_(15)=str); + if(length(style)>0,BodyStyle=style); + ThinDense=density;//17.01.08 +); +////%Setslidebody end//// + +////%Setslidehyper start//// +Setslidehyper():=( 17.12.16from + Setslidehyper(["cl=true,lc=blue,fc=blue",125,70,1]); +); +Setslidehyper(Arg):=( + if(isstring(Arg), + Setslidehyper(Arg,["cl=true,lc=blue,fc=blue",125,70,1]); + , + Setslidehyper("",Arg); + ); +); +Setslidehyper(driverorg,options):=( +//help:Setslidehyper(); +//help:Setslidehyper("dvipdfmx",["cl=true,lc=blue,fc=blue","Pos=[125,73]","Size=1"]); + regional(driver,eqL,reL,stL,,str,tmp,tmp1,tmp2); + driver=driverorg; + if(length(driver)==0, + if(indexof(PathT,"pdflatex")+indexof(PathT,"lualatex")==0, + driver="dvipdfmx"; + ); + ); + tmp=Divoptions(options); + eqL=tmp_5; + reL=tmp_6; + stL=tmp_7; + tmp1=select(eqL,length(Indexall(#,"="))>1); //180813from + eqL=remove(eqL,tmp1); + stL=concat(stL,tmp1); //180813to + if(length(stL)>0, + str=stL_1; + , + str=""; + ); + if(length(str)==0, + str="cl=true,lc=blue,fc=blue"; + ); + if(length(driver)==0, + tmp1="["+str+"]"; + , + tmp1="["+driver+","+str+"]"; + ); + tmp1=replace(tmp1,"cl=","colorlinks="); + tmp1=replace(tmp1,"lc=","linkcolor="); + tmp1=replace(tmp1,"fc=","filecolor="); + tmp1=replace(tmp1,"uc=","urlcolor="); + ADDPACK=select(ADDPACK,indexof(#,"hyperref")==0); + Addpackage(tmp1+"{hyperref}"); + tmp=indexof(tmp1,"linkcolor=");//180813from + tmp1=substring(tmp1,tmp-1,length(tmp1)); + tmp=indexof(tmp1,"="); + tmp1=substring(tmp1,tmp,length(tmp1)); + tmp=indexof(tmp1,","); + if(length(tmp)>0, + tmp1=substring(tmp1,0,tmp-1); + );//180813to + LinkColor=tmp1; + LinkPosH=125; + LinkPosV=73;//180524 + LinkSize=1; +// if(length(reL)>0, +// LinkPosH=reL_1; +// if(length(reL)>1,LinkPosV=reL_2); +// if(length(reL)>2,LinkSize=max(reL_3,0.1)); +// ); + forall(eqL, + tmp=Indexall(#,"=");//180524from + if(length(tmp)==1, + tmp1=Toupper(substring(#,0,1)); + tmp2=substring(#,tmp_1,length(#)); + tmp2=parse(tmp2); + if(tmp1=="P", + LinkPosH=tmp2_1; + LinkPosV=tmp2_2; + ); + if(tmp1=="S", + LinkSize=max(tmp2,0.1); + ); + );//180524to + ); +); //17.12.16to +////%Setslidehyper end//// + +////%Settitle start//// +Settitle(cmdL):=Settitle("",cmdL,[]); // 180608from +Settitle(Arg1,Arg2):=( + if(isstring(Arg1), + Settitle(Arg1,Arg2,[]); + , + Settitle("",Arg1,Arg2); + ); +); // 180608to +Settitle(titleold,cmdL,options):=( +//help:Settitle(cmdL); +//help:Settitle(name,cmdL); +//help:Settitle(options=["Title=slide0","Layery=0","Color=blue"]); + regional(tmp,tmp1,tmp2,eqL,layery,color,size,font); + TitleName="slide0"; //180330 + if(length(titleold)>0,TitleName=titleold);//180608 + layery="0"; + color="blue"; + size="\Large"; + font="\bf"; +// tmp=Divoptions(options); +// eqL=tmp_5; + eqL=options; //180602 + forall(eqL, + tmp1=Toupper(substring(#,0,1)); + tmp=indexof(#,"="); + tmp2=substring(#,tmp,length(#)); + if(tmp1=="L", + layery=tmp2; + ); + if(tmp1=="C", + color=tmp2; + ); + if(tmp1=="S", + size=tmp2; + if(substring(size,0,1)!="\",size="\"+size); + ); + if(tmp1=="F", + font=tmp2; + if(substring(font,0,1)!="\",font="\"+font); + ); + if(tmp1=="T", //180330 + TitleName=tmp2; + ); + ); + TitleCmdL=["{"+size+font]; + if(indexof(color,"[")>0, + tmp=replace(color,"[","{"); + tmp=replace(tmp,"]","}"); + tmp1=Indexall(tmp,","); + if(length(tmp1)>=3, + tmp="\color[cmyk]"+tmp; + , + tmp="\color[rgb]"+tmp; + ); + , + tmp="\color{"+color+"}"; + ); + TitleCmdL=append(TitleCmdL,tmp); + TitleCmdL=concat(TitleCmdL,["","\begin{layer}{120}{"+layery+"}"]); + forall(1..(length(cmdL)), + tmp=cmdL_#; + if(length(tmp)>0, + if(#==1, + tmp="{\Huge \putnote"+tmp+"}" + , + tmp="\putnote"+tmp; + ); + TitleCmdL=append(TitleCmdL,tmp); + ); + ); + TitleCmdL=concat(TitleCmdL,["\end{layer}","","}"]); +); +////%Settitle end//// + +////%Maketitle start//// +Maketitle():=( + if(!isstring(TitleName), //17.04.13from + drawtext(mouse().xy,"Settitle not defined", + size->24,color->[1,0,0]); + , //17.04.13until + Maketitle(TitleName); + ); +); +Maketitle(name):=( +//help:Maketitle(); + regional(texfile,texmain,tmp,tmp1,sep,txtfile); + texfile=name; + texmain=name+"main"; + SCEOUTPUT=openfile(texfile+".tex"); + forall(TitleCmdL, + println(SCEOUTPUT,#); + ); + closefile(SCEOUTPUT); + SCEOUTPUT=openfile(texmain+".tex"); + tmp="\documentclass[landscape,10pt]{article}"; + if(indexof(PathT,"platex")>0, + tmp=replace(tmp,"article","jarticle"); + if(indexof(PathT,"uplatex")>0, //17.08.13from + tmp=replace(tmp,"jarticle","ujarticle"); + );//17.08.13until + ); + println(SCEOUTPUT,tmp); + tmp="\special{papersize=\the\paperwidth,\the\paperheight}"; + println(SCEOUTPUT,tmp); + tmp=replace(Dirhead,"\","/");//17.11.01from + tmp=replace(tmp,"scripts","tex/latex"); + if(isexists(tmp,""), + println(SCEOUTPUT,"\usepackage{ketpic,ketlayer,ketslide}"); + , + tmp=replace(Dirhead+"/ketpicstyle","\","/"); + println(SCEOUTPUT,"\usepackage{"+tmp+"/ketpic}"); + println(SCEOUTPUT,"\usepackage{"+tmp+"/ketlayer}"); + println(SCEOUTPUT,"\usepackage{"+tmp+"/ketslide}"); + );//17.11.01until + println(SCEOUTPUT,"\usepackage{amsmath,amssymb}"); + println(SCEOUTPUT,"\usepackage{bm,enumerate}"); + if((indexof(PathT,"pdflatex")>0)%(indexof(PathT,"lualatex")>0), + println(SCEOUTPUT,"\usepackage{graphicx}"); + , + println(SCEOUTPUT,"\usepackage[dvipdfmx]{graphicx}"); + ); + println(SCEOUTPUT,"\usepackage[usenames]{color}"); //190222 + forall(ADDPACK, +// if(indexof(#,"[")==0, +// println(SCEOUTPUT,"\usepackage{"+#+"}"); +// , + println(SCEOUTPUT,"\usepackage"+#); // 17.07.10 +// ); + ); + if(indexof(PathT,"platex")>0,tmp="\ketmarginJ",tmp="\ketmarginE"); + println(SCEOUTPUT,tmp); + println(SCEOUTPUT,"\ketslideinit"); + println(SCEOUTPUT,""); + println(SCEOUTPUT,"\begin{document}"); + println(SCEOUTPUT,""); + println(SCEOUTPUT,"\input{"+texfile+".tex}"); + println(SCEOUTPUT,""); + println(SCEOUTPUT,"\end{document}"); + closefile(SCEOUTPUT); + if(iswindows(), + Makebat(texmain,"tv"); + , + Makeshell(texmain,"tv"); + ); + kc(); + txtfile=Cindyname()+".txt"; //180815from + if(!isexists(Dircdy,txtfile), + setdirectory(Dircdy); + SCEOUTPUT=openfile(txtfile); + println(SCEOUTPUT,"title::"+name+"//"); + println(SCEOUTPUT,""); + println(SCEOUTPUT,"%%%%%%%%%%%%%%%%//"); + println(SCEOUTPUT,"main::"+PaO()+"title)//"); + println(SCEOUTPUT,"\slidepage[m]//"); + println(SCEOUTPUT,""); + println(SCEOUTPUT,"%%%%%%%%%%%%%%%%//"); + println(SCEOUTPUT,"new::"+PaO()+"title)//"); + println(SCEOUTPUT,"%repeat=1,para//"); + println(SCEOUTPUT,"\slidepage//"); + println(SCEOUTPUT,""); + println(SCEOUTPUT,"layer::{120}{0}//"); + println(SCEOUTPUT,"%%putnote::s{65}{5}:://"); + println(SCEOUTPUT,"end//"); + println(SCEOUTPUT,""); + println(SCEOUTPUT,"itemize//"); + println(SCEOUTPUT,"item//"); + println(SCEOUTPUT,"end//"); + closefile(SCEOUTPUT); + setdirectory(Dirwork); //180815to + ); +); +////%Maketitle end//// + +////%Repeatsameslide start//// +Repeatsameslide(repeatflg,sestr,addedL):=( + regional(seL,flg1,ss,nn,nrep,tmp,tmp1,tmp2,tmp3,str,j,k); + // global RepeatList, SCEOUTPUT, NonThinFlg + nrep=length(RepeatList); + flg1=0; + forall(addedL,ss, + if(repeatflg==0, + if(substring(ss,0,1)!="%", //16.01.04 + println(SCEOUTPUT,ss); + );//16.01.04 + , + forall(1..nrep,nn, + if(sestr=="", + RepeatList_nn=append(RepeatList_nn,ss); + ); + ); + if(sestr=="", + seL=[1]; + , + tmp1=substring(sestr,1,length(sestr)-1); + tmp1=replace(tmp1,",-",".."+text(nrep)); + tmp1=replace(tmp1,"-,","1.."); + tmp1="["+tmp1+"]"; //17.01.03 + seL=flatten(parse(tmp1)); //17.01.03 + ); + if(contains(seL,1), + if(substring(ss,0,1)!="%", //16.01.04 + println(SCEOUTPUT,ss); + ); + seL=remove(seL,[1]); + flg1=1; + ); + forall(1..(length(seL)),nn, + tmp=seL_nn; + if(tmp<=length(RepeatList), //17.01.12from + RepeatList_tmp=append( RepeatList_tmp,ss); + , + println(" "+sestr+" : "+text(tmp)+" > "+text(length(RepeatList))); + ); + ); + if(ThinFlg==1,//16.01.05from + if(flg1==1,seL=append(seL,1)); + seL=remove(1..nrep,seL); + str=ss; // 17.05.28from + if(substring(str,0,16)=="\begin{minipage}",MiniFlg=1);//180526 + repeat(10, + tmp1=Indexall(str,"{\color"); + if(length(tmp1)>0, + tmp2=Indexall(str,"}"); + tmp=select(tmp2,tmp1_1<#); + tmp=substring(str,tmp1_1,tmp_1); + str=replace(str,tmp+" ",""); + str=replace(str,tmp,""); + ); + );//17.05.28to + if(contains(seL,1), + if(substring(str,0,1)!="%", + if(NonThinFlg==0, + if(!contains(["\begi","\end{"],substring(str,0,5)),//17.01.15 + if(MiniFlg==0, //180526from + println(SCEOUTPUT,"{\color[cmyk]{\thin,\thin,\thin,\thin}%");//180701 + println(SCEOUTPUT,str); + println(SCEOUTPUT,"}%"); + , + println(SCEOUTPUT,str); + if(indexof(str,"\end{minipage}")>0, //180526from + println(SCEOUTPUT,"}%"); + ); + ); //180526to + , + println(SCEOUTPUT,str); + if(indexof(str,"\end{minipage}")>0, //180526from + println(SCEOUTPUT,"}%"); + MiniFlg=0; + ); + ); + ); + if(NonThinFlg==1, + if(!contains(["\begi","\end{"],substring(str,0,5)),//17.01.15 + println(SCEOUTPUT,"{\color[cmyk]{\thin,\thin,\thin,\thin}%");//180701 + println(SCEOUTPUT,str); + , + println(SCEOUTPUT,str); + if(indexof(str,"\end{minipage}")>0, //180526from + println(SCEOUTPUT,"}%"); + MiniFlg=0; + ); + ); + ); + if(NonThinFlg==2, + println(SCEOUTPUT,str); + if(!contains(["\begi","\end{"],substring(str,0,5)),//17.01.15 + println(SCEOUTPUT,"}%"); + , //180526from + if(indexof(str,"\end{minipage}")>0, + println(SCEOUTPUT,"}%"); + MiniFlg=0; + ); //180526from + ); + ); + seL=remove(seL,[1]); + ); + ); + if(substring(ss,0,1)!="%", //16.01.04 + forall(1..(length(seL)),nn, + if(substring(str,0,16)=="\begin{minipage}",MiniFlg=1);//180526 + tmp=seL_nn; + if(NonThinFlg==0, + if(!contains(["\begi","\end{"],substring(str,0,5)),//180526from + if(MiniFlg==0, + tmp1="{\color[cmyk]{\thin,\thin,\thin,\thin}%";//180701 + tmp1=[tmp1,str,"}%"]; + , + tmp1=[str]; + if(indexof(str,"\end{minipage}")>0, //180526from + tmp1=append(tmp1,"}%"); + ); + ); + , + tmp1=[str]; + if(indexof(str,"\end{minipage}")>0, + tmp1=append(tmp1,"}%"); + MiniFlg=0; + ); + ); + ); + if(NonThinFlg==1, + if(!contains(["\begi","\end{"],substring(str,0,5)),//17.01.15 + tmp1="{\color[cmyk]{\thin,\thin,\thin,\thin}%";//180701 + tmp1=[tmp1,str]; + , + tmp1=[str]; + if(indexof(str,"\end{minipage}")>0, + tmp1=append(tmp1,"}%"); + MiniFlg=0; + ); + ); + ); + if(NonThinFlg==2, + tmp1=[str]; + if(!contains(["\begi","\end{"],substring(str,0,5)), + tmp1=append(tmp1,"}%"); + , + if(indexof(str,"\end{minipage}")>0, + tmp1=append(tmp1,"}%"); + MiniFlg=0; + ); + ); + ); + RepeatList_tmp=concat( RepeatList_tmp,tmp1); + ); + ); + );//16.01.05to + ); + );//16.12.05to +); +////%Repeatsameslide end//// + +////%Presentation start//// +Presentation(texfile):=Presentation(texfile,texfile); +Presentation(texfile,txtfile):=( +//help:Presentation(texfile,txtfile); + regional(file,flgL,flg,verbflg,slideL,ns,slideorgL,wall,sld,slidecmd,tmp,tmp0,tmp1, + tmp2,tmp3,tmp4,tmp5,newoption,top,repeatflg,nrep,nrepprev,,repstr, + sestr,npara,paradt,parafiles,hyperflg,paractr, + letterc,boxc,shadowc,mboxc,sep); + MiniFlg=0;//180526 + slidecmd=["\ketcletter","\ketcbox","\ketdbox","\ketcframe", + "\ketcshadow","\ketdshadow","\slidetitlex","\slidetitlesize", + "\mketcletter","\mketcbox","\mketdbox","\mketcframe", + "\mslidetitlex","\mslidetitlesize"]; + if(!isstring(BodyStyle),//17.01.06 + BodyStyle="\Large\bf\boldmath"; + ); + repeatflg=0; + RepeatList=[]; + paractr=0; //16.12.31 + if(indexof(texfile,".")==0,file=texfile+".tex",file=texfile); + if(indexof(txtfile,".")==0,tmp1=txtfile+".txt",tmp1=txtfile); +// tmp=load(tmp1); //181125from + tmp=readfile2str(Dirwork,tmp1); + tmp=replace(tmp,"////","||||"); + tmp=replace(tmp,"/L"+"F/::","::"); + tmp=replace(tmp,"///L"+"F/","/L"+"F/"); + slideL=tokenize(tmp,"/L"+"F/"); //181125to + slideorgL=slideL; // 16.07.11 + slideL=apply(slideL,Removespace(#)); + tmp=select(1..length(slideL),length(slideL_#)>0); // 16.07.11from + slideL=apply(tmp,slideL_#); + slideorgL=apply(tmp,slideorgL_#); +// slideL=select(slideL,length(#)>0); // 16.07.11until + flg=0; // 16.06.09from + forall(1..10, + if(flg==0, + if(substring(slideL_1,0,1)!="%", + flg=1; + , + slideL=slideL_(2..length(slideL)); + slideorgL=slideorgL_(2..length(slideorgL)); + ); + ); + ); // 16.06.09until + flgL=[]; + SCEOUTPUT = openfile(file); + tmp=tokenize(slideL_1,"::"); + tmp1=tmp_1; + if(length(tmp)>1, + tmp2=tmp_2; + tmp3=tmp_(3..length(tmp));//16.06.25 + , + tmp2=""; + tmp3=tmp_(2..length(tmp));//16.06.25 + ); + wall=""; // 16.06.10 + if(length(tmp3)>0,//16.06.25from + tmp=substring(tmp3_1,0,1);//180330 + if((tmp!="\")&(tmp!="%")&(indexof(tmp3_1,"=")==0), //180330 + wall=tmp3_1; + tmp3=tmp3_(2..length(tmp3)); + ); + );//16.06.25until + tmp="%%% "+tmp1+" "+txtfile;// 16.06.09from + println(SCEOUTPUT,tmp); + tmp="\documentclass[landscape,10pt]{article}"; + if(indexof(PathT,"platex")>0, + tmp=replace(tmp,"article","jarticle"); + if(indexof(PathT,"uplatex")>0, //17.08.13from + tmp=replace(tmp,"jarticle","ujarticle"); + );//17.08.13until + ); + println(SCEOUTPUT,tmp);// 16.06.09from + tmp=select(1..(length(tmp3)),indexof(tmp3_#,"\usepackage")>0);//17.06.18from + forall(tmp, + println(SCEOUTPUT,tmp3_#); + ); + tmp=remove(1..(length(tmp3)),tmp); + tmp3=tmp3_tmp;//17.06.18until +// if(iswindows(),sep="\",sep="/"); // 17.04.08 +// sep="/"; + if((indexof(PathT,"pdflatex")>0)%(indexof(PathT,"lualatex")>0), + if(indexof(PathT,"lualatex")>0, + println(SCEOUTPUT,"\usepackage{luatexja}"); + ); + println(SCEOUTPUT,"\usepackage{pict2e}"); + println(SCEOUTPUT,"\usepackage{ketpic2e,ketlayer2e}");// 17.04.08from + , + println(SCEOUTPUT,"\special{papersize=\the\paperwidth,\the\paperheight}"); + );// 17.04.08until + tmp=replace(Dirhead,"\","/");//17.11.01from + tmp=replace(tmp,"scripts","tex/latex"); + if(isexists(tmp,""), + println(SCEOUTPUT,"\usepackage{ketpic,ketlayer}"); + , + tmp=replace(Dirhead+"/ketpicstyle","\","/"); + println(SCEOUTPUT,"\usepackage{"+tmp+"/ketpic}"); + println(SCEOUTPUT,"\usepackage{"+tmp+"/ketlayer}"); + ); + if(length(wall)==0, + tmp=replace(Dirhead,"\","/");//17.11.01from + tmp=replace(tmp,"scripts","tex/latex"); + if(isexists(tmp,""), + println(SCEOUTPUT,"\usepackage{ketslide}"); + , + tmp=replace(Dirhead+"/ketpicstyle","\","/"); + println(SCEOUTPUT,"\usepackage{"+tmp+"/ketslide}"); + ); + , + tmp=replace(Dirhead,"\","/"); + tmp=replace(tmp,"scripts","tex/latex"); + if(isexists(tmp,""), + println(SCEOUTPUT,"\usepackage{ketslide2}"); + , + tmp=replace(Dirhead+"/ketpicstyle","\","/"); + println(SCEOUTPUT,"\usepackage{"+tmp+"/ketslide2}"); + ); + );//17.04.08until + println(SCEOUTPUT,"\usepackage{amsmath,amssymb}"); + println(SCEOUTPUT,"\usepackage{bm,enumerate}"); + if((indexof(PathT,"pdflatex")>0)%(indexof(PathT,"lualatex")>0), + println(SCEOUTPUT,"\usepackage{graphicx}"); + , + println(SCEOUTPUT,"\usepackage[dvipdfmx]{graphicx}"); + ); + println(SCEOUTPUT,"\usepackage{color}");//190222 + letterc=[0.98,0.13,0,0.43]; boxc=[0,0.32,0.52,0]; + shadowc=[0,0,0,0.5]; mboxc="yellow"; + tmp4="abcdefghijklmno"; + forall(1..15, + tmp=SlideColorList_#; + if(islist(tmp), + tmp=text(tmp); + tmp=substring(tmp,1,length(tmp)-1); + if(length(SlideColorList_#)==4,//17.01.07from + println(SCEOUTPUT,"\definecolor{slidecolor"+tmp4_#+"}{cmyk}{"+tmp+"}"); + ); + if(length(SlideColorList_#)==3, + println(SCEOUTPUT,"\definecolor{slidecolor"+tmp4_#+"}{rgb}{"+tmp+"}"); + );//17.01.07until + SlideColorList_#="slidecolor"+tmp4_#; + ); + ); + println(SCEOUTPUT,"\def\setthin#1{\def\thin{#1}}");//17.08.23 + println(SCEOUTPUT,"\setthin{"+text(ThinDense)+"}");//17.08.23 + println(SCEOUTPUT,"\newcommand{\slidepage}[1][s]{%");//180524from + println(SCEOUTPUT,"\setcounter{ketpicctra}{18}%"); + println(SCEOUTPUT,"\if#1m \setcounter{ketpicctra}{1}\fi"); + println(SCEOUTPUT,"\hypersetup{linkcolor=black}%"); + println(SCEOUTPUT,"");//180908 + println(SCEOUTPUT,"\begin{layer}{118}{0}"); + println(SCEOUTPUT,"\putnotee{122}{-\theketpicctra.05}{\small\thepage/\pageref{pageend}}"); + println(SCEOUTPUT,"\end{layer}\hypersetup{linkcolor="+LinkColor+"}"); + println(SCEOUTPUT,"");//180908 + println(SCEOUTPUT,"}");//189524to + forall(ADDPACK,// 16.06.09from + println(SCEOUTPUT,"\usepackage"+#); + );// 16.06.09to + tmp=select(ADDPACK,indexof(#,"{hyperref}")>0);//16.12.31from + if(length(tmp)>0, + hyperflg=1; + , + hyperflg=0; //16.12.31until + ); + forall(tmp3, + println(SCEOUTPUT,#); + ); + if(indexof(PathT,"platex")>0, //180903,180908from + tmp="\setmargin{"+text(25+SlideMargin_1)+"}{"; + tmp=tmp+text(145-SlideMargin_1)+"}{"; + tmp=tmp+text(15+SlideMargin_2)+"}{"; + tmp=tmp+text(100-SlideMargin_2)+"}"; + , + tmp="\setmargin{"+text(20+SlideMargin_1)+"}{"; + tmp=tmp+text(135-SlideMargin_1)+"}{"; + tmp=tmp+text(15+SlideMargin_2)+"}{"; + tmp=tmp+text(100-SlideMargin_2)+"}"; + ); // 180903,180908to + println(SCEOUTPUT,""); + println(SCEOUTPUT,tmp); + println(SCEOUTPUT,""); + println(SCEOUTPUT,"\ketslideinit"); + println(SCEOUTPUT,""); + forall(tmp, // 15.07.21 + if(substring(#,0,1)=="\", println(SCEOUTPUT,#)); + ); +// if(!isstring(PageStyle),PageStyle="headings");//180524from +// println(SCEOUTPUT,"\pagestyle{"+PageStyle+"}"); + println(SCEOUTPUT,"\pagestyle{empty}");//180524to + println(SCEOUTPUT,""); + println(SCEOUTPUT,"\begin{document}"); + println(SCEOUTPUT,""); + if(length(wall)>0, + println(SCEOUTPUT,"\input{fig/"+wall+".tex}"); + println(SCEOUTPUT,""); + ); + if(length(tmp2)>0, + if(indexof(tmp2," no")==0, // 16.11.11from + println(SCEOUTPUT,"\begin{layer}{120}{0}"); + if(substring(tmp2,0,1)!="\", + tmp2="\putnotese{0}{0}{\input{fig/"+tmp2+".tex}}";//16.12.27 + ); + println(SCEOUTPUT,tmp2); + println(SCEOUTPUT,"\end{layer}"); + println(SCEOUTPUT,""); + , + tmp=indexof(tmp2,"="); + if(tmp==0, + top="10mm"; + , + top=substring(tmp2,tmp,length(tmp2)); + ); + println(SCEOUTPUT,""); + println(SCEOUTPUT,"\vspace*{"+top+"}"); + println(SCEOUTPUT,""); + ); // 16.11.11until + ); + println(SCEOUTPUT,"\def\mainslidetitley{22}"); + forall(1..14, //16.12.22from + tmp=SlideColorList_#; + if(!isstring(tmp),tmp=text(tmp)); + if(length(tmp)>0, + tmp="\def"+slidecmd_#+"{"+tmp+"}"; + println(SCEOUTPUT,tmp); + ); + );//16.12.22until + println(SCEOUTPUT,""); + println(SCEOUTPUT,"\color{"+SlideColorList_(15)+"}"); + println(SCEOUTPUT,BodyStyle);//17.01.07 +// println(SCEOUTPUT,"\thispagestyle{empty}");//180524 + println(SCEOUTPUT,"\addtocounter{page}{-1}");//17.01.29 + println(SCEOUTPUT,""); + verbflg=0; //16.06.28 + repeatflg=0;//16.12.02 + nrep=0;//16.12.27 + nrepprev=0;//17.01.03 + npara=0;//16.12.27 + forall(2..length(slideL),ns, + ThinFlg=0; + NonThinFlg=0; + flg=0; + tmp1=""; + tmp2=""; + tmp3=""; + sld=Removespace(slideL_ns); // 16.06.28 + sestr=""; + if((substring(sld,0,1)=="%") & (substring(sld,0,2)!="%%"), // 17.06.23 + Repeatsameslide(repeatflg,"",[slideL_ns]); + if(repeatflg>0, + tmp=indexof(sld,"]::"); + if(tmp>0, + if(substring(sld,1,2)!="%",//17.05.31 + if(substring(sld,1,5)=="thin", + ThinFlg=1; + ); + sestr=substring(sld,1,tmp); + sld=substring(sld,tmp+2,length(sld)); + tmp=indexof(sestr,"["); + sestr=substring(sestr,tmp-1,length(sestr));//17.01.05 + ); + ); + ); + if(substring(sld,1,7)=="repeat", // 16.12.09from + tmp=indexof(sld,"="); + tmp5=substring(sld,tmp,length(sld)); + tmp=indexof(tmp5,","); + if(tmp>0,//17.01.03from + tmp5=substring(tmp5,0,tmp-1); + );//17.01.03until + repeatflg=1; + if(length(tmp5)>0, + nrep=parse(tmp5); + tmp=[]; + if(length(wall)>0, + tmp=["","\input{fig/"+wall+".tex}"]; + ); + tmp=concat(tmp, + ["","\sameslide"+NewSlideOption,"","\vspace*{18mm}",""]);//180524 + RepeatList=apply(1..nrep,if(#==1,[],tmp)); + ); + if(sestr=="",flg=1); + tmp=indexof(sld,",");//17.01.03from + if(tmp>0, + sld="%"+substring(sld,tmp,length(sld)); + if(indexof(sld,"=")==0,sld=sld+"="); + );//17.01.03until + ); + if(substring(sld,1,5)=="para", + paractr=paractr+1; + repeatflg=1; + tmp=indexof(sld,"="); + tmp=substring(sld,tmp,length(sld)); + if(length(tmp)==0, //17.01.03 + npara=0; + , + paradt=tokenize(tmp,":"); + tmp=fileslist(Dirwork+"/fig/"+paradt_1); + if(length(tmp)>0, + parafiles=tokenize(tmp,","); + if(indexof(paradt_4,"input")>0, + tmp0=indexof(paradt_4,",");//17.01.29from + if(tmp0>0, + paradt=append(paradt,substring(paradt_4,tmp0,length(paradt_4))); + paradt_4=substring(paradt_4,0,tmp0-1); + );//17.01.29until + parafiles=select(parafiles,indexof(#,".tex")>0); + parafiles=sort(parafiles); //180627 + if(indexof(paradt_4,"\input")==0,paradt_4="\"+paradt_4);//16.12.17 + ); + if(indexof(paradt_4,"include")>0, + parafiles=select(parafiles,indexof(#,".pdf")>0); + parafiles=sort(parafiles); //180627 + ); + npara=length(parafiles); + , + println(Dirwork+"/fig/"+paradt_1+" not found"); + parafiles=[]; + npara=0; + ); + if(nrep==0, + nrep=npara; + if(length(wall)>0, + tmp=["","\input{fig/"+wall+".tex}"]; + ); + tmp=concat(tmp, + ["","\sameslide"+NewSlideOption,"","\vspace*{18mm}",""]);//180524 + RepeatList=apply(1..nrep,if(#==1,[],tmp)); + ); + ); + forall(1..nrep, //16.12.28 + tmp4=[]; //16.12.31from + if(hyperflg>0, + tmp4=["\hypertarget{para"+text(paractr)+"pg"+text(#)+"}{}"]; + );//16.12.31to + if(npara>0, //17.01.03 + tmp4=concat(tmp4,["","\begin{layer}{120}"+paradt_2]); + if(#<=npara, //16.12.28from + tmp=parafiles_#; + , + tmp=parafiles_npara; + ); + tmp="{"+paradt_4+"{fig/"+paradt_1+"/"+tmp+"}}"; + if(length(paradt)>=5, + tmp="{\scalebox{"+text(paradt_5)+"}"+tmp+"}"; + ); + if(substring(paradt_3,0,1)=="\", + tmp=paradt_3+tmp; + , + tmp="\putnote"+paradt_3+tmp; + ); + tmp4=concat(tmp4,[tmp]);//16.12.31 + , + tmp4=concat(tmp4,["","\begin{layer}{120}{0}"]); + ); + if((hyperflg>0) & (LinkSize>0.15), + tmp="{"+text(LinkPosV)+"}{\hyperlink{para"; // 17.01.12from + tmp1=tmp+text(paractr)+"pg"; + tmp2=tmp+text(paractr-1)+"pg"+text(nrepprev); + tmp=tmp2; //180526from + tmp3=[text(LinkPosH-29*LinkSize)+"}"+tmp+"}{\fbox{\Ctab{" + +text(2.5*LinkSize)+"mm}{\scalebox{"+text(LinkSize) + +"}{\scriptsize $\mathstrut||\!\lhd$}}}}}"]; + if(nrep>1,//180526 + tmp="{"+text(LinkPosV)+"}{\hyperlink{para"; // 17.01.12from + tmp1=tmp+text(paractr)+"pg"; + tmp2=tmp+text(paractr-1)+"pg"+text(nrepprev); + tmp=tmp1+text(1); + tmp3=append(tmp3, + text(LinkPosH-24*LinkSize)+"}"+tmp+"}{\fbox{\Ctab{" + +text(2.5*LinkSize)+"mm}{\scalebox{"+text(LinkSize) + +"}{\scriptsize $\mathstrut|\!\lhd$}}}}}"); //180526to + if(#>1,tmp=tmp1+text(#-1),tmp=tmp2); + tmp3=append(tmp3, + text(LinkPosH-17*LinkSize)+"}"+tmp+"}{\fbox{\Ctab{" + +text(4.5*LinkSize)+"mm}{\scalebox{"+text(LinkSize) + +"}{\scriptsize $\mathstrut\!\!\lhd\!\!$}}}}}"); + if(#<nrep,tmp=tmp1+text(#+1),tmp=tmp1+text(nrep)); + tmp3=append(tmp3, + text(LinkPosH-10*LinkSize)+"}"+tmp+"}{\fbox{\Ctab{" + +text(4.5*LinkSize)+"mm}{\scalebox{"+text(LinkSize) + +"}{\scriptsize $\mathstrut\!\rhd\!$}}}}}"); + tmp=tmp1+text(nrep); //180526from + tmp3=append(tmp3, + text(LinkPosH-5*LinkSize)+"}"+tmp+"}{\fbox{\Ctab{" // 17.01.19 + +text(2.5*LinkSize)+"mm}{\scalebox{"+text(LinkSize) + +"}{\scriptsize $\mathstrut \!\rhd\!\!|$}}}}}"); + ); + tmp="{"+text(LinkPosV)+"}{\hyperlink{para"; //180529[2lines] + tmp=tmp+text(paractr+1)+"pg"+text(1); + tmp3=append(tmp3, + text(LinkPosH)+"}"+tmp+"}{\fbox{\Ctab{" // 17.01.19 + +text(2.5*LinkSize)+"mm}{\scalebox{"+text(LinkSize) + +"}{\scriptsize $\mathstrut \!\rhd\!\!||$}}}}}"); //180526to + ); + tmp3=apply(tmp3,tmp,"\putnotew{"+tmp); + tmp4=concat(tmp4,tmp3);// 17.01.12to + tmp="\putnotee{"+text(LinkPosH+1)+"}{"+text(LinkPosV)+"}";//180524 + tmp=tmp+"{\scriptsize\color{blue} "+text(#)+"/"+text(nrep)+"}"; //180524[blue] + tmp4=append(tmp4,tmp); + tmp4=concat(tmp4,["\end{layer}",""]);//16.12.31until + Repeatsameslide(repeatflg,text([#]),tmp4); + ); + ); + ); + if(substring(sld,0,2)=="%%", //17.06.23from + println(SCEOUTPUT,sld); + flg=1; + ); //17.06.23to + if(flg==0, + if(indexof(sld,"\begin{verbatim}")==1, // 16.06.28from + Repeatsameslide(repeatflg,sestr,[slideL_ns]); + verbflg=1; + flg=1; + ); // 16.06.28 + if(indexof(sld,"\end{verbatim}")==1, + Repeatsameslide(repeatflg,sestr,[slideL_ns]); + verbflg=0; + flg=1; + ); // 16.06.28until + if(flg==0, + tmp=replace(sld,"||||","//"); // 16.05.11 + tmp=tokenize(tmp,"::"); // 16.05.11 + tmp1=tmp_1; + if(length(tmp)>1,tmp2=tmp_2,tmp2=""); + if(length(tmp)>2,tmp3=tmp_3,tmp3=""); + if(length(tmp)>3,tmp4=tmp_4,tmp4=""); + if(length(tmp)>4,tmp5=tmp_5,tmp5=""); + if(contains(["main","new","same"],tmp1), + if(tmp1=="new", // 16.11.09from + newoption=""; + if(substring(tmp2,0,1)=="[",newoption=tmp2); + ); + if(tmp1=="same", + if(length(tmp2)==0,tmp2=newoption); + );// 16.11.09until + println(SCEOUTPUT,""); + println(SCEOUTPUT,"%%%%%%%%%%%%%%%%%%%%"); + println(SCEOUTPUT,""); + ); + ); + if(flg==0&tmp1=="main", + if(repeatflg==1, + forall(2..(length(RepeatList)),nrep, + tmp=RepeatList_nrep; + forall(tmp, + if(substring(#,0,1)!="%", //16.01.04 + println(SCEOUTPUT,#); + ); + ); + ); + println(SCEOUTPUT,""); + repeatflg=0;RepeatList=[]; + nrepprev=nrep;//17.01.03 + nrep=0;//16.12.27 + npara=0;//16.12.27 + ); + if(length(wall)>0, + println(SCEOUTPUT,"\input{fig/"+wall+".tex}"); + ); + println(SCEOUTPUT,"\mainslide{"+tmp2+"}"); + println(SCEOUTPUT,""); + println(SCEOUTPUT,""); + tmp2=""; + flg=1; + ); + if(flg==0&tmp1=="new", + if(repeatflg==1, + forall(2..(length(RepeatList)),nrep, + tmp=RepeatList_nrep; + forall(tmp, + if(substring(#,0,1)!="%", //16.01.04 + println(SCEOUTPUT,#); + ); + ); + ); + println(SCEOUTPUT,""); + repeatflg=0;RepeatList=[]; + nrepprev=nrep;//17.01.03 + nrep=0; + npara=0; + ); + if(length(wall)>0, + Repeatsameslide(repeatflg,sestr,["\input{fig/"+wall+".tex}"]); + ); + tmp="\newslide"; + NewSlideOption=""; //17.01.04 + if(substring(tmp2,0,1)=="[", + NewSlideOption=tmp2; //17.01.04 + tmp=tmp+tmp2; + tmp2=tmp3; + tmp3=tmp4; + tmp4=tmp5; + ); + tmp=tmp+"{"+tmp2+"}"; + Repeatsameslide(repeatflg,sestr,[tmp,"","\vspace*{18mm}",""]);//180524 + tmp2=""; + flg=1; + ); + if(flg==0&tmp1=="same", + if(repeatflg==1, + forall(2..(length(RepeatList)),nrep, + tmp=RepeatList_nrep; + forall(tmp, + if(substring(#,0,1)!="%", //16.01.04 + println(SCEOUTPUT,#); + ); + ); + ); + println(SCEOUTPUT,""); + repeatflg=0;RepeatList=[]; + nrepprev=nrep;//17.01.03 + nrep=0; + npara=0; + ); + if(length(wall)>0, + println(SCEOUTPUT,"\input{fig/"+wall+".tex}"); + ); + tmp="\sameslide"+NewSlideOption; //17.01.04; +// if(substring(tmp2,0,1)=="[", +// tmp=tmp+tmp2; +// tmp2=tmp3; +// tmp3=tmp4; +// ); + println(SCEOUTPUT,tmp); + println(SCEOUTPUT,""); //180524 + println(SCEOUTPUT,"\vspace*{18mm}"); + println(SCEOUTPUT,""); + tmp4=tmp3; + tmp3=tmp2; + tmp2=""; + flg=1; + ); + if(flg==0&tmp1=="itemize", + Repeatsameslide(repeatflg,sestr,["\begin{itemize}"]); + flgL=append(flgL,"i"); + tmp2=""; + tmp3=""; + flg=1; + ); + if(flg==0&tmp1=="enumerate", + Repeatsameslide(repeatflg,sestr,["\begin{enumerate}"+tmp2]); + flgL=append(flgL,"e"); + tmp2=""; + tmp3=""; + flg=1; + ); + if(flg==0&tmp1=="verbatim", //16.06.28from + Repeatsameslide(repeatflg,sestr,["\begin{verbatim}"]); + flgL=append(flgL,"v"); + tmp1=""; + tmp2=""; + tmp3=""; + verbflg=1; + flg=1; + ); //16.06.28until + if(flg==0&tmp1=="layer", + Repeatsameslide(repeatflg,sestr,[""]); + tmp="\begin{layer}"; + if(length(tmp2)>0, + tmp=tmp+tmp2; + , + tmp=tmp+"{120}{0}"; + ); + Repeatsameslide(repeatflg,sestr,[tmp]); + flgL=append(flgL,"l"); + tmp2=""; + tmp3=""; + flg=1; + ); + if(flg==0&tmp1=="putnote", + tmp="\putnote"+tmp2+"{"; + if(indexof(tmp3,"include")==0, + tmp1=indexof(tmp3,","); + if(tmp1==0, + tmp=tmp+"\input{fig/"+tmp3+".tex}}"; + , + tmp2=substring(tmp3,tmp1,length(tmp3)); + tmp3=substring(tmp3,0,tmp1-1); + tmp=tmp+"\scalebox{"+tmp2+"}{\input{fig/"+tmp3+".tex}}}"; + ); + , + tmp2=indexof(tmp3,"["); + tmp3=substring(tmp3,tmp2-1,length(tmp3)); + tmp=tmp+"\includegraphics"+tmp3+"{fig/"+tmp4+"}}"; + ); + Repeatsameslide(repeatflg,sestr,[tmp]); + tmp2=""; + tmp3=""; + flg=1; + ); + if(flg==0&tmp1=="item", + NonThinFlg=1; + Repeatsameslide(repeatflg,sestr,["\item"]); + tmp3=""; + flg=1; + ); + if(flg==0&tmp1=="end"&(length(flgL)>0), //180526 + tmp=flgL_(length(flgL)); + if(tmp=="i", + Repeatsameslide(repeatflg,sestr,["\end{itemize}"]); + ); + if(tmp=="e", + Repeatsameslide(repeatflg,sestr,["\end{enumerate}"]); + ); + if(tmp=="l", + Repeatsameslide(repeatflg,sestr,["\end{layer}",""]); + ); + if(tmp=="v", // 16.06.28from + Repeatsameslide(repeatflg,sestr,["\end{verbatim}",""]); + verbflg=0; + ); // 16.06.28until + flgL=flgL_(1..(length(flgL)-1)); + tmp2=""; + tmp3=""; + flg=1; + ); + if(flg==0, // 16.06.28from + if(verbflg==0, + tmp2=tmp1; + , + tmp2=slideorgL_ns; // 16.07.11 + tmp2=replace(tmp2,"||","//"); // 16.07.10 + tmp3=""; + ); + ); // 16.06.28until + if(length(tmp2)>0, + if(tmp2=="...", tmp2=""); + if(NonThinFlg==1,NonThinFlg=2); + Repeatsameslide(repeatflg,sestr,[tmp2]); + ); + if(length(tmp3)>0, + Repeatsameslide(repeatflg,sestr,["\begin{layer}{120}{0}"]); + if(substring(tmp3,0,1)=="{", + tmp=tmp3; + tmp3=tmp4; + , + tmp="{60}{0}"; + ); + tmp1=indexof(tmp3,","); + if(tmp1==0, + tmp3="\putnotes"+tmp+"{\input{fig/"+tmp3+".tex}}"; + , + tmp2=substring(tmp3,tmp1,length(tmp3)); + tmp3=substring(tmp3,0,tmp1-1); + tmp3="\putnotes"+tmp+"{\scalebox{"+tmp2+"} + {\input{fig/"+tmp3+".tex}}}"; + ); + Repeatsameslide(repeatflg,sestr,[tmp3,"\end{layer}",""]); + ); + ); + ); + if(repeatflg==1, + forall(2..(length(RepeatList)),nrep, + tmp=RepeatList_nrep; + forall(tmp, + if(substring(#,0,1)!="%", //16.01.04 + println(SCEOUTPUT,#); + ); + ); + ); +// println(SCEOUTPUT,""); + ); + println(SCEOUTPUT,"\label{pageend}\mbox{}"); //180529 + println(SCEOUTPUT,""); + println(SCEOUTPUT,"\end{document}"); + closefile(SCEOUTPUT); +); +////%Presentation end//// + +////%Mkslides start//// +Mkslides():=( + regional(store,sep,parent,texparentorg,tmp,tmp1,tmp2,tmp3,tmp4,flg); + store=Fillblack();//181125 + tmp4=Fhead; + Fhead=""; + if(!iswindows(), //17.10.13 + Dirwork=replace(Dirwork,"\",pathsep()); + parent=replace(Dirwork+Shellparent,"\",pathsep()); + , + Dirwork=replace(Dirwork,"/",pathsep()); + parent=replace(Dirwork+Batparent,"/",pathsep());// 16.05.29 + ); + tmp=replace(Dirwork,pathsep()+"fig","");//180604[2lines] + Changework(tmp); + Setdirectory(Dirwork); + if(!iswindows(), //180604from + println(setexec(Dirwork,Shellparent)); + ); //180604to + if(length(Texmain)>0, // 15.08.14 from + Texparent=Texmain; + ); + texparentorg=Texparent; //17.04.10from + if(isstring(Slidename), // 15.08.14 from + Texparent=Slidename; + );//17.04.10until + if(!isexists(Dirwork,Texparent+".txt"), // 17.04.12from + drawtext(mouse().xy,Texparent+".txt not exist in "+Dirwork, + size->24,color->[1,0,0]); + , // 17.04.12until + Presentation(Texparent); // 15.08.14to + if(iswindows(), + tmp2=Batparent; + parent=replace(Dirwork+Batparent,sep+"fig","");// 16.05.29 + if(indexof(Pathpdf,"Adobe")>0, //17.12.09from + Makebat(Texparent,"ttv"); + , + Makebat(Texparent,"tv"); + ); //17.12.09until + kc():=( + println("kc : "+kc(parent,Dirlib,Fnametex)); // 16.06.10, 17.02.19 + ); + kc(); + Batparent=tmp2; + , + tmp2=Shellparent; + parent=replace(Dirwork+Shellparent,sep+"fig","");// 16.05.29 + Shellparent=replace(Shellparent,sep+"fig",""); + if(indexof(Pathpdf,"Adobe")>0, //17.12.09from + Makeshell(Texparent,"ttv"); + , + Makeshell(Texparent,"tv"); + ); //17.12.09until + kc():=( + println("kc : "+kc(parent,Mackc+Dirlib,Fnametex)); // 16.06.10 + ); + kc(); + Shellparent=tmp2; + ); + ); + Dirwork=Dirwork+pathsep()+"fig"; //17.10.16 + setdirectory(Dirwork); + Fhead=tmp4; + Texparent=texparentorg;//17.04.10 + Fillrestore(store);//181125 +); +////%Mkslides end//// + +////%Mkslidesummary start//// +Mkslidesummary():=( // 17.10.26 for R + regional(texparentorg); + texparentorg=Texparent; + if(isstring(Slidename), + Texparent=Slidename; + ); + Mkslidesummary(Texparent,Texparent+"digest",["m","Wait=3"]); + Texparent=texparentorg; +); +Mkslidesummary(fin,fout):= + Mkslidesummary(fin,fout,["m","Wait=3"]); +Mkslidesummary(inputfile,outputfile,options):=( +//help:Mkslidesummary(fin,fout,options); + regional(store,fin,fout,out,figflg,dirworkorg,dirtop,tmp); + store=Fillblack();//181125 + dirworkorg=Dirwork;//17.04.10from + dirtop=replace(Dirwork,pathsep()+"fig",""); + Changework(dirtop);//17.04.10uptp + if(ismacosx(), //180604from + println(setexec(Dirwork,Shellparent)); + ); //180604to + fin=inputfile; + if(indexof(fin,".")==0,fin=fin+".tex"); + fout=outputfile; + if(indexof(fout,".")==0,fout=fout+".tex"); + cmdL=[ + "Dt=readLines"+PaO()+"'"+fin+"',encoding='UTF-8')",[], + "num=grep"+PaO()+"'hypertarget',Dt,fixed=TRUE)",[], //180412 + "Dt=Dt[setdiff"+PaO()+"1:length"+PaO()+"Dt),num)]",[], + "Smain=c"+PPa("")+";Snew=c"+PPa("")+";Ssame=c"+PPa(""),[], + "for"+PaO()+"J in 1:length"+PaO()+"Dt)){",[], + " Tmp=length"+PaO()+"grep"+PaO()+"'mainslide{',Dt[J],fixed=TRUE))",[], //180412 + " if"+PaO()+"Tmp>0){Smain=c"+PaO()+"Smain,1)}else{Smain=c"+PaO()+"Smain,0)}",[], + " Tmp=length"+PaO()+"grep"+PaO()+"'newslide{',Dt[J],fixed=TRUE))",[], //180412 + " if"+PaO()+"Tmp>0){Snew=c"+PaO()+"Snew,1)}else{Snew=c"+PaO()+"Snew,0)}",[], + " Tmp=length"+PaO()+"grep"+PaO()+"'sameslide',Dt[J],fixed=TRUE))",[], //180412 + " if"+PaO()+"Tmp>0){Ssame=c"+PaO()+"Ssame,1)}else{Ssame=c"+PaO()+"Ssame,0)}",[], + "}",[], + "Nnew=c"+PPa("")+";Nsame=c"+PPa(""),[], + "for"+PaO()+"J in 1:length"+PaO()+"Dt)){",[], + " if"+PaO(2)+"Snew[J]==1)|"+PaO()+"Smain[J]==1)){Nnew=c"+PaO()+"Nnew,J)}",[], + " if"+PaO()+"Ssame[J]==1){Nsame=c"+PaO()+"Nsame,J)}",[], + "}",[], + "Out=Dt[1:Nnew[1]]",[], + "for"+PaO()+"J in Looprange"+PaO()+"2,length"+PaO()+"Nnew))){",[], + " Tmp=max"+PaO()+"c"+PaO()+"1,Nsame[Nsame<Nnew[J]]))",[], + " Tmp=max"+PaO()+"c"+PaO()+"Tmp,Nnew[J-1]))+1",[], + " Out=c"+PaO()+"Out,Dt[Tmp:Nnew[J]])",[], + "}",[], + "Tmp=max"+PaO()+"c"+PaO()+"Nsame[-1],Nnew[-1]))+1",[], + "Out=c"+PaO()+"Out,Dt[Tmp:length"+PaO()+"Dt)])",[], + "writeLines"+PaO()+"Out,'"+fout+"',sep='\n')",[] //180412[2lines removed] + ]; + CalcbyR("",cmdL,append(options,"Cat=n"));//180412 + wait(1000); + Changework(dirtop);//17.04.10 + tmp=replace(fout,".tex",""); + if(iswindows(), + Makebat(tmp,"tv"); + , + Makeshell(tmp,"tv"); + ); + kc(); + Changework(dirworkorg);//17.04.10 + Fillstore(store);//181125 +); +////%Mkslidesummary end//// + +////%BBdata start//// +BBdata():=BBdata(BBTarget,0); +BBdata(fname):=BBdata(fname,0); // 16.04.09 +BBdata(fname,optionorg):=( +//help:BBdata(filename); +//help:BBdata(options=0(automatic),1(make),"w=","h="); + regional(fout,flg,path,file,kcfile,options,eqL,reL,stL, + waiting,addop,tmp,tmp1,tmp2); + path=""; + file=fname; + flg=0; + waiting=2; + forall(reverse(1..length(fname)), + if(flg==0, + tmp=substring(fname,#-1,#); + if(tmp=="/" % tmp=="\", // 14.01.15 + path=substring(fname,0,#-1); + file=substring(fname,#,length(fname)); + flg=1; + ); + ); + ); + if(path=="",path=Dirwork);//16.10.05 + if(indexof(file,".")==0,file=file+".pdf"); + if(islist(optionorg),options=optionorg,options=[optionorg]); + tmp=Divoptions(options); + eqL=tmp_5; + reL=tmp_6; + stL=tmp_7; + flg=0; + addop=""; + if(length(reL)>0, + tmp=reL_1; + if(tmp==1,flg=1); + ); + forall(stL, + tmp=Toupper(substring(#,0,1)); + if(tmp=="M",flg=1); + ); + forall(eqL, + tmp=indexof(#,"="); + tmp1=Toupper(substring(#,0,1)); //181111 + tmp2=substring(#,tmp,length(#)); + if(tmp1=="W", + addop=addop+",width="+tmp2; + options=remove(options,[#]); + ); + if(tmp1=="H", + addop=addop+",height="+tmp2; + options=remove(options,[#]); + ); + ); + tmp=indexof(file,"."); + tmp1=substring(file,0,tmp-1); + fout=tmp1+".txt"; + if(iswindows(), + kcfile="kc.bat"; + , + if(ismacosx(), //181219 + kcfile="kc.command"; + , + kcfile="kc.sh"; + ); + ); + if(flg==0, + tmp=load(fout); // + if(length(tmp)==0, + flg=1; + , + tmp=tokenize(tmp,"%%"); + tmp=tmp_2; + tmp1=indexof(tmp,":"); + tmp=substring(tmp,tmp1,length(tmp)); + tmp=Removespace(tmp); + if(tmp!=file,flg=1); + ); + ); + if(length(path)==0, + path=Dirwork; + ); + if(flg==1, + setdirectory(path); + tmp=load(file); + setdirectory(Dirwork); + if(length(tmp)==0, + println(" => "+file+" not exists"); + flg=-1; + ); + ); + if(flg==1, + SCEOUTPUT = openfile(kcfile); + if(!iswindows(), + println(SCEOUTPUT,"#!/bin/sh"); + ); + println(SCEOUTPUT,"cd "+Dqq(path)); //190414 + tmp=replace(PathT,"pdflatex","extractbb"); //16.11.22 + tmp=replace(tmp,"pdftex","extractbb"); //16.11.22 + tmp=replace(tmp,"xelatex","extractbb"); + tmp=replace(tmp,"uplatex","extractbb"); //17.09.20 + tmp=replace(tmp,"platex","extractbb"); + tmp=replace(tmp,"latex","extractbb"); + tmp=tmp+" -O "+file; + if(iswindows(), + tmp=tmp+" > "+Dirwork+"\"+fout; + , + tmp=tmp+" > "+Dirwork+"/"+fout; + ); + println(SCEOUTPUT,tmp); + println(SCEOUTPUT,"exit 0"); + closefile(SCEOUTPUT); + kc(Dirwork+"/"+kcfile,Mackc+Dirlib,Fnametex); // 16.06.07 + ); + if(flg>=0, + tmp1=0; + repeat(floor(waiting*1000/WaitUnit), + if(tmp1==0, + wait(10); + tmp=load(fout); + if(indexof(tmp,"CreationDate")>0, + tmp1=1; + ); + ); + ); + if(length(tmp)==0, + println(fout+" not generated. Maybe "+kcfile+" not run."); + , + tmp=tokenize(tmp,"%%"); + tmp=select(tmp,indexof(#,"Bounding")>0); + tmp=tmp_2; // + tmp1=indexof(tmp,":"); + tmp=substring(tmp,tmp1,length(tmp)); + tmp=Removespace(tmp); + tmp=tokenize(tmp," "); + tmp1=""; + forall(tmp, + tmp1=tmp1+Sprintf(#,2)+" "; + ); + tmp1=Removespace(tmp1)+addop; + tmp2="\includegraphics[bb="+tmp1+"]{"+file+"}"; + println(tmp2); + ); + ); +// setdirectory(Dirwork); + tmp2; // 16.04.25 +); +////%BBdata end//// + +////%Gcd start//// //190623 +Gcd(xL):=Gcd(xL,100); +Gcd(xL,nmx):=( +//help:Gcd([12,18,24]); +//help:Gcd(xlist,max<100>); + regional(mL,ng,tmp); + ng=nmx; + mL=apply(xL,mod(abs(#),ng)); + while(sum(mL)>0, + ng=ng-1; + mL=apply(xL,mod(abs(#),ng)); + ); + ng; +); +////%Gcd end//// + +////%Fracform start//// //190623 +Fracform(x):=Fracform(x,5); +Fracform(x,denorg):=( +//help:Fracform(1.3); +//help:Fracform(1.3,[denomlist]); + regional(den,fL,tmp,nn,mm,err); + den=denorg; + if(islist(den), + if(!contains(den,1), den=prepend(1,den)); + , + den=1..den; + ); + fL=[]; + forall(den, + tmp=round(x*#); + fL=append(fL,[tmp,#,abs(tmp/#-x)]); + ); + fL=sort(fL,#_3); + tmp=fL_1; + mm=tmp_1; nn=tmp_2; err=tmp_3; + if(nn>1, + out="fr("+text(mm)+","+text(nn)+")"; + , + out=text(mm); + ); + [out,"err="+format(err,6)]; +); +////%Fracform end//// + +////%Totexformpart start//// +Totexformpart(str):=( //190514 + regional(plv,funL,repL,flg,flgf,nall,nn,fun,funf, + frL,fr,out,tmp,tmp1,tmp2,tmp3,tmp4); + repL=[ //190515from + ["frac",["","\frac{xx}{yy}"]], + ["log",["\log{xx}","\log_{xx} yy"]], + ["sqrt",["\sqrt{xx}","\sqrt[xx]{yy}"]], + ["pow",["","{xx}^{yy}"]], + ["sin",["\sin{xx}","\sin^{xx}{yy}"]], //190522from + ["cos",["\cos{xx}","\cos^{xx}{yy}"]], + ["tan",["\tan{xx}","\tan^{xx}{yy}"]] //190522to + ]; + funL=apply(repL,substring(#_1,0,2)); //190515to + out=""; + plv=Bracket(str,"()"); + nall=length(plv); + if(nall>0, + frL=[]; + forall(1..nall,nn, + tmp1=plv_nn; + if(tmp1_2>0, + fun=""; + flgf=0; + forall(1..20, + if(flgf==0, + tmp2=tmp1_1; + tmp=substring(str,tmp2-#-1,tmp2-#); + if((tmp>="a")&(tmp<="z"), + fun=tmp+fun; + , + flgf=1; + ); + ); + ); + tmp=substring(fun,0,2); //190515from + if(contains(funL,tmp), + tmp=select(repL,substring(#_1,0,2)==tmp); + funf=tmp_1_1; //190515to + tmp=select(plv,(#_1>tmp1_1)&(#_2==-tmp1_2)); + tmp=tmp_1_1-1; + frL=append(frL,[fun,funf,tmp1_1,tmp,tmp1_2]); + ); + ); + ); + if(length(frL)>0, + frL=sort(frL,[-#_5]); + fr=frL_1; + fun=fr_1; funf=fr_2; + tmp1=substring(str,fr_3,fr_4); + tmp=select(repL,#_1==funf); + tmp=tmp_1; + tmp2=tmp_2; + tmp=Strsplit(tmp1,","); //190515from + nn=length(tmp); + if(nn==1, + tmp2=Assign(tmp2_1,["xx",tmp_1]); + ); + if(nn==2, + tmp2=Assign(tmp2_2,["xx",tmp_1,"yy",tmp_2]); + ); //190515to + nn=fr_3-length(fun); + tmp=substring(str,0,nn-1); + out=tmp+tmp2+substring(str,fr_4+1,length(str)); + , + out=""; + ); + ); + out; +); +////%Totexformpart end//// + +////%Totexform start//// +Totexform(str):=( //190514 +//help:Totexform("frac(2,3)"); + regional(out,plv,flg,nn,tmp,tmp1); + out=replace(str," ","\ "); + out=replace(str,"*"," "); + plv=Bracket(out,"()"); //190515from + flg=0; //190521from + if(length(plv)==0, + flg=4; //190522 + ); + if(flg==0, //190521to + tmp=Indexall(out,"("); //190522from + tmp1=Indexall(out,")"); + if(length(tmp)>length(tmp1), + flg=2; + out=out+"?+)?"; + ); + if(length(tmp)<length(tmp1), + flg=3; + out=out+"?)-?"; + ); //190522to + forall(1..20, + if(flg==0, + tmp=Totexformpart(out); + if(length(tmp)==0, + flg=1; + , + out=tmp; + ); + ); + ); + ); + if(flg<=1, + out=replace(out,"+-","\pm "); + out=replace(out,"-+","\mp "); + out=replace(out,"<=","\leq "); + out=replace(out,">=","\geq "); + out=Assign(out,["pi","\pi"]); //190521 + tmp1=Indexall(out,"^"); + forall(tmp1,nn, + if(substring(out,nn,nn+1)=="(", + tmp2=Bracket(substring(out,nn,length(out)),"()"); + tmp2=select(tmp2,#_2==-1); + tmp2=tmp2_1_1+nn; + tmp=substring(out,nn+1,tmp2-1); + out=substring(out,0,nn)+"{"+tmp+"}"; + out=out+substring(out,tmp2,length(out)); + ); + ); + ); + out; +); +////%Totexform end//// + +////%Tocindyformpart start//// +Tocindyformpart(str):=( //190521 + regional(plv,funL,repL,flg,flgf,nall,nn,fun,funf, + frL,fr,out,tmp,tmp1,tmp2,tmp3,tmp4); + repL=[ //190515from + ["frac",["","{xx}/{yy}"]], + ["log",["log{xx}","log{yy}/log{xx}"]], + ["sqrt",["sqrt{xx}","{yy}^(1/{xx})"]], //190522 + ["pow",["","{xx}^{yy}"]], + ["sin",["sin{xx}","{sin{yy}}^{xx}"]], //190522from + ["cos",["cos{xx}","{cos{yy}}^{xx}"]], + ["tan",["tan{xx}","{tan{yy}}^{xx}"]] //190522to + ]; + funL=apply(repL,substring(#_1,0,2)); //190515to + out=""; + plv=Bracket(str,"()"); + nall=length(plv); + if(nall>0, + frL=[]; + forall(1..nall,nn, + tmp1=plv_nn; + if(tmp1_2>0, + fun=""; + flgf=0; + forall(1..20, + if(flgf==0, + tmp2=tmp1_1; + tmp=substring(str,tmp2-#-1,tmp2-#); + if((tmp>="a")&(tmp<="z"), + fun=tmp+fun; + , + flgf=1; + ); + ); + ); + tmp=substring(fun,0,2); //190515from + if(contains(funL,tmp), + tmp=select(repL,substring(#_1,0,2)==tmp); + funf=tmp_1_1; //190515to + tmp=select(plv,(#_1>tmp1_1)&(#_2==-tmp1_2)); + tmp=tmp_1_1-1; + frL=append(frL,[fun,funf,tmp1_1,tmp,tmp1_2]); + ); + ); + ); + if(length(frL)>0, + frL=sort(frL,[-#_5]); + fr=frL_1; + fun=fr_1; funf=fr_2; + tmp1=substring(str,fr_3,fr_4); + tmp=select(repL,#_1==funf); + tmp=tmp_1; + tmp2=tmp_2; + tmp=Strsplit(tmp1,","); //190515from + nn=length(tmp); + if(nn==1, + tmp2=Assign(tmp2_1,["xx",tmp_1]); + ); + if(nn==2, + tmp2=Assign(tmp2_2,["xx",tmp_1,"yy",tmp_2]); + ); //190515to + nn=fr_3-length(fun); + tmp=substring(str,0,nn-1); + out=tmp+tmp2+substring(str,fr_4+1,length(str)); + , + out=""; + ); + ); + out; +); +////%Tocindyformpart end//// + +////%Tocindyform start//// +Tocindyform(str):=( //190521 +//help:Tocindyform("frac(2,3)"); + regional(out,plv,flg,nn,tmp,tmp1); + out=str; + plv=Bracket(out,"()"); + flg=0; + if(length(plv)==0, + flg=4; //190522 + ); + if(flg==0, + tmp=Indexall(out,"("); //190522from + tmp1=Indexall(out,")"); + if(length(tmp)>length(tmp1), + flg=2; + out=out+"?+)?"; + ); + if(length(tmp)<length(tmp1), + flg=3; + out=out+"?)-?"; + ); //190522to + forall(1..20, + if(flg==0, + tmp=Tocindyformpart(out); + if(length(tmp)==0, + flg=1; + , + out=tmp; + ); + ); + ); + ); + if(flg<=1, + tmp1=Indexall(out,"^"); + forall(tmp1,nn, + if(substring(out,nn,nn+1)=="(", + tmp2=Bracket(substring(out,nn,length(out)),"()"); + tmp2=select(tmp2,#_2==-1); + tmp2=tmp2_1_1+nn; + tmp=substring(out,nn+1,tmp2-1); + out=substring(out,0,nn)+"{"+tmp+"}"; + out=out+substring(out,tmp2,length(out)); + ); + ); + ); + out=replace(out,"{","("); + out=replace(out,"}",")"); + out; +); +////%Tocindyform end//// + +////%Animepar start//// //190524 +Animepar(start,ratio,stop):=Animationparam(start,ratio,stop); +////%Animepar end//// + +////%Animationparam start//// +Animationparam(start,ratio,stop):=( //190524 +//help:Animationparam(S.x,5,30); +//help:Animationparam(0,5,[-100,100]); +// Animeflg,sstart,Dirflg,Current,sorg are used in animation buttons + regional(rng); + if(islist(stop),rng=stop,rng=[start,stop]); + if(isreal(Animeflg), + if(Animeflg==1, + sstart=Dirflg*ratio*seconds()+sorg; + ); + , + Current=start; + sstart=start; + ); + if((sstart<=rng_1)%(sstart>=rng_2), //190528 + if(sstart<=rng_1,sstart=rng_1, sstart=rng_2); //190528 + stopanimation(); + ); + sstart; +); +////%Animationparam end//// + +////%Copyketcindyjs start//// 190128 +Copyketcindyjs():=( + regional(tmp,tmp1,tmp2,drive,fname); + if(iswindows(), + drive="C:"; + fname=Dirhead; + tmp=indexof(fname,":"); + if(tmp>0, + drive=substring(Dirwork,0,tmp); + fname=substring(fname,tmp,length(fname)); + ); + kc():=( + println("kc : "+kc(Dirwork+Batparent,Dirlib,Fnametex)); // 16.06.04 + ); + SCEOUTPUT = openfile(Batparent); + println(SCEOUTPUT,drive); + println(SCEOUTPUT,"cd "+Dqq(fname)); + println(SCEOUTPUT,"set xcp="+Dqq("\Windows\System32\xcopy")); + tmp1=Dqq("%xcp%")+" /Y /Q /S /E /R "+Dqq("ketcindyjs\"); + tmp2=" "+Dqq(Dircdy+"ketcindyjs\"); + println(SCEOUTPUT,tmp1+"Cindy.js.map"+tmp2); + println(SCEOUTPUT,tmp1+"webfont.js"+tmp2); + println(SCEOUTPUT,tmp1+"katex-plugin.js"+tmp2); + println(SCEOUTPUT,tmp1+"Cindy.js"+tmp2); + println(SCEOUTPUT,tmp1+"CindyJS.css"+tmp2); + tmp1=Dqq("%xcp%")+" /Y /Q /S /E /R "+Dqq("ketcindyjs\katex\"); + tmp2=" "+Dqq(Dircdy+"ketcindyjs\katex\"); + println(SCEOUTPUT,tmp1+"katex.min.css"+tmp2); + println(SCEOUTPUT,tmp1+"katex.min.js"+tmp2); + tmp1=Dqq("%xcp%")+" /Y /Q /S /E /R "+Dqq("ketcindyjs\katex\fonts\"); + tmp2=" "+Dqq(Dircdy+"ketcindyjs\katex\fonts\"); + println(SCEOUTPUT,tmp1+"KaTeX_Main-Regular.ttf"+tmp2); + println(SCEOUTPUT,tmp1+"KaTeX_Main-Regular.woff"+tmp2); + println(SCEOUTPUT,tmp1+"KaTeX_Main-Regular.woff2"+tmp2); + println(SCEOUTPUT,tmp1+"KaTeX_Math-Italic.ttf"+tmp2); + println(SCEOUTPUT,tmp1+"KaTeX_Math-Italic.woff"+tmp2); + println(SCEOUTPUT,tmp1+"KaTeX_Math-Italic.woff2"+tmp2); + println(SCEOUTPUT,"exit 0"); + closefile(SCEOUTPUT); + , + kc():=( + println("kc : "+kc(Dirwork+Shellparent,Mackc+Dirlib,Fnametex)); + ); + tmp1=Dircdy; //190214from + if(substring(tmp1,length(tmp1)-1,length(tmp1))=="/", + tmp1=substring(tmp1,0,length(tmp1)-1); + ); //190214to + SCEOUTPUT = openfile(Shellparent); + println(SCEOUTPUT,"#!/bin/sh"); + println(SCEOUTPUT,"cd "+Dqq(tmp1+"/")); //190214from + println(SCEOUTPUT,"mkdir ketcindyjs"); + println(SCEOUTPUT,"cd "+Dqq(Dirhead+"/ketcindyjs")); + println(SCEOUTPUT,"cp -r -p katex "+tmp1+"/ketcindyjs"); + println(SCEOUTPUT,"cp -p Cindy.js "+tmp1+"/ketcindyjs"); + println(SCEOUTPUT,"cp -p Cindy.js.map "+tmp1+"/ketcindyjs"); + println(SCEOUTPUT,"cp -p CindyJS.css "+tmp1+"/ketcindyjs"); + println(SCEOUTPUT,"cp -p katex-plugin.js "+tmp1+"/ketcindyjs"); + println(SCEOUTPUT,"cp -p webfont.js "+tmp1+"/ketcindyjs"); //190214to + println(SCEOUTPUT,"exit 0"); + closefile(SCEOUTPUT); + ); + kc(); +); +////%Copyketcindyjs end//// + +////%Ketjsoption start//// 190201 +Ketjsoption():=Setketcindyjs(); +Ketjsoption(list):=Setketcindyjs(list); +////%Ketjsoption end//// + +////%Setketcindyjs start//// 190201 +Setketcindyjs():=( + KETJSOP; +); +Setketcindyjs(list):=( +//help:Setketcindyjs(); +//help:Setketcindyjs(["Local=(n)","Scale=(1)","Nolabel=[](or all)","Color=","Grid="]); +//help:Setketcindyjs(["Removept=[]"]); + KETJSOP=list; + KETJSOP; +); +////%Setketcindyjs end//// + +////%Ketcindyjsdata start//// //190421 +Ketcindyjsdata(datalistorg):=( +//help:Ketcindyjsdata(["ans",ans,"pea[parse]",pea]); + regional(nn,func,tmp,tmp1,tmp2); + datalist=datalistorg; + forall(1..(length(datalist)/2), nn, //190423from + tmp1=datalist_(2*nn-1); + func=""; + tmp=indexof(tmp1,"["); + if(tmp>0, + func=substring(tmp1,tmp,length(tmp1)-1); + tmp1=substring(tmp1,0,tmp-1); + ); + tmp2=datalist_(2*nn); + if(length(func)>0, + forall(1..(length(tmp2)), + tmp=func+"("+Dqq(tmp2_#)+")"; + tmp2_#=parse(tmp); + ); + ); + if(islist(tmp2), + tmp="["; + forall(tmp2, + if(isstring(#), + tmp=tmp+Dqq(#)+","; + , + tmp=tmp+Textformat(#,5)+","; + ); + ); + tmp2=substring(tmp,0,length(tmp)-1)+"]"; + , + tmp2=Dqq(tmp2); + ); + tmp=tmp1+"="+tmp2; + KetcindyjsDataList=append(KetcindyjsDataList,tmp); + ); //190423to +); +Ketcindyjsdata(name,vaL):=( + Ketcindyjsdata([name,vaL]); +); +////%Ketcindyjsdata end//// + +////%Findfun start//// +Findfun(name,lineorg):=( + regional(line,sep,pL,jj,kk,flg,rmv,out,tmp,tmp1,tmp2); + line=Removespace(lineorg); + rmv=[name,"regional","forall","if","text","curkernel","append","concat"]; + rmv=concat(rmv,["append","apply","allelements","indexof"]); + rmv=concat(rmv,["substring","select","isstring","length"]); + rmv=concat(rmv,["round","unicode","openfile","closefile","println","replace"]); + rmv=concat(rmv,["setdirectory","parse","tokenize","import","load","ispoint"]); + rmv=concat(rmv,["isreal","layer","autoclearlayer","drawpoly","allcircles"]); + rmv=concat(rmv,["floor","flatten","prepend","islist","print","mod","abs","sum"]); + rmv=concat(rmv,["cos","sin","tan","arccos","arcsin","arctan","sqrt","reverse","re"]); + rmv=concat(rmv,["sort","contains","max","min","allpoints","isselected","common"]); + rmv=concat(rmv,["inspect","iscircle","alllines","repeat","remove","format"]); + rmv=concat(rmv,["ceil","while","dist","det","exp","err","arctan2","fillpoly"]); + rmv=concat(rmv,["drawtext","mouse","allsegments","createpoint","create"]); + rmv=concat(rmv,["gsave","connect","draw","grestore","wait"]); + +// rmv=concat(rmv,["d","list","c","funN","funP","function","for","return"]); // in string (for R) +// rmv=concat(rmv,["gsub","cat"]); // in string (for R) +// rmv=concat(rmv,["options"]); // written for Windows +// rmv=concat(rmv,["isexists"]); // java functions + + sep=[""," ",",","=","(","+","-","*","/","^","_","[",".","!","&","%",Dq,";",">","<",unicode("0009")]; + out=[]; + if(substring(line,0,2)!="//", + pL=Indexall(line,"("); + forall(pL,jj, + flg=0; + if(contains(pL,jj-1), flg=1); + forall(reverse(1..(jj-1)), + if(flg==0, + if(#==1, + tmp=substring(line,0,1); + if(contains(sep,tmp), + tmp=substring(line,1,jj-1); + , + tmp=substring(line,0,jj-1); + ); + flg=1; + ); + ); + if(flg==0, + tmp=substring(line,#-1,#); + if(contains(sep,tmp), + tmp=substring(line,#,jj-1); + if(indexof(substring(line,0,#-1),"//")==0, + flg=1; + ); + ); + ); + ); + if((flg==1)&(length(tmp)>0), + tmp1=Indexall(line,Dq); //190419from + tmp1=select(tmp1,#<jj); + if(mod(length(tmp1),2)==0, + out=append(out,tmp); + ); //190419 + ); + ); + ); + out=remove(out,rmv); + tmp=out; + out=[]; + forall(tmp, + if(!contains(out,#),out=append(out,#)); + ); + out; +); +////%Findfun end//// + +////%Extractfun start//// +Extractfun(strL):=( + regional(nL,str,str2,start,sep,out,tmp,tmp1,tmp2); + out=[]; + forall(strL,str, + nL=Indexall(str,Dq); + str2=""; + start=0; + forall(1..(length(nL)/2), + tmp1=nL_(2*#-1); + str2=str2+substring(str,start,tmp1-1); + start=nL_(2*#); + ); + str2=str2+substring(str,start,length(str)); + fL=Findfun("csdraw",str2); + out=remove(out,fL); + out=concat(out,fL); + ); +); +////%Extractfun end//// + +//DL1=Readcsv(Dirhead+pathsep()+"ketcindyjs","basic1list.txt"); +//DL2=Readcsv(Dirhead+pathsep()+"ketcindyjs","basic2list.txt"); +//DL=concat(DL1,DL2); +//Out=[]; + +////%Extractall start//// +Extractall(name):=( + regional(fL,jj,tmp,tmp1,tmp2,tmp3,flg); + fL=apply(Out,#_1); + tmp1=select(DL,#_1==name); + if(length(tmp1)>0, + tmp1=tmp1_1; + flg=0; //190417from + forall(IgnoreList,#, + if(flg==0, + tmp2=#; tmp3=length(tmp2); + tmp=indexof(tmp2,"*"); + if(tmp>0, + tmp2=substring(#,0,tmp-1); tmp3=tmp-1; + ); + if(substring(name,0,tmp3)==tmp2, + flg=1; + ); + ); + ); + if(flg==0, //190417to + if(!contains(fL,tmp1), + Out=append(Out,tmp1); + fL=append(fL,tmp1_1); + if(length(tmp1)>=5, + forall(5..(length(tmp1)),jj, + tmp=tmp1_jj; + if(!contains(fL,tmp), + tmp2=Out; + Extractall(tmp); + tmp2=remove(Out,tmp2); + ); + ); + ); + ); + ); //190416 + ); + tmp1=Out; + Out=[]; + forall(1..(length(tmp1)), + if(!contains(Out,tmp1_#), + Out=append(Out,tmp1_#); + ); + ); + Out; +); +////%Extractall end//// + +////%Textedit start//// 190430 +Textedit(no):=( +//help:Textedit(50); + regional(tmp,tmp1,tmp2); + tmp="Text"+text(no)+".currenttext"; + tmp1=parse(tmp); + tmp1; +); +////%Textedit end//// + +////%Textedit2value start//// 190521 +Textedit2value(no):=Textedit2value(no,[]); +Textedit2value(no,options):=( +//help:Textedit2value(50); +//help:Textedit2value(51,["Parse=y/n","Form=c/t/m"]); + regional(str,tmp,tmp1,parseflg,formflg); + parseflg="Y"; + formflg="C"; //190522 + forall(options, + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,1)); + if(tmp1=="P", + parseflg=Toupper(substring(tmp_2,0,1)); + ); + if(tmp1=="F", + formflg=Toupper(substring(tmp_2,0,1)); + ); + ); + str=Textedit(no); + str=Removespace(str); + if(formflg=="C", + str=Tocindyform(str); + if(indexof(str,"?")>0,parseflg="N"); //190522 + ); + if(formflg=="T", //190522from + str=Totexform(str); + parseflg="N"; + ); + if(formflg=="M", + str=Tomaxform(str); + parseflg="N"; + ); //190522to + if(length(str)>0, + tmp=Strsplit(str,"="); + if(length(tmp)>1,str=tmp_2); + ); + if(length(str)==0, //190522from + parseflg="N"; + ); //190522from + if(parseflg=="Y", + str=parse(str); //190522 + ); + str; +); +////%Textedit2value end//// + +////%Mkketcindyjs start//// 190115 +Mkketcindyjs():=Mkketcindyjs(KETJSOP); //190129 +Mkketcindyjs(options):=( //17.11.18 +//help:Mkketcindyjs(); +//help:Mkketcindyjs(options=["Local=(y)","Scale=(1)","Nolabel=[]","Color=","Grid="]); +//help:Mkketcindyjs(optionsadd=["Web=(y)","Path=Dircdy","Ignore=","Equal="]); + regional(webflg,localflg,htm,htmorg,from,upto,flg,fL,fun,jj,tmp,tmp1,tmp2,tmp3, + libnameL,libL,lib,jc,nn,name,partL,toppart,lastpart,path,ketflg,flg,cmdL,scale, + nolabel,color,grid,out,Out,igno,onlyflg,rmptL,colorrgb,ptname,eqflg,eqrep); + libnameL=["basic1","basic2","basic3","3d"]; //190416,190428 + webflg="Y"; //190128 texflg removed + localflg="Y"; //190209,0215 + scale=1; //190129 + nolabel=["SW","NE"]; //190129 + color="lightgray"; //190503 + eqflg=0; //190603 + grid=""; + path=Dircdy; + igno=[]; + rmptL=REMOVEPTJS; + forall(options, + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,1)); + tmp2=tmp_2; + if(tmp1=="W", + if(length(tmp2)>0, //190209 + webflg=Toupper(substring(tmp2,0,1)); + ); + ); + if(tmp1=="L", + if(length(tmp2)>0, //190209 + localflg=Toupper(substring(tmp2,0,1)); + ); + ); + if(tmp1=="S", + if(length(tmp2)>0, //190209 + scale=parse(tmp2); + ); + ); + if(tmp1=="N", + if(length(tmp2)>0, //190209 + if(Toupper(tmp2)=="ALL", //190405from + tmp2=remove(allpoints(),[SW,NE]); + tmp2=text(tmp2); + ); //190405to + tmp=tmp2; + if(indexof(tmp2,"[")>0, + tmp=substring(tmp2,1,length(tmp2)-1); + ); + tmp=tokenize(tmp,","); + nolabel=concat(nolabel,tmp); + ); + ); + if(tmp1=="C", //190209 + if(length(tmp2)>0, + color=tmp2; + ); + ); + if(tmp1=="G", + if(length(tmp2)>0, + grid=tmp2; + ); + ); + if(tmp1=="E", //190603from + eqflg=1; + if(length(tmp2)>0, + eqrep=tmp2; + , + eqrep=""; + ); + ); //190603to + if(tmp1=="P", + if(!tmp2="Dircdy", + path=tmp2; + ); + ); + if(tmp1=="I", //190417from + if(substring(tmp2,0,1)=="[", + tmp2=substring(tmp2,1,length(tmp2)-1); + igno=tokenize(tmp2,","); + ); + ); //190417to + if(tmp1=="R", //190503from + if(substring(tmp2,0,1)=="[", + tmp2=substring(tmp2,1,length(tmp2)-1); + tmp2=tokenize(tmp2,","); + rmptL=concat(rmptL,tmp2); + ); //190503to + ); //190503to + ); + if(substring(color,0,1)=="[", + tmp=parse(color); + if(length(tmp)==4, + colorrgb=Colorcode("cmyk","rgb",tmp); //190504 + , + colorrgb=color; //190506 + ); + , + colorrgb=Colorname2rgb(color); //190504 + ); //190503to + tmp=apply(colorrgb,round(#*255)); //190504 + tmp=text(tmp); + color=substring(tmp,1,length(tmp)-1); + if((webflg=="N")&(localflg=="Y"), + if(!isexists(Dircdy,"ketcindyjs"), + println(3402);Copyketcindyjs();println(3403); + println("ketcindyjs has been copied"); + ); + ); + if(!isexists(Dircdy,Fhead+".html"), + drawtext(mouse().xy-[0,1],Cdyname()+".html not found",size->24,color->[1,0,0]); + wait(3000); + , + htmorg=Readlines(Dircdy,Fhead+".html"); + tmp=select(1..(length(htmorg)),indexof(htmorg_#,"id="+Dqq("csinit"))>0); //190206from + from=tmp_1+5; + flg=0; + forall(from..(length(htmorg)), + if(flg==0, + if(indexof(htmorg_#,"</script>")>0, + upto=#-1; + flg=1; + ); + ); + ); + tmp2=[]; + ketflg="off"; + onlyflg="off"; //190502 + forall(htmorg_(from..upto), + if(indexof(#,"only ketjs on")>0,onlyflg="on"); //190502 + if(indexof(#,"only ketjs off")>0,onlyflg="off"); //190502 + if(indexof(#,"no ketjs")>0, + if(indexof(#,"no ketjs on")>0, + ketflg="on"; + ); + if(indexof(#,"no ketjs off")>0, + ketflg="off"; + ); + , + if(ketflg=="off", + tmp=Removespace(#); + if(substring(tmp,0,2)!="//", + tmp2=append(tmp2,#); + , + tmp1=indexof(tmp,"only ketjs"); //190430from + if((tmp1>0)%(onlyflg=="on"), //190502 + if(tmp1>0,tmp=substring(#,0,tmp1-1)); //190502 + tmp2=append(tmp2,substring(tmp,2,length(tmp))); + ); //190430to + ); + ); + ); + ); + tmp=select(1..(length(htmorg)),indexof(htmorg_#,"id="+Dqq("csdraw"))>0); + from=tmp_1+1; + flg=0; + forall(from..(length(htmorg)), + if(flg==0, + if(indexof(htmorg_#,"</script>")>0, + upto=#-1; + flg=1; + ); + ); + ); + ketflg="off"; + onlyflg="off"; //190502 + forall(htmorg_(from..upto), + if(indexof(#,"only ketjs on")>0,onlyflg="on"); //190502 + if(indexof(#,"only ketjs off")>0,onlyflg="off"); //190502 + if(indexof(#,"no ketjs")>0, + if(indexof(#,"no ketjs on")>0, + ketflg="on"; + ); + if(indexof(#,"no ketjs off")>0, + ketflg="off"; + ); + , + if(ketflg=="off", + tmp=Removespace(#); + if(substring(tmp,0,2)!="//", + tmp2=append(tmp2,#); + , + tmp1=indexof(tmp,"only ketjs"); //190430from + if((tmp1>0)%(onlyflg=="on"), //190502 + if(tmp1>0,tmp=substring(#,0,tmp1-1)); //190502 + tmp2=append(tmp2,substring(tmp,2,length(tmp))); + ); //190430to + ); + ); + ); + ); + fL=Extractfun(tmp2); //190206to + DL=[]; + forall(libnameL,name, //190209from + tmp2=Readlines(Dirhead+pathsep()+"ketcindyjs",name+"list.txt"); + tmp1=[]; + forall(1..(length(tmp2)),nn, + tmp=Indexall(tmp2_nn,","); + from=0; + tmp3=[]; + forall(tmp, + tmp3=append(tmp3,substring(tmp2_nn,from,#-1)); + from=#; + ); + tmp3=append(tmp3,substring(tmp2_nn,from,length(tmp2_nn))); + tmp1=append(tmp1,tmp3); + ); + DL=concat(DL,tmp1); //DL and Out are necessary for Extractall + ); //190209to + tmp=Readlines(Dirhead+pathsep()+"ketcindyjs","ignoredfun.txt"); //190416from + tmp=apply(tmp,Removespace(#)); //190131 + IgnoreList=select(tmp,(length(#)>0)&(substring(#,0,2)!="//")); //190131//190416to + IgnoreList=concat(IgnoreList,igno); //190417 + Out=[]; // necessary for Extractall + forall(fL,fun, + Extractall(fun); + ); +// tmp1=select(Out,contains(igL,#_1)); //190416 +// Out=remove(Out,tmp1); USEDFUN=apply(Out,#_1); //190130 //190416 + tmp1=select(1..(length(htmorg)),indexof(htmorg_#,"script id=")>0); + partL=[]; + forall(tmp1,nn, + from=nn; + tmp2=htmorg_from; + tmp=Indexall(tmp2,Dq); + name=substring(tmp2,tmp_1,tmp_2-1); + tmp=select((from+1)..(length(htmorg)),indexof(htmorg_#,"</script>")>0); + upto=tmp_1; + partL=append(partL,[name,from,upto]); + ); + tmp=apply(partL,#_2); + tmp=min(tmp)-1; + toppart=[1,tmp]; + tmp=apply(partL,#_3); + tmp=max(tmp)+1; + lastpart=[tmp,length(htmorg)]; + if(webflg=="Y", + tmp1=Fhead+"json.html"; + , + tmp1=Fhead+"jsoff.html"; + if(localflg=="Y",tmp1=replace(tmp1,"off.","offL.")); //190209 + ); + setdirectory(path); + SCEOUTPUT = openfile(tmp1); + tmp1=htmorg_((toppart_1)..(toppart_2)); + if(webflg=="N", + if(localflg=="N", //190128 + tmp3=replace(Dirhead+"/ketcindyjs/",pathsep(),"/"); + tmp= " <link rel="+Dqq("stylesheet")+" href="; + tmp=tmp+Dq+"file:///"+tmp3+"CindyJS.css"+Dq+">"; + tmp1_(length(tmp1)-2)=tmp; + tmp= " <script type="+Dqq("text/javascript")+" src="; + tmp=tmp+Dq+"file:///"+tmp3+"Cindy.js"+Dq+"></script>"; + tmp1_(length(tmp1)-1)=tmp; + tmp=" <script type="+Dqq("text/javascript")+" src="; //190117from + tmp1_(length(tmp1))=""; //190120 + , + tmp1_(length(tmp1)-2)= //190128from + " <link rel="+Dqq("stylesheet")+" href="+Dqq("ketcindyjs/CindyJS.css")+">"; //190203 + tmp1_(length(tmp1)-1)= + " <script type="+Dqq("text/javascript")+" src="+Dqq("ketcindyjs/Cindy.js")+"></script>"; + //190203 + tmp1_(length(tmp1))=""; //190128to + ); + , + tmp1_(length(tmp1))=""; //190117to + ); + forall(tmp1, + println(SCEOUTPUT,#); + ); + tmp="<script id="+Dqq("csinit")+" type="; + tmp=tmp+Dqq("text/x-cindyscript")+">"; + println(SCEOUTPUT,tmp); +// tmp=Readlines(Dirhead+pathsep()+"ketcindyjs","commonused.txt"); +// forall(tmp, +// println(SCEOUTPUT,#); +// ); + libL=[]; //190209from + forall(libnameL, + tmp=Readlines(Dirhead+"/ketlib","ketcindylib"+#+"r.cs"); + libL=append(libL,tmp); + ); //190209to + forall(Out,fun, + libf=fun_2;from=parse(fun_3);upto=parse(fun_4); + tmp=select(1..(length(libnameL)),indexof(libf,libnameL_#)>0); //190209from + tmp=tmp_1; + lib=libL_tmp; + tmp1=lib_(from..upto); //190209from + ketflg="off"; //190122from + onlyflg="off"; //190502 + forall(tmp1, + if(indexof(#,"only ketjs on")>0,onlyflg="on"); //190502 + if(indexof(#,"only ketjs off")>0,onlyflg="off"); //190502 + if(indexof(#,"no ketjs")>0, + if(indexof(#,"no ketjs on")>0, + ketflg="on"; + ); + if(indexof(#,"no ketjs off")>0, + ketflg="off"; + ); + , + if(ketflg=="off", + tmp=Removespace(#); + if(substring(tmp,0,2)!="//", + println(SCEOUTPUT,#); + , + tmp1=indexof(tmp,"only ketjs"); //190430from + if((tmp1>0)%(onlyflg=="on"), //190502 + if(tmp1>0,tmp=substring(#,0,tmp1-1)); //190502 + println(SCEOUTPUT,substring(tmp,2,length(tmp))); + ); //190430to + ); + ); //190122to + ); + ); + ); + tmp=select(partL,#_1=="csinit"); + if(length(tmp)>0, + tmp=tmp_1; + from=tmp_2+5; //190206 + upto=tmp_3; + tmp1=htmorg_((from+1)..(upto-1)); //190119 + ketflg="off"; //190206from + onlyflg="off"; //190502 + forall(tmp1, + if(indexof(#,"only ketjs on")>0,onlyflg="on"); //190502 + if(indexof(#,"only ketjs off")>0,onlyflg="off"); //190502 + if(indexof(#,"no ketjs")>0, + if(indexof(#,"no ketjs on")>0, + ketflg="on"; + ); + if(indexof(#,"no ketjs off")>0, + ketflg="off"; + ); + , + if(ketflg=="off", + tmp=Removespace(#); + if(substring(tmp,0,2)!="//", + println(SCEOUTPUT,#); + , + tmp1=indexof(tmp,"only ketjs"); //19020l6from + if((tmp1>0)%(onlyflg=="on"), //190502 + if(tmp1>0,tmp=substring(#,0,tmp1-1)); //190502 + println(SCEOUTPUT,substring(tmp,2,length(tmp))); + ); //190206to + ); + ); + ); + ); + ); + forall(KetcindyjsDataList, //190422from + println(SCEOUTPUT,#+";"); + ); //190422to + println(SCEOUTPUT,"</script>"); + tmp=select(partL,#_1=="csdraw"); + tmp=tmp_1; + from=tmp_2; + upto=tmp_3; + tmp1=htmorg_(from..upto); + ketflg="off"; //190202from + onlyflg="off"; //190502 + forall(tmp1, + if(indexof(#,"only ketjs on")>0,onlyflg="on"); //190502 + if(indexof(#,"only ketjs off")>0,onlyflg="off"); //190502 + if(indexof(#,"no ketjs")>0, + if(indexof(#,"no ketjs on")>0, + ketflg="on"; + ); + if(indexof(#,"no ketjs off")>0, + ketflg="off"; + ); + , + if(ketflg=="off", + tmp=Removespace(#); + if(substring(tmp,0,2)!="//", + println(SCEOUTPUT,#); + , + tmp1=indexof(tmp,"only ketjs"); //19020l6from + if((tmp1>0)%(onlyflg=="on"), //190502 + if(tmp1>0,tmp=substring(tmp,0,tmp1-1)); //190502 + println(SCEOUTPUT,substring(tmp,2,length(tmp))); //190502 + ); //190206to + ); + ); + ); + ); //190206to + tmp1=htmorg_((lastpart_1)..(lastpart_2)); + tmp=select(1..(length(tmp1)),indexof(tmp1_#,Dqq("cs*"))>0); + tmp=tmp_1; + forall(1..tmp, //190117from + println(SCEOUTPUT,tmp1_#); + ); + from=tmp+1; //190117to + tmp=" use: ["+Dqq("katex")+"],"; + println(SCEOUTPUT,tmp); + out=[]; //190129 + forall(from..(length(tmp1)),jj, + flg=0; //190126from + tmp2=["Figure","Parent","ParaF","Anime","Flip","Title","Slide","Digest", + "KeTJS","KeTJSoff","Objview"]; + if(indexof(tmp1_jj,"type: "+Dqq("Button"))>0, + nn=indexof(tmp1_jj,"text: "); + tmp=substring(tmp1_jj,nn-1,length(tmp1_jj)); + nn=Indexall(tmp,Dq); + tmp=substring(tmp,nn_1,nn_2-1); + if(!contains(tmp2,tmp), + out=append(out,tmp1_jj); //190129 + ); + flg=1; + ); + if(flg==0, + if(indexof(tmp1_jj,"Evaluate")>0, + tmp=replace(tmp1_jj,Dqq("Evaluate"),Dqq("EditableText")); + if(eqflg==1,tmp=replace(tmp,"=",eqrep)); //190604 + out=append(out,tmp); + flg=1; + ); + ); + if(flg==0, + if(indexof(tmp1_jj,"Calculation")>0, + tmp=replace(tmp1_jj,Dqq("Calculation"),Dqq("EditableText")); + if(eqflg==1,tmp=replace(tmp,"=",eqrep)); //190604 + out=append(out,tmp); + flg=1; + ); + ); + tmp=indexall(tmp1_jj,Dq); //190504from + if(length(tmp)>0, + ptname=substring(tmp1_jj,tmp_1,tmp_2-1); + , + ptname=""; + ); + if(flg==0, + if(contains(rmptL,ptname), flg=1); + ); + tmp2=tmp1_jj; + if(length(ptname)>0, + if(indexof(tmp2,"size:")==0, + tmp2=replace(tmp2,"}",", size: 3.0}"); + ); + if(indexof(tmp2,"border:")==0, + tmp2=replace(tmp2,"}",", border: true }"); + ); + ); + if(flg==0, + tmp=Indexof(tmp2,"labeled: "); + if((ptname=="")%(tmp==0), + out=append(out,tmp2); + flg=1; + ); + ); + if(flg==0, + if(contains(["TH","FI"],ptname), + if(SLIDEFLG=="Y", + out=append(out,tmp2); + flg=1; + ); + ); + ); + if(flg==0, + if(contains(nolabel,ptname), + tmp2=replace(tmp2,"labeled: true","labeled: false"); + ); + if((indexof(ptname,"z")>0)%(contains(["NE","SW","TH","FI"],ptname)), + if(indexof(ptname,"z")>0, + tmp2=replace(tmp2,"labeled: true","labeled: false"); + ); + tmp=indexof(tmp2,"color:"); + tmp3=Indexall(tmp2,"],"); + tmp3=select(tmp3,#>tmp); + if(length(tmp3)>0, + tmp3=tmp3_1; + , + tmp3=indexof(tmp2,"]}"); + ); + tmp=substring(tmp2,tmp-1,tmp3); + tmp2=replace(tmp2,tmp,"color: [1.0,1.0,1.0]"); +// tmp2=replace(tmp2,"color: tmp,"color: "+text(colorrgb)); + tmp2=replace(tmp2,"border: true","border:false"); + tmp=indexof(tmp2," size:"); + tmp3=Indexall(tmp2,","); + tmp3=select(tmp3,#>tmp); + if(length(tmp3)>0, + tmp3=tmp3_1; + , + tmp3=indexof(tmp2,"}"); + ); + tmp=substring(tmp2,tmp-1,tmp3-1); + tmp2=replace(tmp2,tmp," size: 2.0"); + ); + out=append(out,tmp2); + flg=1; + ); //190504to + if(flg==0, + if(length(tmp1_jj)>0, //190504from + out=append(out,tmp1_jj); + ); //190504to + ); //190126to + ); + tmp=select(1..(length(out)),indexof(out_#," ],")>0); //190129from + tmp=tmp_1; + tmp1=out_(tmp-1); + if(substring(tmp1,length(tmp1)-1,length(tmp1))==",", //190201from + out_(tmp-1)=substring(tmp1,0,length(tmp1)-1); + ); //190201to + tmp=select(1..(length(out)),indexof(out_#,"width:")>0); + jj=tmp_1; + tmp1=out_jj; + flg=0; + forall(1..(length(tmp1)-1), + if(flg==0, + tmp=substring(tmp1,#-1,#); + if(tmp==":", + tmp2=substring(tmp1,#+1,length(tmp1)-1); + flg=1; + ); + ); + ); + tmp=round(scale*parse(tmp2)); + out_jj=" width: "+text(tmp)+","; + tmp=select(1..(length(out)),indexof(out_#,"height:")>0); + jj=tmp_1; + tmp1=out_jj; + flg=0; + forall(1..(length(tmp1)-1), + if(flg==0, + tmp=substring(tmp1,#-1,#); + if(tmp==":", + tmp2=substring(tmp1,#+1,length(tmp1)-1); + flg=1; + ); + ); + ); + tmp=round(scale*parse(tmp2)); + out_jj=" height: "+text(tmp)+","; + if(length(color)>0, + tmp=select(1..(length(out)),indexof(out_#,"background: ")>0); + jj=tmp_1; + tmp=indexof(out_jj,")"); //190130from + tmp=substring(out_jj,tmp-1,length(out_jj)); + out_jj=" background: "+Dq+"rgb("+color+tmp; //190130to + ); + if(length(grid)>0, + tmp=select(1..(length(out)),indexof(out_#,"grid:")>0); + jj=tmp_1; + tmp1=" grid: "+grid; + if(indexof(out_jj,",")>0, + tmp1=tmp1+","; + ); + out_jj=tmp1; + ); + forall(out, + println(SCEOUTPUT,#); + ); //190129to + closefile(SCEOUTPUT); + setdirectory(Dirwork); + if(webflg=="Y",tmp="json",tmp="jsoff"); + drawtext(mouse().xy-[0,1],tmp+"in "+path,size->20,color->[1,0,0]); + wait(1000); + ); +); +////%Mkketcindyjs end//// + +//help:end(); + diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibhelpJ.txt b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibhelpJ.txt index c3e02a5c21c..a6a35d673f7 100755 --- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibhelpJ.txt +++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibhelpJ.txt @@ -90,14 +90,11 @@ //help:PtonSeg*(線分上ã«ç‚¹ã‚’ã¨ã‚‹); //help:PutonCurve*(曲線上ã«ç‚¹ã‚’ã¨ã‚‹); //help:Setscaling*(縦方å‘ã®å€çŽ‡ã‚’指定); - //help:Tabledatalight*(幾何点をもãŸãªã„è¡¨ãƒ‡ãƒ¼ã‚¿ä½œæˆ - //è¿½åŠ ã‚ªãƒ—ã‚·ãƒ§ãƒ³ : ラベルã®ã¨ã³ï¼Œæç”»é ˜åŸŸã‚’è¡¨ã«åˆã‚ã›ã‚‹ã‹); + //help:Tabledata*(è¡¨ãƒ‡ãƒ¼ã‚¿ä½œæˆ + //è¿½åŠ ã‚ªãƒ—ã‚·ãƒ§ãƒ³ : ラベルã®ã¨ã³ï¼Œæç”»é ˜åŸŸã‚’è¡¨ã«åˆã‚ã›ã‚‹ã‹ï¼Œå¹¾ä½•ç‚¹ã‚’用ã„ã‚‹ã‹); //help:Tgrid*(表ã®ã‚»ãƒ«ã®åº§æ¨™ã‚’è¿”ã™); //help:Tlistplot*(表ã®2æ ¼å点をçµã¶ç·šåˆ†); ////help:ChangeTablestyle*(表ã®ç½«ç·šã®ã‚¹ã‚¿ã‚¤ãƒ«å¤‰æ›´); -//help:Tabledata*(幾何点をもã¤è¡¨ãƒ‡ãƒ¼ã‚¿ã‚’ä½œæˆ - //è¿½åŠ ã‚ªãƒ—ã‚·ãƒ§ãƒ³ : ラベルã®ã¨ã³ï¼Œæç”»é ˜åŸŸã‚’è¡¨ã«åˆã‚ã›ã‚‹ã‹); -//help:Tabledata*(xLst=apply(1..5,10);yLst=apply(1..4,8);rmvL=[];); //help:Findcell*(表ã®ã‚»ãƒ«ã®æƒ…å ±ã‚’è¿”ã™); //help:Putcell*(表ã®ã‚»ãƒ«ã«æ–‡å—を書ã入れる); //help:Putcellexpr*(表ã®ã‚»ãƒ«ã«æ•°å¼ã‚’書ã入れる); diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibmvlogr.txt b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibmvlogr.txt index a1aa7df77e3..a325fea4bd7 100644 --- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibmvlogr.txt +++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibmvlogr.txt @@ -1,3 +1,7 @@ +// 20190415 +// parse( ..= ) changed ( ; added ) +// 20190404 +// Mkanimation, Mkflipanime changed ( Filename ) // 20190317 // Setpara debugged ( default value of Frate changed to 20) // 20181224 diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibmvr.cs b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibmvr.cs index 618a070f121..56351e659a8 100755 --- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibmvr.cs +++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibmvr.cs @@ -14,7 +14,7 @@ // along with this program. If not, see <http://www.gnu.org/licenses/> // -println("ketcindymv(20190317) loaded"); +println("ketcindymv(20190415) loaded"); //help:start(); @@ -123,7 +123,7 @@ Parafolder(fstr,sL,optionorg):=( tmp1=substring(fstr,tmp,length(fstr)); tmp=indexof(tmp1,")"); tmp1=substring(tmp1,0,tmp-1); - parse("Movieframe("+tmp1+"):="+fstr); + parse("Movieframe("+tmp1+"):="+fstr+";"); //190415 options=optionorg; tmp=Divoptions(options); eqL=tmp_5; @@ -255,7 +255,7 @@ Parafolder(fstr,sL,optionorg):=( println("Parafolder finished"); ); if(length(after)>0, - parse(after); + parse(after+";"); //190415 ); ); if(ErrFlag!=-1,//180617from @@ -378,7 +378,7 @@ Mkanimation(path,folder):=( ); ); //17.11.25until Fheadbkup=Fhead; - Fhead="animate"+folder; + Fhead=folder+"animate"; //190404 Pathpdfbkup=Pathpdf; Pathpdf=PathAd; tmp1=replace(PathT,pathsep(),"/"); @@ -528,7 +528,7 @@ Mkflipanime(path,folder):=( ); ); //17.11.25until Fheadbkup=Fhead; - Fhead="flipanime"+folder; + Fhead=folder+"flipanime"; //190404 tmp1=replace(PathT,pathsep(),"/"); tmp=indexall(tmp1,"/");//17.10.14from if(length(tmp)>0, diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindyliboutlogr.txt b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindyliboutlogr.txt index ceb338a17a9..ddfac03553f 100644 --- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindyliboutlogr.txt +++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindyliboutlogr.txt @@ -1,3 +1,14 @@ +// 20190424 +// PlotdiscR changed ( "-" added to Listplot ) +// Mxfun debugged (options) +// 20190415 +// parse( ..= ) changed ( ; added ) +// 20190411 +// CalcbyM changed ("Errchk=" added) +// 20190327 +// Mxfun debugged ( eqL to 1 char) +// 20190317 +// Readcsv debugged ( in case of 2 args ) // 20190301 // MeasureDepth => Measuredepth // Readcsv changed ( for 2 arg, ".csv" can be omitted ) diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindyliboutr.cs b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindyliboutr.cs index c5fbf3a999d..7de07986f3f 100644 --- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindyliboutr.cs +++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindyliboutr.cs @@ -14,7 +14,7 @@ // along with this program. If not, see <http://www.gnu.org/licenses/> // -println("ketcindylibout[20190301] loaded"); +println("ketcindylibout[20190424] loaded"); //help:start(); @@ -1094,7 +1094,7 @@ CalcbyR(name,path,cmd,optionorg):=( tmp3=replace(tmp3,"[,","["); tmp3=replace(tmp3,",]","]"); ); - tmp=name+"="+tmp3;//180227 + tmp=name+"="+tmp3+";";//180227//190415 parse(tmp); ); ); @@ -1290,7 +1290,7 @@ Readcsv(Arg1,Arg2):=( //190301from if(islist(Arg2), Readcsv(Dirwork,Arg1,Arg2); , - Readcsv(path,file,[]); + Readcsv(Arg1,Arg2,[]); //190317 ); ); //190301from Readcsv(path,file,options):=( @@ -1538,7 +1538,7 @@ PlotdataR(name1,path,func,variable,optionorg):=( ReadOutData(wfile); Extractdata(name,options); tmp=parse(name); - tmp1=name+"="+textformat(tmp,5); + tmp1=name+"="+textformat(tmp,5)+";"; parse(tmp1); tmp2=apply(tmp,Lcrd(#)); tmp2; @@ -1574,7 +1574,7 @@ PlotdiscR(nm,fun,varrng,options):=( tmp1=replace(tmp1,"##",""); pb=tokenize(tmp1,","); tmp=apply(range,[#,pb_(#+1)]); - Listplot(name,tmp,options); + Listplot("-"+name,tmp,options); //190424 ); ); ////%PlotdiscR end//// @@ -1890,7 +1890,7 @@ Histplot(nm,dataorg,optionorg):=( // tmp=load(file); // tmp=replace(tmp,"/",""); // tmp=tokenize(tmp,","); -// tmp=name+"="+textformat(tmp,5); +// tmp=name+"="+textformat(tmp,5)+";"; // parse(tmp); hp=parse(name); tmp1=(length(hp)-1)/3+1; @@ -1916,7 +1916,7 @@ Histplot(nm,dataorg,optionorg):=( ); pstr=substring(pstr,0,length(pstr)-1)+"]"; println("generate totally "+name); - tmp=name+"="+pstr; + tmp=name+"="+pstr+";"; //190415 parse(tmp); [bdata,cdata]; ); @@ -1968,7 +1968,7 @@ Scatterplot(nm,file,optionorg,optionsreg):=( , tmp=file; ); - parse("rc"+nm+"="+tmp); //181013to + parse("rc"+nm+"="+tmp+";"); //181013to //190415 Pointdata(name,parse("rc"+nm),options); tmp=parse("rc"+nm); dtx=apply(tmp,#_1); @@ -2281,7 +2281,7 @@ PlotdataS(nm,fun,variable,optionorg):=( ReadOutData(fname); Extractdata(name,options); tmp=parse(name); - tmp1=name+"="+textformat(tmp,5); + tmp1=name+"="+textformat(tmp,5)+";"; //190415 parse(tmp1); // Addgraph(name); // 16.04.04 tmp2=apply(tmp,Lcrd(#)); @@ -2682,12 +2682,12 @@ CalcbyA(name,cmd,optionorg):=( tmp=Indexof(tmp1,"/start/,"); // 16.05.18from tmp1="["+Dq+substring(tmp1,tmp+7,length(tmp1)-1)+"]"; // 16.05.18until -// tmp1=substring(tmp1,0,length(tmp1)-1)+"]"; +// tmp1=substring(tmp1,0,length(tmp1)-1)+"];"; //190415 parse(name+"="+tmp1); tmp=parse(name); if(length(tmp)==1, tmp1=substring(tmp1,1,length(tmp1)-1); - parse(name+"="+tmp1); + parse(name+"="+tmp1+";"); //190415 ); flg=1; tmp2=#*WaitUnit/1000; @@ -2825,7 +2825,7 @@ Asirfun(name,fun,argL,optionorg):=( ); out=out2; tmp=apply(out,Dq+#+Dq); - parse(nm+"="+tmp); + parse(nm+"="+tmp+";"); //190415 ); if(ErrFlag==0, if(disp==1, // 15.11.24 @@ -2982,28 +2982,28 @@ kcM(fname,optionorg):=( CalcbyM(name,cmd):=CalcbyM(name,cmd,[]); CalcbyM(name,cmd,optionorg):=( //help:CalcbyM("a",cmdL); -//help:CalcbyM(options1= ["m/r","Wait=5","Ext=txt","Dig=6","Pow=no","All=y"]); +//help:CalcbyM(options1= ["m/r","Wait=5","Errchk=y(/n)","Dig=6","Pow=no","All=y"]); //help:CalcbyM(options2= ["line=1000"]); regional(options,tmp,tmp0,tmp1,tmp2,tmp3,tmp4,realL,strL,eqL,allflg,indL,line, - dig,flg,wflg,file,nc,arg,add,powerd,cmdM,cmdlist,wfile,ext,waiting,num,st); + dig,flg,wflg,file,nc,arg,add,powerd,cmdM,cmdlist,wfile,errchk,waiting,num,st); options=optionorg; tmp=divoptions(options); eqL=tmp_5; realL=tmp_6; strL=tmp_7; wfile=""; - ext=".txt"; + errchk="Y"; //190411 waiting=5; dig=6; allflg=1; powerd="false"; line=1000; // 16.06.13 forall(eqL, - tmp=indexof(#,"="); - tmp1=Toupper(substring(#,0,1)); - tmp2=substring(#,tmp,length(#)); + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,1)); + tmp2=tmp_2; if(tmp1=="E", - if(indexof(tmp2,".")==0,ext="."+tmp2,ext=tmp2); + errchk=Toupper(substring(tmp_1,0,1)); //190411 options=remove(options,[#]); ); if(tmp1=="W", @@ -3029,7 +3029,7 @@ CalcbyM(name,cmd,optionorg):=( options=remove(options,[#]); ); ); - wfile=Fhead+name+ext; + wfile=Fhead+name+".txt"; //190411 wflg=0; forall(strL, tmp=Toupper(substring(#,0,1)); @@ -3080,7 +3080,6 @@ CalcbyM(name,cmd,optionorg):=( forall(tmp2,arg, if(isstring(arg), if(substring(arg,0,1)!=",", -// tmp=replace(arg,"'",Dq); // 16.03.03 tmp=arg; // 16.03.03 tmp=replace(tmp,"`","'");// 2016.02.23 tmp3=tmp3+tmp+","; @@ -3095,7 +3094,6 @@ CalcbyM(name,cmd,optionorg):=( tmp4="]"; forall(arg, if(isstring(#), -// tmp3=tmp3+Dq+#+Dq+","; tmp=replace(#,"'",Dq); tmp3=tmp3+tmp+","; , @@ -3161,7 +3159,7 @@ CalcbyM(name,cmd,optionorg):=( if(wflg==1,wait(WaitUnit)); // 2016.02.23 if(length(tmp1)>0, tmp=indexof(tmp1,"error")+indexof(tmp1,"syntax"); //2016.02.23 - if(tmp>0, + if((tmp>0)&(errchk=="Y"), //190411 println("Some error(s) occurred"); //2016.02.24 from tmp2=tokenize(tmp1,"(%"); forall(4..length(tmp2),println(tmp2_#)); //2016.02.24 until @@ -3199,11 +3197,11 @@ CalcbyM(name,cmd,optionorg):=( ); tmp1=substring(tmp1,0,length(tmp1)-1)+"]"; tmp1=replace(tmp1,".d+0",""); // 15.11.23 - parse(name+"="+tmp1); + parse(name+"="+tmp1+";"); //190415 tmp=parse(name); if(length(tmp)==1, tmp1=substring(tmp1,1,length(tmp1)-1); - parse(name+"="+tmp1); + parse(name+"="+tmp1+";"); //190415 ); flg=1; tmp2=#*WaitUnit/1000; @@ -3255,29 +3253,29 @@ Mxfun(name,fun,argL,optionorg):=( add=""; eqL=tmp_5; forall(eqL, - tmp=indexof(#,"="); - tmp1=Toupper(substring(#,0,1)); - tmp2=substring(#,tmp,length(#)); + tmp=Strsplit(#,"="); + tmp1=Toupper(substring(tmp_1,0,1)); //190424 + tmp2=tmp_2; if(tmp1=="P", precise=parse(tmp2); options=remove(options,[#]); ); - if(tmp1=="DIS" , + if(tmp1=="D" , //190327(to 1 char) tmp=Toupper(substring(tmp2,0,1)); if((tmp=="F") % (tmp=="N"), disp=0; ); options=remove(options,[#]); ); - if((tmp1=="PAC") % (tmp1=="LOA"), // 16.02.08 + if((tmp1=="P") % (tmp1=="L"), //190327(to 1 char) pack=tokenize(tmp2,"::"); options=remove(options,[#]); ); - if(tmp1=="SET", + if(tmp1=="S", //190327(to 1 char) set=tokenize(tmp2,"::"); options=remove(options,[#]); ); - if(tmp1=="ADD", + if(tmp1=="A", //190327(to 1 char) add=","+tmp2; options=remove(options,[#]); ); @@ -3367,7 +3365,7 @@ Mxtex(nm,ex,optionorg):=( println(name+" is:"); println(out); ); - tmp=name+"="+Dq+out+Dq; //16.01.10 + tmp=name+"="+Dq+out+Dq+";"; //16.01.10//190415 parse(tmp); out; ); @@ -3382,7 +3380,7 @@ MxtexL(nm,exlist,options):=( tmp=Mxtex(nm+"n"+text(#),exlist_#,["Disp=n"]); out=append(out,Dq+tmp+Dq); ); - tmp="tx"+nm+"="+out; + tmp="tx"+nm+"="+out+";"; //190415 parse(tmp); println("tx"+nm+"is:"); apply(out,println(#)); @@ -3840,7 +3838,7 @@ Mkobjcmd(nm,fd,options):=( ); tmp2=append(tmp2,tmp); ); - parse("oc"+nm+"="+tmp2); + parse("oc"+nm+"="+tmp2+";"); //190415 println("cmd seq oc"+nm+" generated"); // 16.06.10until OBJCMD=concat(OBJCMD,out);//16.11.29 out; @@ -4022,7 +4020,7 @@ Mkobjthickcmd(nm,fd,fnrm,optionorg):=( if(fnrm=="", tmp=Mkobjnrm(nm,fd,options); tmp1=RSform(tmp); - tmp="Fnrmden"+nm+"("+xst+","+yst+"):="+tmp_2; + tmp="Fnrmden"+nm+"("+xst+","+yst+"):="+tmp_2+";"; //190415 parse(tmp); , tmp1=RSform(fnrm); @@ -4044,7 +4042,7 @@ Mkobjthickcmd(nm,fd,fnrm,optionorg):=( ); tmp2=append(tmp2,tmp); ); - parse("oc"+nm+"="+tmp2); + parse("oc"+nm+"="+tmp2+";"); //190415 println("cmd seq oc"+nm+" generated"); // 16.06.10until OBJCMD=concat(OBJCMD,out);//16.11.29 out; @@ -4117,7 +4115,7 @@ Mkobjpolycmd(nm,pd,optionorg):=( ); tmp2=append(tmp2,tmp); ); - parse("oc"+nm+"="+tmp2); + parse("oc"+nm+"="+tmp2+";"); //190415 println("cmd seq oc"+nm+" generated"); // 16.06.10until OBJCMD=concat(OBJCMD,out);//16.11.29 out; @@ -4196,7 +4194,7 @@ Mkobjplatecmd(nm,pdorg,optionorg):=( // 16.06.18 tmp3=tmp3+tmp2; ); tmp3=substring(tmp3,0,length(tmp3)-1)+"]"; - parse("oc"+nm+"="+tmp3); + parse("oc"+nm+"="+tmp3+";"); //190415 println("cmd seq oc"+nm+" generated"); OBJCMD=concat(OBJCMD,out);//16.11.29 out; @@ -4270,7 +4268,7 @@ Mkobjcrvcmd(nm,pstorg,options):=( ); tmp2=append(tmp2,tmp); ); - parse("oc"+nm+"="+tmp2); + parse("oc"+nm+"="+tmp2+";"); //190415 println("cmd seq oc"+nm+" generated"); // 16.06.10until OBJCMD=concat(OBJCMD,out);//16.11.29 out; @@ -4401,7 +4399,7 @@ Mkobjsymbcmd(path,symborg,size,rot,dir,pos,optionorg):=( ); tmp2=append(tmp2,tmp); ); - parse("oc"+symborg+"="+tmp2); + parse("oc"+symborg+"="+tmp2+";"); //190415 // println("cmd seq oc"+symborg+" generated"); // 16.06.10until OBJCMD=concat(OBJCMD,out);//16.11.29 out; @@ -4707,12 +4705,12 @@ CalcbyF(name,cmd,optionorg):=( ); ); ); - tmp=name+"="+substring(tmp4,0,length(tmp4)-1)+"]"; + tmp=name+"="+substring(tmp4,0,length(tmp4)-1)+"];"; //190415 parse(tmp); tmp=parse(name); if(length(tmp)==1, tmp1=substring(tmp4,1,length(tmp3)-1); - parse(name+"="+tmp1); + parse(name+"="+tmp1+";"); //190415 ); flg=1; tmp2=#*WaitUnit/1000; @@ -6166,7 +6164,7 @@ Crv2onsfparadataC(nm,crv2d,sfbd,fdorg,options,optionsh):=( forall(tmp1, tmp2=append(tmp2,tmpfun(#_1,#_2)); ); - tmp=crv3d+"="+textformat(tmp2,6); + tmp=crv3d+"="+textformat(tmp2,6)+";"; //190415 parse(tmp); Crv3onsfparadataC(nm,crv3d,sfbd,fdorg,options,optionsh); ); @@ -6479,11 +6477,11 @@ Sfcutparadatacdy(nm,cutfun,fd,options):=( tmp=tmp+"sfc"+nm+"n"+text(#)+"3d"+","; tmp1=tmp1+Dqq("sfc"+nm+"n"+text(#)+"3d")+","; ); - tmp=substring(tmp,0,length(tmp)-1)+"]"; + tmp=substring(tmp,0,length(tmp)-1)+"];"; //190415 parse(tmp); tmp1=substring(tmp1,0,length(tmp1)-1)+"]"; println("generate sfcutparadata "+tmp1); - tmp=name2+"="+Textformat(out2,6); + tmp=name2+"="+Textformat(out2,6)+";"; //190415 parse(tmp); out3; ); diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent.r b/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent.r index 0d7791d6fb0..be7bba6346f 100755 --- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent.r +++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent.r @@ -16,10 +16,23 @@ ######################################### -ThisVersion<- "KeTpic for R v5_2_4(20190127)" +ThisVersion<- "KeTpic for R v5_2_4(20190511)" print(ThisVersion) +# 20190511 +# Implicitplot changed (Eps=> 10^(-6)) +# 20190508 +# Implicitplot debugged ( bisection method employed ) +# 20190409 +# Plotdata debugged ( Exclution at left side) +# 20190408 +# Projpara debugged ( for a single point ) +# 20190405 +# Drwpt changed(Incolor,Same) +# Makecurves changed(Drwpt) +# 20190322 +# Plotdata debugged (in the case fo Exc) # 20190127 # Mvprod added # 20181231 @@ -2407,27 +2420,16 @@ Drwpt<-function(...){ Same="y" Incolor="" Tmp=varargin[[All]] - if(is.numeric(Tmp)){ - if(length(Tmp)==3){Tmp=c(Tmp,1)} #181231 - if(length(Tmp)==4){ - if(Tmp[4]<0){ #181231from - Same="nn" - }else{ - Incolor=paste(" ",as.character(Tmp[4]),sep="") - } #181231to + if((is.numeric(Tmp))&&(length(Tmp)>2)){ #190405from + if(Tmp[1]==-1){ + Same="no" }else{ + Tmp1=sapply(Tmp,as.character) + Incolor=paste("{",Tmp1[1],",",Tmp1[2],",",Tmp1[3],"}",sep="") Same="n" - Incolor="{" - for(J in 4:6){ - Incolor=paste(Incolor,as.character(Tmp[J]),sep="") - if(J<6){ - Incolor=paste(Incolor,",",sep="") - } - } - Incolor=paste(Incolor,"}",sep="") } - All=Nargs-1 - }#181230to + All=All-1 + }#190405to CL<- c() for (J in 0:N){ Tmp<- TenSize*0.5*1000/2.54/MilliIn @@ -2452,9 +2454,11 @@ Drwpt<-function(...){ } PL<- matrix(PL,nrow=2) PL<- t(PL) - if(Same=="n"){ #181230from - Str1<- paste("{\\special{pn 0}\\color[rgb]",Incolor,"%\n",sep="") - cat(Str1,file=Wfile,append=TRUE) + if(Same!="no"){ #190405 + if(Same=="n"){ #190405 + Str1<- paste("{\\special{pn 0}\\color[rgb]",Incolor,"%\n",sep="") + cat(Str1,file=Wfile,append=TRUE) + } Mojisu<-0 for (J in 1:Nrow(PL)){ Q<- PL[J,] @@ -2468,7 +2472,11 @@ Drwpt<-function(...){ } Mojisu=0 } - Str1<- paste("\\special{sh}\\special{fp}}%\n",sep="") + Str1<- "\\special{sh}\\special{fp}" #190405from + if(Same=="n"){ + Str1<- paste(Str1,"}",sep="") + } + Str1<- paste(Str1,"%\n",sep="") #190405to cat(Str1,file=Wfile,append=TRUE) } cat("\\special{pn 4}",file=Wfile,append=TRUE) #181231 @@ -4517,6 +4525,7 @@ MakeCurves<-function(...){ ## Scaling is implemented next } Tmp1<- as.numeric(Motos) + Tmp1=list(Tmp1) #190405 if(Ptout==1){ Drwpt(Tmp1) } @@ -5547,7 +5556,6 @@ Plotdata<- function(...) Tmp<- sort(E) E<- E[length(Tmp):1] Ke<- 1 -# for (x in seq(X1,X2,by=dx)){ for (J in 0:N){ #180929 x=X1+dx*J/N #180929 if(nchar(Exfun)>0){ @@ -5573,7 +5581,8 @@ Plotdata<- function(...) Ke<-Ke+1 } if(length(Pa)>0){ - if(Pa[1]==Inf){ + if((abs(Pa[1])==Inf)||(abs(Pa[2])==Inf)){ #190409 + Pa=c(Inf,Inf) #190322 Tmp<-Appendrow(P,Pa) P<-Tmp } @@ -9779,6 +9788,9 @@ Projpara<- function(...){ for (N in Looprange(1,Nargs)){ Crv<- varargin[[N]] if(is.numeric(Crv)){ + if(!is.matrix(Crv)){ # 190408from + Crv=matrix(Crv,ncol=3) + } # 190408to Tmp<- ProjCurve(Crv) CL<- c(CL,list(Tmp)) } @@ -11686,7 +11698,7 @@ Connectseg<- function(...){ Implicitplot<- function(...){ #180402 varargin=list(...) - Eps=10^(-4) + Eps=10^(-6) #190511 Nargs=length(varargin) Func=varargin[[1]] Xrng=varargin[[2]] @@ -11749,14 +11761,28 @@ Implicitplot<- function(...){ #180402 }else{ if(vL[kk]>Eps){ if(vL[kk+1]< -Eps){ - tmp=1/(vL[kk]-vL[kk+1])* - (-vL[kk+1]*pL[[kk]]+vL[kk]*pL[[kk+1]]) +# tmp=1/(vL[kk]-vL[kk+1])* +# (-vL[kk+1]*pL[[kk]]+vL[kk]*pL[[kk+1]]) + tmp1=pL[[kk]]; tmp2=pL[[kk+1]] #190508from + for(ii in 1:20){ #190511 + tmp=(tmp1+tmp2)/2 + tmp3=Impfun(tmp[1],tmp[2]) + if(abs(tmp3)<=Eps){break} + if(tmp3>Eps){tmp1=tmp}else{tmp2=tmp} + } #190508to qL=Appendrow(qL,tmp) } }else{ if(vL[kk+1]>Eps){ - tmp=1/(-vL[kk]+vL[kk+1])* - (vL[kk+1]*pL[[kk]]-vL[kk]*pL[[kk+1]]) +# tmp=1/(-vL[kk]+vL[kk+1])* +# (vL[kk+1]*pL[[kk]]-vL[kk]*pL[[kk+1]]) + tmp1=pL[[kk]]; tmp2=pL[[kk+1]] #190508from + for(ii in 1:20){ #190511 + tmp=(tmp1+tmp2)/2 + tmp3=Impfun(tmp[1],tmp[2]) + if(abs(tmp3)<=Eps){break} + if(tmp3>Eps){tmp2=tmp}else{tmp1=tmp} + } #190508to qL=Appendrow(qL,tmp) } } diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent_rep2e.r b/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent_rep2e.r index 8d2a90b274d..084f94c70c2 100755 --- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent_rep2e.r +++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent_rep2e.r @@ -16,8 +16,10 @@ ######################################### -ThisVersion<- "2ev5_2_4(181230)" +ThisVersion<- "2ev5_2_4(190405)" +# 20190405 +# Drwpt debugged/changed ( Incolor ) # 20181230 # Drwpt changed ( Inside ) # 20180930 @@ -208,7 +210,7 @@ Drwline<-function(...) ########################################### -Drwpt<-function(...) #181230 +Drwpt<-function(...) #190405 { varargin<-list(...) Nargs<-length(varargin) @@ -216,34 +218,17 @@ Drwpt<-function(...) #181230 Same="y" Incolor="" Tmp=varargin[[All]] - if(is.numeric(Tmp)){ - if(length(Tmp)==3){Tmp=c(Tmp,1)} - if(length(Tmp)==4){ - if(Tmp[4]<0){ - Same="nn" - }else{ - if(Tmp[4]!=1){ - Tmp1=Tmp[4]*(c(1,1,1)-Tmp[1:3]) - Tmp1=c(1,1,1)-Tmp1 - Tmp=c(Tmp[1:3],Tmp1) - } - } - } - if(length(Tmp)==6){ + if((is.numeric(Tmp))&&(length(Tmp)>2)){ #190405from + if(Tmp[1]==-1){ + Same="no" + }else{ + Tmp1=sapply(Tmp,as.character) + Incolor=paste("{",Tmp1[1],",",Tmp1[2],",",Tmp1[3],"}",sep="") Same="n" - Incolor="\\color[rgb]{" - for(J in 4:6){ - Incolor=paste(Incolor,as.character(Tmp[J]),sep="") - if(J<6){ - Incolor=paste(Incolor,",",sep="") - } - } - Incolor=paste(Incolor,"}",sep="") } - All=Nargs-1 - } + All=All-1 + }#190405to Ra=TenSize*1000/2.54/MilliIn - Mojisu=0 for (II in Looprange(1,All)){ MS<- varargin[[II]] MS=Flattenlist(MS) #17.10.28 @@ -256,36 +241,25 @@ Drwpt<-function(...) #181230 P<- Doscaling(P) X=sprintf('%5.5f',P[1]) Y=sprintf('%5.5f',P[2]) - Str="" - if(Same=="n"){ - Str=paste("{\\linethickness{0 in}",Incolor,sep="") - } - if(Same!="nn"){ - Str=paste(Str,'\\put(',X,',',Y,'){\\circle*{',sprintf('%6.6f',Ra),'}}',sep="") + if(Same!="no"){ #190405from + Str=paste("{\\linethickness{0 in}%\n",sep="") cat(Str,file=Wfile,append=TRUE) - Mojisu=Mojisu+nchar(Str) - } - if(Same=="n"){ - cat("}",file=Wfile,append=TRUE) + if(Same=="n"){ #190405 + Str1<- paste("{\\color[rgb]",Incolor,"%\n",sep="") + cat(Str1,file=Wfile,append=TRUE) + } + Str=paste('\\put(',X,',',Y,'){\\circle*{',sprintf('%6.6f',Ra),'}}%\n',sep="") + cat(Str,file=Wfile,append=TRUE) + if(Same=="n"){ + cat("}%\n",file=Wfile,append=TRUE) + } + cat("}%\n",file=Wfile,append=TRUE) } - Str=paste('\\put(',X,',',Y,'){\\circle{',sprintf('%6.6f',Ra),'}}',sep="") + Str=paste('\\put(',X,',',Y,'){\\circle{',sprintf('%6.6f',Ra),'}}%\n',sep="") cat(Str,file=Wfile,append=TRUE) - Mojisu=Mojisu+nchar(Str) - if(Mojisu>80){ - cat("\n",file=Wfile,append=TRUE) - Mojisu=0 - Str="" - } } - } - if(Same=="n"){ - # Str='}%' - } - if(Mojisu>0){ - Str=paste('\n',Str,'\n',sep="") - } - cat(Str,file=Wfile,append=TRUE) - cat("\n",file=Wfile,append=TRUE) #180930 + } # 190405to + cat("\n",file=Wfile,append=TRUE) } diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent_reptikz.r b/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent_reptikz.r index bce6137fea1..c68ccc5e83e 100644 --- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent_reptikz.r +++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent_reptikz.r @@ -16,18 +16,232 @@ ######################################### -ThisVersion<- "2ev5_2_4(180930)" +ThisVersion<- "tikzv1_1_1(190402)" -# 20180930 -# Drwpt debugged ( the last newline added) -# 20180929 -# Shade changed (Kyoukai => Joincrvs) -# 2017.10.28 -# Drwpt debugged ( Flattenlist ) -# 2017.10.07 -# Dottedline,Drwline,Drwpt,Makehasen,Beginpicture,Setpen,Shade +# 2019.04.05 Drwpt ( Incolor, Takato) +# 2019.04.02 Beginpicture ( Unitlen, Takato) +# 2019.04.02 Drwline ( Sepen restore when finished, Takato) +# 2019.03.17 from 20190207 +# Ketinit, Beginpicture, Endpicture, Drwline, Setpen, Dottedline, Makehasen, Drwpt, Shade, Letter #from 20190317 -############################################# +########### Ketinit ############ + +Ketinit<- function(){ +XMIN<<- -5 +XMAX<<- 5 +YMIN<<- -5 ; YMAX<<- 5 +ZIKU<<- "l" +#ARROWSIZE<<- 1 +XNAME<<- "$x$" +XPOS<<- "e" +YNAME<<- "$y$" +YPOS<<- "n" +ONAME<<- "O" +OPOS<<- "sw" +ULEN<<- "1cm" +MilliIn<<- 1/2.54*1000 +PenThick<<- round(MilliIn*0.02)*0.075 #from 20190317 +PenThickInit<<- PenThick +TenSizeInit<<- 0.02*2 #17.10.07 +TenSize<<- TenSizeInit +Wfile<<-"" +MEMORI<<- 0.05 +MEMORIInit<<- MEMORI +MEMORINow<<- MEMORI +MARKLEN<<- 0.05 +MARKLENInit<<- MARKLEN +MARKLENNow<<- MARKLEN +GENTEN<<- c(0,0) +YaSize<<- 1 +YaAngle<<- 18 +YaPosition<<- 1 +YaThick<<- 1 +YaStyle<<- "tf" +PHI<<- 30*pi/180 +THETA<<- 60*pi/180 +FocusPoint<<- c(0,0,0) +EyePoint<<- c(5,5,5) +ASSIGNLIST<<- list("`","'") + +SCALEX<<- 1 +SCALEY<<- 1 +LOGX<<- 0 +LOGY<<- 0 + +TEXFORLEVEL<<- 0 +TEXFORLAST<<- list() +} + +################### Beginpicture ###################### + +Beginpicture<-function(ul) +{ ## Scaling is implemented + Tmp<- Doscaling(c(XMIN,YMIN)) + Xm<- Tmp[1] + Ym<- Tmp[2] + Tmp<- Doscaling(c(XMAX,YMAX)) + XM<- Tmp[1] + YM<- Tmp[2] + Dx<- XM-Xm + Dy<- YM-Ym + Sym<-".0123456789 +-*/" + SL<-Sym + OL<-"+-*/" + if (ul!=""){ + ULEN<<-ul; + } + Is<-1; + VL<-""; + Ucode<-ULEN + for (I in Looprange(1,nchar(Ucode))){ + C<-substring(Ucode,I,I); + if (length(grep(C,SL,fixed=TRUE))>0){ + if (length(grep(C,OL,fixed=TRUE))>0){ + Tmp<-substring(Ucode,Is,I-1); + Str<-paste(VL,Tmp,C,sep="") + VL<-Str + Is<-I+1; + } + } + else{ + Unit<-substring(Ucode,I,I+1); + Str<-substring(Ucode,Is,I-1); + VL<-paste(VL,Str,sep="") + break; + } + } + Valu<-eval(parse(text=VL)); + Str<-as.character(Valu); + ULEN<<- paste(Str,Unit,sep=""); + if (Unit=="cm") MilliIn<<-1000/2.54*Valu + if (Unit=="mm") MilliIn<<-1000/2.54*Valu/10 + if (Unit=="in") MilliIn<<-1000*Valu + if (Unit=="pt") MilliIn<<-1000/72.27*Valu + if (Unit=="pc") MilliIn<<-1000/6.022*Valu + if (Unit=="bp") MilliIn<<-1000/72*Valu + if (Unit=="dd2") MilliIn<<-1000/1238/1157/72.27*Valu + if (Unit=="cc") MilliIn<<-1000/1238/1157/72.27*12*Valu; + if (Unit=="sp") MilliIn<<-1000/72.27/65536*Valu/10 + MARKLEN<<- MARKLENNow*1000/2.54/MilliIn; + Str<-paste("{\\unitlength=",ULEN,"%\n",sep=""); + cat(Str,file=Wfile,append=TRUE); + cat("\\begin{tikzpicture}[x=",ULEN,",y=",ULEN,"]%\n",file=Wfile,append=TRUE);#190404 + Str<-"\\clip ("; + Tmp<-as.character(round(Xm,digits=6)); + Str<-paste(Str,Tmp,",",sep=""); + Tmp<-as.character(round(Ym,digits=6)); + Str<-paste(Str,Tmp,") rectangle (",sep=""); + Tmp<-as.character(round(XM,digits=6)+0.5); + Str<-paste(Str,Tmp,",",sep=""); + Tmp<-as.character(round(YM,digits=6)+0.5); + Str<-paste(Str,Tmp,");%\n",sep=""); + cat(Str,file=Wfile,append=TRUE); +# Str=paste('\\linethickness{',as.character(PenThickInit/1000),'in}%',sep="") #20190207 +# cat(Str,file=Wfile,append=TRUE) +# cat("%\n",file=Wfile,append=TRUE) +} + +################### Endpicture ##################### + +Endpicture<-function(...) +{ + varargin<-list(...) + Nargs<-length(varargin) + if(Nargs==0) + { + Drwxy() + } + else + { + if(varargin[[1]]==1) Drwxy() + } + cat("\\end{tikzpicture}}%",file=Wfile,append=TRUE) + MEMORI<<-MEMORINow*1000/2.54/MilliIn + Setunitlen("1cm") +} + +##################### Drwline ###################### + +Drwline<-function(...) +{ + varargin<-list(...) + Nall <- length(varargin) + Tmp <- varargin[[Nall]] + Width <- PenThick/PenThickInit + Thick <- 1 + if (mode(Tmp)=="numeric" && length(Tmp)==1){ + Thick <- Tmp + Setpen(Width*Thick) + Nall <- Nall-1 + }else{ + Setpen(Width) + } + for (N in 1:Nall){ + Pdata <- varargin[[N]] + if (length(Pdata)==0) next + if (mode(Pdata)!="list") Pdata<-list(Pdata) + while(Mixtype(Pdata)==3){ + Tmp1 <- list() + for(II in Looprange(1,length(Pdata))){ + Tmp1 <- Mixjoin(Tmp1,Pdata[[II]]) + } + Pdata <- Tmp1 + } + for (II in Looprange(1,length(Pdata))){ + Clist <- MakeCurves(Pdata[[II]]) + DinM <- Dataindex(Clist) + for (n in Looprange(1,Nrow(DinM))){ + Tmp <- DinM[n,] + Data <- Clist[Tmp[1]:Tmp[2],] +# Mojisu <- 0 #from 20190317 + for (I in Looprange(1,Nrow(Data))){ + Tmp <- Data[I,] + X=sprintf('%5.5f',Tmp[1]) + Y=sprintf('%5.5f',Tmp[2]) + Pt=paste('(',X,',',Y,')',sep="") + if (I==1){ +# if (Width>1){ #from 20190317 + Str=paste('\\draw [line width=',round(PenThick,digit=6),']',Pt,sep="") +# }else{ +# if (Thick>1){ +# Str=paste('\\draw [line width=',round(PenThick,digit=6),']',Pt,sep="") +# }else{ +# Str=paste('\\draw [line width=',round(PenThick,digit=6),']',Pt,sep="") +# } +# } + }else{ + Str=paste('--',Pt,sep="") + } + cat(Str,file=Wfile,append=TRUE) +# Mojisu <- Mojisu+nchar(Str) +# if (Mojisu>80){ +# cat(";%\n",file=Wfile,append=TRUE) +# Mojisu <- 0 +# } + } +# if (Mojisu!=0){ +# cat(";%\n",file=Wfile,append=TRUE) +# } + cat(";%\n",file=Wfile,append=TRUE) + } + } + } + if (Thick!=1){ #from 20190402 + Setpen(Width) + } +} + +################### Setpen ###################### + +Setpen<-function(Width) +{ + PenThick <<- PenThickInit*Width #from 20190317 +# Str=paste('\\linethickness{',as.character(PenThick/1000),'in}%',sep="") +# cat(Str,file=Wfile,append=TRUE) +# cat("%\n",file=Wfile,append=TRUE) +} + +##################### Dottedline ######################## Dottedline<- function(...) { @@ -143,161 +357,12 @@ Dottedline<- function(...) Setpen(Tmp) } - -########################################### - -Drwline<-function(...) -{ - varargin<-list(...) - Nall<-length(varargin) - Thick<-0 - Tmp<-varargin[[Nall]] - if (mode(Tmp)=="numeric" && length(Tmp)==1){ - Setpen(Tmp) - Nall<-Nall-1 - } - for (N in 1:Nall){ - Pdata<-varargin[[N]] - if (length(Pdata)==0) next - if (mode(Pdata)!="list") Pdata<-list(Pdata) - while(Mixtype(Pdata)==3){ - Tmp1<- list() - for(II in Looprange(1,length(Pdata))){ - Tmp1<- Mixjoin(Tmp1,Pdata[[II]]) - } - Pdata<- Tmp1 - } - for (II in Looprange(1,length(Pdata))){ - Clist<-MakeCurves(Pdata[[II]]) - DinM<-Dataindex(Clist) - for (n in Looprange(1,Nrow(DinM))){ - Tmp<-DinM[n,] - Data<-Clist[Tmp[1]:Tmp[2],] - Mojisu<-0 - for (I in Looprange(1,Nrow(Data))){ - Tmp<-Data[I,] - X=sprintf('%5.5f',Tmp[1]) - Y=sprintf('%5.5f',Tmp[2]) - Pt=paste('(',X,',',Y,')',sep="") - if(I==1){ - Str=paste('\\polyline',Pt,sep="") - }else{ - Str=Pt - } - cat(Str,file=Wfile,append=TRUE) - Mojisu<-Mojisu+nchar(Str) - if (Mojisu>80){ - cat("%\n",file=Wfile,append=TRUE) - Mojisu<-0 - } - } - if (Mojisu!=0){ - cat("%\n",file=Wfile,append=TRUE) - } - cat("%\n",file=Wfile,append=TRUE) - } - } - } - if (Thick>0){ - Tmp<-PenThick/PenThickInit - Setpen(Tmp) - } -} - -########################################### - -Drwpt<-function(...) -{ - varargin<-list(...) - Nargs<-length(varargin) - All=Nargs - if (TenSize>TenSizeInit){ - N<- round(6*sqrt(TenSize/TenSizeInit)) - } - else{ - N<-4 - } - Tmp<- varargin[[All]] - Iro=c(0,0,0,1) - Iroflg=0 - if(is.character(Tmp)){ - Iro=Ratiocmyk(Tmp) - Iroflg=1 - All=All-1 - } - Tmp<- varargin[[All]] - if (mode(Tmp)=="numeric"){ - if (length(Tmp)>1){ - Kosa<- 1; All<- Nargs - } - else{ - Kosa<- Tmp; All<- All-1 - } - } - else if (mode(Tmp)=="list"){ - Kosa<- 1; All<- Nargs - } - Ra=TenSize*1000/2.54/MilliIn - if(Iroflg>0){ - Str='{\\color[cmyk]{' - for(J in 1:4){ - Str=paste(Str,as.character(Kosa*Iro[J]),sep="") - if(J<4){ - Str=paste(Str,',',sep="") - } - } - Str=paste(Str,'}%',sep="") - cat(Str,file=Wfile,append=TRUE) - } - -# CL<-c() -# for (J in 0:N){ -# Tmp<- TenSize*0.5*1000/2.54/MilliIn -# Tmp<- Tmp*c(cos(pi/4+J*2*pi/N),sin(pi/4+J*2*pi/N)) -# CL<- append(CL,Tmp) -# } -# CL<- matrix(CL,nrow=2) -# CL<- t(CL) - Mojisu=0 - for (II in Looprange(1,All)){ - MS<- varargin[[II]] - MS=Flattenlist(MS) #17.10.28 - if (mode(MS)=="numeric"){ - MS<- list(MS) - } - for (I in Looprange(1,length(MS))){ - P<- MS[[I]] - if (InWindow(P)!="i") next - P<- Doscaling(P) - X=sprintf('%5.5f',P[1]) - Y=sprintf('%5.5f',P[2]) - Str=paste('\\put(',X,',',Y,'){\\circle*{',sprintf('%6.6f',Ra),'}}',sep="") - cat(Str,file=Wfile,append=TRUE) - Mojisu=Mojisu+nchar(Str) - if(Mojisu>80){ - cat("\n",file=Wfile,append=TRUE) - Mojisu=0 - } - } - } - Str="%" - if(Iroflg>0){ - Str='}%' - } - if(Mojisu>0){ - Str=paste('\n',Str,'\n',sep="") - }else{ - Fmt=paste(Str,'\n',sep="") - } - cat(Str,file=Wfile,append=TRUE) - cat("\n",file=Wfile,append=TRUE) #180930 -} - - -###################################### +################### Makehasen ################### Makehasen<- function(Figdata,Sen,Gap,Ptn) { + Width <- PenThick/PenThickInit #from 20190317 + Setpen(Width) #from 20190317 Eps<- 10.0^(-6) Clist<- MakeCurves(Figdata) DinM<- Dataindex(Clist) @@ -341,8 +406,11 @@ Makehasen<- function(Figdata,Sen,Gap,Ptn) SegList<- c(seq(Tobi,Tobi+(Nsen-2)*SegUnit,by=SegUnit)) } } + Com=paste0('%%%%% start dashline, Senlength=',Sen,', Gaplength=',Gap,' %%%%%%') #from 20190317 + cat(Com,file=Wfile,append=TRUE) + cat(";%\n%\n",file=Wfile,append=TRUE); Hajime<- 1; Owari<- 1 - Mojisu<- 0 +# Mojisu<- 0 for (I in Looprange(1,length(SegList))){ Len<- SegList[I] J<- Owari @@ -367,117 +435,99 @@ Makehasen<- function(Figdata,Sen,Gap,Ptn) X0=sprintf('%5.5f',P[1]) Y0=sprintf('%5.5f',P[2]) Pt0=paste('(',X0,',',Y0,')',sep="") - Str=paste('\\polyline',Pt0,sep="") + Str=paste('\\draw [line width=',round(PenThick,digits=6),']',Pt0,sep="") #from 20190317 cat(Str,file=Wfile,append=TRUE) - Mojisu<- Mojisu+nchar(Str) +# Mojisu<- Mojisu+nchar(Str) for (J in Looprange(Hajime+1,Owari)){ P=Data[J,] X=sprintf('%5.5f',P[1]) Y=sprintf('%5.5f',P[2]) - Pt=paste('(',X,',',Y,')',sep="") + Pt=paste(' -- (',X,',',Y,')',sep="") Str=Pt cat(Str,file=Wfile,append=TRUE) - Pt0=Pt - Mojisu=Mojisu+nchar(Str) +# Pt0=Pt +# Mojisu=Mojisu+nchar(Str) } T<- (Len+Naga-Lenlist[Owari]) T<- T/(Lenlist[Owari+1]-Lenlist[Owari]) P<- Data[Owari,]+T*(Data[Owari+1,]-Data[Owari,]) X=sprintf('%5.5f',P[1]) Y=sprintf('%5.5f',P[2]) - Pt=paste('(',X,',',Y,')',sep="") + Pt=paste(' -- (',X,',',Y,')',sep="") Str=Pt cat(Str,file=Wfile,append=TRUE) - Mojisu<- Mojisu+nchar(Str) - if (Mojisu>80){ - cat("%\n",file=Wfile,append=TRUE) - Mojisu<- 0 - } + cat(";%\n",file=Wfile,append=TRUE); #190412 +# Mojisu<- Mojisu+nchar(Str) +# if (Mojisu>80){ +# cat("%\n",file=Wfile,append=TRUE) +# Mojisu<- 0 +# } } + Com=paste0('%%%%%% finish dashline, Senlength=',Sen,', Gaplength=',Gap,' %%%%%%') #from 20190317 + cat(Com,file=Wfile,append=TRUE) + cat(";%\n%\n",file=Wfile,append=TRUE); } - cat("%\n%\n",file=Wfile,append=TRUE); +# cat("%\n%\n",file=Wfile,append=TRUE); } -######################################### +##################### Drwpt ###################### -Beginpicture<-function(ul) -{ ## Scaling is implemented - Tmp<- Doscaling(c(XMIN,YMIN)) - Xm<- Tmp[1] - Ym<- Tmp[2] - Tmp<- Doscaling(c(XMAX,YMAX)) - XM<- Tmp[1] - YM<- Tmp[2] - Dx<- XM-Xm - Dy<- YM-Ym - Sym<-".0123456789 +-*/" - SL<-Sym - OL<-"+-*/" - if (ul!=""){ - ULEN<<-ul; - } - Is<-1; - VL<-""; - Ucode<-ULEN - for (I in Looprange(1,nchar(Ucode))){ - C<-substring(Ucode,I,I); - if (length(grep(C,SL,fixed=TRUE))>0){ - if (length(grep(C,OL,fixed=TRUE))>0){ - Tmp<-substring(Ucode,Is,I-1); - Str<-paste(VL,Tmp,C,sep="") - VL<-Str - Is<-I+1; - } +Drwpt<-function(...) #181230 +{ + varargin<-list(...) + Nargs<-length(varargin) + All=Nargs + Same="y" + Incolor="" + Tmp=varargin[[All]] + if((is.numeric(Tmp))&&(length(Tmp)>2)){ #190405from + if(Tmp[1]==-1){ + Same="no" + }else{ + Tmp1=sapply(Tmp,as.character) + Incolor=paste("{",Tmp1[1],",",Tmp1[2],",",Tmp1[3],"}",sep="") + Same="n" } - else{ - Unit<-substring(Ucode,I,I+1); - Str<-substring(Ucode,Is,I-1); - VL<-paste(VL,Str,sep="") - break; + All=All-1 + }#190405to + Ra=TenSize*1000/2.54/MilliIn + for (II in Looprange(1,All)){ + MS<- varargin[[II]] + MS=Flattenlist(MS) #17.10.28 + if (mode(MS)=="numeric"){ + MS<- list(MS) } - } - Valu<-eval(parse(text=VL)); - Str<-as.character(Valu); - ULEN<<- paste(Str,Unit,sep=""); - if (Unit=="cm") MilliIn<<-1000/2.54*Valu - if (Unit=="mm") MilliIn<<-1000/2.54*Valu/10 - if (Unit=="in") MilliIn<<-1000*Valu - if (Unit=="pt") MilliIn<<-1000/72.27*Valu - if (Unit=="pc") MilliIn<<-1000/6.022*Valu - if (Unit=="bp") MilliIn<<-1000/72*Valu - if (Unit=="dd2") MilliIn<<-1000/1238/1157/72.27*Valu - if (Unit=="cc") MilliIn<<-1000/1238/1157/72.27*12*Valu; - if (Unit=="sp") MilliIn<<-1000/72.27/65536*Valu/10 - MARKLEN<<- MARKLENNow*1000/2.54/MilliIn; - Str<-paste("{\\unitlength=",ULEN,"%\n",sep=""); - cat(Str,file=Wfile,append=TRUE); - cat("\\begin{picture}%\n",file=Wfile,append=TRUE); - Str<-"("; - Tmp<-as.character(round(Dx,digits=6)); - Str<-paste(Str,Tmp,",",sep=""); - Tmp<-as.character(round(Dy,digits=6)); - Str<-paste(Str,Tmp,")(",sep=""); - Tmp<-as.character(round(Xm,digits=6)); - Str<-paste(Str,Tmp,",",sep=""); - Tmp<-as.character(round(Ym,digits=6)); - Str<-paste(Str,Tmp,")%\n",sep=""); - cat(Str,file=Wfile,append=TRUE); - Str=paste('\\linethickness{',as.character(PenThickInit/1000),'in}%',sep="") - cat(Str,file=Wfile,append=TRUE) - cat("%\n",file=Wfile,append=TRUE) -} - -######################################### - -Setpen<-function(Width) -{ - PenThick<<-round(PenThickInit*Width) - Str=paste('\\linethickness{',as.character(PenThick/1000),'in}%',sep="") - cat(Str,file=Wfile,append=TRUE) - cat("%\n",file=Wfile,append=TRUE) + for (I in Looprange(1,length(MS))){ + P<- MS[[I]] + if (InWindow(P)!="i") next + P<- Doscaling(P) + X=sprintf('%5.5f',P[1]) + Y=sprintf('%5.5f',P[2]) + if(Same!="no"){ #190405from + Str=paste("{\\linethickness{0 in}",Incolor,sep="") + } + if(Same!="no"){ #190405from + Str=paste("{\\linethickness{0 in}%\n",sep="") + cat(Str,file=Wfile,append=TRUE) + if(Same=="n"){ #190405 + Str1<- paste("{\\color[rgb]",Incolor,"%\n",sep="") + cat(Str1,file=Wfile,append=TRUE) + } + Str=paste('\\put(',X,',',Y,'){\\circle*{',sprintf('%6.6f',Ra),'}}%\n',sep="") + cat(Str,file=Wfile,append=TRUE) + if(Same=="n"){ + cat("}%\n",file=Wfile,append=TRUE) + } + cat("}%\n",file=Wfile,append=TRUE) + } + Str=paste('\\put(',X,',',Y,'){\\circle{',sprintf('%6.6f',Ra),'}}%\n',sep="") + cat(Str,file=Wfile,append=TRUE) + } + } # 190405to + cat("\n",file=Wfile,append=TRUE) } -######################################### +#################### Shade ##################### Shade<- function(...) { ## Scaling is implemented @@ -523,7 +573,7 @@ Shade<- function(...) cat(Str,file=Wfile,append=TRUE) } } - Mojisu=0 +# Mojisu=0 Tmp=varargin[[1]] # Data=Kyoukai(Tmp) Data= Joincrvs(Tmp) #180929from @@ -538,25 +588,118 @@ Shade<- function(...) Y=sprintf('%5.5f',P[2]) Pt=paste('(',X,',',Y,')',sep="") if(J==1){ - Str=paste('\\polygon*',Pt,sep="") + Str=paste('\\fill',Pt,sep="") }else{ - Str=Pt + Str=paste('--',Pt,sep="") } cat(Str,file=Wfile,append=TRUE) - Mojisu<- Mojisu+nchar(Str) - if (Mojisu>80){ - cat("%\n",file=Wfile,append=TRUE) - Mojisu<- 0 - } +# Mojisu<- Mojisu+nchar(Str) +# if (Mojisu>80){ +# cat("%\n",file=Wfile,append=TRUE) +# Mojisu<- 0 +# } } + cat(";%\n",file=Wfile,append=TRUE) } - if(Iroflg==1){ - Str='}%' - if(Mojisu>0){ - Str=paste('\n',Str,'\n',sep="") - }else{ - Str=paste(Str,'\n') +# if(Iroflg==1){ +# Str='}%\n' +# if(Mojisu>0){ +# Str=paste('\n',Str,'\n',sep="") +# }else{ +# Str=paste(Str,'\n') +# } +# cat(Str,file=Wfile,append=TRUE) +# } +} + +################## Letter #################### + +Letter<-function(...) +{ ## Scaling is implemented + varargin<-list(...) + Nargs<-length(varargin) + Irng<-c(seq(from=1,to=Nargs,by=3)) + for (I in Irng) + { + Tmp<-varargin[[I]] + P<- Doscaling(Tmp) + X<-P[1] + Y<-P[2] + Houkou<-varargin[[I+1]] + Mojiretu<-varargin[[I+2]] + if(length(grep("\\$",Mojiretu))>0) #from 20190317 + { + Mojiretu <- Mojiretu + } + else + { + Mojiretu <- paste0("$\\mathrm{",Mojiretu,"}$") + } + Hset<-Houkou + Vhoko<-"c" + if(length(grep("n",Hset))>0) + { + Vhoko<-"n"; Y<-Y+MEMORI } + if(length(grep("s",Hset))>0) + { + Vhoko<-"s"; Y<-Y-MEMORI + } + Hhoko<-"c" + if(length(grep("e",Hset))>0) + { + Hhoko<-"e"; X<-X+MEMORI + } + if(length(grep("w",Hset))>0) + { + Hhoko<-"w"; X<-X-MEMORI + } + Hoko<-paste(Vhoko,Hhoko,sep="") + Suu<-"+-.0123456789" + SuuL<-Suu + J<-1; Dstr<-"" + while (J<=nchar(Houkou)) + { + Tmp<-substring(Houkou,J,J) + if(length(grep(Tmp,SuuL))>0) + { + if(Dstr=="") Hk<-substring(Houkou,J-1,J-1) + Dstr<-paste(Dstr,Tmp,sep="") + } + else + { + if(Dstr!="") + { + Nmbr<-as.numeric(Dstr) + D<-Nmbr*MEMORI + if(Hk=="n") Y<-Y+D + if(Hk=="s") Y<-Y-D + if(Hk=="e") X<-X+D + if(Hk=="w") X<-X-D + Dstr<-"" + } + } + J<-J+1 + } + if(Dstr!="") + { + Nmbr<-as.numeric(Dstr) + D<-Nmbr*MEMORI; + if(Hk=="n") Y<-Y+D + if(Hk=="s") Y<-Y-D + if(Hk=="e") X<-X+D + if(Hk=="w") X<-X-D + } + CalcWidth(Hoko,Mojiretu) + CalcHeight(Hoko,Mojiretu) + cat("\\put(",file=Wfile,append=TRUE) + Tmp1<- sprintf("%7.7f",X) # 11.07.19 + Tmp2<- sprintf("%7.7f",Y) # 11.07.19 + Str<-paste(Tmp1,",",Tmp2,sep="") + cat(Str,file=Wfile,append=TRUE) + Tmp<-"){\\hspace*{\\Width}" + Str<-paste(Tmp,"\\raisebox{\\Height}{",Mojiretu,"}}%\n",sep="") cat(Str,file=Wfile,append=TRUE) + cat("%\n",file=Wfile,append=TRUE) } } diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/maximaL/pdefourier.mac b/Master/texmf-dist/scripts/ketcindy/ketlib/maximaL/pdefourier.mac new file mode 100644 index 00000000000..7b968144a0c --- /dev/null +++ b/Master/texmf-dist/scripts/ketcindy/ketlib/maximaL/pdefourier.mac @@ -0,0 +1,1199 @@ +/* +Fourier analysis Maxima package + +Authors: Jose A. Vallejo + Faculty of Sciences + Universidad Autonoma de San Luis Potosi (Mexico) + http://galia.fc.uaslp.mx/~jvallejo + + Emmanuel Roque + Faculty of Sciences + Universidad Autonoma de San Luis Potosi (Mexico) +*/ + +load(fourie)$ +load(simplify_sum)$ +load(draw)$ +/*The following rules are intented to work with intervals in "a canonical way" +leq,geq,lss,grtr are for bounded intervals + + +Note: Instead of using constantp inside of matchdeclare, numberp but this approach won't work if %pi is used, so probably is not an option since this is a Fourier package and %pi will appear most of the time. Another possible approach is to use freeof(var) instead of constantp +*/ +matchdeclare(constn, constantp)$ +defrule(leq,constn>=xx,xx<=constn)$ +defrule(geq,xx>=constn,constn<=xx)$ +defrule(lss,constn>xx,xx<constn)$ +defrule(grtr,xx>constn,constn<xx)$ + +/* fun_parts(expr,var) +Input: piecewise defined function written in one of the following ways + +if x>=a_0 and x<=a_1 then expr1 elseif x>a_1 and x<= a_2 then expr2 ... elseif x>a_n and x<=a_{n+1} then expr_{n+1} + +if x<=a_0 then expr0 elseif x>a0 and x<=a1 then expr1 ... elseif x>=a_n then exprn + +Output: A list [[a0,a1,expr1],[a1,a2,expr2,]...] + +Important notes: +-In all cases it is expected that a_i<a_{i+1} +Writing (x<=7 and x>=6) instead of (x>=6 and x<=7) does not work. +-If in the function definition some of the intervals are empty (e.g x>=3 and x<=-3) returns error. +-Use of else is currently unsupported, the expr after else is ignored! Use elseif instead. +-functionality with logical operator "or" is currently unsupported, will be treated same as "and". +-fun_parts does not check if the intervals are disjoint! +*/ + +fun_parts(expr,var):=block( + [subint,subval,tmp,ll,tmp1,tmp2,xx,ans,tmp3,tmpb,leftU,rightU], + if not piecewisep(expr) then error("The function is not piecewise defined") else ( + xx:var, + ll:(length(expr)-2)/2, + tmp:makelist(inpart(expr,i),i,makelist(2*k-1,k,1,ll)), + subval:makelist(inpart(expr,i),i,makelist(2*k,k,1,ll)), + tmp1:makelist(operatorp(tmp[j],["<",">","<=",">="]),j,1,ll), + tmp2:sublist_indices(tmp1,lambda([x],x=true)), + /*if tmp2 is an empty list then all the intervals in the domain + of the function are bounded */ + if emptyp(tmp2) then( + /*Get rid of logical operators*/ + tmp:makelist(makelist(inpart(tmp[k],i),i,1,2),k,1,ll), + /*Use canonical ordering*/ + tmp:apply1(tmp,leq,geq,lss,grtr), + /*Extract subintervals*/ + subint:makelist(makelist(inpart(tmp[i][j],j),j,1,2),i,1,ll), + /*Check for ill defined subintervals*/ + tmp3:map(lambda([L],lfreeof(L,var)),subint), + if not emptyp(sublist_indices(tmp3,lambda([x],x=false))) then + error("Check function definition, some interval(s) appear to be empty or ill-defined. Read documentation for further details.") + else (ans:makelist([subint[k],subval[k]],k,1,ll), + return(ans) ) + ) + /*Function is not bounded*/ + else( + if not is(tmp2=[1,ll]) then error("Check function definition, some interval(s) appear to be empty or ill-defined. Read documentation for further details.") + else (if is(ll=2) then( + tmp:apply1(tmp,leq,geq,lss,grtr), + leftU:[[minf,inpart(tmp[1],2)],subval[1]], + rightU:[[inpart(tmp[2],1),inf],subval[2]], + ans:[leftU,rightU], + return(ans) + ) + elseif is(ll>2) then( + leftU:apply1(tmp[1],leq,geq,lss,grtr), + rightU:apply1(tmp[ll],leq,geq,lss,grtr), + leftU:[[minf,inpart(leftU,2)],subval[1]], + rightU:[[inpart(rightU,1),inf],subval[ll]], + /*Get rid of logical operators in the bounded intervals*/ + tmpb:makelist(makelist(inpart(tmp[k],i),i,1,2),k,2,ll-1), + /*Use canonical ordering*/ + tmpb:apply1(tmpb,leq,geq,lss,grtr), + /*Extract bounded subintervals*/ + subint:makelist(makelist(inpart(tmpb[i][j],j),j,1,2),i,1,ll-2), + /*Check for ill-defined subintervals*/ + tmp3:map(lambda([L],lfreeof(L,var)),subint), + if not emptyp(sublist_indices(tmp3,lambda([x],x=false))) then + error("Check function definition, some interval(s) appear to be empty or ill-defined. Read documentation for further details.") + else ( ans:append([leftU],makelist([subint[k],subval[k+1]],k,1,ll-2),[rightU]), + return(ans)) + ) + + ) + ) +))$ + +/*bint_comp(L1,L2,var) +Bounded intervals comparison +Input: Two lists, L1 and L2, each one having the following format +[[a_i,b_i],expr_i] +Output: A flag used by parityL +*/ + +bint_comp(L1,L2,var):=block( + if is(L1[1][1]=-L2[1][2]) and is(L1[1][2]=-L2[1][1]) then( + if is(L1[2]=0) and is(L2[2]=0) then return('zero) + elseif equalp(L1[2],ratsubst(-var,var,L2[2])) then return('even) + elseif equalp(L1[2],-ratsubst(-var,var,L2[2])) then return('odd) else return('none) + ) + else return('none) +)$ +/* uint_comp(L1,L2,var) +Unbounded intervals comparison +Input: Two list, L1 and L2, corresponding to unbounded intervals in +the following format +[[minf,b_1],expr1] or [[a_2,inf],expr2] +Output: A flag used by parityL +It is assumed that parity check has already checked if a_1,b_2 are equal to minf,inf respectively. +*/ +uint_comp(L1,L2,var):=block( + if is(L1[1][2]=-L2[1][1]) then( + if is(L1[2]=0) and is(L2[2]=0) then return('zero) + elseif equalp(L1[2],ratsubst(-var,var,L2[2])) then return('even) + elseif equalp(L1[2],-ratsubst(-var,var,L2[2])) then return('odd) else return('none) + ) + else return('none) +)$ + +/*parityb(L,var) +Input: A list returned by fun_parts of a bounded function +Output: A list used by parityL +*/ +parityb(L,var):=block( + [ll,icentral,aux,ans,llaux,Laux,paux], + ll:length(L), + /* Trivial case, just check if the only interval has + an even expression, an odd expression or neither of them.*/ + if is(ll=1) and is(L[1][1][1]=-L[1][1][2]) then( + if evenfunp(L[1][2],var) then return('even) + elseif oddfunp(L[1][2],var) then return('odd) + else return('none) + ) + elseif is(ll>1) then( + icentral:0, + /*Search if there is a central interval*/ + for i:1 thru ll do (if is(L[i][1][1]*L[i][1][2]<0) then icentral:i), + /*Case 1: icentral=0 */ + if is(icentral=0) then( + if not evenp(ll) then return('none) else( + aux:makelist(bint_comp(L[i],L[ll+1-i],var),i,1,ll/2), + if is(length(sublist_indices(aux,lambda([x],x=even or x=zero)))=ll/2) + then return('even) + elseif is(length(sublist_indices(aux,lambda([x],x=odd or x=zero)))=ll/2) + then return('odd) + else return('none) + ) + ) + /*icentral>0*/ + elseif is(icentral>0) and oddp(ll) then( + /*Check parity of central element*/ + if is(L[icentral][1][1]=-L[icentral][1][2]) then ( + if evenfunp(L[icentral][2],var) then paux:'even + elseif oddfunp(L[icentral][2],var) then paux:'odd + else return('none), + Laux:delete(L[icentral],L), + aux:makelist(bint_comp(Laux[i],Laux[ll-i],var),i,1,(ll-1)/2), + if is(length(sublist_indices(aux,lambda([x],x=even or x=zero)))=(ll-1)/2) and is(paux=even) + then return('even) + elseif is(length(sublist_indices(aux,lambda([x],x=odd or x=zero)))=(ll-1)/2) and is(paux=odd) + then return('odd) + else return('none) + ) + else return('none) + ) + ))$ + + + +/*parityL(L,var) + +Input: A list returned by fun_parts +Output: the parity of the function + +Important notes: +- +*/ +parityL(L,var):=block( + [aux1,aux2,Laux,ll], + ll:length(L), + if (not boundedp(L)) and is(ll=2) then( + if is(uint_comp(L[1],L[2],var)=zero) or is(uint_comp(L[1],L[2],var)=even) then return('even) + elseif is(uint_comp(L[1],L[2],var)=odd) then + return('odd) + else return('none) + ) + /*Check if there are unbounded intervals*/ + elseif (not boundedp(L)) and is(ll>2) then( + aux1:uint_comp(L[1],L[ll],var), + Laux:delete(L[1],L), + Laux:delete(L[ll],Laux), + aux2:parityb(Laux,var), + if (is(aux1=zero) and is(aux2=even)) or + (is(aux1=even) and is(aux2=even)) then + return('even) elseif (is(aux1=zero) and is(aux2=odd)) or + (is(aux1=odd) and is(aux2=odd)) then return('odd) + else return('none) + ) + else return(parityb(L,var)) + +)$ +boundedp(L):=block( + [ll], + ll:length(L), + if is(L[1][1][1]=minf) and is (L[ll][1][2]=inf) + then return(false) + else return(true) +)$ + +piecewisep(expr):=if atom(expr) then false else is(inpart(expr,0)="if")$ +paritycheck(expr,var):=block( + if piecewisep(expr) then return(parityL(fun_parts(expr,var),var)) + elseif listp(expr) then return(parityL(expr,var)) + else ( + if equalp(ratsubst(-var,var,expr),expr) then return('even) + elseif equalp(ratsubst(-var,var,expr),-expr) then return('odd) + else return('none) + ) +)$ + +/*Check if the domain is bounded and symmetric [-L,L] +symbintp(L) +intput: a list L returned by fun_parts +output: true or false +*/ + +symbintp(L):=if boundedp(L) and is(L[1][1][1]=-L[length(L)][1][2]) then L[length(L)][1][2] else false$ + +/*integratepw(L,var) + +Integrate the list form of a piecewise defined function + +*/ + +integratepw(L,var):=block( + [ll], + ll:length(L), + return(sum(integrate(L[i][2],var,L[i][1][1],L[i][1][2]),i,1,ll)) +)$ + +/* sum2list(expr) +Auxiliary function +Input: An expression +Output: A list whose elements are the terms of expression + +Important notes: sum2list does not check by itself if op(expr)="+" or not*/ + +sum2list(expr):= if is(expr=0) then [0] elseif is(nterms(expr)=1) then [expr] else args(expr)$ + +/*secsum2bl(L) +Input: A list as in fun_parts output format +Output: +*/ +secsum2bl(L):=block( + [ll,laux], + ll:length(L), + laux:makelist(i,i,1,ll), + create_list([L[i][1],y],i,laux,y,sum2list(L[i][2])) +)$ + +/*Match rules for special cases*/ +matchdeclare(nexp,lambda([e],e#0 and nonnegintegerp(e)))$ +matchdeclare(nfreq,lambda([e],e#0 and nonnegintegerp(e)))$ +matchdeclare(const,lambda([e],e#0 and freeof(xargument,e)))$ +/*matchdeclare(argtrig,lambda([e],e#0 and constantp(e)))$ +defmatch(powx,const*xargument^nexp,xargument)$*/ +defmatch(powxsin,const*xargument^nexp*sin(nfreq*%pi*xargument/pargument),xargument,pargument)$ +defmatch(powxcos,const*xargument^nexp*cos(nfreq*%pi*xargument/pargument),xargument,pargument)$ +defmatch(multsin,const*sin(nfreq*%pi*xargument/pargument),xargument,pargument)$ +defmatch(multcos,const*cos(nfreq*%pi*xargument/pargument),xargument,pargument)$ +/*powxcos_int +Computes \int_a^b (x^r*cos(n*%pi*x/L)dx for r>=0 +*/ +powxcos_int(pow,freq,p,a,b):=block( + if is(freq=0) then (b^(pow+1)-a^(pow+1))/(pow+1) + elseif is(pow=0) then (p/(%pi*freq))*(sin(freq*%pi*b/p)-sin(freq*%pi*a/p)) + elseif is(pow>0) then (p/(%pi*freq))*(b^pow*sin(freq*%pi*b/p)-a^pow*sin(freq*%pi*a/p))-(p*pow/(freq*%pi)*powxsin_int(pow-1,freq,p,a,b)) +)$ +/*powxsin_int +Computes \int_a^b x^r*sin(n*%pi*x/L) dx for r>=0 */ +powxsin_int(pow,freq,p,a,b):=block( + if is(freq=0) then 0 + elseif is(pow=0) then (p/(%pi*freq))*(cos(freq*%pi*a/p)-cos(freq*%pi*b/p)) + elseif is(pow>0) then (p/(%pi*freq))*(a^pow*cos(freq*%pi*a/p)-b^pow*cos(freq*%pi*b/p))+(p*pow/(freq*%pi)*powxcos_int(pow-1,freq,p,a,b)) +)$ +/*Heuristic a_n + +*/ +heuristic_an(expr,var,p,a,b):=block( + [n,ans], + declare(n,integer), + if listp(powxsin(expr,var,p)) then ( + if is(a=-b) and evenp(nexp) then 0 else( + ans:(const/(2*p))*powxsin_int(nexp,nfreq+n,p,a,b)+ev((const/(2*p))*powxsin_int(nexp,nfreq-n,p,a,b),noeval,n), + remove(n,integer), + ans + ) + ) + elseif listp(powxcos(expr,var,p)) then ( + if is(a=-b) and oddp(nexp) then 0 else( + ans:(const/(2*p))*powxcos_int(nexp,nfreq+n,p,a,b)+ev((const/(2*p))*powxcos_int(nexp,nfreq-n,p,a,b),noeval,n), + remove(n,integer), + ans) + ) + elseif listp(multsin(expr,var,p)) then( + if is(a=-b) then 0 else( + ans:(const/(2*p))*powxsin_int(0,nfreq+n,p,a,b)+ev((const/(2*p))*powxsin_int(0,nfreq-n,p,a,b),noeval,n), + remove(n,integer), + ans + ) + ) + elseif listp(multcos(expr,var,p)) then ( + ans:(const/(2*p))*powxcos_int(0,nfreq+n,p,a,b)+ev((const/(2*p))*powxcos_int(0,nfreq-n,p,a,b),noeval,n), + remove(n,integer), + ans + ) + else( + ans:adefint(expr*cos(n*%pi*var/p),var,a,b)/p, + remove(n,integer), + ans + ) +)$ +/*Heuristic b_n + +*/ +heuristic_bn(expr,var,p,a,b):=block( + [n,ans], + declare(n,integer), + if listp(powxsin(expr,var,p)) then ( + if is(a=-b) and oddp(nexp) then 0 else( + ans:(-const/(2*p))*powxcos_int(nexp,nfreq+n,p,a,b)+ev((const/(2*p))*powxcos_int(nexp,nfreq-n,p,a,b),noeval,n), + remove(n,integer), + ans + ) + ) + elseif listp(powxcos(expr,var,p)) then ( + if is(a=-b) and evenp(nexp) then 0 else( + ans:(const/(2*p))*powxsin_int(nexp,nfreq+n,p,a,b)+ev((const/(2*p))*powxsin_int(nexp,n-nfreq,p,a,b),noeval,n), + remove(n,integer), + ans + ) + ) + elseif listp(multsin(expr,var,p)) then( + ans:(-const/(2*p))*powxcos_int(0,nfreq+n,p,a,b)+ev((const/(2*p))*powxcos_int(0,nfreq-n,p,a,b),noeval,n), + remove(n,integer), + ans + ) + elseif listp(multcos(expr,var,p)) then ( + if is(a=-b) then 0 else( + ans:(const/(2*p))*powxsin_int(0,nfreq+n,p,a,b)+ev((const/(2*p))*powxsin_int(0,n-nfreq,p,a,b),noeval,n), + remove(n,integer), + ans + ) + ) + else( + ans:adefint(expr*sin(n*%pi*var/p),var,a,b)/p, + remove(n,integer), + ans + ) +)$ + +/*foucoeffpw(L,var) +Fourier coefficients of a piecewise defined function +Currently it only works with functions defined on an interval of the form [-p,p]. +The output is a list of the form [a0,a1,b1,an,bn] +*/ + +foucoeffpw(L,var):=block( + [llaux,ll,a0,an,bn,answ,lm], + ll:length(L), + lm:(L[ll][1][2]-L[1][1][1])/2, /*For more general intervals*/ + Laux:secsum2bl(L), + llaux:length(Laux), + if is(parityL(L,var)=odd) then ( + a0:0, an:0, + bn:sum(heuristic_bn(Laux[i][2],var,lm,Laux[i][1][1],Laux[i][1][2]),i,1,llaux), + answ:[a0,an,simplify_sum(bn)], + return(ratsimp(answ))) + elseif is(parityL(L,var)=even) then ( + a0:(1/(2*lm))*integratepw(L,var), + an:sum(heuristic_an(Laux[i][2],var,lm,Laux[i][1][1],Laux[i][1][2]),i,1,llaux), + bn:0, + answ:[simplify_sum(a0),simplify_sum(an),bn], + return(ratsimp(answ))) + else( + a0:(1/(2*lm))*integratepw(L,var), + an:sum(heuristic_an(Laux[i][2],var,lm,Laux[i][1][1],Laux[i][1][2]),i,1,llaux), + bn:sum(heuristic_bn(Laux[i][2],var,lm,Laux[i][1][1],Laux[i][1][2]),i,1,llaux), + answ:[a0,an,bn], + answ:map(simplify_sum,answ), + return(ratsimp(answ) )) +)$ + +foucoeffterm(term,var,p):=block( + [a0,bn,an,ans], + if listp(term) then( + /* if is(symbintp(term,var)=p) then */ + return(foucoeffpw(term,var)) + /* else error("Domain of the piecewise function is not valid. Read the documentation for further details")*/ + ) + elseif piecewisep(term) then( + /*Check if the domain is valid*/ + /*if is(symbintp(fun_parts(term,var))=p) then*/ + if is(boundedp(fun_parts(term,var))) then + return(foucoeffpw(map(lambda([e],[e[1],expand(trigrat(e[2]))]),fun_parts(term,var)),var)) + else error("Domain of the piecewise function is not valid. Read the documentation for further details") + ) + else( + /*Check parity of term*/ + if is(paritycheck(term,var)=even) then( + a0:ratsimp((1/(2*p))*adefint(term,var,-p,p)), + an:heuristic_an(term,var,p,-p,p), + bn:0, + ans:ratsimp([a0,an,bn]), + return(ans) + ) + elseif is(paritycheck(term,var)=odd) then( + a0:0, an:0, + bn:heuristic_bn(term,var,p,-p,p), + ans:ratsimp([a0,an,bn]), + return(ans) + ) + else( + a0:ratsimp((1/(2*p))*adefint(term,var,-p,p)), + an:heuristic_an(term,var,p,-p,p), + bn:heuristic_bn(term,var,p,-p,p), + ans:ratsimp([a0,an,bn]), + return(ans) + ) + ) +)$ + +list2bl(L):=block( + [ll,laux], + ll:length(L), + laux:makelist(i,i,1,ll), + create_list(y,i,laux,y,sum2list(L[i])) +)$ + +trigpattern(term,var,p):=block( + if listp(powxsin(term,var,p)) then return(nfreq) + elseif listp(powxcos(term,var,p)) then return(nfreq) + elseif listp(multcos(term,var,p)) then return(nfreq) + elseif listp(multsin(term,var,p)) then return(nfreq) + else return(false) +)$ + +searchpoles_term(term,var,p):=block( + [L,Laux,indx_aux,indx], + if listp(term) then( + L:secsum2bl(term), + indx_aux:map(lambda([e],trigpattern(e[2],var,p)),L), + indx:unique(sublist(indx_aux,integerp)), + return(indx) + ) + elseif piecewisep(term) then( + Laux:map(lambda([e],[e[1],expand(trigrat(e[2]))]),fun_parts(term,var)), + L:secsum2bl(Laux), + indx_aux:map(lambda([e],trigpattern(e[2],var,p)),L), + indx:unique(sublist(indx_aux,integerp)), + return(indx) + ) else( + indx_aux:trigpattern(term,var,p), + if integerp(indx_aux) then return([indx_aux]) + else return([]) + ) +)$ + +searchpoles(expr,var,p):=block( + [L,Laux,indx], + Laux:sum2list(expand(expr)), + Laux:map(lambda([e],if not piecewisep(e) then expand(trigrat(e)) else e),Laux), + L:list2bl(Laux), + indx:apply(append,map(lambda([e],searchpoles_term(e,var,p)),L)), + return(unique(indx)) + )$ + +fouriercoeff(expr,var,p):=block( + [ans,Llist,Laux,coeffpoles,poles,n], + Laux:sum2list(expand(expr)), + Llist:map(lambda([e],if not piecewisep(e) then expand(trigrat(e)) else e),Laux), + Llist:list2bl(Llist), + ans:lsum(y,y,map(lambda([e],foucoeffterm(e,var,p)),Llist)), + ans:ratsimp(ans), + poles:searchpoles(expr,var,p), + coeffpoles:makelist(at([i,ans[2],ans[3]],n=i),i,poles), + declare(n,integer), + coeffpoles:ev(coeffpoles), + ans:ev(ans), + remove(n,integer), + return(ratsimp([ans,coeffpoles])) +)$ + +fouriercoeff_expand(fcoeff,var,p,NN):=block( + [ans,a0,an,bn,poles,indx_poles,polessum,sl_indx,laux], + [[a0,an,bn],poles]:fcoeff, + an:ev(an), + bn:ev(bn), + if emptyp(poles) then( + ans:a0+sum(at(an*cos(n*%pi*var/p)+bn*sin(n*%pi*var/p),n=n),n,1,NN), + return(ans) + ) else( + indx_poles:makelist(poles[i][1],i,1,length(poles)), + if is(NN=inf) then( + polessum:sum(poles[i][2]*cos(poles[i][1]*%pi*var/p)+poles[i][3]*sin(poles[i][1]*%pi*var/p),i,1,length(poles)), + ans:a0+polessum+sum(at(an*cos(n*%pi*var/p)+bn*sin(n*%pi*var/p),n=n),n,1,inf), + if is(an=0) and is(bn=0) then return(ans), + print("The sum is over \\N -",setify(indx_poles)), + return(ans) + ) + else( + sl_indx:sublist_indices(indx_poles,lambda([e],is(e<=NN))), + polessum:lsum(poles[i][2]*cos(poles[i][1]*%pi*var/p)+poles[i][3]*sin(poles[i][1]*%pi*var/p),i,sl_indx), + laux:listify(setdifference(setify(makelist(i,i,1,NN)),setify(indx_poles))), + ans:a0+polessum+lsum(at(an*cos(n*%pi*var/p)+bn*sin(n*%pi*var/p),n=i),i,laux), + return(ans) + ) + ) +)$ + +fourier_series(expr,var,p,NN):=block( + [fcoeff,ans], + fcoeff:fouriercoeff(expr,var,p), + ans:fouriercoeff_expand(fcoeff,var,p,NN), + ans +)$ + +fourier_amplitudes(expr,var,p,N):=block( + [a0,an,bn,ans,poles,indx_poles,polelist,sl_indx,laux], + [[a0,an,bn],poles]:fouriercoeff(expr,var,p), + an:ev(an), + bn:ev(bn), + if emptyp(poles) then( + ans:makelist(at([n,sqrt(an^2+bn^2)],n=i),i,1,N), + /*ans:float(ans),*/ + return(ans)) else( + indx_poles:makelist(poles[i][1],i,1,length(poles)), + sl_indx:sublist_indices(indx_poles,lambda([e],is(e<N))), + polelist:makelist([poles[i][1],sqrt(poles[i][2]^2+poles[i][3]^2)],i,sl_indx), + laux:listify(setdifference(setify(makelist(i,i,1,N)),setify(indx_poles))), + ans:append(polelist,makelist(at([n,sqrt(an^2+bn^2)],n=i),i,laux)), + /*ans:float(ans),*/ + ans:sort(ans,lambda([a,b],a[1]<b[1])), + return(ans) + ) +)$ + +fourier_freq_list(expr,var,p,N):=block( + [modules], + modules:float(fourier_amplitudes(expr,var,p,N)) +)$ + +fourier_freq(expr,var,p,N):=block( + [modules], + modules:float(fourier_amplitudes(expr,var,p,N)), + draw2d(points_joined=impulses,line_width=4,color="blue",points(modules), + xlabel="w(n)=nw_0",ylabel="|c_n|",axis_top=false,axis_right=false,xtics=1,user_preamble="set grid ytics") +)$ + +wxfourier_freq(expr,var,p,N):=block( + [modules], + modules:float(fourier_amplitudes(expr,var,p,N)), + wxdraw2d(points_joined=impulses,line_width=4,color="blue",points(modules), + xlabel="w(n)=nw_0",ylabel="|c_n|",axis_top=false,axis_right=false,xtics=1,user_preamble="set grid ytics") +)$ + +atan_fourier(an,bn):=if is(an=0) and is(bn=0) then 0 else atan2(an,bn)$ + +fourier_phshift(expr,var,p,N):=block( + [a0,an,bn,ans,poles,indx_poles,polelist,sl_indx,laux], + [[a0,an,bn],poles]:fouriercoeff(expr,var,p), + an:ev(an), + bn:ev(bn), + if emptyp(poles) then( + ans:makelist([i,atan_fourier(at(bn,n=i),at(an,n=i))],i,1,N), + /*ans:float(ans),*/ + return(ans)) else( + indx_poles:makelist(poles[i][1],i,1,length(poles)), + sl_indx:sublist_indices(indx_poles,lambda([e],is(e<N))), + polelist:makelist([poles[i][1],atan_fourier(poles[i][3],poles[i][2])],i,sl_indx), + laux:listify(setdifference(setify(makelist(i,i,1,N)),setify(indx_poles))), + ans:append(polelist,makelist([i,atan_fourier(at(bn,n=i),at(an,n=i))],i,laux)), + /*ans:float(ans),*/ + ans:sort(ans,lambda([a,b],a[1]<b[1])), + return(ans) + ) +)$ + + + +fourier_harm(expr,var,p,N):=block( + [amplitudes,phshift,ans], + amplitudes:fourier_amplitudes(expr,var,p,N), + phshift:fourier_phshift(expr,var,p,N), + ans:makelist(amplitudes[i][2]*cos(i*%pi*var/p-phshift[i][2]),i,1,N), + return(ans) +)$ + +chop(expr,[N]):=if emptyp(N) then scanmap(lambda([x],if is(numberp(x)) then (if is(abs(x)<1.0*10^(-12)) then 0.0 else x) else x),expr) +else scanmap(lambda([x],if is(numberp(x)) then (if is(abs(x)<1.0*10^(-N[1])) then 0.0 else x) else x),expr)$ + +oddextension_pwterm(L,var):=block( + [Laux], + Laux:[[-L[1][2],-L[1][1]],-ratsubst(-x,x,L[2])], + Laux +)$ + +oddextensionpw(L,var):=block( + [Lodd], + Lodd:append(reverse(map(lambda([e],oddextension_pwterm(e,var)),L)),L), + Lodd +)$ + +evenextension_pwterm(L,var):=block( + [Laux], + Laux:[[-L[1][2],-L[1][1]],ratsubst(-x,x,L[2])], + Laux +)$ + +evenextensionpw(L,var):=block( + [Lodd], + Lodd:append(reverse(map(lambda([e],evenextension_pwterm(e,var)),L)),L), + Lodd +)$ + +odd_extension(expr,var,p):=block( + [Laux], + if piecewisep(expr) then( + Laux:fun_parts(expr,var), + if is(Laux[1][1][1]=0) and is(Laux[length(Laux)][1][2]=p) then return(oddextensionpw(Laux,var)) + else error("The domain must be of the form [0,p]") + ) + else( + Laux:[[[0,p],expr]], + return(oddextensionpw(Laux,var)) + ) +)$ + +even_extension(expr,var,p):=block( + [Laux], + if piecewisep(expr) then( + Laux:fun_parts(expr,var), + if is(Laux[1][1][1]=0) and is(Laux[length(Laux)][1][2]=p) then return(evenextensionpw(Laux,var)) + else error("The domain must be of the form [0,p]") + ) + else( + Laux:[[[0,p],expr]], + return(evenextensionpw(Laux,var)) + ) +)$ + +/*foucoscoeff(expr,var,p):=block( + [Laux,fcoeff,a0,an,bn,poles], + Laux:even_extension(expr,var,p), + [[a0,an,bn],poles]:fouriercoeff(Laux,var,p), + fcoeff:[[a0,an],map(lambda([e],[e[1],e[2]]),poles)], + return(fcoeff) +)$ + +fousincoeff(expr,var,p):=block( + [Laux,fcoeff,a0,an,bn,poles], + Laux:odd_extension(expr,var,p), + [[a0,an,bn],poles]:fouriercoeff(Laux,var,p), + fcoeff:[[bn],map(lambda([e],[e[1],e[3]]),poles)], + return(fcoeff) +)$ +*/ + +/*Here we have the new implementation of fouriersincoeff and fouriercoscoeff*/ + +fouriersincoeffpw(Llist,var):=block( + [llaux,ll,bn,answ,lm], + ll:length(Llist), + lm:(Llist[ll][1][2]-Llist[1][1][1]), /*No need to divide by 2*/ + Laux:secsum2bl(Llist), + llaux:length(Laux), + bn:2*sum(heuristic_bn(Laux[i][2],var,lm,Laux[i][1][1],Laux[i][1][2]),i,1,llaux), + answ:[bn], + answ:map(simplify_sum,answ), + return(ratsimp(answ) ) +)$ + +fouriercoscoeffpw(Llist,var):=block( + [llaux,ll,a0,an,answ,lm], + ll:length(Llist), + lm:(Llist[ll][1][2]-Llist[1][1][1]), /*No need to divide by 2*/ + Laux:secsum2bl(Llist), + llaux:length(Laux), + a0:(1/(lm))*integratepw(Llist,var), + an:2*sum(heuristic_an(Laux[i][2],var,lm,Laux[i][1][1],Laux[i][1][2]),i,1,llaux), + answ:[a0,an], + answ:map(simplify_sum,answ), + return(ratsimp(answ) ) +)$ + +fouriersincoeffterm(term,var,p):=block( + [bn,ans], + if listp(term) then( + /* if is(symbintp(term,var)=p) then */ + return(fouriersincoeffpw(term,var)) + /* else error("Domain of the piecewise function is not valid. Read the documentation for further details")*/ + ) + elseif piecewisep(term) then( + /*Check if the domain is valid*/ + /*if is(symbintp(fun_parts(term,var))=p) then*/ + if is(boundedp(fun_parts(term,var))) then + return(fouriersincoeffpw(map(lambda([e],[e[1],expand(trigrat(e[2]))]),fun_parts(term,var)),var)) + else error("Domain of the piecewise function is not valid. Read the documentation for further details") + ) + else( + bn:2*heuristic_bn(term,var,p,0,p), + ans:ratsimp([bn]), + return(ans) + ) +)$ + +fouriercoscoeffterm(term,var,p):=block( + [a0,an,ans], + if listp(term) then( + /* if is(symbintp(term,var)=p) then */ + return(fouriercoscoeffpw(term,var)) + /* else error("Domain of the piecewise function is not valid. Read the documentation for further details")*/ + ) + elseif piecewisep(term) then( + /*Check if the domain is valid*/ + /*if is(symbintp(fun_parts(term,var))=p) then*/ + if is(boundedp(fun_parts(term,var))) then + return(fouriercoscoeffpw(map(lambda([e],[e[1],expand(trigrat(e[2]))]),fun_parts(term,var)),var)) + else error("Domain of the piecewise function is not valid. Read the documentation for further details") + ) + else( + a0:ratsimp((1/p)*adefint(term,var,0,p)), + an:2*heuristic_an(term,var,p,0,p), + ans:ratsimp([a0,an]), + return(ans) + ) +)$ + +fouriersincoeff(expr,var,p):=block( + [ans,Llist,Laux,coeffpoles,poles,n], + Laux:sum2list(expand(expr)), + Llist:map(lambda([e],if not piecewisep(e) then expand(trigrat(e)) else e),Laux), + Llist:list2bl(Llist), + ans:lsum(y,y,map(lambda([e],fouriersincoeffterm(e,var,p)),Llist)), + ans:ratsimp(ans), + poles:searchpoles(expr,var,p), + /*Now there is only a list of the form [bn]*/ + coeffpoles:makelist(at([i,ans[1]],n=i),i,poles), + declare(n,integer), + coeffpoles:ev(coeffpoles), + ans:ev(ans), + remove(n,integer), + return(ratsimp([ans,coeffpoles])) +)$ + +fouriercoscoeff(expr,var,p):=block( + [ans,Llist,Laux,coeffpoles,poles,n], + Laux:sum2list(expand(expr)), + Llist:map(lambda([e],if not piecewisep(e) then expand(trigrat(e)) else e),Laux), + Llist:list2bl(Llist), + ans:lsum(y,y,map(lambda([e],fouriercoscoeffterm(e,var,p)),Llist)), + ans:ratsimp(ans), + poles:searchpoles(expr,var,p), + /*Now there is only a list of the form [a0,an]*/ + coeffpoles:makelist(at([i,ans[2]],n=i),i,poles), + declare(n,integer), + coeffpoles:ev(coeffpoles), + ans:ev(ans), + remove(n,integer), + return(ratsimp([ans,coeffpoles])) +)$ + +fouriersincoeff_expand(sincoeff,var,p,NN):=block( + [ans,bn,poles,indx_poles,polessum,sl_indx,laux], + [[bn],poles]:sincoeff, + bn:ev(bn), + if emptyp(poles) then( + ans:sum(at(bn*sin(n*%pi*var/p),n=n),n,1,NN), + return(ans) + ) else( + indx_poles:makelist(poles[i][1],i,1,length(poles)), + if is(NN=inf) then( + polessum:sum(poles[i][2]*sin(poles[i][1]*%pi*var/p),i,1,length(poles)), + ans:polessum+sum(at(bn*sin(n*%pi*var/p),n=n),n,1,inf), + if is(bn=0) then return(ans), + print("The sum is over \\N-",setify(indx_poles)), + return(ans) + ) + else( + sl_indx:sublist_indices(indx_poles,lambda([e],is(e<=NN))), + polessum:lsum(poles[i][2]*sin(poles[i][1]*%pi*var/p),i,sl_indx), + laux:listify(setdifference(setify(makelist(i,i,1,NN)),setify(indx_poles))), + ans:polessum+lsum(at(bn*sin(n*%pi*var/p),n=i),i,laux), + return(ans) + ) + ) +)$ + +fouriercoscoeff_expand(coscoeff,var,p,NN):=block( + [ans,a0,an,poles,indx_poles,polessum,sl_indx,laux], + [[a0,an],poles]:coscoeff, + an:ev(an), + if emptyp(poles) then( + ans:a0+sum(at(an*cos(n*%pi*var/p),n=n),n,1,NN), + return(ans) + ) else( + indx_poles:makelist(poles[i][1],i,1,length(poles)), + if is(NN=inf) then( + polessum:sum(poles[i][2]*cos(poles[i][1]*%pi*var/p),i,1,length(poles)), + ans:a0+polessum+sum(at(an*cos(n*%pi*var/p),n=n),n,1,inf), + if is(an=0) then return(ans), + print("The sum is over \\N -",setify(indx_poles)), + return(ans) + ) + else( + sl_indx:sublist_indices(indx_poles,lambda([e],is(e<=NN))), + polessum:lsum(poles[i][2]*cos(poles[i][1]*%pi*var/p),i,sl_indx), + laux:listify(setdifference(setify(makelist(i,i,1,NN)),setify(indx_poles))), + ans:a0+polessum+lsum(at(an*cos(n*%pi*var/p),n=i),i,laux), + return(ans) + ) + ) +)$ + +fouriersin_series(expr,var,p,NN):=block( + [ans,sincoeff], + sincoeff:fouriersincoeff(expr,var,p), + ans:fouriersincoeff_expand(sincoeff,var,p,NN), + ans +)$ + +fouriercos_series(expr,var,p,NN):=block( + [ans,coscoeff], + coscoeff:fouriercoscoeff(expr,var,p), + ans:fouriercoscoeff_expand(coscoeff,var,p,NN), + ans +)$ + +real2complex_fcoeff(fcoeff):=block( + [c0,cn,cpoles,rpoles,a0,an,bn], + [[a0,an,bn],rpoles]:fcoeff, + c0:a0, + cn:(an-%i*bn)/2, + cpoles:map(lambda([e],[e[1],(e[2]-%i*e[3])/2]),rpoles), + ratsimp([[c0,cn],cpoles]) +)$ + +cfouriercoeff(expr,var,p):=real2complex_fcoeff(fouriercoeff(expr,var,p))$ + +cfouriercoeff_expand(cfcoeff,var,p,NN):=block( + [ans,c0,cn,cpoles,indx_cpoles,cpolessumpos,cpolessumneg,sl_indx,laux], + [[c0,cn],cpoles]:cfcoeff, + an:ev(cn), + if emptyp(cpoles) then( + if is(NN=inf) then( + ans:c0+sum(at(cn*exp(%i*n*%pi*var/p),n=n),n,minf,inf), + print("The sum is over \\N-\{0\}"), + return(ans) + ) else( + ans:c0+sum(at(conjugate(cn)*exp(%i*-n*%pi*var/p),n=n),n,1,NN) + +sum(at(cn*exp(%i*n*%pi*var/p),n=n),n,1,NN), + return(ratsimp(demoivre(ans)))) + ) else( + indx_cpoles:map(first,cpoles), + if is(NN=inf) then( + cpolessumpos:sum(cpoles[i][2]*exp(%i*cpoles[i][1]*%pi*var/p),i,1,length(cpoles)), + cpolessumneg:sum(conjugate(cpoles[i][2])*exp(-%i*cpoles[i][1]*%pi*var/p),i,1,length(cpoles)), + ans:c0+cpolessumpos+cpolessumneg+sum(at(cn*exp(%i*n*%pi*var/p),n=n),n,minf,inf), + if is(cn=0) then return(ans), + print("The sum is over \\N -",setify(append(indx_cpoles,[0]))), + return(ans) + ) + else( + sl_indx:sublist_indices(indx_cpoles,lambda([e],is(e<=NN))), + cpolessumpos:lsum(cpoles[i][2]*exp(%i*cpoles[i][1]*%pi*var/p),i,sl_indx), + cpolessumneg:lsum(conjugate(cpoles[i][2])*exp(-%i*cpoles[i][1]*%pi*var/p),i,sl_indx), + laux:listify(setdifference(setify(makelist(i,i,1,NN)),setify(indx_cpoles))), + ans:c0+cpolessumpos+cpolessumneg+lsum(at(cn*exp(%i*n*%pi*var/p),n=i),i,laux) + +lsum(at(conjugate(cn)*exp(-%i*n*%pi*var/p),n=i),i,laux), + return(ratsimp(demoivre(ans))) + ) + ) +)$ + +cfourier_series(expr,var,p,NN):=cfouriercoeff_expand(cfouriercoeff(expr,var,p),var,p,NN)$ + +evalpole_scn(bfn,polesf,indx_pf,indx):=block([n], + if member(indx,indx_pf) then return(assoc(indx,polesf)) + else return(at(bfn,n=indx)) +)$ + +fourier_heatcoeff(Qexpr,fexpr,var,p,kap):=block( + [bnf,bnQ,polesf,polesQ,indxpf,indxpQ,indxp,n,un,polesU,ans], + /* [[bnf],polesf]:fousincoeff(fexpr,var,p), + [[bnQ],polesQ]:fousincoeff(Qexpr,var,p), */ + [[bnf],polesf]:fouriersincoeff(fexpr,var,p), + [[bnQ],polesQ]:fouriersincoeff(Qexpr,var,p), + declare(n,integer), + un:bnf*exp(-(n*%pi/p)^2*kap*t)+integrate(at(bnQ,t=s)*exp(-(n*%pi/p)^2*kap*(t-s)),s,0,t), + if emptyp(polesf) and emptyp(polesQ) then (ans:[[un],[]], remove(n,integer), return(ratsimp(ans))) + /*now let's deal with the poles*/ + else( + indxpf:map(first,polesf), indxpQ:map(first,polesQ), + indxp:unique(append(indxpf,indxpQ)), + polesU:map(lambda([e],[e,evalpole_scn(bnf,polesf,indxpf,e)*exp(-(e*%pi/p)^2*kap*t) + +integrate(at(evalpole_scn(bnQ,polesQ,indxpQ,e),t=s)*exp(-(e*%pi/p)^2*kap*(t-s)),s,0,t)]),indxp), + ans:[[un],polesU], + remove(n,integer), + return(ratsimp(ans)) + ) +)$ + +fourier_heat(Qexpr,fexpr,var,p,kap,NN):=fouriersincoeff_expand(fourier_heatcoeff(Qexpr,fexpr,var,p,kap),var,p,NN)$ + +fourier_wavecoeff(Qexpr,fexpr,gexpr,var,p,A):=block( + [indxp,indxpf,indxpQ,indxpg,n,polesf,polesg,polesQ,bnf,bnQ,bng,Ln,un,polesU], + Ln:(n*%pi*A)/p, +/* [[bnf],polesf]:fousincoeff(fexpr,var,p), + [[bng],polesg]:fousincoeff(gexpr,var,p), + [[bnQ],polesQ]:fousincoeff(Qexpr,var,p), */ + [[bnf],polesf]:fouriersincoeff(fexpr,var,p), + [[bng],polesg]:fouriersincoeff(gexpr,var,p), + [[bnQ],polesQ]:fouriersincoeff(Qexpr,var,p), + bng:bng/Ln, polesg:map(lambda([e],[e[1],e[2]*at(1/Ln,n=e[1])]),polesg), + declare(n,integer), + un:bnf*cos(Ln*t)+bng*sin(Ln*t)+(1/Ln)*integrate(at(bnQ,t=s)*sin(Ln*(t-s)),s,0,t), + if emptyp(polesf) and emptyp(polesQ) and emptyp(polesg) then (ans:[[un],[]], remove(n,integer), return(ratsimp(ans))) + /*now let's deal with the poles*/ + else( + indxpf:map(first,polesf), indxpQ:map(first,polesQ), indxpg:map(first,polesg), + indxp:unique(append(indxpf,indxpQ,indxpg)), + polesU:map(lambda([e],[e,evalpole_scn(bnf,polesf,indxpf,e)*cos(e*%pi*A*t/p)+ + evalpole_scn(bng,polesg,indxpg,e)*sin(e*%pi*A*t/p)+ + (p/(e*%pi*A))*integrate(at(evalpole_scn(bnQ,polesQ,indxpQ,e),t=s)*sin(e*%pi*A*(t-s)/p),s,0,t)]),indxp), + ans:[[un],polesU], + remove(n,integer), + return(ratsimp(ans)) + ) +)$ + +fourier_wave(Qexpr,fexpr,gexpr,var,p,A,NN):=fouriersincoeff_expand(fourier_wavecoeff(Qexpr,fexpr,gexpr,var,p,A),var,p,NN)$ + +dirichlet_heat(Qexpr,fexpr,h1expr,h2expr,var,p,kap,NN):=block( +[Qaux,faux,vaux], + vaux:(h1expr-h2expr)*var/p-h1expr, + Qaux:Qexpr+diff(vaux,t), + faux:fexpr+at(vaux,t=0), + fourier_heat(Qaux,faux,var,p,kap,NN)-vaux +)$ + +dirichlet_wave(Qexpr,fexpr,gexpr,h1expr,h2expr,var,p,A,NN):=block( +[Qaux,faux,gaux,vaux], + vaux:(h1expr-h2expr)*var/p-h1expr, + Qaux:Qexpr+diff(vaux,t,2), + faux:fexpr+at(vaux,t=0), + gaux:gexpr+at(diff(vaux,t),t=0), + fourier_wave(Qaux,faux,gaux,var,p,A,NN)-vaux +)$ + +dirichlet_laplace_disk(a,fexpr,var,NN):=block( + [cn,c0,cpoles,n], + [[c0,cn],cpoles]:cfouriercoeff(fexpr,var,%pi), + cn:(r/a)^abs(n)*cn, + cpoles:map(lambda([e],[e[1],(r/a)^e[1]*e[2]]),cpoles), + cfouriercoeff_expand([[c0,cn],cpoles],var,%pi,NN) +)$ + +neumann_laplace_disk(a,fexpr,var,NN):=block([a0,an,bn,poles,n], + [[a0,an,bn],poles]:fouriercoeff(fexpr,var,%pi), + if not is(a0=0) then return("The solution does not exist.") + else( + an:(a/n)*an*(r/a)^n, + bn:(a/n)*bn*(r/a)^n, + poles:map(lambda([e],[e[1],e[2]*(a/e[1])*(r/a)^e[1],e[3]*(a/e[1])*(r/a)^e[1]]),poles), + return(fouriercoeff_expand([[a0,an,bn],poles],var,%pi,NN)) + ) +)$ + +dirichlet_laplace_annulus(a,b,fexpr,gexpr,var,NN):=block( + [n,cnf,c0f,cng,c0g,cpolesf,cpolesg,c0aux,cnaux,cpolesaux, + indxpf,indxpg,indxp,ans], + [[c0f,cnf],cpolesf]:cfouriercoeff(fexpr,var,%pi), + [[c0g,cng],cpolesg]:cfouriercoeff(gexpr,var,%pi), + c0aux:(c0g*log(b)-c0f*log(a))*log(b/a)+(c0f-c0g)*log(r)/log(b/a), + cnaux:(b^abs(n)*r^abs(n)-a^abs(2*n)*b^abs(n)*r^(-abs(n)))*cnf/(b^abs(2*n)-a^abs(2*n))+ + cng*(b^abs(2*n)*a^abs(n)*r^(-abs(n))-a^abs(n)*r^abs(n))/(b^abs(2*n)-a^abs(2*n)), + if emptyp(cpolesf) and emptyp(cpolesg) then( + ans:cfouriercoeff_expand(ratsimp([[c0aux,cnaux],[]]),var,%pi,NN), + return(ans) + ) /*now let's deal with the poles*/ + else( + indxpf:map(first,cpolesf), indxpg:map(first,cpolesg), + indxp:unique(append(indxpf,indxpg)), + cpolesaux:map(lambda([e],[e,(b^e*r^e-a^(2*e)*b^e*r^(-e))*evalpole_scn(cnf,cpolesf,indxpf,e)/(b^(2*e)-a^(2*e))+ + evalpole_scn(cng,cpolesg,indxpg,e)*(b^(2*e)*a^e*r^(-e)-a^e*r^e)/(b^(2*e)-a^(2*e))]),indxp), + ans:cfouriercoeff_expand(ratsimp([[c0aux,cnaux],cpolesaux]),var,%pi,NN), + return(ans) + ) +)$ + +dirichlet_laplace_wedge(R,a,fexpr,var,NN):=block( + [bnf,polesf,bnaux,polesaux,n,p:a], + [[bnf],polesf]:fouriersincoeff(fexpr,var,p), + bnaux:bnf*(r/R)^(n*%pi/a), + if emptyp(polesf) then return(fouriersincoeff_expand([[bnaux],[]],var,p,NN)) + else( + polesaux:map(lambda([e],[e[1],e[2]*(r/R)^(e[1]*%pi/a)]),polesf), + return(fouriersincoeff_expand([[bnaux],polesaux],var,p,NN)) + ) +)$ + +neumann_laplace_wedge(R,a,fexpr,var,NN):=block( + [bnf,polesf,bnaux,polesaux,n,p:a], + [[bnf],polesf]:fouriersincoeff(fexpr,var,p), + bnaux:bnf*(r/R)^(n*%pi/a)*(R*a/(n*%pi)), + if emptyp(polesf) then return(fouriersincoeff_expand([[bnaux],[]],var,p,NN)) + else( + polesaux:map(lambda([e],[e[1],e[2]*(r/R)^(e[1]*%pi/a)*(R*a/(e[1]*%pi))]),polesf), + return(fouriersincoeff_expand([[bnaux],polesaux],var,p,NN)) + ) +)$ + +dirichlet_laplace_rectangle(a,b,f1expr,f2expr,g1expr,g2expr,var1,var2,NN):=block( +[n,f1n,polesf1,f2n,polesf2,g1n,polesg1,g2n,polesg2,indxpf1,indxpf2,indxpg1,indxpg2, + indxp,Fnaux,Gnaux,polesFaux,polesGaux,ans], + [[f1n],polesf1]:fouriersincoeff(f1expr,var1,a), + [[f2n],polesf2]:fouriersincoeff(f2expr,var1,a), + [[g1n],polesg1]:fouriersincoeff(g1expr,var2,b), + [[g2n],polesg2]:fouriersincoeff(g2expr,var2,b), + Fnaux:f1n*sinh(n*%pi*(b-var2)/a)/sinh(n*%pi*b/a)+f2n*sinh(n*%pi*var2/a)/sinh(n*%pi*b/a), + Gnaux:g1n*sinh(n*%pi*(a-var1)/b)/sinh(n*%pi*a/b)+g2n*sinh(n*%pi*var1/b)/sinh(n*%pi*a/b), + if emptyp(polesf1) and emptyp(polesf2) and emptyp(polesg1) and emptyp(polesg2) then( + ans:fouriersincoeff_expand([[Fnaux],[]],var1,a,NN)+fouriersincoeff_expand([[Gnaux],[]],var2,b,NN), + return(ans) + ) + else( + indxpf1:map(first,polesf1), indxpf2:map(first,polesf2), + indxpg1:map(first,polesg1), indxpg2:map(first,polesg2), + indxp:unique(append(indxpf1,indxpf2,indxpg1,indxpg2)), + polesFaux:map(lambda([e],[e,evalpole_scn(f1n,polesf1,indxpf1,e)*sinh(e*%pi*(b-var2)/a)/sinh(e*%pi*b/a) + +evalpole_scn(f2n,polesf2,indxpf2,e)*sinh(e*%pi*var2/a)/sinh(e*%pi*b/a)]),indxp), + polesGaux:map(lambda([e],[e,evalpole_scn(g1n,polesg1,indxpg1,e)*sinh(e*%pi*(a-var1)/b)/sinh(e*%pi*a/b) + +evalpole_scn(g2n,polesg2,indxpg2,e)*sinh(e*%pi*var1/b)/sinh(e*%pi*a/b)]),indxp), + ans:fouriersincoeff_expand([[Fnaux],polesFaux],var1,a,NN)+fouriersincoeff_expand([[Gnaux],polesGaux],var2,b,NN), + return(ans) + ) +)$ + +neumann_laplace_rectangle(a,b,f1expr,f2expr,g1expr,g2expr,var1,var2,NN):=block( +[n,f1n,polesf1,f2n,polesf2,g1n,polesg1,g2n,polesg2,indxpf1,indxpf2,indxpg1,indxpg2, + indxp,Fnaux,Gnaux,polesFaux,polesGaux,C,ans,f10,g10,f20,g20], + [[f10,f1n],polesf1]:fouriercoscoeff(f1expr,var1,a), + [[f20,f2n],polesf2]:fouriercoscoeff(f2expr,var1,a), + [[g10,g1n],polesg1]:fouriercoscoeff(g1expr,var2,b), + [[g20,g2n],polesg2]:fouriercoscoeff(g2expr,var2,b), + Fnaux:(-a/(n*%pi))*f1n*cosh(n*%pi*(b-var2)/a)/sinh(n*%pi*b/a)+(a/(n*%pi))*f2n*cosh(n*%pi*var2/a)/sinh(n*%pi*b/a), + Gnaux:(-b/(n*%pi))*g1n*cosh(n*%pi*(a-var1)/b)/sinh(n*%pi*a/b)+(b/(n*%pi))*g2n*cosh(n*%pi*var1/b)/sinh(n*%pi*a/b), + if emptyp(polesf1) and emptyp(polesf2) and emptyp(polesg1) and emptyp(polesg2) then( + ans:fouriercoscoeff_expand([[0,Fnaux],[]],var1,a,NN)+fouriercoscoeff_expand([[0,Gnaux],[]],var2,b,NN), + return(ans+C) + ) + else( + indxpf1:map(first,polesf1), indxpf2:map(first,polesf2), + indxpg1:map(first,polesg1), indxpg2:map(first,polesg2), + indxp:unique(append(indxpf1,indxpf2,indxpg1,indxpg2)), + polesFaux:map(lambda([e],[e,(-a/(n*%pi))*evalpole_scn(f1n,polesf1,indxpf1,e)*cosh(e*%pi*(b-var2)/a)/sinh(e*%pi*b/a) + +(a/(n*%pi))*evalpole_scn(f2n,polesf2,indxpf2,e)*cosh(e*%pi*var2/a)/sinh(e*%pi*b/a)]),indxp), + polesGaux:map(lambda([e],[e,(-b/(n*%pi))*evalpole_scn(g1n,polesg1,indxpg1,e)*cosh(e*%pi*(a-var1)/b)/sinh(e*%pi*a/b) + +(b/(n*%pi))*evalpole_scn(g2n,polesg2,indxpg2,e)*cosh(e*%pi*var1/b)/sinh(e*%pi*a/b)]),indxp), + ans:fouriercoscoeff_expand([[0,Fnaux],polesFaux],var1,a,NN)+fouriercoscoeff_expand([[0,Gnaux],polesGaux],var2,b,NN), + return(ans+C) + ) +)$ + +/*Beggining of 2D Wave equation*/ + +BesselJZeros(m,k,[u]):=block([a,alpha,A,answ],local(a,alpha,A), +if is(not(m>-1)) then return("The order m must be m>-1"), +if (is(not(integerp(k))) or is(not(k > 0))) then return("k must be an integer k>0"), +a[i]:=m+2*i, +alpha[i,j]:=if is(equal(i,j)) then 2/((a[i]-1)*(a[i]+1)) + elseif is(equal(j,i-1)) then 1/((a[i]-1)*sqrt((a[i]-2)*a[i])) + elseif is(equal(j,i+1)) then 1/((a[i+1]-1)*sqrt((a[i+1]-2)*a[i+1])) + else 0, +A:genmatrix(alpha,ceiling(k/0.64)+10,ceiling(k/0.64)+10), +answ:2/sqrt(first(eigens_by_jacobi(A,floatfield))), +if (is(not(equal(length(u),0))) and is(equal(first(u),all))) then + firstn(sort(answ),k) +elseif (is(not(equal(length(u),0))) and is(not(equal(first(u),all)))) then + return("Do you want the first k roots? In this case, the option is 'all'") +else + last(firstn(sort(answ),k)) +)$ + +simpgen(l1,l2):=append(endcons(last(l1)+first(l2),rest(l1,-1)),rest(l2,1))$ + +pairing(L1,L2):=xreduce(append,map(lambda([x],map(lambda([y],[x,y]),L2)),L1))$ + +nintegrate(f,m,[I]):=block([n:length(args(lhs(apply(fundef,[f])))),tmp:xreduce(simpgen,makelist([1,4,1],j,1,m/2)),x,deltax,p,w,ww,xx],local(x,deltax,p,w), +if is(not(evenp(m))) then return ("The number of subdivisions m must be even") +elseif is(not(equal(length(I),n))) then return("The number of variables xi and intervals [ai,bi] must match") else + ( + for i:1 thru n do x[i]:args(lhs(apply(fundef,[f])))[i], + for i:1 thru n do deltax[i]:(I[i][2]-I[i][1])/m, + for j:1 thru n do p[j]:makelist(I[j][1]+k*deltax[j],k,0,m), + for j:1 thru n do w[j]:(deltax[j]/3)*tmp, + if is(equal(n,1)) then + ww:w[1] + else + ww:map(lambda([x],apply("*",x)),map(flatten,xreduce(pairing,makelist(w[j],j,1,n)))), + if is(equal(n,1)) then + xx:p[1] + else + xx:map(flatten,xreduce(pairing,makelist(p[j],j,1,n))), + if is(equal(n,1)) then + bfloat(apply("+",ww*map(f,xx))) + else + bfloat(apply("+",ww*map(lambda([x],apply(f,x)),xx))) + ) +)$ + +a0(n,a,f):=block([r:args(lhs(apply(fundef,[f])))[1],theta:args(lhs(apply(fundef,[f])))[2],lam:BesselJZeros(0,n)/a,p:%pi,ff,k],local(ff), +define(funmake(ff,[r,theta]),apply(f,[r,theta])*r*bessel_j(0,lam*r)), +k:1/(p*a^2*(bessel_j(1,lam))^2), +k*nintegrate(ff,14,[0,a],[0,2*p]) +)$ + +a(m,n,a,f):=block([r:args(lhs(apply(fundef,[f])))[1],theta:args(lhs(apply(fundef,[f])))[2],lam:BesselJZeros(0,n)/a,p:%pi,ff,k],local(ff), +define(funmake(ff,[r,theta]),apply(f,[r,theta])*r*bessel_j(0,lam*r)*cos(m*theta)), +k:2/(p*a^2*(bessel_j(m+1,lam))^2), +k*nintegrate(ff,14,[0,a],[0,2*p]) +)$ + +b(m,n,a,f):=block( +[r:args(lhs(apply(fundef,[f])))[1],theta:args(lhs(apply(fundef,[f])))[2],lam:BesselJZeros(0,n)/a,p:%pi,ff,k],local(ff), +define(funmake(ff,[r,theta]),apply(f,[r,theta])*r*bessel_j(0,lam*r)*sin(m*theta)), +k:2/(p*a^2*(bessel_j(m+1,lam))^2), +k*nintegrate(ff,14,[0,a],[0,2*p]) +)$ + +as0(n,a,c,f):=block([r:args(lhs(apply(fundef,[f])))[1],theta:args(lhs(apply(fundef,[f])))[2],lam:BesselJZeros(0,n)/a,p:%pi,ff,k],local(ff), +define(funmake(ff,[r,theta]),apply(f,[r,theta])*r*bessel_j(0,lam*r)), +k:1/(c*p*lam*a^2*(bessel_j(1,lam))^2), +k*nintegrate(ff,14,[0,a],[0,2*p]) +)$ + +as(m,n,a,c,f):=block([r:args(lhs(apply(fundef,[f])))[1],theta:args(lhs(apply(fundef,[f])))[2],lam:BesselJZeros(0,n)/a,p:%pi,ff,k],local(ff), +define(funmake(ff,[r,theta]),apply(f,[r,theta])*r*bessel_j(0,lam*r)*cos(m*theta)), +k:2/(c*p*lam*a^2*(bessel_j(m+1,lam))^2), +k*nintegrate(ff,14,[0,a],[0,2*p]) +)$ + +bs(m,n,a,c,f):=block([r:args(lhs(apply(fundef,[f])))[1],theta:args(lhs(apply(fundef,[f])))[2],lam:BesselJZeros(0,n)/a,p:%pi,ff,k],local(ff), +define(funmake(ff,[r,theta]),apply(f,[r,theta])*r*bessel_j(0,lam*r)*sin(m*theta)), +k:2/(c*p*lam*a^2*(bessel_j(m+1,lam))^2), +k*nintegrate(ff,14,[0,a],[0,2*p]) +)$ + +wave2d_disk(c,a,f,g,k,l):=block([A0,A,B,As0,As,Bs,lamb],local(A0,A,B,As0,As,Bs,lamb,t), +A0[i]:=a0(i,a,f),A[i,j]:=a(i,j,a,f),B[i,j]:=b(i,j,a,f),As0[i]:=as0(i,a,c,g),As[i,j]:=as(i,j,a,c,g),Bs[i,j]:=bs(i,j,a,c,g), +lamb[i,j]:=BesselJZeros(i,j)/a, +sum(A0[n]*bessel_j(0,lamb[0,n]*r)*cos(c*lamb[0,n]*t),n,1,l) ++sum(sum(bessel_j(m,lamb[m,n]*r)*(A[m,n]*cos(m*theta)+B[m,n]*sin(m*theta))*cos(c*lamb[m,n]*t),n,1,l),m,1,k) ++sum(As0[n]*bessel_j(0,lamb[0,n]*r)*sin(c*lamb[0,n]*t),n,1,l) ++sum(sum(bessel_j(m,lamb[m,n]*r)*(As[m,n]*cos(m*theta)+Bs[m,n]*sin(m*theta))*sin(c*lamb[m,n]*t),n,1,l),m,1,k) +)$ + +Arect(f,a,b,m,n):=block([x:args(lhs(apply(fundef,[f])))[1],y:args(lhs(apply(fundef,[f])))[2]], +define(funmake(ff,[x,y]),apply(f,[x,y])*sin(m*%pi*x/a)*sin(m*%pi*y/b)), +4*(nintegrate(ff,14,[0,a],[0,b]))/(a*b) +)$ + +Brect(g,a,b,c,m,n):=block([x:args(lhs(apply(fundef,[f])))[1],y:args(lhs(apply(fundef,[f])))[2],lamb],local(lamb), +lamb[m,n]:=((m/a)^2+(n/b)^2)/(%pi^2), +define(funmake(gg,[x,y]),apply(g,[x,y])*sin(m*%pi*x/a)*sin(m*%pi*y/b)), +4*(nintegrate(gg,14,[0,a],[0,b]))/(a*b*c*sqrt(lam[m,n])) +)$ + +wave2d_rectangle(c,a,b,f,g,k,l):=block([x:args(lhs(apply(fundef,[f])))[1],y:args(lhs(apply(fundef,[f])))[2],lamb,t],local(lamb,t), +lamb[m,n]:=((m/a)^2+(n/b)^2)/(%pi^2), +sum(sum((Arect(f,a,b,m,n)*cos(sqrt(lamb[0,n])*c*t)+Brect(g,a,b,c,m,n)*sin(sqrt(lamb[0,n])*c*t))*sin(m*%pi*x/a)*sin(n*%pi*y/b),m,1,k),n,1,l) +)$ diff --git a/Master/texmf-dist/scripts/ketcindy/setketcindy.txt b/Master/texmf-dist/scripts/ketcindy/setketcindy.txt index 66ba6a4febc..293d1b74961 100755 --- a/Master/texmf-dist/scripts/ketcindy/setketcindy.txt +++ b/Master/texmf-dist/scripts/ketcindy/setketcindy.txt @@ -5,6 +5,7 @@ DirlibC=Dirhead+pathsep()+"ketlibC"; setdirectory(Dirlib); import("ketcindylibbasic1r.cs"); import("ketcindylibbasic2r.cs"); +import("ketcindylibbasic3r.cs"); import("ketcindyliboutr.cs"); import("ketcindylib3dr.cs"); import("ketcindylibmvr.cs"); diff --git a/Master/texmf-dist/scripts/ketcindy/template0.cdy b/Master/texmf-dist/scripts/ketcindy/template0.cdy Binary files differindex e4425893ccf..7a86dd848de 100644 --- a/Master/texmf-dist/scripts/ketcindy/template0.cdy +++ b/Master/texmf-dist/scripts/ketcindy/template0.cdy diff --git a/Master/texmf-dist/scripts/ketcindy/template1basic.cdy b/Master/texmf-dist/scripts/ketcindy/template1basic.cdy Binary files differindex b75f05615c1..367a6beefe2 100644 --- a/Master/texmf-dist/scripts/ketcindy/template1basic.cdy +++ b/Master/texmf-dist/scripts/ketcindy/template1basic.cdy diff --git a/Master/texmf-dist/scripts/ketcindy/template2slide.cdy b/Master/texmf-dist/scripts/ketcindy/template2slide.cdy Binary files differdeleted file mode 100644 index 5b518f9f9e3..00000000000 --- a/Master/texmf-dist/scripts/ketcindy/template2slide.cdy +++ /dev/null diff --git a/Master/texmf-dist/scripts/ketcindy/template3Dfigure.cdy b/Master/texmf-dist/scripts/ketcindy/template3Dfigure.cdy Binary files differindex ec10c6f34e5..daf0cf639f2 100644 --- a/Master/texmf-dist/scripts/ketcindy/template3Dfigure.cdy +++ b/Master/texmf-dist/scripts/ketcindy/template3Dfigure.cdy diff --git a/Master/texmf-dist/scripts/ketcindy/template4ketcindyjs.cdy b/Master/texmf-dist/scripts/ketcindy/template4ketcindyjs.cdy Binary files differindex da71001ab72..eb7ee2d1c41 100644 --- a/Master/texmf-dist/scripts/ketcindy/template4ketcindyjs.cdy +++ b/Master/texmf-dist/scripts/ketcindy/template4ketcindyjs.cdy |