texlive[72564] Master/texmf-dist: sunpath (16oct24)
commits+karl at tug.org
commits+karl at tug.org
Wed Oct 16 21:32:10 CEST 2024
Revision: 72564
https://tug.org/svn/texlive?view=revision&revision=72564
Author: karl
Date: 2024-10-16 21:32:09 +0200 (Wed, 16 Oct 2024)
Log Message:
-----------
sunpath (16oct24)
Modified Paths:
--------------
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.pdf
trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.scrartcl.pdf
trunk/Master/texmf-dist/source/latex/sunpath/sunpath.dtx
trunk/Master/texmf-dist/tex/latex/sunpath/sunpath.sty
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/sunpath/horizontal-coordinate.pdf
trunk/Master/texmf-dist/doc/latex/sunpath/horizontal-coordinate.tex
trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.docpart.tex
trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.equidistance.pdf
trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.equidistance.tex
trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.spherical.pdf
trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.spherical.tex
trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.track.pdf
trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.track.tex
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.demo.pdf
trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.demo.tex
Modified: trunk/Master/texmf-dist/doc/latex/sunpath/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/README.md 2024-10-16 19:31:21 UTC (rev 72563)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/README.md 2024-10-16 19:32:09 UTC (rev 72564)
@@ -1,11 +1,15 @@
# `sunpath` -- Draw Sun Path #
-(C) 2019 Hồng-Phúc Bùi
+(C) 2024 Hồng-Phúc Bùi
+## Description ##
+This package provides tool to draw a sunpath chart like this:
+![sunpath chart](https://raw.githubusercontent.com/hpb-htw/sunpath/refs/heads/master/sunpath.track.svg)
+
## Licence ##
Added: trunk/Master/texmf-dist/doc/latex/sunpath/horizontal-coordinate.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/sunpath/horizontal-coordinate.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/horizontal-coordinate.pdf 2024-10-16 19:31:21 UTC (rev 72563)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/horizontal-coordinate.pdf 2024-10-16 19:32:09 UTC (rev 72564)
Property changes on: trunk/Master/texmf-dist/doc/latex/sunpath/horizontal-coordinate.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/sunpath/horizontal-coordinate.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/horizontal-coordinate.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/horizontal-coordinate.tex 2024-10-16 19:32:09 UTC (rev 72564)
@@ -0,0 +1,183 @@
+\documentclass[tikz]{standalone}
+
+\usepackage{fontspec}
+\usepackage{mathtools}
+\usepackage{unicode-math}
+\usepackage{siunitx}
+
+\newcommand{\az}{\ensuremath{\Phi}}
+\newcommand{\el}{\ensuremath{\theta}}
+
+% Tikz Style
+\usepackage{tikz}
+
+\usetikzlibrary{decorations.markings}
+\usetikzlibrary{arrows.meta}
+
+\usepackage{pgfplots}
+\pgfplotsset{
+ compat=1.18
+ ,width=15cm
+ ,lua debug
+}
+
+\definecolor{celestial}{rgb}{1,0,1}%{0.0, 0.51, 0.5}
+\definecolor{elevation}{rgb}{0,1,0}%{0.6, 0.4, 0.8}
+\definecolor{horizon}{rgb}{0,0,1}%{0.54, 0.81, 0.94}
+\definecolor{sun}{rgb}{0.83, 0.0, 0.25}
+
+\tikzstyle{help circle} = [dashed, thick]
+\tikzstyle{coordinate curve} = [ultra thick]
+\tikzstyle{sun position} = [color=sun,ultra thick]
+\tikzstyle{navi direction} = [font=\sffamily\Large]
+\tikzstyle{coordinate angle} = [font=\Large]
+\tikzstyle{base plane} = [font=\sffamily]
+
+\begin{document}
+\begin{tikzpicture}
+\begin{axis}[view={5}{5}
+ ,axis lines=none,
+ ,plot box ratio={1 1 1}
+ ,xlabel=$x$
+ ,ylabel=$y$
+ ,zlabel=$z$
+ ,xmin=-1.4
+ ,xmax=1.4
+% ,ymin=-1.2
+% ,ymax=1.2
+% ,zmin=-1.2
+% ,zmax=1.2
+ ,declare function={
+% Sun position
+ azimuth=-110; % Positive = westward from north
+ elevation = 65; % Positive = from Horizon to Zenith
+ sunx = cos(azimuth)*cos(elevation);
+ suny = sin(azimuth)*cos(elevation);
+ sunz = sin(elevation);
+% Text Az coordinates
+ textazx = cos(3/5*azimuth);
+ textazy = sin(3/5*azimuth);
+ textazz = 0;
+% Text El coordinates
+ textelx = cos(azimuth)*cos(elevation/2);
+ textely = sin(azimuth)*cos(elevation/2);
+ textelz = sin(elevation/2);
+% Celestial Meridian
+ ucx = 1;
+ ucy = 0;
+ ucz = 0;
+%
+ vcx = 0;
+ vcy = 0;
+ vcz = 1;
+ celestialx(\t) = cos(\t)*ucx + sin(\t)*vcx;
+ celestialy(\t) = cos(\t)*ucy + sin(\t)*vcy;
+ celestialz(\t) = cos(\t)*ucz + sin(\t)*vcz;
+% Horizon => Azimut
+ uhx = 1;
+ uhy = 0;
+ uhz = 0;
+%
+ vhx = 0;
+ vhy = 1;
+ vhz = 0;
+ horizonx(\t) = cos(\t)*uhx + sin(\t)*vhx;
+ horizony(\t) = cos(\t)*uhy + sin(\t)*vhy;
+ horizonz(\t) = cos(\t)*uhz + sin(\t)*vhz;
+% Elevation
+ uex = cos(azimuth);
+ uey = sin(azimuth);
+ uez = 0;
+%
+ vex = 0;
+ vey = 0;
+ vez = 1;
+ elevationx(\t) = cos(\t)*uex + sin(\t)*vex;
+ elevationy(\t) = cos(\t)*uey + sin(\t)*vey;
+ elevationz(\t) = cos(\t)*uez + sin(\t)*vez;
+ }
+]
+%
+\draw[->] (0,0,0) -- (1.1,0,0) node[anchor=west,navi direction] {North};
+\draw[->] (0,0,0) -- (0,-1.5,0) node[anchor=north,navi direction] {East};
+\draw[->] (0,0,0) -- (0,0,1.1) node[anchor=south,navi direction] {Zenith};
+\node at ( 0.71, 0,0.71)[anchor=west,outer sep=1ex,base plane] {Meridian}; %0.71 app sqrt(2)/2
+\node at (-0.71, 0.71,0) [anchor=south,base plane] {Horizon};
+% Plot the Meridian through Nord
+\addplot3 [
+ domain=0:360,
+ samples=60,
+ samples y=1,
+ variable=t,
+ celestial,help circle
+] (
+ {celestialx(t)},
+ {celestialy(t)},
+ {celestialz(t)}
+);
+% Plot the horizon circle
+\addplot3 [
+ domain=0:360,
+ samples=60,
+ samples y=1,
+ variable=t,
+ horizon,help circle
+] (
+ {horizonx(t)},
+ {horizony(t)},
+ {horizonz(t)}
+);
+% Plot the azimuth curve
+\addplot3 [
+ domain=0:azimuth+0.5,
+ samples=60,
+ samples y=1,
+ variable=t,
+ horizon,coordinate curve,
+ postaction={decorate},
+ decoration={markings,
+ mark=at position 0.55 with {\arrow{Latex[round]}}
+ }
+] (
+ {horizonx(t)},
+ {horizony(t)},
+ {horizonz(t)}
+);
+% Plot the great circle through the sun
+\addplot3 [
+ domain=0:360,
+ samples=60,
+ samples y=1,
+ variable=t,
+ elevation,help circle
+] (
+ {elevationx(t)},
+ {elevationy(t)},
+ {elevationz(t)}
+);
+% Plot the elevation curve
+\addplot3 [
+ domain=0.5:elevation,
+ samples=60,
+ samples y=1,
+ variable=t,
+ elevation,coordinate curve,
+ postaction={decorate},
+ decoration={markings,
+ mark=at position 0.5 with {\arrow{Latex[round]}}
+ }
+] (
+ {elevationx(t)},
+ {elevationy(t)},
+ {elevationz(t)}
+) ;
+\draw [-{Latex[round]}, sun position] (0,0,0) -- (sunx, suny, sunz) node[anchor=south east,inner sep=0] {$\odot$};
+\draw [sun position, thin](0,0,0) -- (uex, uey, 0);
+\node at (textazx, textazy, textazz) [anchor=north,coordinate angle] {\az};
+\node at (textelx, textely, textelz) [anchor=east ,coordinate angle] {\el};
+\end{axis}
+\end{tikzpicture}
+
+\end{document}
+
+
Property changes on: trunk/Master/texmf-dist/doc/latex/sunpath/horizontal-coordinate.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.article.pdf
===================================================================
(Binary files differ)
Deleted: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.demo.pdf
===================================================================
(Binary files differ)
Deleted: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.demo.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.demo.tex 2024-10-16 19:31:21 UTC (rev 72563)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.demo.tex 2024-10-16 19:32:09 UTC (rev 72564)
@@ -1,119 +0,0 @@
-\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}
-
Added: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.docpart.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.docpart.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.docpart.tex 2024-10-16 19:32:09 UTC (rev 72564)
@@ -0,0 +1,402 @@
+\section{Documentation}
+
+\subsection{Context and Terms}
+The position of the sun from perspective of an observer is defined by two parameters:
+
+\begin{itemize}
+ \item the azimuth $\Phi$, which tells the observer, how far (in degree) he must turn around from the North direction,
+ \item the altitude $\theta$, which tells the observer, how height (in degree) about the horizon he must look to see the sun.
+\end{itemize}
+The azimuth can take a value in the interval $[0,360)$.
+The altitude can take a value in the interval $[0,90]$, whereas 0 is the horizon, 90 is the zenith.
+We do not care so much about how far is the sun, so we normalize this distance to 1.
+
+
+The figure~\ref{fig:hz-coordinate} shows these parameter.
+The coordinate system, which takes the position of the observer as the centre,
+and the observer's local horizon as the fundamental plane,
+is called horizontal coordinate system.\footnote{dt.: topozentrisches Koordinatensystem}
+
+\begin{figure}[H]
+\centering
+\includegraphics[scale=0.75]{horizontal-coordinate.pdf}
+\caption{Horizontal coordinate system}
+\label{fig:hz-coordinate}
+\end{figure}
+
+In this package, the cardinal points have specifics values of azimuth as following:
+
+\begin{tabular}{c c c c}
+North & East & South & West \\
+0° & 90° & 180° & 270°
+\end{tabular}
+
+
+The projection of the sun on the horizon plane is a point, which can be defined by two parameters:
+\begin{itemize}
+\item the angle $\Phi$,
+\item the distance $r = \cos(\theta)$ from the centre to the sun.
+\end{itemize}
+
+Figure~\ref{fig:sun-projection} shows the projection of the sun on the horizontal plane.
+If we track the position of sun on the horizontal plane changes from time to time, we will get a curve.
+This curve is called the sun path.
+A chart which shows position of the sun from time to time is called a sun path chart.
+Of course there are many type of sun path chart.
+This package provides tools to plot sun path on the horizontal plane.
+
+\begin{figure}[H]
+\centering
+\begin{tikzpicture}[spradius=3]
+\drawcrosshair;
+\drawaltitudecircle{{0}}
+%\drawazimuthline{{0,10,...,360}}{85}{70}
+%\drawazimuthline{{0,5,...,360}}{80}{0}
+
+%\drawazimuthtick
+
+\drawgeodirection
+%\drawaltitudelabel{{10,20,...,80,85}}
+%\drawazimuthlabel{{0,15,...,350}} ;
+
+\path[draw=red,fill=red](sunpath cs:azi=110,alt=66) circle[radius=2pt] ;
+\end{tikzpicture}
+\caption{Projection of the sun on the horizon plane}
+\label{fig:sun-projection}
+\end{figure}
+
+\subsection{Draw a Sun path chart}
+
+Figure~\ref{fig:sun-projection} is a very rudimentary sun path chart.
+There is neither scalar, nor time on the chart.
+A more usable Sun path chart may look like one in the figure~\ref{fig:full-sun-path-chart}.
+In this section we will create this chart.
+
+
+\begin{figure}[H]
+\centering
+\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[draw=red,fill=red](sunpath cs:azi=110,alt=66) circle[radius=2pt] node[below] {{9:30}};
+\end{tikzpicture}
+\caption{A Sun path chart}
+\label{fig:full-sun-path-chart}
+\end{figure}
+
+\subsubsection{Outlines}
+
+The chart is a \TikZ-picture, so we need a \texttt{tikzpicture}-environment.
+We can also customize the distance from the centre of the chart to the horizon line by setup the option \texttt{spradius}.
+By default it is 5.5 in PGF xy coordinate.
+In this example we make it a little bigger:
+
+\marginpar{\texttt{spradius}}
+\begin{verbatim}
+\begin{tikzpicture}[spradius=6]
+\end{tikzpicture}
+\end{verbatim}
+
+We also need the crosshair, the horizon line --in this chart it is a circle--,
+the fours geographic direction.
+This can be done by adding more commands into the \texttt{tikzpicture}
+
+\begin{verbatim}
+\begin{tikzpicture}[spradius=6]
+\drawcrosshair
+\drawaltitudecircle{{0}}
+\drawgeodirection
+\end{tikzpicture}
+\end{verbatim}
+
+\marginpar{\texttt{drawcrosshair\\ drawgeodirection\\ drawaltitudecircle}}
+\begin{tikzpicture}[spradius=6]
+\drawcrosshair
+\drawaltitudecircle{{0}}
+\drawgeodirection
+\end{tikzpicture}
+
+
+Man has to pay attention to the double curry brackets in the command \texttt{drawaltitudecircle}.
+The outer brackets delimit the argument of the command.
+The argument of the command is a valid \TikZ-range, which is used in a \verb:\foreach: command,
+so it has be placed in between a pair of curry bracket.
+That is the inner brackets.
+
+
+\subsubsection{Scalar and labels}
+
+
+As the name of the commando says, we can also draw more than the horizon line by adding some values of altitude in the range of the argument of the command \verb|\drawaltitudecircle|.
+For example \verb:\drawaltitudecircle{{0,10,...,80,85}}: draws 10 circles of altitude.
+
+\begin{verbatim}
+\begin{tikzpicture}[spradius=6]
+\drawcrosshair
+\drawaltitudecircle{{0,10,...,80,85}}
+\drawgeodirection
+\end{tikzpicture}
+\end{verbatim}
+
+\begin{tikzpicture}[spradius=6]
+\drawcrosshair
+\drawaltitudecircle{{0,10,...,80,85}}
+\drawgeodirection
+\end{tikzpicture}
+
+
+We can use the command \verb:\drawazumuthline{r}{h}{l}: to draw azimuth lines in range \verb:r:,
+from the higher altitude \verb:h: to the lower altitude \verb:l:.
+
+For example
+
+\begin{itemize}
+ \item \verb:\drawazimuthline{{0,10,...,360}}{85}{70}: draws every 10° azimuth from the 85° altitude to to 70° altitude.
+ \item \verb:\drawazimuthline{{0,5,...,360}}{80}{0}: draws every 5° azimuth from the 80° altitude to to 0° altitude.
+\end{itemize}
+
+\begin{verbatim}
+\begin{tikzpicture}[spradius=6]
+\drawcrosshair
+\drawaltitudecircle{{0,10,...,80,85}}
+\drawazimuthline{{0,10,...,360}}{85}{70}
+\drawazimuthline{{0,5,...,360}}{80}{0}
+
+\drawgeodirection
+\end{tikzpicture}
+\end{verbatim}
+
+\marginpar{\texttt{drawazimuthline}}
+\begin{tikzpicture}[spradius=6]
+\drawcrosshair
+\drawaltitudecircle{{0,10,...,80,85}}
+\drawazimuthline{{0,10,...,360}}{85}{70}
+\drawazimuthline{{0,5,...,360}}{80}{0}
+
+\drawgeodirection
+\end{tikzpicture}
+
+To draw azimuth ticks outside the horizon line, we can use
+\verb:\drawazimuthtick:.
+This command expects for now no argument.
+
+\begin{verbatim}
+\begin{tikzpicture}[spradius=6]
+\drawcrosshair
+\drawaltitudecircle{{0,10,...,80,85}}
+\drawazimuthline{{0,10,...,360}}{85}{70}
+\drawazimuthline{{0,5,...,360}}{80}{0}
+\drawazimuthtick
+
+\drawgeodirection
+\end{tikzpicture}
+\end{verbatim}
+
+\marginpar{\texttt{drawazimuthtick}}
+\begin{tikzpicture}[spradius=6]
+\drawcrosshair
+\drawaltitudecircle{{0,10,...,80,85}}
+\drawazimuthline{{0,10,...,360}}{85}{70}
+\drawazimuthline{{0,5,...,360}}{80}{0}
+\drawazimuthtick
+
+\drawgeodirection
+\end{tikzpicture}
+
+
+To draw labels of azimuth lines and altitude circles in the chart, we can use the commands
+
+\verb:\drawaltitudelabel{r}: and
+
+\verb:\drawazimuthlabel{r}:.
+
+\begin{tikzpicture}[spradius=6]
+\drawcrosshair
+\drawaltitudecircle{{0,10,...,80,85}}
+\drawazimuthline{{0,10,...,360}}{85}{70}
+\drawazimuthline{{0,5,...,360}}{80}{0}
+\drawazimuthtick
+
+\drawaltitudelabel{{10,20,...,80,85}}
+\drawazimuthlabel{{0,15,...,350}}
+\drawgeodirection
+\end{tikzpicture}
+
+That it's, now we have a nice chart, on which we can draw positions of the sun from time to time.
+
+\subsubsection{Position of the sun}
+
+We can easily plot the position of the sun in the chart with the coordinate \texttt{sunpath},
+if the azimuth and the altitude are given.
+For example, to plot the position of the sun with 150° Azimuth and 22° Altitude,
+we just use the \texttt{path} command as following:
+
+\verb|\path[fill=red,draw=red] (sunpath cs:azi=150,alt=22);|
+
+The result would be
+
+\begin{verbatim}
+% ...
+\path[fill=red,draw=red] (sunpath cs:azi=150,alt=35) circle[radius=2pt];
+\drawaltitudelabel[160]{{10,20,...,80,85}}
+% ...
+\end{verbatim}
+
+\marginpar{\texttt{sunpath cs}}
+\begin{tikzpicture}[spradius=6]
+\drawcrosshair
+\drawaltitudecircle{{0,10,...,80,85}}
+\drawazimuthline{{0,10,...,360}}{85}{70}
+\drawazimuthline{{0,5,...,360}}{80}{0}
+\drawazimuthtick
+
+\path[fill=red,draw=red] (sunpath cs:azi=150,alt=35) circle[radius=2pt];
+
+\drawaltitudelabel[160]{{10,20,...,80,85}}
+\drawazimuthlabel{{0,15,...,350}}
+\drawgeodirection
+\end{tikzpicture}
+
+The command \verb:\drawaltitudelabel: can also take an optional argument to set altitude label on other azimuth.
+This can be useful if the labels cover distract important points on chart.
+In this chart it is set to be 160°. So one can easily read the azimuth of the sun on the chart.
+
+We can also connect the position of the sun to a path, for example with the positions given in the following table
+
+{\ttfamily
+\begin{tabular}{c c c}
+Time & Azimuth & Altitude \\
+07:44 & 98.968673 & -0.208672 \\
+08:00 & 102.009695 & 2.035492 \\
+10:00 & 126.513583 & 19.499874 \\
+12:00 & 156.854847 & 31.593335 \\
+14:00 & 192.292832 & 33.425294 \\
+16:00 & 224.708002 & 24.034984 \\
+18:00 & 250.626597 & 7.619801 \\
+18:53 & 260.810553 & -0.244637 \\
+\end{tabular}
+}
+
+we can get a sun path like this:
+
+\begin{tikzpicture}[spradius=6]
+\tikzset{
+ sunpath curve/.style={draw,fill=red},
+ sunpath point/.style={radius=2pt,draw=red},
+ sunpath node/.style={below,inner sep=0.5pt,outer sep=4.5pt,fill=white}
+}
+\drawcrosshair
+\drawaltitudecircle{{0,10,...,80,85}}
+\drawazimuthline{{0,10,...,360}}{85}{70}
+\drawazimuthline{{0,5,...,360}}{80}{0}
+\drawazimuthtick
+
+\path[sunpath curve]
+ (sunpath cs:azi=98.968673,alt=-0.208672) circle[sunpath point] node[sunpath node]{ { 07:44 } }
+--(sunpath cs:azi=102.009695,alt=2.035492) circle[sunpath point] node[sunpath node]{ { 08:00 } }
+--(sunpath cs:azi=126.513583,alt=19.499874) circle[sunpath point] node[sunpath node]{ { 10:00 } }
+--(sunpath cs:azi=156.854847,alt=31.593335) circle[sunpath point] node[sunpath node]{ { 12:00 } }
+--(sunpath cs:azi=192.292832,alt=33.425294) circle[sunpath point] node[sunpath node]{ { 14:00 } }
+--(sunpath cs:azi=224.708002,alt=24.034984) circle[sunpath point] node[sunpath node]{ { 16:00 } }
+--(sunpath cs:azi=250.626597,alt=7.619801) circle[sunpath point] node[sunpath node]{ { 18:00 } }
+--(sunpath cs:azi=260.810553,alt=-0.244637) circle[sunpath point] node[sunpath node]{ { 18:53 } }
+;
+
+\drawaltitudelabel{{10,20,...,80,85}}
+\drawazimuthlabel{{0,15,...,350}}
+\drawgeodirection
+\end{tikzpicture}
+
+But this chart is not nice.
+If the data is machine readable, we can generate all stuffs of the chart automatically.
+This chart below is generated from the table above.
+Just use your favourite programming language to process sun data.
+
+\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[170]{{10,20,...,80,85}}
+\drawazimuthlabel{{0,15,...,350}}
+\drawgeodirection
+\end{tikzpicture}
+
+The part, which makes the chart nicer, is there:
+
+\begin{verbatim}
+%...
+\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) ;
+%...
+\end{verbatim}
+
+
Property changes on: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.docpart.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.equidistance.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.equidistance.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.equidistance.pdf 2024-10-16 19:31:21 UTC (rev 72563)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.equidistance.pdf 2024-10-16 19:32:09 UTC (rev 72564)
Property changes on: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.equidistance.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.equidistance.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.equidistance.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.equidistance.tex 2024-10-16 19:32:09 UTC (rev 72564)
@@ -0,0 +1,36 @@
+\documentclass{standalone}
+
+
+\usepackage{fontspec}
+\usepackage{sunpath}
+\usetikzlibrary{hobby}
+
+\usepackage{hyperref}
+
+
+\begin{document}
+\begin{tikzpicture}[spradius=6,altitude projection=equidistance]
+\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 (P3) at (sunpath cs:azi=156.854847,alt=31.593335);
+
+\path[sun point] (P3) circle;
+
+\node[sun label,anchor=270-156.854847] at (P3) {12:00};
+
+\drawaltitudelabel{{10,20,...,80,85}}
+\drawazimuthlabel{{0,15,...,350}}
+\drawgeodirection
+\end{tikzpicture}
+\end{document}
+
Property changes on: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.equidistance.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.scrartcl.pdf
===================================================================
(Binary files differ)
Added: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.spherical.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.spherical.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.spherical.pdf 2024-10-16 19:31:21 UTC (rev 72563)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.spherical.pdf 2024-10-16 19:32:09 UTC (rev 72564)
Property changes on: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.spherical.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.spherical.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.spherical.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.spherical.tex 2024-10-16 19:32:09 UTC (rev 72564)
@@ -0,0 +1,36 @@
+\documentclass{standalone}
+
+
+\usepackage{fontspec}
+\usepackage{sunpath}
+\usetikzlibrary{hobby}
+
+\usepackage{hyperref}
+
+
+\begin{document}
+\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 (P3) at (sunpath cs:azi=156.854847,alt=31.593335);
+
+\path[sun point] (P3) circle;
+
+\node[sun label,anchor=270-156.854847] at (P3) {12:00};
+
+\drawaltitudelabel{{10,20,...,80,85}}
+\drawazimuthlabel{{0,15,...,350}}
+\drawgeodirection
+\end{tikzpicture}
+\end{document}
+
Property changes on: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.spherical.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.track.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.track.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.track.pdf 2024-10-16 19:31:21 UTC (rev 72563)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.track.pdf 2024-10-16 19:32:09 UTC (rev 72564)
Property changes on: trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.track.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.track.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.track.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/sunpath/sunpath.track.tex 2024-10-16 19:32:09 UTC (rev 72564)
@@ -0,0 +1,55 @@
+\documentclass{standalone}
+
+
+\usepackage{fontspec}
+\usepackage{sunpath}
+\usetikzlibrary{hobby}
+
+\usepackage{hyperref}
+
+
+\begin{document}
+\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.track.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/sunpath/sunpath.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/sunpath/sunpath.dtx 2024-10-16 19:31:21 UTC (rev 72563)
+++ trunk/Master/texmf-dist/source/latex/sunpath/sunpath.dtx 2024-10-16 19:32:09 UTC (rev 72564)
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% File: sunpath.dtx Copyright (C) 2019 Hong-Phuc Bui
+% File: sunpath.dtx Copyright (C) 2024 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
@@ -23,9 +23,13 @@
%
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[2018/12/01]
-%<package>\ProvidesPackage{sunpath}[2024/10/10 v0.1-Alpha Draw Sun Path]
+%<package>\ProvidesPackage{sunpath}[2024/10/16 v0.2-Alpha Draw Sun Path]
% \fi
+% \changes{v0.2-Alpha}
+% {2024/10/16}
+% {Small fixes in README.md and document}
+%
% \changes{v0.1-Alpha}
% {2024/10/10}
% {Initial implementation}
Modified: trunk/Master/texmf-dist/tex/latex/sunpath/sunpath.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/sunpath/sunpath.sty 2024-10-16 19:31:21 UTC (rev 72563)
+++ trunk/Master/texmf-dist/tex/latex/sunpath/sunpath.sty 2024-10-16 19:32:09 UTC (rev 72564)
@@ -7,7 +7,7 @@
%% sunpath.dtx (with options: `package')
%%
\NeedsTeXFormat{LaTeX2e}[2018/12/01]
-\ProvidesPackage{sunpath}[2024/10/10 v0.1-Alpha Draw Sun Path]
+\ProvidesPackage{sunpath}[2024/10/16 v0.2-Alpha Draw Sun Path]
\RequirePackage{expl3}
More information about the tex-live-commits
mailing list.