Several common mussel species doing what they do.

Freshwater Mussels

Several common mussel species doing what they do.

Several common mussel species doing what they do.

Most people don’t realize it, but New Jersey is the home of roughly two dozen freshwater mussel species. These aren’t the blue or green marine muscles you’re probably most familiar with over pasta with garlic and butter. These are their  freshwater cousins, the bivalves that live in brooks and streams throughout the State.

What makes them so special? Well first, they are the filters of our rivers and streams. They eat small particulates, plankton, and algae from the waterways and are amazingly efficient at it. A few of these mussels can clear out a 5 gallon tank of water in a matter of hours that would otherwise be too murky to see through. They are also important food for birds and mammals. As a result, healthy populations of freshwater mussels indicate a healthy waterway.

Secondly, their lifecycle is fascinating. Some species can live for decades, where others for up to a century – which is a lot longer than their marine cousins. Unlike other bivalves like clams, they have distinct sexes, and when they release their larvae (called “glochidia”) in order to survive they need to attach themselves to the gills or body of a host fish for several weeks and feed off of them. Some species’ females actually deploy lures – which are parts of their bodies which they puppeteer – that look like the natural prey of their hosts. When the fish dive in to attack, they’re sprayed all over with larvae, which heightens the chance that some will latch on.

Third, they are capable of making things of beauty: Freshwater pearls. In fact, the largest American freshwater pearl on record was found right here in New Jersey. As the story goes, in the 1850s, a man by the name of Daniel Howell apparently sat down to a meal of freshwater mussels that his wife had prepared for him, and bit down on a 400 grain (~130 carat) freshwater pearl – something about the size of a golfball.

Where the details of the story get a bit squiffy, there does appear to be a core of truth to it. My wife (whose hobby is genealogy) on a lark, managed to track down Daniel Howell’s household, to find that in 1860, he and his wife had a boarder by the name of John McCaucklin who was a bridge tender for the Raritan Canal. The likely scenario is that McCaucklin brought some mussels he cleaned out of a canal lock home for dinner, and that’s when the discovery was made.

The gem believed to be the Patterson Pearl.

Sadly, after being cooked the pearl’s luster would certainly have been destroyed. However, a few years after the Howell Pearl was found (circa 1857), a man by the name of Jacob Quackenbush over near Patterson discovered a “perfectly round, pink pearl” that was 93 grains (~30 carats) in size. Nicknamed the “Patterson Pearl” or the “Queen Pearl” it was sold to Tiffany Co. for $1,500 (roughly $50,000 modern money) who then flipped it to a French jeweler for $2,500 (roughly $80,000 today) who then sold it to Empress Eugenie de Montijo, the Queen consort of Emperor Napoleon III.

Once gain, where the core story is true, the details proved a little squiffy. It is believed that this pearl now resides in the Royal Ontario Museum as part of a snake-headed brooch; however, that pearl is not round, nor pink – it is a silvery baroque-style (“crinkly”) pearl – but its weight matches precisely.

These pearl finds caused a “pearl rush” or “pearl mania” in the later half of the 1800s which began to deplete mussel populations. It got worse between 1890 and 1930, because freshwater mussel shells – specifically the mother-of-pearl interiors – became the most popular and common source of buttons in North America, prized for their carve-ability and opalescent sheen.

The opal-like (and paper thin) inner surface of a Paper Pondshell (U. imbecillis).

The opal-like (and paper thin) inner surface of a Paper Pondshell (U. imbecillis).

It was only until the advent of commercial plastics that the button industry collapsed, and a hundred years later, mussel populations have built back up once more. Freshwater mussels once again represent the largest portion of biomass in many waterways throughout the State, and are pretty much off the radar of the average New Jerseyian.

So, should you drop whatever you’re doing and run out to the nearest stream or river to look for pearls because now it’s “safe”?

Well, no. There are still serious caveats and considerations.

Like I mentioned at the beginning – where are some dozen+ species native to New Jersey, all but three of them are severely endangered, and are protected at either the State or Federal level. The three “safe” (or “least concern”) species are the:

  • Eastern Elliptio (Elliptio complanata), the
  • Alewife Floater (Utterbackiana implicata, formerly Anodonta implicata), and the
  • Eastern Floater (Pyganodon cataracta).

