I ran across a discussion recently of Tanaka contours, and decided to try it in 9. A Tanaka contour is a contour line that gets brighter where it runs perpendicular to the Sun azimuth on the climbing side of a contoured hill and it gets darker on the other side of the hill. It is also thicker when running perpendicular to Sun azimuth and thinner when running to or fro in the direction of Sun azimuth.
Click the image above to make it bigger.
If you overlay these lines on top of a colored raster of a terrain, especially if you use Fill rules of closest lower or higher so that regions between contour lines are the same color, you get a cool effect of terraced, 3D-like contours. It's a nice trick.
The way people usually kludge this is to take contour lines and to break them up into segments (I used the decompose to segments template) so that instead of one contour line you have a zillion lines, each of which is one segment between vertices. Next, you compute the bearing for each such tiny segment and save it as a field. I used a computed field called azi for that, with the expression
57.2958 * Atan2((VectorValue(GeomCoordXY([Geom], 1),0) - VectorValue(GeomCoordXY([Geom], 0),0)), (VectorValue(GeomCoordXY([Geom], 1),1) - VectorValue(GeomCoordXY([Geom], 0),1)))
If you have two points at coordinates x1, y1 and x2, y2, then the bearing using the inverse arctangent function atan2 is simply atan2( (x2-x1), (y2-y1)). You have to multiply by 57.2958 to convert radians to degrees. The tricky functions are copied out of the Example topic on creating a geocoded table from a drawing and are just simple functions to pull the X or Y coordinate out of the first or the second vertex in a geom.
You then have to normalize the bearing so it is always a positive number, using an expression like
CASE WHEN ([azi]< 0) THEN [azi]+360 ELSE [azi] END
to create another computed field. All the above, of course, could be done in one go.
Next, you tinker with Style to color the various one-segment lines depending on their bearing, and to size their widths so those perpendicular to the Sun azimuth are fatter. Last, you create a PDF like the one attached.
The experience teaches some lessons: first, there is some tuning we will do to make the rendering smoother and better. The PDFs are prettier than the view onscreen, and we can't settle for that! :-) Second, although it is cool the technique works just fine in 9, decomposing contour lines to a huge number of one segment lines is a kludge. Everybody else does it that way but it is still a kludge. We should put this into a special style. Third, it is gratifying 9 does this so well in the print to PDF part of it, which would without fail would have choked 8.
I'll try to get around to publishing a .mxb on this, since the formatting used is part of the art of doing Tanaka contours.
By the way, the attached PDF is called what it is because I used the Microsoft print to PDF facility using basic rendering. That ends up creating a smaller, but acceptable PDF than using the hardware accelerated rendering option. The region shown is the Mount Hood terrain elevation data that is used in the Contours examples.