lorenzo.pantieri” post=73643
[quote=”lorenzo.pantieri”]con la spaziatura appropriata.
Così com’è con questo codice, va bene?
Direi che “origine” è scritto un po’ troppo in piccolo, e forse è inutile. Anche “punto di vista” è scritto troppo in piccolo, credo, e forse è inutile, visto che l’occhio dovrebbe essere sufficiente. Ah, metterei “elevazione” e “azimut” in minuscolo.
L.[/quote]
Queste modifiche, però, sai farle anche tu 😉
Basta cambiare \tiny con qualcosa d’altro e scrivere azimut in minuscolo 🙂 Ecco qui, credo:
`
% !TEX TS-program = pdflatex
% !TEX encoding = UTF-8 Unicode
\documentclass[a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{backgrounds}
\usetikzlibrary{calc}
\usetikzlibrary{intersections}
\usetikzlibrary{positioning}
\usetikzlibrary{shadows}
\usetikzlibrary{shapes}
\usetikzlibrary{through}
%\usetkzobj{all}
\usepackage{tikz-3dplot}
\pgfarrowsdeclare{freccia45}{freccia45}
{
\pgfmathsetlengthmacro{\rex}{\pgfgetarrowoptions{freccia45}+1.28\pgflinewidth}
\pgfarrowsleftextend{0pt}
\pgfarrowsrightextend{\rex}
}
{
\pgfmathsetlengthmacro{\lun}{\pgfgetarrowoptions{freccia45}/cos(22.5)}
\pgfsetdash{}{+0pt}
\pgfsetmiterjoin
\pgfpathmoveto{\pgfpointadd{\pgfqpoint{\pgfgetarrowoptions{freccia45}}{0pt}}{\pgfqpointpolar{157.5}{\lun}}}
\pgfpathlineto{\pgfqpoint{\pgfgetarrowoptions{freccia45}}{0pt}}
\pgfpathlineto{\pgfpointadd{\pgfqpoint{\pgfgetarrowoptions{freccia45}}{0pt}}{\pgfqpointpolar{-157.5}{\lun}}}
\pgfpathclose
\pgfusepathqstroke
}
\def\miodef{3.5pt} % imposta il valore utilizzato per default
\pgfsetarrowoptions{freccia45}{\miodef} % valore utilizzato se /punta non viene invocato
\pgfkeys{/punta/.default=\miodef, /punta/.code={\pgfsetarrowoptions{freccia45}{#1}}}
\begin{document}
\begin{figure}[tb]
\centering
\tdplotsetmaincoords{70}{110}
\begin{tikzpicture}[tdplot_main_coords,scale=1.5]
%origine
%\coordinate [label=177:{\tiny Origine}] (o) at (0,0,0);
\coordinate (o) at (0,0,0);
%asse x
\coordinate [label=0:$x$] (x) at (0,5.5,0);
\draw [thick,-stealth'] (o) — (x);
%asse y
\coordinate [label=70:$y$] (y) at (-4.5,0,0);
\coordinate (yneg) at (4.5,0,0);
\draw [thick,-stealth'] (o) — (y);
%tratto y<0
\draw [thick] (o) — (yneg);
%asse z
\coordinate [label=above:$z$] (z) at (0,0,3);
\draw [thick,-stealth'] (o) — (z);
%segmento piano xy
\fill [gray!50,opacity=.75] (o) — (3,4.5,0) — +(0,0,3) — (o);
\draw (o) — (3,4.5,0) — +(0,0,3) — (o);
%elevazione
\tdplotgetpolarcoords{1}{1}{1}
\tdplotsetthetaplanecoords{56.310}
\tdplotdrawarc[tdplot_rotated_coords,-freccia45]{(o)}{2.1}{90}{60.983}{anchor=south west}{\small elevazione}
%azimuth
\tdplotdrawarc[-freccia45]{(o)}{1.5}{0}{56.310}{anchor=north}{\small azimut}
%viewpoint
\def\dista{6}
\def\distb{5}
\def\tana{2/3}
\coordinate (cen) at (\dista*\tana,\dista,\dista*\tana);
\coordinate (sup) at ($(cen)+(canvas polar cs:radius=.75cm,angle=180)$);
\coordinate (inf) at ($(cen)+(canvas polar cs:radius=.75cm,angle=225)$);
\coordinate (pupilla) at ($(cen)+(canvas polar cs:radius=.475cm,angle=202.5)$);
%\coordinate [label=above:{\tiny Punto di vista}] (vp) at ($(sup)!.5!(cen)$);
\draw (inf) — (cen) — (sup);
\tdplotgetpolarcoords{1}{1}{1}
\tdplotsetthetaplanecoords{123.690}
\tdplotdrawarc[tdplot_rotated_coords]{(cen)}{.5}{226.5}{275}{anchor=west}{}
\fill [black] (pupilla) circle (.025cm);
\end{tikzpicture}
\label{fig:nomeFigura}
\caption{Didascalia.}
\end{figure}
\end{document}
`
Piuttosto, ci ho messo un po’ a capire che era un occhio! 🙂
Ciao
Tommaso