Saturday, April 30, 2011

Vector graphics and Inkscape

On a whim, I decided to try Inkscape. It's a completely free open-source vector graphics editor.

Most images, like those taken by digital cameras, are raster graphics - they consists of thousands and millions of individual pixels, a bitmap. The storage and compression algorithms are different, but all raster graphics share one thing - they take up a lot of space on hard drives. Now, that's a pretty hefty disadvantage. A 500x500 pixel image may be just 250kB, but a typical 1000x2000 image is 2MB, and it just scales up from there.

Raster graphics also pixelate. Try to take a tiny 100x100 image and blow it up to screen-size and it just becomes fuzzy.

Vector graphics solve both those problems. They store images as a series of vectors, which can represent curves, polygons, and lines. For simple images - maps, diagrams, graphs, basic 3D images, and line drawings - vector graphics can have absurdly small filesizes, often smaller than Word documents.

And, the vectors can be scaled infinitely. So you could take a postage-stamp-sized .SVG file, and blow it up to the size of a billboard, and it'd still be perfectly smooth. PDF files use vector graphics, so they can be zoomed in nicely.

They're not perfect for everything; normal photographs do not work as vectors. But for simple images, vectors have another advantage: Each object that you create remains a separate piece, even after saving. You can move each independently at any time, thus making changes that are laborious in raster images extremely simple. For example, if there is text on top of a complex background, it's impossible to move it in a raster image if it's not in a separate layer. In Inkscape? Click, drag.

Here's my first image created in Inkscape, the aforementioned station schematic. Below is a rasterized version of the vector image (Blogger doesn't accept vector images); for the (now slightly updated) vector version, see the file page on Commons. (The new version has more street names and a compass rose).

I got reddited

Apparently, someone on reddit found and liked my post about the M-407 Black Beetle. It was kinda neat to see my traffic spike for a day.

Thursday, April 28, 2011

Macbeth Essay

Long and frustrating, though it's going well. A practice run for our senior critique / thesis paper, if you will. It's frustrating trying to read literary criticism, but I just have to remind myself that this is the last literature-analysis class I will take. (My only English classes at BU focus on communication in engineering and the writing of scholarly papers).

And, it's not all bad. I get to use multiple layers of nested parentheses (which are lots of fun (especially when you get to 2 and 3 interweaving layers)); semicolons are also in abundance in my writing. And Shakespeare does have neat things to say sometimes; who could remain unmoved by Lady Macbeth's command for the spirits to “unsex me here, / and fill me from the crown to the toe top-full / Of direst cruelty” (1.5.48-50).
 
Back to work...

Tuesday, April 26, 2011

Well, that's strange

So, I've been driving my sister's Civic for the last 2 months while she's been away. (It gets better gas mileage than my van...). A few weeks ago, it suddenly had trouble starting - it coughed to life, but slowly. Then it got better, and then it started happening again.

So, we took it in for service. It turns out that there is absolutely nothing wrong - I just have to keep it filled up. Apparently, if an old-model Civic is below a quarter tank of gas, then it's basically starting on fumes. Very random.

Sunday, April 24, 2011

Boston University West - transit art

The Green Line stop at Boston University West has on its signs a series of public art drawings. The drawings were made by a BU masters student, a local artist named Andy Bell. He happens to be a standup guy - I've been in communication with him about the art - and the signs are really neat:





Please note that those four images are NOT free use; the drawings contain the copyright of Mr. Bell, and I use them only under fair use, which is non-free.

This sign map, however, is free use:

MegaIntersection pictures

The following pictures are taken from central campus, at the south end of the BU Bridge. At this spot, 3 lanes of Route 2 coming from the BU Bridge cross 6 lanes of Commonwealth Avenue (and the 2-track Green Line B Branch) - all on a giant elevated structure, under which are 6 lanes of I-90 (the Mass Pike) and the 2-track Framingham/Worcester Line. It's downright impressive engineering.

Looking north, from Comm Ave towards the BU Bridge (with the Grand Junction Railroad and Storrow Drive underneath) with I-90 in the foreground:

A closer view, again through the chain-link fence:

And looking at the chain-link fence:

Trams on the median of Commonwealth:



