Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.

Dismiss

1,125 views

Skip to first unread message

Aug 3, 2008, 12:45:46 PM8/3/08

to

Hi,

my father has handed in some theoretical physics paper to a journal, and

they requested that he delivers a few illustrations. Well, I thought I

should be able to whip them up with PStricks, but I find that I spent a

whole day not getting halfway through the first illustration.

Basically, I can't get the hang of how to label things and arcs in 3D,

and I don't get a good grip on not cluttering the graph with too many

meridians while not letting it look butt-ugly.

I have no doubt that if I spent a week on further experimentation and

reading the manuals and my PStricks book, I'd likely get this finished.

Problem is that I don't have a week.

So if somebody who actually knows PStricks (or featpost or whatever

other tool would be fine for producing this stuff), I'd be very grateful

if he gave it a hand. I'd be willing to recompensate in the equivalent

of not too many beer cases.

The three sketches are at

<URL:http://home.arcor.de/david.kastrup/cent.jpg>

<URL:http://home.arcor.de/david.kastrup/merc.jpg>

<URL:http://home.arcor.de/david.kastrup/kart.jpg>

My attempt so far at getting the first of those sketches implemented

would be

Aug 3, 2008, 1:16:20 PM8/3/08

to

David Kastrup wrote:

> So if somebody who actually knows PStricks (or featpost or whatever

> other tool would be fine for producing this stuff), I'd be very grateful

> if he gave it a hand. I'd be willing to recompensate in the equivalent

> of not too many beer cases.

>

> The three sketches are at

> <URL:http://home.arcor.de/david.kastrup/cent.jpg>

> <URL:http://home.arcor.de/david.kastrup/merc.jpg>

> <URL:http://home.arcor.de/david.kastrup/kart.jpg>

I think that you might try Sketch: http://www.frontiernet.net/~eugene.ressler/

--

Happy Hacking.

Aug 3, 2008, 1:21:53 PM8/3/08

to

Aug 3, 2008, 1:29:55 PM8/3/08

to

Dmitry Dzhus <di...@sphinx.net.ru> writes:

Having glanced over the docs, I don't see that it would help me get to a

result faster. Basically I still have to specify the same things as in

PStricks. And even use PStricks commands to get labels and stuff

through. So no, this will not help me get the task done today, even if

it might conceivably get somebody else (who already is into Sketch, like

its author) faster there.

--

David Kastrup, Kriemhildstr. 15, 44793 Bochum

UKTUG FAQ: <URL:http://www.tex.ac.uk/cgi-bin/texfaq2html>

Aug 3, 2008, 1:41:13 PM8/3/08

to

Peter Flynn <peter...@m.silmaril.ie> writes:

Sigh. This is turning into an "everybody name his favorite tool"

thread. Now if that was accompanied by "look how easy it was to do the

second sketch in my favorite tool, here is example code", I'd be a lot

more impressed. The problem is not that I think that PStricks can't do

the job: it can do a lot more, and quite compactly. And I also don't

doubt that other tools, mentioned or unmentioned, have this capability

as well. But as I explained already, the task at hand for me is not how

to best invest a week of time into learning a tool. I don't have a week

of time. This was sprung on me rather unexpectedly (and on my father,

too, actually), and I thought that the TeX toolchain should be up to

it. It is just that I am not up to it, not in the required time frame.

And judging from what I've seen others do, others _do_ seem up to it.

I'm fine with investing beer or other recompensation. I'm also fine

with fine-tuning stuff (scaling, making fonts and sizes fit the journal

and so on).

I guess I'll pick up something to eat and then try getting forward.

Aug 3, 2008, 9:43:35 PM8/3/08

to

David Kastrup <d...@gnu.org> writes:

/../

Hard problem I think the first two, but for the second you might get

away using TikZ/PGF. Here is an example I did for a paper, and if you

have any questions please feel free to email me at

aikis...@gmail.com, I learnt many things while doing this (yes,

there are more efficient ways of coding it). Notice it is clipped,

else you would see the full circle and all.

It requires: \usepackage{tikz}

\begin{figure}

\centering

%% create a TikZ picture here

\begin{tikzpicture}[scale=3]

\clip (-0.5,-1.5) rectangle (2.7,2.7);

\begin{scope}[>=latex]

% \draw[step=0.5cm,gray,very thin] (-2.4, -2.4) grid (2.4, 2.4);

\draw[->] (-2.5, 0) -- (2.5, 0) node[right] {$x$};

\draw[->] (0, -2.5) -- (0, 2.5) node[above] {$y$};

\draw (0, 0) circle (2cm);

%% add wind vector in thick black

\draw[thick,->] (0,0) -- node[midway, sloped, above] {$\vec V$} (35:2cm);

\draw[->] (0,1.5) arc (90:35:1.5cm);

\path (0,0) ++(62.5:1.6cm) node{$\theta_V$};

%% add Cartesian components

%% x component

\draw[blue, very thick,->] (0,0) -- node[midway, below] {$v_x$} (35:2cm |- 0,0);

\draw[blue, very thin] (35:2cm) -- (35:2cm |- 0,0);

%% y component

\draw[blue, very thick,->] (0,0) -- node[midway, left] {$v_y$} (0,0 |- 35:2cm) ;

\draw[blue, very thin] (35:2cm) -- (0,0 |- 35:2cm);

%% add Baseline 1 component

\draw[orange, very thin] (205:2.5cm) -- (25:2.5cm) node[right] {$B_1$};

%% mark intersection of a line at 90 degrees to u_1

\draw[white] (35:2cm) coordinate (A) -- ++(-65:1cm) coordinate (B);

\draw[red, very thick,->] (0,0) -- node[midway, sloped, below]

{$u_1$} (intersection cs: first line={(A)--(B)}, second

line={(0,0)--(25:3cm)}); );

%\draw[red, very thick] (0,0) -- (intersection of A--B and 0,0--25:3cm);

\draw[red,very thin] (35:2cm)--(intersection cs: first

line={(A)--(B)}, second line={(0,0)--(25:3cm)}); );

%\draw[red, very thick] (0,0) -- ([shift=(25:-2cm)] 35:2cm);

\draw[red,->] (0,0.8) arc (90:25:0.8cm);

%\path (0,0) ++(57.5:0.9cm) node[color=red]{$\theta_1$};

\path (0,0) ++(62.5:0.9cm) node[color=red]{$\theta_1$};

%% add Baseline 2 component

\draw[orange, very thin] (150:2.5cm) -- (-30:2.5cm) node[right] {$B_2$};

%% mark intersection of a line at 90 degrees to u_1

\draw[white] (35:2cm) coordinate (A) -- ++(-120:5cm) coordinate (B);

\draw[red, very thick,->] (0,0) -- node[midway, sloped, below] {$u_2$} (intersection cs: first

line={(A)--(B)}, second line={(0,0)--(-30:3cm)}); );

%\draw[red, very thick] (0,0) -- (intersection of A--B and 0,0--25:3cm);

\draw[red,very thin] (35:2cm)--(intersection cs: first

line={(A)--(B)}, second line={(0,0)--(-30:3cm)}); );

%\draw[red, very thick] (0,0) -- ([shift=(25:-2cm)] 35:2cm);

\draw[red,->] (0,0.6) arc (90:-30:0.6cm);

%\path (0,0) ++(57.5:0.5cm) node[color=red]{$\theta_2$};

\path (0,0) ++(62.5:0.7cm) node[color=red]{$\theta_2$};

%% draw in baseline difference angle

\draw[orange,->] (25:0.7) arc (25:-30:0.7cm);

\path (0,0) ++(10:0.8cm) node[color=orange]{$\theta_B$};

%% draw difference between wind and baseline 1

\draw[->] (35:1.1) arc (35:25:1.1cm);

\path (0,0) ++(30:1.3cm) node{\small $\Delta\theta_1$};

%% draw difference between wind and baseline 2

\draw[->] (35:0.3) arc (35:-30:0.3cm);

