#rdcHQ Road Trip – Part II

Another trailer from RDC Junior Member Nathan Malamud – we’re excited to see the full-length motion picture coming to a computer screen near you on August 3 (although Nate is keeping the option open to extend his release date to make it really cool).

MathML Meetup/SVGMath

Happy Tuesday! Today in the MathML Meetup, we devoted the session to MathML → SVG conversion. We discovered that our chosen tool, SVGMath, has been upgraded to work with OpenType fonts, most notably the STIX Font Project we are using in our SVG Track.

Professor Jacques Distler modded a working version of SVG Math for his own project, and we used it as an illustration on how to work with diffs. Jasper and I both agree with Distler’s sentiment that it would be really useful to have the new version be a proper Python package, or have this code readily accessible in github, and we may fold this into our own release cycle at the end of the program.

Once we successfully patched SVG Math to the working version, we found the documentation of the original program to be concise and useful. It did not take long for us to successfully convert our first equation into an SVG format. Below are the results showing the original equation on the left and the generated SVG on the right:

MathML:

  D
  =
  
    
      Q
      0.381
    
    
      18.93
      
        
          [
          
            
              
                (
                
                  P
                  1
                  2
                
                
                
                  p
                  2
                  2
                
                )
              
              .
              Y
            
            
              Cr
              ⁢
              x
              ⁢
              L
            
          
          ]
        
        
      
    
  

SVG:

Using a simple python command …

python math2svg.py new.jasper/Page_240_02.html

… our equations are converted from MathML to SVG markup code. Below is the SVG markup for the equations displayed above:

Debugging

We are experiencing encoding errors with certain entities that we need to track down when attempting to run in batch-file mode. We think this is most likely related to an unsupported element in the MathML namespace, although most elements are supported as shown in this snippet from mathml-coverage.txt from SVGMath:

    Token elements:
         <mi>, <mn>, <mo>, <mtext>, <ms>, <mspace>
    General layout schemata:
         <math>, <mrow>, <mstyle>, <mfrac>, <msqrt>, <mroot>,
         <mfenced>, <mphantom>, <mpadded>, <merror>, <menclose>
    Scripts and limits schemata:
         <msub>, <msup>, <msubsup>,
         <munder>, <mover>, <munderover>, <mmultiscripts>
    Tables and matrices:
         <mtable>, <mtr>, <mtd>

Unfortunately, the debugging interface is not particularly verbose (as with other command line conversion programs, such as PrinceXML). Ideally, we want this script to be designed to become part of a workflow scenario, so it will be easy to batch generate new equations as they are added to the repository.

In other debugging news, we are working to reconcile some presentation issues between WordPress and MathJax. We are hopeful to have them resolved to support code contributions from other cool folks interested in our project.

More news next Meetup!

#rdcHQ Road Trip – Part I

Greetings from #rdcHQ! This week, we kick off our adventures with the first of a series of trailers for a new #rdcHQ Home Movie by Nate Malamud. This idea was inspired by a recent trip to the Portland Zoo:

The trailer was created in iMovie using Nate’s imagination and a Flip video camera. Production went smoothly, despite the fact that we had to convert the video clips from .AVI format to .m4v using the excellent open source utility, HandBrake. This conversion was necessary to import the video from the Flip into iMovie 11. Nate is working on a full-length feature film which he plans to release on August 3.

Our Zoo Adventure was part of a spontaneous #rdcHQ Road Trip to attend the new “Community Leadership Summit.” It was an interesting “unconference” (+1) and we learned new things and met smart people. We also had the opportunity to talk a bit about what we do at RDC Headquarters and about mentoring in general.


Photo by Mark Terranova / Community Leadership Summit #csl11
<

SVG Meetup – Patterns and Tiles and Blends! Oh, My!

Greetings from #rdcHQ! This week in the SVG Track, we completed another set of illustrations under Simple Schematics. This new set introduced an essential technique as we move into the advanced levels known as interpolate.

Interpolate

For anyone familiar with Adobe Illustrator, this technique is similar to using the Blend tool. It’s a little more difficult to find buried in Inkscape’s Extensions menu.


(Extensions → Generate From Path → Interpolate)

This command makes it very easy to create a set of evenly spaced lines by drawing and manually spacing the first and last line in a series and generating the steps in-between programmatically. The number of lines between the first and last segment is the value that should be used for the interpolation steps.

The charts, grids and patterns that are in the advanced levels of our SVG Track will benefit greatly from this technique. We are in the process of building these patterns for our graphic library so they will be available for use on similar illustrations.

Creating Tiled Clones

We will also make good use of Tiled Clones (Edit → Clone → Create Tiled Clones) to create cross-hatching effects and other pattern fills that are common to our collection. This technique renders custom patterns quickly based on an object or group of objects. When used in conjunction with a Wacom tablet, this technique can often give a hand-drawn quality to elements of a technical illustration.

The technique above shows a group of lines being repeated in a reflective manner. Below is the same set of lines creating a very different effect by being tiled in a linear fashion.

Lots more coming up … Stay tuned! :-)

Return top