As always, click to embiggen. I may upload these images to Wikimedia Commons under the username Pi.1415926535, and all these images are free use anyway.

Saturday, April 23, 2011

Boston Visit!

I spent most of Friday in Boston for an accepted students day at BU. It was quite enjoyable; I got to meet some of my fellow engineering students and fellow honors college students, as well as talking with current honor students. It was excellent, and definitely confirmed my decision.

I also got to take a look at a dorm room - lived-in, not the empty example room - in the Towers, where I will live next year. The obligatory picture was taken:


(Note my complete disregard for the keep-off-the-grass chains.... such a rebel.)

After the visit, my folks and I walked down Commonwealth Avenue, from Kenmore Square to west campus and back. With two cameras, we took a ton of pictures. I'm going to break them up into several posts.

Here's one picture that doesn't fit anywhere else, though. It's a chandelier inside the "Castle" on Bay State Road:



(click to enlarge to lanterny goodness)

Thursday, April 21, 2011

I am an engineer.

So, I got a new pocketwatch today. It's pretty neat. But, it was fifteen days off.

A normal person would either ignore the date, or spend five minutes winding.

But I'm an engineer. So I spent fifteen minutes building a little mechanism out of Lego parts so that I could wind it in 15 seconds with a motor.

Wednesday, April 20, 2011

Unbreaking the Rubik's Revenge

As you may know, I own several variations of the Rubik's Cube. I own the regular 3-on-a-side version, 4-a-side and 5-a-side variants (called Rubik's Revenge and Professor's Cube, respectively), and the weird, angled-turn Square One.

I've been playing with the Revenge a lot lately; it's not as tricky as the 5x5x5 cube, but it's tricky. I've got it all memorized except for one lengthy sequence that fixes a parity error*.

Last week, one of my classmates was mixing it up when she tried to turn two perpendicular sides at the same time. Two pieces - an edge piece and a corner piece - popped out of the assembly. Nothing was broken, but the cube was about to fall apart.

I was able to get the edge piece back in, but not the corner piece. The cube held together, and I very carefully solved it. I'd managed to guess the orientation of the edge piece correctly. However, I still didn't have a complete cube. No matter how I twisted sides, I couldn't open a big enough gap for the corner piece to fit back in.

Fortunately, I found Chris Hardwick's guide. (I also use his directions for solving the cube).