There are also several introduced or invasive species that are “safe” (or “compulsory” to remove in the latter case) which include the

  • Paper Pondshell (Utterbackia imbecillis – what a binomial name – it almost looks like it means “say again, idiot?” – however “utterbackia” means “outer-round” or “outer-pearl” and “imbecillis” means “fragile” – an apt description of this species’ ultra-thin shell), the
  • Lilliput (Toxolasma parvum – introduced in a few places in South Jersey), the
  • Chinese Pond Mussel (Sianodonta woodiana – highly invasive, apparently piggybacking in on tilapia gills), and the
  • Giant Floater (Anodonta grandis – a close relation of the Eastern Floater) apparently introduced in the State, whose status has not been assessed.

Everything else is on the “do not fish” list.

Only a small portion of these protections are a holdover from “pearl/button mania” as some species in some places simply evaporated and could not be replaced. The biggest contributing factor, however, is habitat depletion: Dams, serious pollution, and the death or depletion of host fish (some mussel species are very specific about their hosts, and if those disappear, so do the mussels). Invasive species like Asian clams (Corbicula fulminea) are also competing for food and space, too. So, if you’re caught keeping even the shell of one of the protected species (and you can’t prove you’ve collected them from a jurisdiction that they are not protected) you’ll be hit with a serious fine, and have all of your fishing equipment confiscated.

Possibly an Eastern Floater. Possibly an Alewife Floater. Possibly not.

Possibly an Eastern Floater. Possibly an Alewife Floater. Possibly not.

What makes it harder is that some of the endangered species can be confused with the common species, so you’ll need to be familiar enough with these critters in order to tell them apart safely.

What makes it even harder (and ironic) is that most of the State-sponsored identification keys require you to observe internal features of the shell… in other words a dead specimen (so, yes, it’s pretty much, “these are protected so don’t kill them or else, but you can’t tell if it’s protected for certain until after you kill it…”).

Even if you’re good with your identification, there are limits on harvesting. You must get a special license to fish for mollusks which is a separate thing from the normal freshwater fishing license, or the saltwater registry. It’s not difficult or expensive to get, but if you don’t have it on your person, you’re in additional trouble.

Over the course of the next month, I’m going to try and share pictures of my own specimens, as well as my progress in several freshwater mussel projects I’m fiddling around with (aquaculture, shell carving, pearl culture, etc.) so stick around. It’s bound to be interesting. 🙂

Peace,
-Steve

Quick Update

As I’m taking an extended Facebook break (no worries! no one caused it; I’m simply taking the research about social media and happiness to heart 🙂 ) I have decided that I will take up personal blogging again here and there. Since this blog syndicates everything I write directly to Facebook, all of my Facebook friends will be able to keep up with what I’m doing, too – and if anyone wants to comment, they’ll have to do so here.

And I’m doing quite a bit! I’ll go into more detail in subsequent posts, but in no particular order I am:

  • Finishing up my SIGGRAPH’18 poster on DEGAS before the conference, itself, in August.
  • Synthesizing rubies and sapphires in my basement using 1850s-era technology.
  • Trying to grow opal from waterglass and dirt.
  • Hunting for freshwater mussels in the Raritan River and its tributaries.

Stay tuned. 🙂

Peace,
-Steve

Digitally Extrapolated Graphics via Algorithmic Strokes (DEGAS) – An Oil Painting Program

So for those of you following me on Facebook, I’ve lately been working on a programming project that takes photographs and turns them into impressionist paintings. I have named this program DEGAS, which stands for Digitally Extrapolated Graphics via Algorithmic Strokes. (I’ve always loved a good name-cronym, especially when it’s a pun. 🙂 )

It’s not done with neural networks, like Ostagram.ru does. Although neural networks are all the rage right now, they only mimic the features and product of a painting, not the process.

It’s also not a filter – that is to say that the process is not fully automated. You don’t just choose a photograph and it works on it alone and then *boom* you have a painting. You have to “paint” the details onto the photo by choosing your brushes, size, angle range, and scatter, and DEGAS automates color selection and brush orientation based upon what fits the color contours the best.

A before and after shot on a test image.

A before and after shot on a test image. All the pictures here are of my wife. 🙂

