texlive[72555] Master: sunpath (15oct24)
commits+karl at tug.org
commits+karl at tug.org
Tue Oct 15 22:08:49 CEST 2024
Revision: 72555
https://tug.org/svn/texlive?view=revision&revision=72555
Author: karl
Date: 2024-10-15 22:08:49 +0200 (Tue, 15 Oct 2024)
Log Message:
-----------
sunpath (15oct24)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/sunpath/
trunk/Master/texmf-dist/doc/latex/sunpath/README.md
trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.article.pdf
trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.article.tex
trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.demo.pdf
trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.demo.tex
trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.pdf
trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.scrartcl.pdf
trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.scrartcl.tex
trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.tex
trunk/Master/texmf-dist/source/latex/sunpath/
trunk/Master/texmf-dist/source/latex/sunpath/sunpath.dtx
trunk/Master/texmf-dist/source/latex/sunpath/sunpath.ins
trunk/Master/texmf-dist/tex/latex/sunpath/
trunk/Master/texmf-dist/tex/latex/sunpath/sunpath.sty
trunk/Master/tlpkg/tlpsrc/sunpath.tlpsrc
Added: trunk/Master/texmf-dist/doc/latex/sunpath/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/README.md 2024-10-15 20:08:49 UTC (rev 72555)
@@ -0,0 +1,56 @@
+# `sunpath` -- Draw Sun Path #
+
+
+(C) 2019 Hồng-Phúc Bùi
+
+
+
+
+## Licence ##
+
+
+This package may be distributed and/or modified under the conditions of the
+LaTeX Project Public License (LPPL), either version 1.3c of this
+License or any later version. The latest version
+of this license is in the file https://www.latex-project.org/lppl.txt
+
+## Build and Install (for Distributor) ##
+
+
+* To build the style file `sunpath.sty` just run **one** of
+
+```
+latex sunpath.ins
+pdflatex sunpath.ins
+xelatex sunpath.ins
+lualatex sunpath.ins
+```
+
+then you can copy `sunpath.sty` to your local `texmf` tree, where latex can find it.
+
+* To create PDF Document manual you must use `lualatex` via `l3build doc`:
+
+```
+l3build doc
+```
+
+You also need the TikZ-library hobby to create the curve.
+
+```
+\usetikzlibrary{hobby}
+```
+
+(`lualatex` because of my name, really ego right! It needs unicode to be typeset correctly.)
+
+## Development ##
+
+
+I try to use latex3 as much as posible. You can use
+
+```
+l3build doc
+```
+
+to create the style file and documentation files at once. You can also (like I also do) use `make`
+to call repeatly tasks.
+
Property changes on: trunk/Master/texmf-dist/doc/latex/sunpath/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.article.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.article.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.article.pdf 2024-10-15 20:08:12 UTC (rev 72554)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.article.pdf 2024-10-15 20:08:49 UTC (rev 72555)
Property changes on: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.article.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.article.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.article.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.article.tex 2024-10-15 20:08:49 UTC (rev 72555)
@@ -0,0 +1,39 @@
+\documentclass{article}
+
+\usepackage{fontspec}
+\usepackage{luaotfload}
+\usepackage{tikz}
+\usepackage{graphicx}
+\usepackage{float}
+
+\usepackage{sunpath}
+
+\usetikzlibrary{hobby} % this library let one connect points to curve.
+
+\newcommand{\TikZ}{Ti\textit{k}Z}
+
+\title{
+ \textsf{sunpath} -- Draw Sun Path\\
+ (Test Compatibility only)
+}%
+%
+\author{%
+ Hồng-Phúc Bùi%
+}
+
+
+
+\begin{document}
+%
+\parindent0pt
+%
+\maketitle
+\tableofcontents
+
+\section{Object}
+
+This file tests if this package can be used within a \texttt{article} class.
+
+\input{sunpath.docpart.tex}
+
+\end{document}
Property changes on: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.article.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.demo.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.demo.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.demo.pdf 2024-10-15 20:08:12 UTC (rev 72554)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.demo.pdf 2024-10-15 20:08:49 UTC (rev 72555)
Property changes on: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.demo.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.demo.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.demo.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.demo.tex 2024-10-15 20:08:49 UTC (rev 72555)
@@ -0,0 +1,119 @@
+\documentclass[DIV=11]{scrartcl}
+%\documentclass{ltxdoc}
+
+\usepackage{fontspec}
+\usepackage{sunpath}
+\usetikzlibrary{hobby}
+
+\usepackage{hyperref}
+
+%\GetFileInfo{sunpath.sty}
+%
+\title{
+% \pkg{sunpath} -- Draw Sun Path
+% \thanks{This file describes \fileversion,
+% last revised \filedate.}\\[1ex]
+% \normalsize{Reference}
+}
+%
+\author{
+ Hồng-Phúc Bùi
+ \thanks{
+ E-mail:
+ \href{mailto:Hồng-Phúc Bùi}
+ {hong-phuc.bui (at) htwsaar dot de}
+ }
+}
+
+%\date{Released \filedate}
+%
+% \parindent0pt
+%
+% \maketitle
+% \tableofcontents
+
+\begin{document}
+
+\maketitle
+\tableofcontents
+
+\section{Document}
+
+\begin{tikzpicture}
+\drawcrosshair;
+\drawaltitudecircle{{0,10,...,80,85}}
+\drawazimuthline{{0,10,...,360}}{85}{70}
+\drawazimuthline{{0,5,...,360}}{80}{0}
+
+\drawazimuthtick
+
+\drawgeodirection
+\drawaltitudelabel{{10,20,...,80,85}}
+\drawazimuthlabel{{0,15,...,350}}
+
+\path[fill=red,draw=red] (sunpath cs:azi=150,alt=35) circle[radius=1pt];
+
+\draw[] (sunpath cs:alt=66,azi=105) -- (sunpath cs:alt=66,azi=250);
+
+\end{tikzpicture}
+
+
+\begin{tikzpicture}[spradius=6,altitude projection=equidistance]
+\drawaltitudecircle{{0,10,...,80}}
+
+\drawazimuthline{{0,10,...,360}}{80}{0}
+
+\drawazimuthtick
+
+\drawgeodirection
+\drawaltitudelabel{{10,20,...,80}}
+\drawazimuthlabel{{0,15,...,350}}
+\end{tikzpicture}
+
+
+\begin{tikzpicture}[spradius=6]
+\tikzset{
+ sun path curve/.style={draw=red!20,thick},
+ sun point/.style={radius=2pt,draw=red,fill=red},
+ sun label/.style={below,fill=white,outer sep=4pt,text=red},
+}
+\drawcrosshair
+\drawaltitudecircle{{0,10,...,80,85}}
+\drawazimuthline{{0,10,...,360}}{85}{70}
+\drawazimuthline{{0,5,...,360}}{80}{0}
+\drawazimuthtick
+
+\coordinate (P0) at (sunpath cs:azi=98.968673,alt=-0.208672);
+\coordinate (P1) at (sunpath cs:azi=102.009695,alt=2.035492);
+\coordinate (P2) at (sunpath cs:azi=126.513583,alt=19.499874);
+\coordinate (P3) at (sunpath cs:azi=156.854847,alt=31.593335);
+\coordinate (P4) at (sunpath cs:azi=192.292832,alt=33.425294);
+\coordinate (P5) at (sunpath cs:azi=224.708002,alt=24.034984);
+\coordinate (P6) at (sunpath cs:azi=250.626597,alt=7.619801);
+\coordinate (P7) at (sunpath cs:azi=260.810553,alt=-0.244637);
+\path[sun point] (P0) circle;
+\path[sun point] (P1) circle;
+\path[sun point] (P2) circle;
+\path[sun point] (P3) circle;
+\path[sun point] (P4) circle;
+\path[sun point] (P5) circle;
+\path[sun point] (P6) circle;
+\path[sun point] (P7) circle;
+\node[sun label,anchor=270-98.968673] at (P0) {07:44};
+\node[sun label,anchor=270-102.009695] at (P1) {08:00};
+\node[sun label,anchor=270-126.513583] at (P2) {10:00};
+\node[sun label,anchor=270-156.854847] at (P3) {12:00};
+\node[sun label,anchor=270-192.292832] at (P4) {14:00};
+\node[sun label,anchor=270-224.708002] at (P5) {16:00};
+\node[sun label,anchor=270-250.626597] at (P6) {18:00};
+\node[sun label,anchor=270-260.810553] at (P7) {18:53};
+\path[sun path curve] (P0) to [curve through={ (P1) .. (P2) .. (P3) .. (P4) .. (P5) .. (P6) }] (P7) ;
+
+\drawaltitudelabel[175]{{10,20,...,80,85}}
+\drawazimuthlabel{{0,15,...,350}}
+\drawgeodirection
+\end{tikzpicture}
+
+
+\end{document}
+
Property changes on: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.demo.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.pdf 2024-10-15 20:08:12 UTC (rev 72554)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.pdf 2024-10-15 20:08:49 UTC (rev 72555)
Property changes on: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.scrartcl.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.scrartcl.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.scrartcl.pdf 2024-10-15 20:08:12 UTC (rev 72554)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.scrartcl.pdf 2024-10-15 20:08:49 UTC (rev 72555)
Property changes on: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.scrartcl.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.scrartcl.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.scrartcl.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.scrartcl.tex 2024-10-15 20:08:49 UTC (rev 72555)
@@ -0,0 +1,39 @@
+\documentclass{scrartcl}
+
+\usepackage{fontspec}
+\usepackage{luaotfload}
+\usepackage{tikz}
+\usepackage{graphicx}
+\usepackage{float}
+
+\usepackage{sunpath}
+
+\usetikzlibrary{hobby} % this library let one connect points to curve.
+
+\newcommand{\TikZ}{Ti\textit{k}Z}
+
+\title{
+ \textsf{sunpath} -- Draw Sun Path\\
+ (Test Compatibility only)
+}%
+%
+\author{%
+ Hồng-Phúc Bùi%
+}
+
+
+
+\begin{document}
+%
+\parindent0pt
+%
+\maketitle
+\tableofcontents
+
+\section{Object}
+
+This file tests if this package can be used within a \texttt{scrartcl} class.
+
+\input{sunpath.docpart.tex}
+
+\end{document}
Property changes on: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.scrartcl.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.tex 2024-10-15 20:08:49 UTC (rev 72555)
@@ -0,0 +1,59 @@
+% main document
+% separated from dtx, sothat there is no unrelated things in the dtx itselft, but only code and comment for package
+
+\documentclass[full]{ltxdoc}
+
+\usepackage{fontspec}
+\usepackage{luaotfload}
+\usepackage{tikz}
+\usepackage{graphicx}
+\usepackage{float}
+
+\usepackage{sunpath}
+
+\usetikzlibrary{hobby} % this library let one connect points to curve.
+
+\newcommand{\TikZ}{Ti\textit{k}Z}
+
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+
+\GetFileInfo{\jobname.sty}
+%
+\title{
+ \pkg{sunpath} -- Draw Sun Path%
+ \thanks{This file describes \fileversion, %
+ last revised \filedate.}\\[1ex]%
+ \normalsize{Reference}%
+}%
+%
+\author{%
+ Hồng-Phúc Bùi%
+ \thanks{%
+ E-mail:
+ \href{mailto:Hồng-Phúc Bùi}
+ {hong-phuc.bui (at) htwsaar dot de}%
+ }%
+}
+%
+\date{Released \filedate}
+
+
+\begin{document}
+%
+\parindent0pt
+%
+\maketitle
+\tableofcontents
+
+
+\input{sunpath.docpart.tex}
+
+
+% get the document about implementation inside main document
+\DocInput{\jobname.dtx}
+
+\PrintChanges
+\PrintIndex
+\end{document}
Property changes on: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/sunpath/sunpath.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/sunpath/sunpath.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/sunpath/sunpath.dtx 2024-10-15 20:08:49 UTC (rev 72555)
@@ -0,0 +1,261 @@
+% \iffalse meta-comment
+%
+% File: sunpath.dtx Copyright (C) 2019 Hong-Phuc Bui
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% https://www.latex-project.org/lppl.txt
+%
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/hpb-htw/sunpath
+%
+% for those people who are interested.
+%
+% -----------------------------------------------------------------------
+% \fi
+%
+% \iffalse
+%<package>\NeedsTeXFormat{LaTeX2e}[2018/12/01]
+%<package>\ProvidesPackage{sunpath}[2024/10/10 v0.1-Alpha Draw Sun Path]
+% \fi
+
+% \changes{v0.1-Alpha}
+% {2024/10/10}
+% {Initial implementation}
+
+
+% \section{Implementation}
+%
+% \subsection{Package Dependenies}
+%
+% \begin{macrocode}
+\RequirePackage{expl3}
+\RequirePackage{tikz}
+% \end{macrocode}
+%
+% Load necsessary \texttt{tikz}-libraries.
+% \begin{macrocode}
+\usetikzlibrary{calc,math,through}
+% \end{macrocode}
+
+
+
+
+% \subsection{\texttt{tikz}-Options for the new coordinate system}
+% Setup options for tikzpicture environment.
+% \DescribeMacro{spradius} The radius of the 0° Altitude circle, default 5.5.
+% This value can be accessed via macro \verb:\spradius:.
+%
+% \DescribeMacro{altitude projection}
+% How the altitude of the sun is "projected" on the sunpath diagram.
+% Valid values are \texttt{spherical} and \texttt{equidistance}.
+% Its default value is \texttt{spherical}.
+%
+% This value can be accessed via macro \verb:\sprojection:.
+
+% These options can be used like
+%
+% \begin{verbatim}
+% \begin{tikzpicture}[spradius=6,altitude projection=equidistance]
+% \coordinate (sunrise) at (sunpath cs:azi=105, alt=66.6);
+% \end{tikzpicture}
+% \end{verbatim}
+%
+% \begin{macrocode}
+\pgfkeys{/tikz/.cd,
+ spradius/.store in=\spradius,
+ spradius=5.5,
+ altitude projection/.store in = \spprojection,
+ altitude projection=spherical
+}
+% \end{macrocode}
+%
+
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{Define the new coordinate system \texttt{sunpath}}
+\makeatletter
+
+% \subsubsection{Azimuth and altitude}
+% Define component \texttt{azi} (=Azimuth angle) and \texttt{alt} (=Altidude angle) for the coordinate system \texttt{sunpath}.
+% \begin{macrocode}
+\tikzset{
+ cs/azi/.store in=\tikz at cs@azi,
+ cs/alt/.store in=\tikz at cs@alt,
+}
+% \end{macrocode}
+
+
+% \subsubsection{Projection functions}
+% Funtions to map the atitude of the sun to the altitude value on the sun path diagram.
+%
+% \DescribeMacro{spherical}
+% maps an altitude angle $\theta$ to the altitude radius on the diagram with the function
+% \[s (\theta) = r \cos(\theta). \]
+%
+% \DescribeMacro{equidistance}
+% maps an altitude angle $\theta$ to the altitude radius on the diagram with the function
+% \[e (\theta) = r - r\cdot \frac{\theta}{90}. \]
+%
+% \DescribeMacro{altradius}
+% this function is used in the coordinate system \texttt{sunpath} to determinate the altitude
+% radius of an azimuth angle on the sun path chart.
+% It depends on the value of the option \verb:altitude projection:.
+%
+%
+% \DescribeMacro{aziangle}
+% maps the azimuth angle $\Phi$ to the azimuth angle on the diagram with the function
+% \[ a(\Phi) = 90 - \Phi. \]
+% \begin{macrocode}
+\tikzset{
+ declare function = {
+ spherical(\alt) = \spradius * cos(\alt);
+ equidistance(\alt) = \spradius - \spradius*\alt/90;
+ altradius(\alt) = \spprojection(\alt);
+ aziangle(\x) = 90 - \x;
+ }
+}
+% \end{macrocode}
+%
+
+
+% \subsubsection{Coordinate system \texttt{sunpath}}
+% \begin{macrocode}
+\tikzdeclarecoordinatesystem{sunpath}%
+{
+ \tikzset{cs/.cd,azi=0,alt=0,#1}
+ \tikzmath{
+ \r = altradius(\tikz at cs@alt);
+ \angle = aziangle(\tikz at cs@azi);
+ }
+ \pgfpointadd{\pgfpointxy{0}{0}}{%
+ \pgfpointpolarxy{\angle}{\r}
+ }
+}
+% \end{macrocode}
+\makeatother
+
+
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{Setup optical options for sunpath diagram}
+% \begin{macrocode}
+\tikzset{
+ sunpath grid/.style={help lines,color=blue!45!white!80},
+ sunpath tick/.style={draw,thick,color=blue!90!white!80},
+ sunpath minor tick/.style={draw,thin,color=blue!90!white!80},
+ altitude label/.style={
+ font=\footnotesize\sffamily,
+ fill=white,minimum width={width("90")+2pt},
+ inner sep=0.5pt
+ },
+ azimuth label/.style={
+ font=\footnotesize\sffamily,
+ minimum width={width("360")+2pt},
+ inner sep=0.5pt
+ },
+}
+% \end{macrocode}
+%
+%
+% \subsection{Expose some commands for end-user}
+% \begin{macrocode}
+\NewDocumentCommand\drawcrosshair{}{
+ \draw[sunpath grid] (-\spradius,0) -- (\spradius,0);
+ \draw[sunpath grid] (0,-\spradius) -- (0,\spradius);
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand\drawgeodirection{}{
+ \foreach \dname / \dgrad in {N/0, E/90, S/180, W/270}{
+ \tikzmath{
+ \polarangle = aziangle(\dgrad);
+ }
+ \coordinate (D) at (\polarangle:\spradius cm + 22pt);
+ \node[anchor=270-\dgrad] at (D) {\dname};
+ };
+}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\NewDocumentCommand\drawaltitudecircle{m}{
+ \foreach \altitude in #1 {
+ \coordinate (A) at (sunpath cs:azi=0,alt=\altitude) ;
+ \path[draw,sunpath grid] (0,0) circle[radius=altradius(\altitude)];
+ }
+}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\NewDocumentCommand\drawaltitudelabel{O{135}m}{
+ \foreach \altitude in #2 {
+ \coordinate (A) at (sunpath cs:azi=#1,alt=\altitude) ;
+ \node [anchor=east,altitude label] at (A) {\altitude};
+ }
+}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\NewDocumentCommand\drawazimuthlabel{m}{
+ \foreach \azimuth in #1 {
+ \tikzmath{
+ \polarangle = aziangle(\azimuth);
+ }
+ \coordinate (D) at (\polarangle:\spradius cm + 13pt);
+ \node[azimuth label] at (D) {\azimuth};
+ }
+}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\NewDocumentCommand\drawazimuthline{m m m}{
+ \foreach \azimuth in #1{
+ \draw[sunpath grid] (sunpath cs:azi=\azimuth,alt={#2}) -- (sunpath cs:azi=\azimuth,alt={#3});
+ }
+}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\NewDocumentCommand\drawazimuthtick{}{
+ \foreach \azimuth in {10,20,...,360}{
+ \tikzmath{
+ \pa = aziangle(\azimuth);
+ }
+ \path[sunpath tick] (\pa:\spradius) -- (\pa:{\spradius cm+6pt});
+ }
+
+ \foreach \azimuth in {1,2,...,360}{
+ \tikzmath{
+ \pa = aziangle(\azimuth);
+ }
+ \path[sunpath minor tick] (\pa:\spradius) -- (\pa:{\spradius cm+2.5pt});
+ }
+
+ \foreach \azimuth in {15,30,...,360}{
+ \tikzmath{
+ \pa = aziangle(\azimuth);
+ }
+ \path[sunpath minor tick] (\pa:\spradius) -- (\pa:{\spradius cm+5pt});
+ }
+}
+% \end{macrocode}
+%
+%
+%%%%%%%%%%%%%%
+\endinput
+%%%%%%%%%%%%%%
+
+
Property changes on: trunk/Master/texmf-dist/source/latex/sunpath/sunpath.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/sunpath/sunpath.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/sunpath/sunpath.ins (rev 0)
+++ trunk/Master/texmf-dist/source/latex/sunpath/sunpath.ins 2024-10-15 20:08:49 UTC (rev 72555)
@@ -0,0 +1,62 @@
+\iffalse meta-comment
+
+File: sunpath.ins Copyright (C) 2024 by Hong-Phuc Bui
+
+It may be distributed and/or modified under the conditions of the
+LaTeX Project Public License (LPPL), either version 1.3c of this
+license or (at your option) any later version. The latest version
+of this license is in the file
+
+ https://www.latex-project.org/lppl.txt
+
+
+The released version of this bundle is available from CTAN.
+
+-----------------------------------------------------------------------
+
+The development version of the bundle can be found at
+
+ https://github.com/hpb-htw/sunpath
+
+for those people who are interested.
+
+-----------------------------------------------------------------------
+
+\fi
+
+\input l3docstrip.tex
+\askforoverwritefalse
+\usedir{tex/latex/sunpath}
+% stop DocStrip adding rather wordy text
+\preamble
+\endpreamble
+\postamble
+Copyright (C) 2024 by
+ Hong-Phuc Bui
+
+It may be distributed and/or modified under the conditions of
+the LaTeX Project Public License (LPPL), either version 1.3c of
+this license or (at your option) any later version. The latest
+version of this license is in the file:
+
+ https://www.latex-project.org/lppl.txt
+
+
+This work consists of the files sunpath.dtx,
+ sunpath.ins,
+ and the derived files sunpath.pdf,
+ sunpath.sty.
+
+\endpostamble
+
+\keepsilent
+
+\generate {%
+ \file{sunpath.sty} {%
+ \from{sunpath.dtx}{package}
+ }
+}
+
+\endbatchfile
+
+
Added: trunk/Master/texmf-dist/tex/latex/sunpath/sunpath.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/sunpath/sunpath.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/sunpath/sunpath.sty 2024-10-15 20:08:49 UTC (rev 72555)
@@ -0,0 +1,148 @@
+%%
+%% This is file `sunpath.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% sunpath.dtx (with options: `package')
+%%
+\NeedsTeXFormat{LaTeX2e}[2018/12/01]
+\ProvidesPackage{sunpath}[2024/10/10 v0.1-Alpha Draw Sun Path]
+
+
+\RequirePackage{expl3}
+\RequirePackage{tikz}
+\usetikzlibrary{calc,math,through}
+
+
+\pgfkeys{/tikz/.cd,
+ spradius/.store in=\spradius,
+ spradius=5.5,
+ altitude projection/.store in = \spprojection,
+ altitude projection=spherical
+}
+
+\makeatletter
+
+\tikzset{
+ cs/azi/.store in=\tikz at cs@azi,
+ cs/alt/.store in=\tikz at cs@alt,
+}
+
+\tikzset{
+ declare function = {
+ spherical(\alt) = \spradius * cos(\alt);
+ equidistance(\alt) = \spradius - \spradius*\alt/90;
+ altradius(\alt) = \spprojection(\alt);
+ aziangle(\x) = 90 - \x;
+ }
+}
+
+\tikzdeclarecoordinatesystem{sunpath}%
+{
+ \tikzset{cs/.cd,azi=0,alt=0,#1}
+ \tikzmath{
+ \r = altradius(\tikz at cs@alt);
+ \angle = aziangle(\tikz at cs@azi);
+ }
+ \pgfpointadd{\pgfpointxy{0}{0}}{%
+ \pgfpointpolarxy{\angle}{\r}
+ }
+}
+\makeatother
+
+\tikzset{
+ sunpath grid/.style={help lines,color=blue!45!white!80},
+ sunpath tick/.style={draw,thick,color=blue!90!white!80},
+ sunpath minor tick/.style={draw,thin,color=blue!90!white!80},
+ altitude label/.style={
+ font=\footnotesize\sffamily,
+ fill=white,minimum width={width("90")+2pt},
+ inner sep=0.5pt
+ },
+ azimuth label/.style={
+ font=\footnotesize\sffamily,
+ minimum width={width("360")+2pt},
+ inner sep=0.5pt
+ },
+}
+\NewDocumentCommand\drawcrosshair{}{
+ \draw[sunpath grid] (-\spradius,0) -- (\spradius,0);
+ \draw[sunpath grid] (0,-\spradius) -- (0,\spradius);
+}
+\NewDocumentCommand\drawgeodirection{}{
+ \foreach \dname / \dgrad in {N/0, E/90, S/180, W/270}{
+ \tikzmath{
+ \polarangle = aziangle(\dgrad);
+ }
+ \coordinate (D) at (\polarangle:\spradius cm + 22pt);
+ \node[anchor=270-\dgrad] at (D) {\dname};
+ };
+}
+\NewDocumentCommand\drawaltitudecircle{m}{
+ \foreach \altitude in #1 {
+ \coordinate (A) at (sunpath cs:azi=0,alt=\altitude) ;
+ \path[draw,sunpath grid] (0,0) circle[radius=altradius(\altitude)];
+ }
+}
+\NewDocumentCommand\drawaltitudelabel{O{135}m}{
+ \foreach \altitude in #2 {
+ \coordinate (A) at (sunpath cs:azi=#1,alt=\altitude) ;
+ \node [anchor=east,altitude label] at (A) {\altitude};
+ }
+}
+\NewDocumentCommand\drawazimuthlabel{m}{
+ \foreach \azimuth in #1 {
+ \tikzmath{
+ \polarangle = aziangle(\azimuth);
+ }
+ \coordinate (D) at (\polarangle:\spradius cm + 13pt);
+ \node[azimuth label] at (D) {\azimuth};
+ }
+}
+\NewDocumentCommand\drawazimuthline{m m m}{
+ \foreach \azimuth in #1{
+ \draw[sunpath grid] (sunpath cs:azi=\azimuth,alt={#2}) -- (sunpath cs:azi=\azimuth,alt={#3});
+ }
+}
+\NewDocumentCommand\drawazimuthtick{}{
+ \foreach \azimuth in {10,20,...,360}{
+ \tikzmath{
+ \pa = aziangle(\azimuth);
+ }
+ \path[sunpath tick] (\pa:\spradius) -- (\pa:{\spradius cm+6pt});
+ }
+
+ \foreach \azimuth in {1,2,...,360}{
+ \tikzmath{
+ \pa = aziangle(\azimuth);
+ }
+ \path[sunpath minor tick] (\pa:\spradius) -- (\pa:{\spradius cm+2.5pt});
+ }
+
+ \foreach \azimuth in {15,30,...,360}{
+ \tikzmath{
+ \pa = aziangle(\azimuth);
+ }
+ \path[sunpath minor tick] (\pa:\spradius) -- (\pa:{\spradius cm+5pt});
+ }
+}
+%%%%%%%%%%%%%%
+%% Copyright (C) 2024 by
+%% Hong-Phuc Bui
+%%
+%% It may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License (LPPL), either version 1.3c of
+%% this license or (at your option) any later version. The latest
+%% version of this license is in the file:
+%%
+%% https://www.latex-project.org/lppl.txt
+%%
+%%
+%% This work consists of the files sunpath.dtx,
+%% sunpath.ins,
+%% and the derived files sunpath.pdf,
+%% sunpath.sty.
+%%
+%%
+%% End of file `sunpath.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/sunpath/sunpath.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2024-10-15 20:08:12 UTC (rev 72554)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2024-10-15 20:08:49 UTC (rev 72555)
@@ -809,7 +809,7 @@
subdocs subdepth subeqn subeqnarray
subfig subfigmat subfigure subfiles subfloat substances
substr subsupscripts subtext
- sudoku sudokubundle suftesi sugconf
+ sudoku sudokubundle suftesi sugconf sunpath
superiors supertabular suppose susy svg svg-inkscape svgcolor
svn svn-multi svn-prov svninfo svrsymbols
swebib swfigure swimgraf swrule swungdash syllogism
Modified: trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc 2024-10-15 20:08:12 UTC (rev 72554)
+++ trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc 2024-10-15 20:08:49 UTC (rev 72555)
@@ -170,6 +170,7 @@
depend spath3
depend spectralsequences
depend strands
+depend sunpath
depend swimgraf
depend syntaxdi
depend table-fct
Added: trunk/Master/tlpkg/tlpsrc/sunpath.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list.