It's actually really easy to take apart the Rubik's Revenge. (Taking apart a standard 3x3x3 Rubik's Cube is more difficult and a bit riskier). Just slip a flathead screwdriver (or a similar object) under an edge piece and carefully pry it out. After that, it's easy to change out corner pieces. Just pop the edge piece back into place and it's good as new.

Tuesday, April 19, 2011

Monocle

I am quite pleased, because for a super secret future project of mine, I have had the occasion to make a monocle.


The lens is about 30mm in diameter; its assembly comes from the scanner that I took apart for my second post.

I made the frame out of some materials I bought last month - sixteenth-inch aluminum tubing, with even tinier brass wire inside to keep it from buckling. In what historians are calling "unprecedented but not really that impressive", I managed to solder it closed myself.

The chain was 2 dollars at a craft store. The lens is attached to the frame with my trusty epoxy clay, painted silver.

Interestingly, with a large lens held at arms length, it can function as the eyepiece of a primitive telescope.

Monday, April 18, 2011

Sensible Amtrak Schedules

One thing has always bugged me about Amtrak's Northeast Regional services on the Northeast Corridor: they're not regular. You can't say "oh, I'll take the three-o'clock train" without consulting a schedule first, because they don't operate on a very logical schedule.

For example, these are the weekday departures from Washington DC, heading to Boston. Regional trains on the left, Acela Express on the right:
0315    0500
0450    0700
0725    0900
0840    1000
1025    1200
1205    1300
1405    1400
1502    1500
1605    1600
2200

And southbound departures from Boston:

0615    0510
0815    0605
0935    0715
1103    0910
1340    1113
1520    1215
1735    1310
1848    1515
2130    1630
               1720

There's no pattern to any of the Regional departures; they're not even concentrated at a few minutes past the hour like the southbound Acelas are.

All of the services should be like the northbound Acelas: almost hourly, and always at exactly the same interval past the hour. This should be the ideal northbound schedule:


0330    0500
0530    0700
0730    0900
0830    1000
1030    1200
1230    1300
1430    1400
1530    1500
1630    1600
2130

Put the Regionals on the half-hour, and Acelas on the hour. The British (who always know how to run a railway) do it that way. For example, this is what the services out of King's Cross in London look like:

xx:00, to Edinburgh Waverley (extended on alternate hours to Glasgow Central).
xx:10, to Leeds.
xx:30, to Newcastle (with some services extended into Scotland).
xx:35, to Leeds.

It's fantastically simple. You know the 12:00 is to Edinburgh and the 12:30 to Newcastle, because it's like that every hour. It's simple, easy to remember, and convenient. And that's what brings in transit riders.

Wednesday, April 13, 2011

Vacation

It's music trip time! I will be spending the next four days playing trumpet and exploring Washington DC! And enjoying the company of my wacky friends!

...and not blogging. Ah well. I'll be back on Monday.

It's Official.

Deposit is sent. I am officially a member of the Boston University class of 2015.

I'm looking forward to the next four years.

Monday, April 11, 2011

The worth of the human body

In one scene of the novel Dead Poets Society, a character's father says that he must be worth more than "five ninety-eight" - which he explains is the price of the human body, when separated into elements and sold individually. I'm not sure if he meant $5.98 or $598, but I was curious what that cost would be today.

Please note that I am not implying disrespect for the worth of a human; the father is a stupid and abusive character. I'm just curious on a scientific level, and it's an interesting and worthy look at what the human body is made of.

Elemental abundances and total masses in the human body are from Wikipedia; I also borrowed some of the code for the table. Costs are from Chemicool; bulk costs unless only pure cost is given.

Only elements with nonzero cost are given, plus a few prominent ones; the whole list is about three times longer, but most of the trace elements are present in such small concentrations that they're just about worthless.

Element Percent of Mass Mass (kg) Cost per kg Cost
Oxygen 65 43     $0.20     $8.60
Carbon 18 16     $2.40   $38.40
Hydrogen 10 7   $12.00   $84.00
Nitrogen 3 1.8     $4.00     $7.20
Calcium 1.5 1.0 $200.00 $200.00
Phosphorus 1 0.780 $300.00 $234.00
Potassium 0.25 0.140 $650.00   $91.00
Sulfur 0.25 0.140 $500.00   $70.00
Sodium 0.15 0.100 $250.00   $25.00
Chlorine 0.15 0.095     $1.50     $0.14
Magnesium 0.05 0.019     $2.90     $0.22
Iron 0.006 0.0042     $0.20     $0.00
Fluorine 0.0037 0.0026     $4.94     $0.01
Zinc 0.0032 0.0023     $1.80     $0.00
Silicon 0.002 0.0010     $1.40     $0.00
Rubidium 0.00046 0.00068 $12,000   $81.60
Strontium 0.00046 0.00032 $1,000     $0.32
Boron 0.000069 0.000018 $5,000     $0.09
Arsenic 0.000026 0.000007 $3,200     $0.02
Cesium 0.0000021 0.000006 $11,000     $0.07
Gold 0.000014 0.0000002 $47,000     $0.01

And the grand total is...... approximately 840 dollars, over half that for the calcium and phosphorus which are tricky to get in pure amounts.

It's interesting that gold, at $47,000 per kilogram (depending on market prices), is worth a penny despite there being only 0.2 mg in the human body. (The few atoms of radium, despite a value of 2.8 million dollars an ounce, still cost about one billionth of a penny).

Just like they do on CSI

CSI and its ilk love a lot of things. Single-source clues: feathers that only come from ostriches, dirt that only comes from one coal mine. Improbable coincidences. And of course, ridiculous photographic enhancement. They can pull a face from a reflection on a flagpole.

And now, I feel darn special. I just identified a picture via a hidden reflection. Here's how.

This image was uploaded to Commons a few years ago. The author didn't specify where it was taken.

(click for larger version)

Now, it's immediately obvious that this is an MBTA Orange Line train, somewhere in Boston. (The Oak Grove rollsign confirms that). In the background we see catenary wire supports, thus this is a station on the Southwest Corridor between Back Bay and Forest Hills. The inbound (Oak-Grove-bound) train and the Amtrak tracks to the left indicate we're looking south, as do the shadows.

The white curved roof supports are the next clue; Bing Maps shows that only two stations have those support poles with the semi-open design. Those are Roxbury Crossing and Green Street. But there's no way to narrow it down any further; there's no background detail other than trees (which both stations have), and no station signs visible.

But wait. Zoom in on that image again. There's a lot of reflective surface visible: the train windows. And in the second window on the train, you can see a slightly-fuzzy station sign:

Let me flip that around for you, and brighten the image a bit for contrast:

Suddenly, you see it. The "ROSS" of "ROXBURY CROSSING" is visible. This is Roxbury Crossing station.


Lest you think I'm seeing more than I should in that fuzzy detail, I found a corroborating piece of evidence. Take a look at the concrete wall which separates the subway and mainline rail tracks. On the far right of the image, it terminates about at the last white column. At Green Street, the wall continues down onto the open platform.

Sunday, April 10, 2011

Make Music

This is incredibly cool.

It's a music generator. Pitch is on the vertical axis, and time on the horizontal. You can play chord and scales (it uses xylophone notes) or create an ethereal drumbeat. There's very little dissonance to work around, and almost anything sounds neat. A fun way to waste some time.

Saturday, April 9, 2011

Atlantic Branch Map

After noting a request on the talk page, I have made and uploaded a map for the Atlantic Branch of the Long Island Rail Road. I think it's pretty neat:



(Click to go to the file page)

The background map is public-domain and from the National Atlas; I added the coloring and station markers and names.

Two seconds that represent my day

Tennis match, second set. I lost the first set, and on my way to lose the second. I'm down 2-1 in that second set.

My opponent hits a shot: short, spinning, and to my right. On the bounce, it spins further to the right and away from me. I swing but miss the shot; as I do, my legs buckle.

My calves had been sore and cramping earlier; the opposing team's school trainer happened to be there and helped me out. But this time, it's bad. Both legs give out at the same time, and I barely manage to throw my racket away (no sense breaking my wrist while I'm at it).

I hit hard, skin my knee, then somehow skin it a second time, this time right below the kneecap. I roll over and realize I can't get up. Both calves feel like they have a knot in the middle. It's probably another thirty seconds before I totter over to the fence.

But by that point, the pain is dull enough to ignore. I play six more games, hurting every step of the way. Running on adrenaline and stubbornness, I even win two of them.

I didn't win. Team didn't win, either. But that little bit of persistence - playing despite the pain - I'm proud of that.

And don't let anyone ever tell you that tennis is a non-contact sport. Cause hitting the concrete isn't exactly much more pleasant than hitting a person.

Wednesday, April 6, 2011

Tuesday, April 5, 2011

Unbroken Images!

So, you may have noticed that a lot of images I post were cut off on the right side, just a few pixels. My blogger template was just a hair to narrow to handle standard 400-pixel-wide image thumbnails.

So, I went into the code for the template and messed around a bit. I changed the 410-pixel wide post area to 440 pixels; this allows for 400-pixel-wide images plus the frame that Blogger inserts. Change the whole width a bit et voila, unbroken images.

A small change, but I like the look. I might make it even a bit wider in the future.

Pictures from the T Part 1: Green Line

My visit at BU got done around 3, too late to catch the 3:20 train home, so I had plenty of time to kill. I walked down Commonwealth Ave. to BU West:
(Not a free-use image due to Andy Bell's neat art on the sign)

I rode from BU West inbound, then got off at Boylston. Boylston is a somewhat weird station. It was originally four-tracked, with two island platforms each serving two tracks. The inner pair of tracks are still operative, but the outer pair are not. They dip under the inner tracks just south of Boylston, and to head the unused southern section of the Tremont Street Subway, which allowed streetcars to reach South Boston and briefly (1901-08) the Washington Street Elevated.

But the inbound track isn't completely unused - the MBTA put two old streetcars on display, which is very cool. Here's a shot of Boston Elevated Railway #3295 and its sign:




Number 3295 is a PCC (President's Conference Committee) streetcar. The PCC cars were top-of-the-line in the late 1930s and engineered impressively; the MBTA still uses ten of them of the Ashmont-Mattapan branch of the Red Line.

After waiting on numerous B, C, and D branch trams, I finally caught a E-branch tram out to Lechmere. There, I walked around and boarded an inbound train, but got off at Science Park.

There, I sought out the MBTA official on the platform. Not a cop, but there to keep order and assist the tram drivers. Contrary to the image of the MBTA as disliking photography, he was familiar with MBTA policy that allows non-threatening photography and told me to have fun. I took a few shots down the viaduct:



The Science Park station is in the middle of accessibility-related rebuilding, hence the temporary wooden platforms. Not all of the platforms were wooden, only about 100 feet of length on the Lechmere side.


Then, I boarded a tram and got off at North Station and changed to the Orange Line.. but that's for next post.

Monday, April 4, 2011

"Celebration of the Underground"

On my way to BU in March, I didn't take a lot of pictures. A blurry one of a T map, plus the Storrow Drive panorama pictures, plus two more which I'll get to in a moment.

I did travel quite a bit, though. From South Station, I took the Red Line to Park Street, then a Green Line tram to Government Center and its weird triangular platform. Then a Blue Line train to the loop platform at Bowdoin, where I exited the train, watched it go around the loop, then boarded the now-outbound train back to Government Center. From there, I took a Green Line tram out to Blandford Street (on the east end of BU).

I did get two neat photographs, which cover about half of the neatest pieces of public art I've ever seen. Created by artist Lilli Ann K. Rosenberg, it's a mosaic mural titled "Celebration of the Underground" and shows the first 100 years of Park Street Station and the Tremont Street Subway, which opened in 1897.

I was only able to photograph part of the mural due to ongoing construction (and grumpy construction workers...) but I stitched two pictures together into a composite:


(Please note that unlike most images from this blog, this image is NOT free-use. It contains the inherent copyright of the original artist, Ms. Rosenberg, by US law and can only be used in limited circumstances.)

You can find more about MBTA public art from the MBTA here.

Sunday, April 3, 2011

Storrow Drive Panorama

During my March visit to BU, I took a lot of pictures. The pictures of the T are coming shortly, but first I wanted share the pictures I took that weren't of the T.

I got to BU a bit early, so I walked around campus a bit. At the end of Silber Way, there's a small footbridge. It takes you over Storrow Drive and onto the Charles River Reservation (BU Beach, as it's called locally).

It was a strange juxtaposition: on the middle of this bridge in the middle of a crowded city, with fifty cars a minute rushing below, I could see no one. The cars were rushing by too fast to see inside, no one was passing on the Beach, and the brownstones hid Commonwealth Avenue.

So, I took a picture, facing east:

Then, I took ten more, rotating on the center of the pedestrian bridge.

Yesterday, I stitched them together in GIMP. It wasn't perfect - I was doing it all by hand, which means that the rotation is only approximate, and due to the different depths in each picture, only a few things match up perfectly. Also, I did not color-balance them. But I'm still quite proud of the result:



(which you should definitely click on to emBostonize)


If you'd like the original version to play with or modify, I've uploaded it to Wikimedia Commons and you can find it here.

Friday, April 1, 2011

Important News Update for Bostonians

April 1st:

A giant lobster has been spotted emerging from the Charles River just north of central Boston. The creature - rumored to have been disturbed by ongoing construction at Science Park - climbed onto the BU Beach at around 9:30 am this morning.

After sunning itself for a few minutes in the rain, the two-hundred-foot arthropod ambled up Storrow Drive then onto the Route 1 ramps. It snapped several cables on the Leonard P. Zakim Bunker Hill Bridge with its bus-sized claws, then apparently began to take a nap on top of the 10-lane highway, which carries Interstate 93 over the Charles.

Reports that the lobster is plucking outbound commuter trains off their rails are unconfirmed; however, it does not appear that the monster is disrupting traffic. Current reports indicate delays of just 5 minutes between Charlestown and the I-90 interchange. Despite the need to avoid the giant tail and ten silo-sized legs, the two remaining lanes of the bridge are "no worse than the old Central Artery," according to commuter Charlie Onmta.

Orders to kill the lobster with a missile strike are on hold pending a City Council vote on whether to make a hot or cold lobster roll from the remains.


(Image of lobster borrowed from Google Maps)