In essence, it’s an impressionist gattling-brush. The choice of what features to emphasize and their final form are still more or less in the hands of the painter, but the most time consuming aspects are automated.

It’s written in plain, vanilla HTML5/Canvas. No special libraries (although I tinkered with gpu.js for a few operations that didn’t pan out). And the currently used portion of the codebase comes in at under 1,000 lines. Once I work out a few bugs, and design a nicer UI for it, I’ll probably release the source code for anyone who wishes to play with it.

The Process

So, how does it work? First it creates several canvases:

  • The Display canvas.
  • A Source canvas to hold the initial image.
  • A Blur Buffer canvas which holds a copy of the initial image, but blurred to a certain value (more on that in a bit).
  • A general Buffer canvas for compositing things on the fly.
  • A Brush canvas to hold the brush’s shape; and
  • A Brush Buffer canvas where color matching takes place.

The source image is loaded in to the Source, Blur Buffer, and Display canvases. The Display canvas is appended to the body of the document, and the Blur canvas is blurred by a few pixels to smooth out rough details.

The initial brush shape is then loaded into the Brush canvas. All a brush is is an outline with a transparent background. Generally it also has antialiased edges and some alpha for thin paint. (Brushes are generally 512×512.)

Where there are several ways to add strokes to the painting, when each stroke is placed it follows the same procedure:

  1. First, it grabs the color of the pixel at the center of the stroke.
  2. It tints the Brush canvas to this color. All detail on the brush shape is lost, but all transparency is preserved.
  3. It then reads out what allowable angles it has to paint strokes. By default it has 16 equal angles between 0 and 180 degrees. I’ve had even better results with 20 angles all 360.
  4. For each allowable angle:
    1. It reaches into the Blur Buffer and takes the area of the image that the brush will be painted on and writes it to the Brush Buffer.
    2. It then paints the brush at the appropriate angle on top of the Brush Buffer.
    3. It then runs a comparison metric on the color difference between the original area on the Blur Buffer and the painted stroke over the same area on the Brush Buffer.
  5. It then paints the brush onto the Display Canvas in the orientation that fits the color and contour of the original image the best.

And it does this dozens of times per second to a very stunning effect.

Some of the parameters that can be changed to affect the spread of the strokes include:

  • Averaging the color of the stroke, or increasing the saturation, etc.
  • The blurriness of the Blur Buffer. This helps make better stroke choices when working with noisy images, or features like hair.
  • The shape of the brush – I have 9 shapes made from actual scanned brush strokes.
  • The size and scatter of the strokes under the mouse. One generally starts out with a large size and scatter (300,300) for large features, and then fills in the details with smaller strokes with less scatter (150,100 to 50,40).
  • What angles are allowable. The more angles, the slower the process as DEGAS needs to compare each iteration, but at the same time the better the match. Or if you want to force the brush in a certain direction you can do that, too.

DEGAS also keeps track of each stroke. As a result, it can re-paint an image while loading a painting back into memory; which looks like this:

And because it keeps track of all of those strokes, it can also do some really fun post-processing. It can generate a height map of the paint:

And from that height map, generate a normal map:

And then from that normal map, add the depth of the paint by simulating light casting onto the strokes:

And it looks pretty neat:

One could potentially also use the height map to “3D print” one of these paintings onto a canvas using something like a UV ink printer (which is precisely what they did for The Next Rembrandt project).

I’ll be posting more images here soon.

UPDATE (March 29, 2017): I’ve skipped the normal map step and have gone and implemented GIMPs bump map algorithm (which computes the normals much better and shades them directly without sticking them in a normal map file first). Here’s a new video showing it in action. You may have to view it full screen as the effect of the brush strokes at this resolution is a bit subtle.

FURTHER UPDATES (Oct 16): DEGAS is now officially an “award winning algorithm.” It came in 1st place in the Graphics category at Arts in the Park (I should post some pictures). I also have a gallery of some of my work up here.

Peace,
-Steve

Harriet Tubman On the $20 Bill

/home/content/04/10839404/html/steve/wp content/uploads/2016/04/160428 Harriet Tubman

This is the first $20 bill. It was issued in the 1860’s. Lady Liberty was on it.

We’re just bringing her back as Harriet Tubman.

Another important note: Andrew Jackson didn’t appear on the $20 bill until 1928.