\path (0,0) ++(10:0.45cm) node{\small $\Delta\theta_2$};

\end{scope}

\end{tikzpicture}

\caption{Geometry relating Cartesian horizontal wind field components

$v_x$ and $v_y$ of a horizontal wind field $\vec V$ to the

along-baseline winds $u_1$ and $u_2$ of two independent baselines

$B_1$ and $B_2$, respectively. The angle between the baselines is

$\theta_B = \theta_2-\theta_1$, and the difference between the wind

vector and the baselines is designates by $\Delta\theta_1$ and

$\Delta\theta_2$.}

\label{fig:cartgeom}

\end{figure}

--

BOFH excuse #4:

static from nylon underwear

Aug 3, 2008, 11:31:40 PM8/3/08

to

David Kastrup schrieb:

Hi David, attached a basic version of kart:

\documentclass{scrartcl}

\usepackage[]{pstricks}

\begin{document}

\begin{pspicture}(12,11)

\psset{xunit=1cm, yunit=1cm}

\psline{->}(5,0)(5,10)

\psline{->}(0,5)(10,5)

\pscircle(5,5){3}

\psline(5,5)(10,8)

\psline[linestyle=dashed](5,5)(4.5,7.93)

\psline[linestyle=dashed](5,5)(7.8,4)

\psline[linestyle=dashed](4.5,7.93)(10,8)

\psline[linestyle=dashed](7.8,4)(10,8)

\psline[linestyle=dashed](4.5,7.93)(7.8,4)

\uput[-90](9.8,4.8){X}

\end{pspicture}

\end{document}

Uwe

--

Email-address is valid but never read. Visit

www.<firstname><lastname>.de for my contact details.

Aug 4, 2008, 2:24:04 AM8/4/08

to

Uwe Ziegenhagen <news...@ziegenhagen.info> writes:

> David Kastrup schrieb:

>

>> Having glanced over the docs, I don't see that it would help me get

>> to a result faster. Basically I still have to specify the same

>> things as in PStricks. And even use PStricks commands to get labels

>> and stuff through. So no, this will not help me get the task done

>> today,

Got a time extension to end of week...

> Hi David, attached a basic version of kart:

Thanks, I'll be able to look at it in the evening. That's a relief.

At the moment I have a hard time labelling the threeD things. \rput

wants 2 coordinates. I can set a node with \pstThreeDNode, but I seem

to be too stupid to set a label by specifying a node name.

Here is the experimentation material. N should be placed above the

north pole of the sphere, S below the south pole, and they should

whiteout the space they need. I have not been able to specify the

whiteout, and the positioning via origin= does not appear to work. And

the labels phi and beta don't even appear at all.

Aug 4, 2008, 6:45:24 AM8/4/08

to

Hi David,

just some thought that may help you:

David Kastrup schrieb:

>

> At the moment I have a hard time labelling the threeD things. \rput

> wants 2 coordinates. I can set a node with \pstThreeDNode, but I seem

> to be too stupid to set a label by specifying a node name.

>

> Here is the experimentation material. N should be placed above the

> north pole of the sphere, S below the south pole, and they should

> whiteout the space they need. I have not been able to specify the

> whiteout, and the positioning via origin= does not appear to work. And

> the labels phi and beta don't even appear at all.

For the positioning with pstThreeDPut you need the parameter pOrigin.

The reason why beta and phi do not appear is, that \nbput and related

\n..put commands refer to a node connection drawn beforehand with one of

the \nc... macros. With other lines or arc this does not work as the

\nc... macros calculate some stuff on PS side which is used by the

\n...put macros lateron.

For the sphere you might have a look at pst-solides3d. I haven't worked

with it, yet, and as I do not understand french, it was a bit hard to

read through the docs :-)

However, I found some interesting feature for your sphere:

\documentclass{scrartcl}

\usepackage{pst-solides3d}

\begin{document}

\begin{pspicture}(-5,-5)(5,5)

\psSolid[object=sphere,%

intersectiontype=0,%

% linewidth=0pt,

% r = 1,

intersectionplan={[0 1 0 0] [ 0 0 1 0]},%

intersectionlinewidth=2, %

ngrid=50 50,%

intersectioncolor=(bleu) (rouge),%

action=draw](0,0,0)

\end{pspicture}

\end{document}

Unfortunately I haven't found a way to get rid of the sphere itself and

draw only the intersections. Using the 'linewidth=0pt' the solid lines

disappear, but it does not affect the dashed lines.

Another issue is, that I do not know how to integrated this snippet

properly into the rest that you posted, the scalings of pst-solides3d

and pst-3dplot seem to be different.

I hope this helps you a bit,

Christoph

Aug 4, 2008, 7:55:07 AM8/4/08

to

> 1KHerunterladen

>

> --

> David Kastrup, Kriemhildstr. 15, 44793 Bochum

> UKTUG FAQ: <URL:http://www.tex.ac.uk/cgi-bin/texfaq2html>

Do you need to to it in 3D? I would just do it in 2D, seems to be much

easier, although one has to "play a little" with the optimal settings.

Uwe

Aug 4, 2008, 8:21:08 AM8/4/08

to

My contribution, with pst-solides3d for the first drawing. The files

are here:

http://melusine.eu.org/syracuse/mluque/solides3d2007/projection/

Only the file LaTeX :

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass{article}

\usepackage{pst-solides3d,pst-eucl}

\begin{document}

\begin{pspicture}(-6,-6)(6,8)

\psset{lightsrc=viewpoint}

\psset{viewpoint=100 15 20 rtp2xyz,Decran=100}

\psSolid[object=grille,fillcolor=blue!20,

action=draw**,grid=false,

base=-8 8 -8 8](0,0,-2)

\psPolygonIIID(-8,-8,-2)(-8,8,-2)(8,8,-2)(8,-8,-2)

\psSolid[object=sphere,r=2,fillcolor=gray!20,

action=draw**,grid=false,

ngrid=15 36,linewidth=0.01,

intersectiontype=0,

intersectionplan={[0 0 1 0] [0 1 0 0]},

intersectionlinewidth=2 2,

intersectioncolor=(bleu) (rouge)]

\pscircle{2}

\pstVerb{/CoordA {2 0 -20} def

/CoordB {2 0 20} def}

\psSolid[object=trigospherique,linestyle=dashed,linecolor=red,

definition=geodesique_sphere,

args=CoordA CoordB]%

\pstVerb{/CoordC {2 0 0} def

/CoordD {2 30 0} def}

\psSolid[object=trigospherique,linestyle=dashed,linecolor=blue,

definition=geodesique_sphere,

args=CoordC CoordD]%

\psPoint(0,0,0){O}

\psPoint(0,0,2){N}

\psPoint(0,0,-2){S}

\psPoint(2,0,0){X1}

\psPoint(-2,0,0){X2}

\psPoint(0,-2,0){Y1}

\psPoint(0,2,0){Y2}

\psline[linestyle=dashed](X1)(X2)

\psline[linestyle=dashed](Y1)(Y2)

\uput[u](N){\color{red}{$N$}}

\uput[d](S){\color{red}{$S$}}

\pstVerb{/xP 2 40 cos mul 30 cos mul def

/yP 2 40 sin mul 30 cos mul def

/zP 2 30 sin mul def}

\psPoint(xP,yP,zP){P}

\uput[r](P){$P$}

\psdot(P)

\psline{->}(O)(P)

\psline[linestyle=dashed](N)(P)

% projection de P sur le plan equatorial

