Another day, another diagram. This is from a presentation about the Sun which I'll shortly be giving at Berwick Educational Association.
The diagram is fairly simple. A series of overlaid wedges. A nice thing about PSTricks is that there's a package for almost everything. In this case the wedges can be colour shaded (using pst-slope) to give the impression of a decreasing temperature gradient.
The lines in the radiation zone should ideally be random-walk zig-zags to represent the path of a typical photon! I haven't worked out how to do that so for now they're wavy lines (using \ncsin). The convection lines are done using \pccurve and specifying the angles leaving and entering the nodes at the end points.
The other useful feature of LaTeX is the \multido command; it's necessary to just specify one command (for say, one convection loop) and let \multido put the shape at regular angle increments at a fixed radius.
Here's the code.
Solar Structure Diagram
I'm a big fan of LaTeX and PSTricks and I use them often to create diagrams and graphs for my various maths and astronomy lecture notes. But to create this lunar phase diagram it was much more convenient to use another package called TikZ!
It's a pretty standard diagram; sunlight is shown streaming from the right. The Earth is at the centre with the moon shown in a (blue) circular orbit and presented at various positions around the orbit. The phase of the moon (the shape of the illuminated portion we see from Earth) is shown outside the orbit. I added some arrows and arcs to show the traditional waxing (growing larger) and waning (growing smaller) sections of the orbit and finally, the number of days since new moon.
Technical details of the code below the fold.
I needed a diagram for an article on noctilucent clouds. They range from pretty (and copyrighted) to pretty ugly online so I had a go at making my own. As usual this was done with LaTeX (via LyX) and PSTRICKS.
Here's the finished picture:
The diagram is simple: part of a circle, some tangent lines, cloud symbols and labels. Then shade between the various curves and lines. Finally, a multi-do loop to draw the Sun.
Details below the fold.
Just put the finishing touches to a planetary elongation chart. Here it is in all of its glory:
A high quality PDF can be downloaded here.
This chart shows the positions of the naked-eye planets to the east (left) or west (right) of the Sun. The vertical axis represents the days and months of the year. The diagonal bands represent constellation boundaries. The wavy yellow band is a region close to the Sun in which it would be difficult to observe the planets. This chart behaves like a game of PacMan; any planets reaching opposition 180 degrees west of the Sun wrap straight over to the evening sky on the far left. Think of this as being like an unwrapped cylinder!
The places where the paths of the planets intersect represent conjunctions. These are visually striking opportunities to see bright planets shining together in the sky. In 2015 there are at least 12 such opportunities.
There's a particularly striking gathering of the planets in the morning sky during October 2015. The planets Mercury, Venus, Mars and Jupiter will all appear together before sunrise on many of those autumn mornings.
Before you get the wrong idea Uranography is the art of making making high quality star charts. Celestial cartography is another way to describe it. I've just finished a substantial first attempt to make maps of the entire night sky - including all the stars visible to the unaided eye and lots of star clusters, nebulae and galaxies.
Click here to go to the page with my star charts and more details.
Here's one of the charts.
Setting up the star charts was a great way to become familiar with parts of the sky not visible from Northumberland. These charts are based on the code from open source PP3 Star Charts. I learned a lot of stuff along the way - namely modifying the C++ code to do things slightly differently and compiling it to work on Windows 7. I also modified the original constellation definitions (there are errors in the original). It's not perfect but I'm happy there are no big errors.
Well, now I can add Uranography to the CV! Before there's any confusion - that just means I can make star maps:
This was generated after a day of messing around with PP3 as I described previously. PP3 does most of the work but I can add bits and pieces (the large circle, planets, the compass points and magnitude scale) and the program gives me complete control over which star labels are displayed and where they go. The Milky Way runs from northeast to southwest and is rendered very nicely too.
About 8 years ago I discovered a brilliant little program for generating high quality printed star charts called PP3. Basically, it reads star, deepsky and constellation data from installed catalogues and builds a LaTeX file which can be compiled to give superb and highly customisable PDF output. And everything had to be done from the command line. I was in geek heaven using it!
Development of the PP3 software seems to have stopped around 2003. The version of PP3 which worked on my old Windows XP laptop no longer functions under Windows 7. I found various workarounds in the last year, including installing XP as Virtual Machine using Oracle VM VirtualBox. The results were hit and miss; sometimes the thing worked and sometimes it would crash with memory problems while compiling.
So today a bit of a victory; I downloaded the PP3 source and learned how to convert it to C++ and compile a new version of the software that runs on Windows 7. If anyone wants it this executable, just drop me a line. Yes, I'm aware that 99.99% of the human race will not. Next step...make star charts for my work in progress astronomy book.
I was introduced to the joys of LaTeX (and TeX) by my PhD supervisor about 13 years ago. When it came to writing up scientific reports and documents Microsoft Word just didn't cut it; documents with inline equations in Word just looked bad. Things may have improved since then (I'm not convinced) but polished, beautifully typeset documents come from LaTeX.
However, LaTeX has a steep learning curve. You have to write code in LaTeX (to produce everything from headers, footnotes, bold text, equations, etc) and then compile the document to see how it looks. LaTeX is best described as WYSIWYM (What You See Is What You Mean). LaTeX's internal algorithms deal with the best places for page breaks, positioning diagrams, equations, footnotes and so on. This is not the same as Word (or equivalent), with its WYSIWYG (What You See Is What You Get) interface and bewildering choices of styles for everything.
Now to the point.
LaTeX has a steep learning curve - no doubt about it. In recent years there have been attempts to put a nice front end on it. Something between Word (with it's shortcuts and buttons) and raw LaTeX (with the actual coding hidden from view but not inaccessible and still easily customisable).
My favourite editor - by a mile - is called LyX. I like it because it's free and easy to use. I wrote my mathematics textbook using LyX. All of my course notes were produced with it. Any time I need a diagram or figure for an exam paper....I write the code to produce it. Just to give you an idea how I use it, here's an example: a slab of graph paper with an irregular shaded region. This was part of a question about using Simpson's rule to compute areas.
To produce this diagram I called the package "pst-plot" in the LaTeX preamble within LyX:
and in the document window I placed some ERT (evil red text - raw LaTeX!)
...and LyX outputs a hires plot to the exact specifications I need.
It's easy to get started - just go to the LyX website and download the latest stable version (currently 2.10).
Dr Adrian Jannetta
Guitar strummin' explorer of the universe. Mild mannered maths teacher by day and astronomer by night.