Before that it was:

  • Grover Cleveland (1914).
  • George Washington (1905)
  • Hugh McCulloch (1902) (Not a President!)
  • John Marshall (1890) (Not a President!)
  • Daniel Manning (1886) (Not a President!)
  • James Garfield (1882)
  • Stephen Decatur (1878) (Not a President!)
  • Alexander Hamilton (1869) (Not a President!)
  • Pocahontas (1865) (Not a President!) and
  • An Eagle (1863) (Not a President…)

Lots of not-Presidents. 🙂

Peace,
-Steve

What is My Episcopal Identity?

This is my response to Episcopal Café’s #myepiscopalidentity campaign. 🙂

———-

/home/content/04/10839404/html/steve/wp content/uploads/2016/02/160208 Episcopal Shield

The Episcopal Shield

What makes me an Episcopalian? It’s in my DNA.

It’s a long tradition in my family carried by my mother, my grandmother, my great grandmother, and further back my family line. It’s a mantle that I now bear, and by example live and share with my children.

It is a Christian faith that sees the importance of Scripture, Tradition, and Reason – all as equals. It’s a faith that doesn’t make windows into other peoples’ souls. It’s a faith that strives to agree upon matters of importance, but allows a wide range of differing opinions and expressions with everything else. It is a faith that loves music. It’s a faith that recognizes the Creeds, the universal, catholic church, and the unbroken line of Bishops that trace all the way back to Jesus’ Disciples. And it is a faith that shows how the way we pray – together in Common Prayer – also shows the way that we believe. Lex orandi, lex credendi.

A number of ethnic churches tend to identify themselves by their origins (Greek Orthodox, Russian Orthodox, Polish Catholic, etc.) and keep the rich culture of their heritage as a vessel for how they express their devotion to Christ. With the Episcopal Church it is the same, but harder to see. Many do not realize that our tradition stretches all the way back to England where, in the mid 1500s, our ancestors began to share the rich liturgy in their native English for the very first time – during a period when virtually all of the language heard in church was Latin.

The Episcopal Flag

The Episcopal Flag

It was a tradition to be understood by the common person, and as such it has spread and touched upon everywhere the English language has traveled to – every continent – throughout what eventually became the modern Anglican Communion. To this day it leaves fingerprints in our greater culture and language, leaving idioms and phrases from rituals, from turns of phrase in Shakespeare to modern idioms such as, “read, mark, learn, and inwardly digest,” or “speak now or forever hold your peace.”

Sometimes, folks from other flavors of Christianity will ask me, “Is your church based on the Bible?” And I am one to point out that, “I could more say that it’s likely your Bible is based upon my church.” The King James Version that many denominations lean so heavily upon on was “Authorized” by the Church of England, and brought to America by what eventually became the Episcopal Church. The church that today claims among its own a full quarter of our country’s Presidents, great thinkers, scientists, and artists such as George Washington, Thomas Jefferson, Fred Astaire, Judy Garland, Nat King Cole, Franklin Delano Roosevelt, Charlton Heston, Madeline L’Engle, Buzz Aldrin, and Robin Williams, but to name a few.


Judy Garland & Fred Astaire in “Easter Parade” (1948)… It doesn’t get much more Episcopalian than that. 🙂

We are educated, because we see the value in education. We hold the most graduate and post graduate degrees per capita of any Christian denomination in the United States. We are not afraid to use them.

C Teesdale Anglican ExampleMagnificat Text

Anglican Chant

Where our liturgy has come a long, long way it is still based upon essentially the same patterns and formularies that have been used for over 500 years. It is a liturgy which is predominantly made up of reciting portions of Scripture, chanted Psalms, Canticles, and readings from the Lectionary.

The 8th SacramentWe have services with thees and thous – but in the spirit of keeping the liturgy understandable we have services modern English as well (our Rites I and II). We also have a rich Daily Office, founded upon Thomas Cranmer’s original abbreviation of the seven Divine Hours down to Morning and Evening Prayer, with the distinctly Episcopalian Lesser Hours of Noonday and Compline to compliment them. We love our coffee hour after the Eucharist.

We focus on community service – feeding the poor, clothing the needy, housing the homeless – and strive to see Christ in all people, no matter who they are. We are part of a greater whole, locally adapted, and are always out to do the right thing, no matter how tough.