\psPoint(xP,yP,0){P'}

\psPoint(xP,0,0){P'x}

\psPoint(0,yP,0){P'y}

\psPoint(0,0,zP){P'z}

\pstVerb{% les coordonnées du point sur le plan P1

/zN 2 def

/zP1 -2 def

/k1 zP1 zN sub zP zN sub div def

/xP1 k1 xP mul def

/yP1 k1 yP mul def}

%\psdot(P')

\psline[linestyle=dashed](P'x)(P')(P'y)

\psline[linestyle=dashed](P')(P)

\psline[linestyle=dashed](O)(P')

\psPoint(xP1,yP1,zP1){P1}

\psline(P)(P1)

\psdot(P1)

\uput[dr](P1){$\hat{P}$}

\psPoint(xP1,yP1,-2){P1'}

\psPoint(xP1,0,-2){P1'x}

\psPoint(0,yP1,-2){P1'y}

\psline[linestyle=dashed](P1'x)(P1')(P1'y)

\psPoint(0,0,-2){O'}

\psPoint(0,0,4){Z}

\psPoint(8,0,-2){X}

\psPoint(0,8,-2){Y}

\uput[d](X){$X$}

\uput[r](Y){$Y$}

\uput[u](Z){$Z$}

\psline{->}(O')(X)

\psline{->}(O')(Y)

\psline{->}(N)(Z)

\psline[linestyle=dashed](S)(N)

\pstMarkAngle[arrows=->,linecolor=blue,LabelSep=0.6]{P'x}{O}{P'}

{\color{blue}{$\theta$}}

\pstMarkAngle[arrows=->,linecolor=red,LabelSep=0.6]{P'}{O}{P}

{\color{red}{$\phi$}}

\end{pspicture}

\end{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Manuel

Aug 4, 2008, 9:18:23 AM8/4/08

to

David Kastrup <d...@gnu.org> writes:

> So if somebody who actually knows PStricks (or featpost or whatever

> other tool would be fine for producing this stuff), I'd be very grateful

> if he gave it a hand.

Quick and dirty "cent" (I couldn't figure out the real coordinates of

Phat):

--8<---------------cut here---------------start------------->8---

\listfiles

\documentclass[12pt,a4paper]{article}

\usepackage{pst-3dplot}

\usepackage{pstricks-add}

\usepackage{pst-pdf}

%% Hack for \psbrace in combination with older pstricks-add versions:

\makeatletter

\pst@def{UserCoor}< \pst@number\psyunit div exch \pst@number\psxunit div exch >

\pst@def{ScreenCoor}< \pst@number\psyunit mul exch \pst@number\psxunit mul exch >

\makeatother

\begin{document}

% Andersrum:

% Definiere über phi und beta

% phi Kreisbogen von (a,0,a) nach (a cos phi, a sin phi, a)

% beta Kreisbogen von (a cos phi, a sin phi, a)

% nach P=(a cos phi cos beta, a sin phi cos beta, a + a sin beta)

% ^P ist bei (2a+Pz)/(2a-Pz)*(Px, Py, 0)

\def\PHI/{33}

\def\BETA/{30}

\def\A/{4}

\def\outer/{4}

\def\inner/{2.5}

\def\B/{2,2}

\def\offset/{0.3}

% P = (a cos phi cos beta, a sin phi cos beta, a + a sin beta)

\def\Px/{\A/ \PHI/ cos mul \BETA/ cos mul}

\def\Py/{\A/ \PHI/ sin mul \BETA/ cos mul}

\def\Pz/{\A/ \BETA/ sin mul \A/ add}

\def\phicolor/{red}

\def\betacolor/{blue}

\SpecialCoor

\begin{pspicture}(-7,-9)(9,9)

\footnotesize%

\psset{Alpha=75,Beta=20, arrowscale=2}

\pstThreeDPlaneGrid[planeGrid=xy,linecolor=gray](-5,-5)(7,8)

%% Sphere:

\pstThreeDSphere[SegmentColor={[cmyk]{.3,0,0,0}},linecolor=gray!10,increment=10]%

(0,0,\A/){\outer/}

%% Circles:

\pstThreeDEllipse[beginAngle=0,endAngle=360,linecolor=gray,linestyle=dashed]%

(0,0,\A/)(\outer/,0,0)(0,\outer/,0)

\pstThreeDEllipse[beginAngle=0,endAngle=360,linecolor=gray,linestyle=dashed]%

(0,0,\A/)(\outer/,0,0)(0,0,\outer/)

%% Nodes:

%% NOTE: \pstThreeDNode converts fromn 3D to 2D. These newly created nodes can

%% currently only be used with 2D pstricks functions:

\pstThreeDNode(0,0,\A/ 2 mul){N}

\pstThreeDNode(0,0,\A/){M}

\pstThreeDNode(\Px/, \Py/, \Pz/){P}

\pstThreeDNode(0, 0, \A/){PAxis}

%% Labels "N" and "S":

\pstThreeDPut[origin=t](0,0,0 \offset/ sub){S}

\pstThreeDPut[origin=b](0 \offset/ sub,0 \offset/ sub,\A/ 2 mul \offset/ add){N}

%% Ellipsis Phi:

\pstThreeDEllipse[beginAngle=0,endAngle=\PHI/,linecolor=\phicolor/,arrows=->]%

(0,0,\A/)(\inner/,0,0)(0,\inner/,0)

% \pstThreeDEllipse[beginAngle=0,endAngle=\PHI/,linecolor=\phicolor/,arrows=->]%

% (0,0,\A/)(\inner/,0,0)(0,\inner/,0)

%% Label Phi (placed at phi/2):

\pstThreeDPut[origin=t](\inner/,\PHI/ 2 div sin \inner/ mul,\A/ \offset/ add)%

{\color{\phicolor/}{$\phi$}}

%% Ellipsis Beta:

\pstThreeDEllipse[beginAngle=0,endAngle=\BETA/,linecolor=\betacolor/,arrows=->]%

(0,0,\A/)(\inner/ \PHI/ cos mul,\inner/ \PHI/ sin mul,0)(0,0,\inner/)

%% Label Beta:

\pstThreeDPut[origin=l]%

(\inner/ \PHI/ cos mul,

\inner/ \BETA/ sin mul .1 sub,

\A/ \BETA/ sin mul \A/ 2 div add .5 add)%

{\color{\betacolor/}{$\beta$}}

%% Line "A" to "P":

\pstThreeDLine[linecolor=blue](0, 0, \A/)(\Px/, \Py/, \Pz/)

%% Alternative using 2D function and results from \pstThreeDNode:

%\psline[linecolor=red](M)(P)

%% Label "P":

\pstThreeDPut[origin=b](\Px/ \offset/ add, \Py/ \offset/ add, \Pz/ \offset/ add)%

{$P$}

%% P hat: (2a+Pz)/(2a-Pz)*(Px, Py, 0)

%% TODO: Fix coordinate?:

\pstThreeDNode(

\A/ 2 mul \Pz/ add \A/ 2 mul \Pz/ sub div \Px/ mul,

\A/ 2 mul \Pz/ add \A/ 2 mul \Pz/ sub div \Py/ mul,

0){Phat}

\psline[linecolor=black](P)(Phat)

\psline[linecolor=black](P)(N)

% \psline[linecolor=green](Phat)(N)

%% Brace "a" (needs pstricks-add; older versions need hack in header):

%% This is a 2D function:

\psbrace[bracePos=0.75,ref=rC,rot=180,linewidth=.5pt,braceWidth=.5pt]%

(PAxis)(S){$a$}

%% Helper lines:

{\psset{linecolor=gray,linestyle=dashed,linewidth=0.2pt,drawCoor}

%% Phi:

\pstThreeDLine(0,0,\A/)(\outer/ \PHI/ cos mul,\outer/ \PHI/ sin mul, \A/)

\pstThreeDLine(0,0,\A/)(\outer/,0, \A/)

%% optional:

% \pstThreeDDot(\inner/ \PHI/ cos mul,\inner/ \PHI/ sin mul, \A/)

% \pstThreeDDot(\inner/,0, \A/)

%% P:

%% optional:

% \pstThreeDDot(\Px/, \Py/, \Pz/)

}

%% Coordinate axes:

\pstThreeDCoor[linecolor=darkgray,xMin=-5,xMax=5,yMin=-5,yMax=7,zMin=0,zMax=9,%

nameX=$x$ $\xi$,nameY=$y$ $\eta$,nameZ=$\zeta$]

\end{pspicture}

\end{document}

%%% Local Variables:

%%% mode: latex

%%% LaTeX-command-style: (("" "ps4pdf %S %t"))

%%% TeX-master: t

%%% End:

--8<---------------cut here---------------end--------------->8---

Hope that helps,

Patrick

--

An idea is like a cup of coffee, it's not going to stay hot forever.

Aug 4, 2008, 11:11:16 AM8/4/08

to

Quick and dirty "merc"

--8<---------------cut here---------------start------------->8---

\listfiles

\documentclass[12pt,a4paper]{article}

\usepackage{pst-3dplot}

\usepackage{pst-pdf}

\begin{document}

\def\A/{4}

\def\outer/{4}

\def\inner/{2.2}

\def\offset/{0.3}

\def\PHI/{40}

\def\PHITWO/{60}

\def\BETA/{50}

\def\BETAradius/{\outer/ \BETA/ cos mul}

\def\Px/{\outer/ \PHI/ cos mul \BETA/ cos mul}

\def\Py/{\outer/ \PHI/ sin mul \BETA/ cos mul}

\def\Pz/{\outer/ \BETA/ sin mul \A/ add}

\def\PxPlane/{\outer/ \PHI/ cos mul}

\def\PyPlane/{\outer/ \PHI/ sin mul}

\def\Qx/{\outer/ \PHITWO/ cos mul \BETA/ cos mul}

\def\Qy/{\outer/ \PHITWO/ sin mul \BETA/ cos mul}

\def\Qz/{\outer/ \BETA/ sin mul \outer/ add}

\def\QxPlane/{\outer/ \PHITWO/ cos mul}

\def\QyPlane/{\outer/ \PHITWO/ sin mul}

\def\phicolor/{red!50!brown}

\def\betacolor/{blue}

\def\othercolor/{green!50!black}

\SpecialCoor

\begin{pspicture}(-7,-7)(7,9)

\footnotesize%

\psset{Alpha=75,Beta=20, arrowscale=2}

% %% Top circle:

% \pstThreeDEllipse[beginAngle=0,endAngle=360,linecolor=gray,linestyle=dashed]%

% (0,0,\A/ 2 mul)(\outer/,0,0)(0,\outer/,0)

% %% Lines:

% \pstThreeDLine[linecolor=black](0, \outer/, 0)(0, \outer/, \A/ 2 mul)

% \pstThreeDLine[linecolor=black](0, -\outer/, 0)(0, -\outer/, \A/ 2 mul)

%% Sphere:

\pstThreeDSphere[SegmentColor={[cmyk]{.3,0,0,0}},linecolor=gray!10,increment=10]%

(0,0,\A/){\outer/}

%% Circle 1:

\pstThreeDEllipse[beginAngle=0,endAngle=360,linecolor=gray,linestyle=dashed]%

(0,0,\A/)(\outer/,0,0)(0,\outer/,0)

%% Circle 2:

\pstThreeDEllipse[beginAngle=0,endAngle=360,linecolor=gray,linestyle=dashed]%

(0,0,\Pz/)(\BETAradius/,0,0)(0,\BETAradius/,0)

%% Circle 3 (N->S) phi1:

\pstThreeDEllipse[beginAngle=90,endAngle=-90,linecolor=\othercolor/,linestyle=solid]%

(0,0,\A/)(\outer/ \PHI/ cos mul,\outer/ \PHI/ sin mul,0)(0,0,\outer/)

%% Circle 4 (N->S) phi2:

\pstThreeDEllipse[beginAngle=90,endAngle=-90,linecolor=\othercolor/,linestyle=solid]%

(0,0,\A/)(\outer/ \PHITWO/ cos mul,\outer/ \PHITWO/ sin mul,0)(0,0,\outer/)

%% Labels "1":

\pstThreeDPut[origin=l]%

(\outer/ \PHI/ cos mul,

\outer/ \BETA/ sin mul \offset/ sub,

\A/ \BETA/ sin mul \A/ 2 div add)%

{\color{\othercolor/}{$1$}}

%% Labels "2":

\pstThreeDPut[origin=r]%

(\outer/ \PHITWO/ cos mul,

\outer/ \BETA/ sin mul .5 add,

\A/ \BETA/ sin mul \A/ 2 div add)%

{\color{\othercolor/}{$2$}}

%% Line "A" to "P":

\pstThreeDLine[linecolor=black](0, 0, \A/)(\Px/, \Py/, \Pz/)

\pstThreeDLine[linecolor=gray](0, 0, \A/)(\PxPlane/, \PyPlane/, \A/)

%% Line "A" to "Q":

\pstThreeDLine[linecolor=black](0, 0, \A/)(\Qx/, \Qy/, \Qz/)

\pstThreeDLine[linecolor=gray](0, 0, \A/)(\QxPlane/, \QyPlane/, \A/)

%% Phi 1:

\pstThreeDEllipse[beginAngle=0,endAngle=\PHI/,linecolor=\phicolor/,linestyle=solid,arrows=->]%

(0,0,\A/)(\inner/,0,0)(0,\inner/,0)

%% Phi 1 label:

\pstThreeDPut[origin=t](\inner/,\PHI/ 2 div sin \inner/ mul,\A/ \offset/ add)%

{\color{\phicolor/}{$\phi _1$}}

%% Phi 2:

\pstThreeDEllipse[beginAngle=0,endAngle=\PHITWO/,linecolor=\phicolor/,linestyle=solid,arrows=->]%

(0,0,\A/)(\inner/ \offset/ add,0,0)(0,\inner/ \offset/ add,0)

%% Phi 2 label:

\pstThreeDPut[origin=t](\inner/ \offset/ add,\PHI/ 2 div sin \inner/ \offset/ add mul,\A/ \offset/ sub)%

{\color{\phicolor/}{$\phi _2$}}

%% helper line:

\pstThreeDLine[linecolor=gray](0, 0, \A/)(\outer/, 0, \A/)

%% Beta (phi 1):

\pstThreeDEllipse[beginAngle=0,endAngle=\BETA/,linecolor=\betacolor/,linestyle=solid,arrows=->]%

(0,0,\A/)(\inner/ \PHI/ cos mul,\inner/ \PHI/ sin mul,0)(0,0,\inner/)

%% Beta (phi 2): optional

% \pstThreeDEllipse[beginAngle=0,endAngle=\BETA/,linecolor=\betacolor/,linestyle=solid,arrows=->]%

% (0,0,\A/)(\inner/ \PHITWO/ cos mul,\inner/ \PHITWO/ sin mul,0)(0,0,\inner/)

%% Beta label:

\pstThreeDPut[origin=l]%

(\inner/ \PHI/ cos mul,

\inner/ \BETA/ sin mul .1 sub,

\A/ \BETA/ sin mul \A/ 2 div add .5 add)%

{\color{\betacolor/}{$\beta$}}

% %% Helper lines (optional):

% {\psset{linecolor=gray,linestyle=dashed,linewidth=0.2pt,drawCoor}

% %% Line "A" to "P":

% \pstThreeDDot[drawCoor](\Px/, \Py/, \Pz/)

% %% Line "A" to "Q":

% \pstThreeDDot[drawCoor](\PxPlane/, \PyPlane/, \A/)

% \pstThreeDDot[drawCoor](\Qx/, \Qy/, \Qz/)

% %% helper lines:

% \pstThreeDDot[drawCoor](\QxPlane/, \QyPlane/, \A/)

% }

%% Coordinate axes:

\pstThreeDCoor[linecolor=darkgray,xMin=-5,xMax=5,yMin=-5,yMax=5,zMin=0,zMax=9,%

nameX=$x$ $\xi$,nameY=$y$ $\eta$,nameZ=$\zeta$]

\end{pspicture}

\end{document}

%%% Local Variables:

%%% mode: latex

%%% LaTeX-command-style: (("" "ps4pdf %S %t"))

%%% TeX-master: t

%%% End:

--8<---------------cut here---------------end--------------->8---

--

War is God's way of teaching Americans geography.

-- Ambrose Bierce

Aug 4, 2008, 12:17:08 PM8/4/08

to

this is not great. Here, however, the second drawing with pst-

solides3d :

solides3d :

The new files are still here:

http://melusine.eu.org/syracuse/mluque/solides3d2007/projection/

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass{article}

\usepackage{pst-solides3d,pst-eucl}

\begin{document}

\begin{pspicture}(-6,-6)(6,8)

\psset{lightsrc=viewpoint}

\psset{viewpoint=100 15 20 rtp2xyz,Decran=100}

\psSolid[object=sphere,r=4,fillcolor=gray!20,

action=draw**,grid=false,

ngrid=30 72,linewidth=0.01,

intersectiontype=0,

intersectionplan={[-40 sin 40 cos 0 0] [-55 sin 55 cos 0 0] [0

0 1 0] [0 0 1 -2] [0 1 0 0]},

intersectionlinewidth=2 2 2 2 2,

intersectioncolor=(bleu) (rouge) (Green) (Green) (Black)]

\psSolid[object=cylindre,r=4,h=8,

action=draw,

ngrid=2 36,linewidth=0.01](0,0,-4)

\pscircle{4}

\pstVerb{/CoordA {4 40 -20} def

/CoordB {4 40 20} def}

\psSolid[object=trigospherique,linestyle=dashed,linecolor=blue,

definition=geodesique_sphere,

args=CoordA CoordB]

\pstVerb{/CoordC {4 55 -20} def

/CoordD {4 55 20} def}

\psSolid[object=trigospherique,linestyle=dashed,linecolor=red,

definition=geodesique_sphere,

args=CoordC CoordD]

\pstVerb{/CoordE {4 0 0} def

/CoordF {4 30 0} def}

\psSolid[object=trigospherique,linestyle=dashed,linecolor=green,

definition=geodesique_sphere,

args=CoordE CoordF]

\pstVerb{/CoordG {4 0 30} def

/CoordH {4 0 -30} def}

\psSolid[object=trigospherique,linestyle=dashed,

definition=geodesique_sphere,

args=CoordG CoordH]

\pstVerb{/xE1 4 40 cos mul def

/yE1 4 40 sin mul def

/xE2 4 55 cos mul def

/yE2 4 55 sin mul def}

\psPoint(0,0,0){O}

\psPoint(0,0,4){N}

\psPoint(0,0,-4){S}

\psPoint(4,0,0){X1}

\psPoint(-4,0,0){X2}

\psPoint(0,-4,0){Y1}

\psPoint(0,4,0){Y2}

\psPoint(xE1,yE1,0){E1}

\psPoint(xE2,yE2,0){E2}

\psline(O)(E1)

\psline(O)(E2)

\psline(S)(N)

\psdots[linecolor=red](N)(S)

\psline[linestyle=dashed](X1)(X2)

\uput[u](N){\color{red}{$N$}}

\uput[d](S){\color{red}{$S$}}

\pstVerb{/xP 4 40 cos mul 30 cos mul def

/yP 4 40 sin mul 30 cos mul def

/zP 4 30 sin mul def}

\psPoint(xP,yP,zP){P}

\psSolid[object=vecteur,

linecolor=red,

args=xP yP zP](0,0,0)%

\psset{arrowsize=0.2}

\pstMarkAngle[arrows=->,MarkAngleRadius=0.4,LabelSep=0.6]{X1}{O}{E1}{$

\phi_1$}

\pstMarkAngle[arrows=->,MarkAngleRadius=0.8,LabelSep=1]{X1}{O}{E2}{$

\phi_2$}

\pstMarkAngle[arrows=->,MarkAngleRadius=1,LabelSep=1.2,linecolor=blue]

{E1}{O}{P}{\color{blue}{$\beta$}}

\end{pspicture}

\end{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%ù

Manuel

Aug 4, 2008, 3:10:59 PM8/4/08

to

David Kastrup schrieb:

> Hi,

>

> Hi,

>

<snip>

Hi David, for cent I have another proposal (which might be drastically

improved by using psbezier instead of pscurve):

\documentclass{scrartcl}

\usepackage[]{xcolor}

\usepackage[]{pstricks}

\begin{document}

\begin{pspicture}(12,11)

\psset{xunit=1cm, yunit=1cm}

\psline{->}(5,3)(9,2.5)

\psline{->}(5,3)(5,7)

\psline{->}(5,3)(4,2)

\pscurve[linecolor=blue,linestyle=dashed](3.25,4.4)(5.2,4.5)(6.79,4)

\pscurve[linecolor=blue,linestyle=solid](3.25,4.4)(4.8,3.5)(6.79,4)

\pscircle(5,4){1.8}

\end{pspicture}

\end{document}

The only tricky thing is to get the curve so nice that is actually looks

like a sphere, pscurve apparently lacks the necessary features.

BTW: With CorelDraw I would need only a few minutes to make the drawing.

What about labeling a PDF or PS afterwards?

Aug 4, 2008, 3:15:07 PM8/4/08

to

Uwe Ziegenhagen schrieb:

> David Kastrup schrieb:

>> Hi,

>>

>

> <snip>

>

> Hi David, for cent I have another proposal (which might be drastically

> improved by using psbezier instead of pscurve):

>

> \documentclass{scrartcl}

>

> \usepackage[]{xcolor}

> \usepackage[]{pstricks}

>

> \begin{document}

>

>

> \begin{pspicture}(12,11)

> \psset{xunit=1cm, yunit=1cm}

>

> \psline{->}(5,3)(9,2.5)

> \psline{->}(5,3)(5,7)

> \psline{->}(5,3)(4,2)

>

> \pscurve[linecolor=blue,linestyle=dashed](3.25,4.4)(5.2,4.5)(6.79,4)

> \pscurve[linecolor=blue,linestyle=solid](3.25,4.4)(4.8,3.5)(6.79,4)

> \pscircle(5,4){1.8}

> \end{pspicture}

> \end{document}

>

> The only tricky thing is to get the curve so nice that is actually looks

> like a sphere, pscurve apparently lacks the necessary features.

>

> BTW: With CorelDraw I would need only a few minutes to make the drawing.

> What about labeling a PDF or PS afterwards?

>

> Uwe

>

> David Kastrup schrieb:

>> Hi,

>>

>

> <snip>

>

> Hi David, for cent I have another proposal (which might be drastically

> improved by using psbezier instead of pscurve):

>

> \documentclass{scrartcl}

>

> \usepackage[]{xcolor}

> \usepackage[]{pstricks}

>

> \begin{document}

>

>

> \begin{pspicture}(12,11)

> \psset{xunit=1cm, yunit=1cm}

>

> \psline{->}(5,3)(9,2.5)

> \psline{->}(5,3)(5,7)

> \psline{->}(5,3)(4,2)

>

> \pscurve[linecolor=blue,linestyle=dashed](3.25,4.4)(5.2,4.5)(6.79,4)

> \pscurve[linecolor=blue,linestyle=solid](3.25,4.4)(4.8,3.5)(6.79,4)

> \pscircle(5,4){1.8}

> \end{pspicture}

> \end{document}

>

> The only tricky thing is to get the curve so nice that is actually looks

> like a sphere, pscurve apparently lacks the necessary features.

>

> BTW: With CorelDraw I would need only a few minutes to make the drawing.

> What about labeling a PDF or PS afterwards?

>

> Uwe

>

Using one psbezier:

\documentclass{scrartcl}

\usepackage{xcolor}

\usepackage{pstricks}

\begin{document}

\begin{pspicture}(12,11)

\psset{xunit=1cm, yunit=1cm}

\psline{->}(5,3)(9,2.5)

\psline{->}(5,3)(5,7)

\psline{->}(5,3)(4,2)

\pscurve[linecolor=blue,linestyle=dashed](3.25,4.4)(5.3,4.5)(6.79,4)

\psbezier[linecolor=blue,linestyle=solid,showpoints=true](3.25,4.4)(4.0,3.2)(4.8,3.0)(6.79,4)

\pscircle[fillcolor=red](5,4){1.8}

\end{pspicture}

\end{document}

Uwe

Aug 5, 2008, 9:37:56 AM8/5/08

to

Patrick Drechsler <pat...@pdrechsler.de> writes:

I'll probably try to sneak the fancier versions past the editor, but it

may well be that they don't do color. But probably at least grayscale.

One problem with the uncluttered variants is that it is quite complex to

determine the angles at which circles pass from visibility (straight

lines for the ellipse sections) to invisibility (dashed lines) and back.

I have the slight suspicion that a proper calculation would involve

elliptic integrals. Also for my graphics, the brace for "a" is

misplaced since it shares its spines rather than its ends with the pole

axis.

And I have to do the point calculation properly, of course, but that's

really well in my ballpark, so no problem there.

Aug 5, 2008, 10:08:53 AM8/5/08

to

David Kastrup <d...@gnu.org> writes:

> Patrick Drechsler <pat...@pdrechsler.de> writes:

>

>> I skipped the part about "too many meridians", so here are simpler

>> versions which converts the 3D coordinates back to 2D coordinates so one

>> can just draw a normal circle and unclutter the image.

>

> I'll probably try to sneak the fancier versions past the editor, but it

> may well be that they don't do color. But probably at least grayscale.

Shouldn't be a problem. Just adapt the SegmentColor={[cmyk]{.3,0,0,0}}

part.

> One problem with the uncluttered variants is that it is quite complex to

> determine the angles at which circles pass from visibility (straight

> lines for the ellipse sections) to invisibility (dashed lines) and back.

> I have the slight suspicion that a proper calculation would involve

> elliptic integrals.

Since you only have 2 graphs you might as well just fiddle with values

manually before doing a complex calculation. Probably faster.

> Also for my graphics, the brace for "a" is misplaced since it shares

> its spines rather than its ends with the pole axis.

I don't understand this sentence. Could you try to explain? If it is of

any help: The docs for the psbrace command are in pstricks-add-doc,

chapter 6.

> And I have to do the point calculation properly, of course, but that's

> really well in my ballpark, so no problem there.

OK.

Cheers,

Patrick

--

You know the world is going crazy when the best rapper is a white

guy, the best golfer is a black guy, the Swiss hold the America's Cup,

France is accusing the US of arrogance, and Germany doesn't want to go

to war. (Charles Barkley)

Aug 5, 2008, 11:05:02 AM8/5/08

to

On Aug 5, 2:37 pm, David Kastrup <d...@gnu.org> wrote:

> One problem with the uncluttered variants is that it is quite complex to

> determine the angles at which circles pass from visibility (straight

> lines for the ellipse sections) to invisibility (dashed lines) and back.

> I have the slight suspicion that a proper calculation would involve

> elliptic integrals.

> One problem with the uncluttered variants is that it is quite complex to

> determine the angles at which circles pass from visibility (straight

> lines for the ellipse sections) to invisibility (dashed lines) and back.

> I have the slight suspicion that a proper calculation would involve

> elliptic integrals.

There are no elliptic integrals involved. I was intrigued by your

challenge and I played with this stuff a little bit (well, actually a

lot). I finally figured out how to get transition from visible to

invisible lines properly. I don't know pstricks, so I used tikz. Since

there is no real 3D in tikz I did every thing in 2D with line art only

as on your original sketches. Below is the code for "globe sphere".

Let me know if you are interested in getting your sketches. I could

get them done relatively quickly now but I am not sure if tikz is OK

for you.

Cheers,

Tomek

%%%%%%%%%%%%%%%%%%%%%%%% BOF %%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass{article}

\usepackage{tikz,ifthen}

\usetikzlibrary{calc}

\pagestyle{empty}

\begin{document}

%% some definitions

\def\tikzplane#1#2#3#4#5{%

\pgfmathsetmacro\Xx{#2}% x coordiante of X axis unit vector

\pgfmathsetmacro\Xy{#3}% y coordiante of X axis unit vector

\pgfmathsetmacro\Yx{#4}% x coordiante of Y axis unit vector

\pgfmathsetmacro\Yy{#5}% y coordiante of Y axis unit vector

\tikzstyle{#1}=[cm={\Xx,\Xy,\Yx,\Yy,(0,0)}]% transformation matrix

}

\def\pgfmathsincos#1#2#3{%

\pgfmathsetmacro#1{sin(#3)}%

\pgfmathsetmacro#2{cos(#3)}%

}

% sphere radius

\def\R{4}

% elevation angle

\def\angEl{32}

% azimuth angle

\def\angAz{110}

% longitude of point P

\def\angPhi{-50}

% latitude of point P

\def\angBeta{-30}

\begin{tikzpicture}[>=latex] % option '>=latex' for nice arrows

\draw (0,0) circle (\R);

\foreach \t in {-80,-70,...,80} {

\pgfmathsincos\sint\cost{\t}

\pgfmathsincos\sinEl\cosEl{\angEl}

\pgfmathsetmacro\y{\R*\cosEl*\sint*1cm}

\tikzstyle{latitude circle}=[yshift=\y,yscale=\sinEl,scale=\cost]

\pgfmathsetmacro\sinLon{\sint/\cost*\sinEl/\cosEl}

\pgfmathtruncatemacro\testval{\sinLon}

\ifnum\testval=0

\pgfmathsetmacro\ang{asin(\sinLon)} % angle of "visibility"

\draw[latitude circle] (\ang:\R) arc (\ang:-\ang-180:\R);

\draw[latitude circle,dashed] (180-\ang:\R) arc (180-\ang:\ang:

\R);

\fi

\ifnum\testval>0

\draw[latitude circle] (0,0) circle(\R);

\fi

\ifnum\testval<0

\draw[latitude circle,dashed] (0,0) circle(\R);

\fi

}

\foreach \t in {-5,-35,...,-175} {

\pgfmathsincos\sint\cost{\t}

\pgfmathsincos\sinEl\cosEl{\angEl}

\tikzplane{xyplane}{\cost}{\sint*\sinEl}{0}{\cosEl}

\pgfmathsetmacro\ang{atan(\sint*\cosEl/\sinEl)} % angle of

"visibility"

\draw[xyplane,->] (180:1.7*\R) -- (0:1.7*\R);

\draw[xyplane] (\ang:\R) arc (\ang:\ang+180:\R);

\draw[xyplane,dashed] (\ang-180:\R) arc (\ang-180:\ang:\R);

}

\draw[->] (-90:1.3*\R) -- (90:1.3*\R);

\end{tikzpicture}

\end{document}

%%%%%%%%%%%%%%%%%%%%%%%% EOF %%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Aug 5, 2008, 6:16:27 PM8/5/08

to

On 4 Aug 2008 at 6:24, David Kastrup wrote:

[mime garbage snipped]

[mime garbage snipped]

look, will you *please* stop posting mime attachments to this group? it

is a gross breach of netiquette. if you want to share nontext files,

upload them to a webserver somewhere and post a link.

thanks.

Aug 5, 2008, 6:27:01 PM8/5/08

to

tom lewton <nos...@nospam.invalid> writes:

You are confused. This was not an attachment, it was inline text.

_TEXT_. This is a text newsgroup. If you have a non-MIME-capable

reader (an antiquity, to be honest), the text will come out _perfectly_

fine with just a few lines of clear text headers in between.

Including them in this way makes them readable on _every_ newsreader

_including_ vintage ones, and it makes certain that you don't get

spurious line breaks inserted. It also makes it easier to save the

example texts _if_ you have a MIME-capable reader.

It is _most_ certainly _not_ a breach of _any_ netiquette to post

programmatic _text_ inline with MIME headers. Which is obvious since

every newsserver lets them through even on text-only groups.

So could you please pick a better topic for your personal vendetta next

time round? Thanks.

Aug 6, 2008, 1:53:50 PM8/6/08

to

For what it's worth, here is my take on CENT and KART sketches. I

didn't bother with MERC, since I don't know if tikz code is of any use

to David. I mainly wanted to learn tikz better and I've certainly

learn a lot during the process. The drawings are parametrized so they

can be easily rotated and scaled (label positioning might require some

fine tuning).

didn't bother with MERC, since I don't know if tikz code is of any use

to David. I mainly wanted to learn tikz better and I've certainly

learn a lot during the process. The drawings are parametrized so they

can be easily rotated and scaled (label positioning might require some

fine tuning).

I hope that others will find those examples interesting, especially

that David's sketches posed some intriguing challenges for 2D

programmatic drawing.

Cheers,

Tomek

%%%%%%%%%%%%%%%%%%%% BOF %%%%%%%%%%%%%%%%%%%%%%%

\documentclass{article}

\usepackage{tikz}

\usetikzlibrary{calc,decorations.pathreplacing}

\pagestyle{empty}

\newcommand\pgfmathsinandcos[3]{%

\pgfmathsetmacro#1{sin(#3)}%

\pgfmathsetmacro#2{cos(#3)}%

}

\newcommand\LongitudePlane[3][current plane]{%

\pgfmathsinandcos\sinEl\cosEl{#2} % elevation

\pgfmathsinandcos\sint\cost{#3} % azimuth

\tikzset{#1/.estyle={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}}

% angle of "visibility"

\pgfmathsetmacro\angVis{atan(\sint*\cosEl/\sinEl)} %

}

\newcommand\LatitudePlane[3][current plane]{%

\pgfmathsinandcos\sinEl\cosEl{#2} % elevation

\pgfmathsinandcos\sint\cost{#3} % latitude

\pgfmathsetmacro\yshift{\cosEl*\sint}

\tikzset{#1/.estyle={cm={\cost,0,0,\cost*\sinEl,(0,\yshift)}}} %

\pgfmathsetmacro\sinLon{\sint/\cost*\sinEl/\cosEl}

% angle of "visibility"

\pgfmathsetmacro\angVis{asin(min(1,max(\sinLon,-1)))}

}

\newcommand\DrawLongitudeCircle[2][1]{

\LongitudePlane{\angEl}{#2}

\tikzset{current plane/.prefix style={scale=#1}}

\draw[current plane] (\angVis:1) arc (\angVis:\angVis+180:1);

\draw[current plane,dashed] (\angVis-180:1) arc (\angVis-180:\angVis:

1);

}

\newcommand\DrawLatitudeCircle[2][1]{

\LatitudePlane{\angEl}{#2}

\tikzset{current plane/.prefix style={scale=#1}}

\draw[current plane] (\angVis:1) arc (\angVis:-\angVis-180:1);

\draw[current plane,dashed] (180-\angVis:1) arc (180-\angVis:\angVis:

1);

}

%% document-wide tikz options and styles

\tikzset{%

>=latex, % option for nice arrows

inner sep=0pt,%

outer sep=2pt,%

mark coordinate/.style={inner sep=0pt,outer sep=0pt,minimum

size=3pt,fill=black,circle}%

}

%% some definitions

\def\R{2.5} % sphere radius (must be with unit)

\def\angEl{35} % elevation angle

\def\angAz{-105} % azimuth angle

\def\angPhi{-40} % longitude of point P

\def\angBeta{19} % latitude of point P

\begin{document}

\begin{tikzpicture} % CENT

%% working planes

\pgfmathsetmacro\H{\R*cos(\angEl)} % distance to north pole

\tikzset{xyplane/.estyle={cm={cos(\angAz),sin(\angAz)*sin(\angEl),-

sin(\angAz),cos(\angAz)*sin(\angEl),(0,-\H)}}}

\LongitudePlane[xzplane]{\angEl}{\angAz}

\LongitudePlane[pzplane]{\angEl}{\angPhi}

%% characteristic points

\coordinate (O) at (0,0);

\coordinate[mark coordinate] (N) at (0,\H);

\coordinate[mark coordinate] (S) at (0,-\H);

\path[pzplane] (\angBeta:\R) coordinate[mark coordinate] (P);

\path[pzplane] (\R,0) coordinate (PE);

\path[xzplane] (\R,0) coordinate (XE);

\path (PE) ++(0,-\H) coordinate (Pproj); % to aid Phat calculation

\coordinate[mark coordinate] (Phat) at (intersection cs: first

line={(N)--(P)}, second line={(S)--(Pproj)});

%% meridians and latitude circles

\draw (0,0) circle (\R);

\DrawLatitudeCircle[\R]{0}

%\DrawLatitudeCircle[\R]{\angBeta}

\DrawLongitudeCircle[\R]{\angAz}

\DrawLongitudeCircle[\R]{\angAz+90}

\DrawLongitudeCircle[\R]{\angPhi}

%% draw xyz coordinate system

\draw[xyplane,<->] (2*\R,0) node[below] {$x,\xi$} -- (0,0) -- (0,2.4*

\R) node[right] {$y,\eta$};

\draw[->] (0,-\H) -- (0,1.6*\R) node[above] {$z,\zeta$};

%% draw lines and put labels

\draw[dashed] (P) -- (N) +(0.3ex,0.6ex) node[above left] {$\mathbf{N}

$};

\draw (P) -- (Phat) node[above right] {$\mathbf{\hat{P}}$};

\path (S) +(0.4ex,-0.4ex) node[below] {$\mathbf{S}$};

\draw[->] (O) -- (P) node[above right] {$\mathbf{P}$};

\draw[dashed] (XE) -- (O) -- (PE);

\draw[->,thin] ($(O)!3em!(PE)$) to[bend right=10] ($(O)!3em!(P)$)

node[below right] {$\beta$};

\draw[->,thin] ($(O)!2em!(XE)$) to[bend right=30] ($(O)!2em!(PE)$)

node[midway,below] {$\phi$};

\draw[thin,decorate,decoration={brace,raise=0.5pt,amplitude=1ex}] (N)

-- (O) node[midway,right=1ex] {$a$};

\end{tikzpicture}

\begin{tikzpicture} % KART

\node[draw,minimum size=2cm*\R,inner sep=0,outer sep=0,circle] (C) at

(0,0) {};

\coordinate (O) at (0,0);

\coordinate[mark coordinate] (Phat) at (20:2.5*\R);

\coordinate (T1) at (tangent cs: node=C, point={(Phat)}, solution=1);

\coordinate (T2) at (tangent cs: node=C, point={(Phat)}, solution=2);

\coordinate[mark coordinate] (P) at ($(T1)!0.5!(T2)$);

\draw[dashed] (T1) -- (O) -- (T2) -- (Phat) -- (T1) -- (T2);

\draw[->] (-1.5*\R,0) -- (2.5*\R,0) node[right] {$x$};

\draw[->] (0,-1.5*\R) -- (0,1.5*\R) node[above] {$y$};

\draw (O) node[below left] {$\mathbf{O}$} -- (P) node[above right=1ex]

{$\mathbf{P}$} -- (Phat) node[above=1ex] {$\mathbf{\hat{P}}$} -- ($(O)!

1.2!(O)$);

\end{tikzpicture}

\begin{tikzpicture} % "THE GLOBE" showcase

\draw (0,0) circle (\R);

\foreach \t in {-80,-60,...,80} { \DrawLatitudeCircle[\R]{\t} }

\foreach \t in {-5,-35,...,-175} { \DrawLongitudeCircle[\R]{\t} }

\end{tikzpicture}

\end{document}

%%%%%%%%%%%%%%%%%%%% EOF %%%%%%%%%%%%%%%%%%%%%%%

Aug 6, 2008, 6:15:22 PM8/6/08

to

Ah, I think you should have reprimanded me instead of David, who attached

text files. I attached a BASE64 encoded tex(t) file by mistake (lack of

knowledge) to my post in this thread.

I'll try to make sure I only post text attachments in the future; Tom, can

you (or anybody else here) offer some advice on how to force Alpine to

attach tex files as text?

TIA,

Erik

Aug 7, 2008, 1:10:01 AM8/7/08

to

On Aug 5, 5:27 pm, David Kastrup <d...@gnu.org> wrote:

> tom lewton <nos...@nospam.invalid> writes:

> > On 4 Aug 2008 at 6:24, David Kastrup wrote:

> > [mime garbage snipped]

>

> > look, will you *please* stop posting mime attachments to this group?

> > it is a gross breach of netiquette. if you want to share nontext

> > files, upload them to a webserver somewhere and post a link.

>

> You are confused. This was not an attachment, it was inline text.

> tom lewton <nos...@nospam.invalid> writes:

> > On 4 Aug 2008 at 6:24, David Kastrup wrote:

> > [mime garbage snipped]

>

> > look, will you *please* stop posting mime attachments to this group?

> > it is a gross breach of netiquette. if you want to share nontext

> > files, upload them to a webserver somewhere and post a link.

>

> You are confused. This was not an attachment, it was inline text.

I am not sure what you mean by "inline text". What I see in my

newsreader (Free Agent) or in Google Groups (via Firefox 3) is a

link that opens a save-as dialogue. It takes a few extra steps to

view your code, and it is not readable "in-line".

Dan

Aug 7, 2008, 2:21:47 AM8/7/08

to

Dan <luec...@uark.edu> writes:

Then your newsreader likely did not identity the text type "text/x-tex".

I could probably declare them as "text/plain" instead but then

readers/system capable of syntax highlighting will not see this as TeX

source. If it turns out to be a problem for people, that's one thing I

can do. As to inline text: if one declares a known image or text type

in the same way, it appears "in sequence" rather than as something you

have to separately save/display.

Most newsreaders _also_ offer a way to separately save the inlined text,

and that's the reason I do it in this way: cut&paste from inside the

message text, in contrast, will typically introduce all sorts of

artifacts like line wraps, unbreakable spaces and similar junk. It is

unpredictable.

In either case, a non-MIME capable reader will display the included file

just fine.

Aug 7, 2008, 5:15:44 AM8/7/08

to

t.m.tr...@gmail.com writes:

> For what it's worth, here is my take on CENT and KART sketches. I

> didn't bother with MERC, since I don't know if tikz code is of any use

> to David. I mainly wanted to learn tikz better and I've certainly

> learn a lot during the process. The drawings are parametrized so they

> can be easily rotated and scaled (label positioning might require some

> fine tuning).

>

> I hope that others will find those examples interesting, especially

> that David's sketches posed some intriguing challenges for 2D

> programmatic drawing.

I have been so busy (and exhausted in the evening) that I have not even

been able to do all the helpful and interested people justice by running

every contribution through and reading through all the sources. I hope

to be able to round up most of the work this evening.

In the mean time, let me express my gratitude for all the proferred help

and serious invested work (I had gravely underestimated the amount of

work this would mean even for people intimate with the amazing tool sets

of the TeX diagram world). There were so many different solutions

proposed that I can't, obviously, adopt all of them. That does not mean

that I don't appreciate the offered wealth. I just have a hard time

deciding how to dispense with the beer cases I am owing...

If there is a reasonable way to get a hold of the final printed results

(I think they are going to be printed and not just online published),

I'll try getting exemplars to those who could likely recognize their

contribution in the end results.

--

David Kastrup

Aug 7, 2008, 10:06:11 AM8/7/08

to

On Aug 7, 10:15 am, David Kastrup <d...@gnu.org> wrote:

> I have been so busy (and exhausted in the evening) that I have not even

> been able to do all the helpful and interested people justice by running

> every contribution through and reading through all the sources. I hope

> to be able to round up most of the work this evening.

> I have been so busy (and exhausted in the evening) that I have not even

> been able to do all the helpful and interested people justice by running

> every contribution through and reading through all the sources. I hope

> to be able to round up most of the work this evening.

I have posted an updated version together with images to

http://www.latex-community.org/viewtopic.php?f=4&t=2111 so you can

take a look there. I added some 3D lighting to the sphere to make it

more eye candy (perhaps not really desirable for the publication but

certainly good for presentation on the web ;)

I also added MERC to the mix - after setting the stage with CENT that

was a piece of cake :)

> I just have a hard time

> deciding how to dispense with the beer cases I am owing...

Sounds like a contest ;)

Cheers,

Tomek

Aug 7, 2008, 11:58:07 AM8/7/08

to

On 2008-08-07 16:06:11 +0200, t.m.tr...@gmail.com said:

> On Aug 7, 10:15 am, David Kastrup <d...@gnu.org> wrote:

>> I have been so busy (and exhausted in the evening) that I have not even

>> been able to do all the helpful and interested people justice by running

>> every contribution through and reading through all the sources. I hope

>> to be able to round up most of the work this evening.

>

> I have posted an updated version together with images to

> http://www.latex-community.org/viewtopic.php?f=4&t=2111 so you can

> take a look there. I added some 3D lighting to the sphere to make it

> more eye candy (perhaps not really desirable for the publication but

> certainly good for presentation on the web ;)

Good examples and very fine work with TikZ

Alain

PS perhaps you can send these files to Kjell

(http://www.fauskes.net/pgftikzexamples/)

Aug 7, 2008, 2:40:19 PM8/7/08

to

On Thu, 7 Aug 2008, t.m.tr...@gmail.com wrote:

>

> I have posted an updated version together with images to

> http://www.latex-community.org/viewtopic.php?f=4&t=2111 so you can

> take a look there. I added some 3D lighting to the sphere to make it

> more eye candy (perhaps not really desirable for the publication but

> certainly good for presentation on the web ;)

>

> I have posted an updated version together with images to

> http://www.latex-community.org/viewtopic.php?f=4&t=2111 so you can

> take a look there. I added some 3D lighting to the sphere to make it

> more eye candy (perhaps not really desirable for the publication but

> certainly good for presentation on the web ;)

That looks very nice and clean!

Erik

Aug 7, 2008, 5:26:34 PM8/7/08

to

On Aug 7, 4:58 pm, Alain Matthes <alain.matt...@nofree.fr> wrote:

> Good examples and very fine work with TikZ

> Good examples and very fine work with TikZ

Thanks. This is much appreciated, especially that it comes from one of

the major TikZ hackers.

> PS perhaps you can send these files to Kjell

> (http://www.fauskes.net/pgftikzexamples/)

I've already done so. Funny thing, you are the 3rd person suggesting

this to me. Kjell's web site has a lot of recognition.

Cheers,

Tomek

PS, has anyone tried fig4tex?

http://perso.univ-rennes1.fr/yvon.lafranche/fig4tex/firstlook.html

I've just came across it and never heard about it before. I wonder how

it compares to PGF/TikZ and PSTricks.

Aug 8, 2008, 12:13:42 PM8/8/08

to

On Aug 7, 10:26 pm, t.m.trzec...@gmail.com wrote:

> On Aug 7, 4:58 pm, Alain Matthes <alain.matt...@nofree.fr> wrote:

> > PS perhaps you can send these files to Kjell

> > (http://www.fauskes.net/pgftikzexamples/)

>

> I've already done so. Funny thing, you are the 3rd person suggesting

> this to me. Kjell's web site has a lot of recognition.

> On Aug 7, 4:58 pm, Alain Matthes <alain.matt...@nofree.fr> wrote:

> > PS perhaps you can send these files to Kjell

> > (http://www.fauskes.net/pgftikzexamples/)

>

> I've already done so. Funny thing, you are the 3rd person suggesting

> this to me. Kjell's web site has a lot of recognition.

Kjell has brought to my attention that there were some

incompatibilities in my code with the upcoming version of PGF. For all

interested people an updated version that fixes the issue is available

either through latex-community.org or Kjell's gallery.

Cheers

Tomek

0 new messages