There is more to be said. There is always more to be said. But all of this boils down to #myepiscopalidentity.


Steve Caruso, MLIS
Christ Church, New Brunswick, NJ
ChristChurchMini

2d6-2d6 as a Base Roll For Roleplaying Games

So I am one to sometimes meddle with making roleplaying systems (in fact I’ve been playing games in that system for years now)  but in the afterglow of storytelling at PrinceCon for the first time in a long time, I more seriously started to ponder about dice. The PrinceCon system — now with more than 40 years of history behind it — presently runs off of a d20 OGL-based system which (like all d20-based games) resolves randomness with a roll of a 20-sided die, plus modifiers, to meet or exceed a difficulty.

d20 probabilities to roll "at least" the number shown. From anydice.com.

d20 probabilities to roll “at least” the number shown. From anydice.com.

A single die roll, of course, is a completely flat distribution. You have a 5% chance to land on any one number and a 50% chance to roll an 11 or higher.

3d6-graph

The 3d6 bell curve. From anydice.com.

I’m not one who likes flat distributions (they’re all over the place) so when I play d20 I tend to play with the 3d6 variant, which makes a nice bell curve (seen above) whose peak falls betwixt 10 and 11, and whose extremes (3 and 18) have a mere ~0.5% chance of happening.

Probabilities for landing at least on the number listed for 3d6. From anydice.com.

Probabilities for landing at least on the number listed for 3d6. From anydice.com.

This works well for many things, but it’s not as elegant as a d20 in some respects. First, a d20 has a range of 20 values. In a system where a value of 10 is average (like d20 OGL) that works out well. 3d6 only has a range of 16 values (3-18), so it is much shorter and by default, difficulties below 3 are impossible (which effectively takes out a chunk of range). Furthermore, none of the values on the curve are nice “round numbers.” Getting a 10 (base) is a 62.5% chance, getting a 15 (+5 base) is ~5%, and getting an 18 (+8 base) is about 1 in 200.

Playing around with probabilities on AnyDice.com (awesome site) I fiddled around with different possible dice combinations and unexpectedly found that 2d6-2d6 might present a more elegant solution.

2d6-2d6 bell curve. From anydice.com.

2d6-2d6 bell curve. From anydice.com.

Where it seems like a lot of dice (and a bit more math) 2d6-2d6 creates a beautiful graph with some elegant properties.

  • First of all, it’s a nice bell curve.
  • Second, the peak of the bell curve is on 0, so all results will fall around the base modifier. In a system where the base statistic is 10 that means that a roll will range between 0 and 20 (just like d20, albeit 0 is possible).
  • Third the major increments fall upon rather round probabilities:
"At least" rolls on 2d6-2d6. From anydice.com.

“At least” rolls on 2d6-2d6. From anydice.com.

  • About 90% of the time you’ll at least hit -4 or more.
  • About 75% of the time you’ll hit -2 or more.
  • About 2/3rds of the time you’ll hit -1 or more.
  • Base probability (0) is 55% (as close to half as one can get)
  • +2 is almost exactly 1 in 3
  • +3 is roughly 25%
  • +5 is roughly 10%
  • +6 is roughly 5%
  • +7 is roughly half that (~2.5%)
  • +8 is roughly 1%
  • +9 is roughly 1 in 250; and for something truly epic
  • +10 is roughly 1 in 1000

This progression makes incremental changes to the difficulty of a task ease into a curve with some nice round numbers. 🙂

And given that the extremes happen so rarely, it gives a good excuse for an epic resolution as they really are a one-in-a-thousand shot.

all-of-them

A comparison of all three curves. From anydice.com with modifications.

 

Now, this has direct application to d20-like games. The only thing that would have to change is the calculation of base skill levels and roll modifiers as now everything would need to start out at a base of 10. In the end you would get the same range as a d20, but with a nice bell curve.

Mean Deviation: Range:
d20 10.5 5.7 20 [1-20]
3d6 10.5 2.96 16 [3-18]
2d6-2d6 0 3.42 21 [-10-10]

As such I believe that there is some good potential for using 2d6-2d6 as a base roll for table-top RPGs.

Peace,
-Steve