Saturday, October 31, 2009

Plucker's Quartic Curve

A quartic curve in the plane has a maximum of 28 real bitangents. Plucker came up with the following sort of example that attains that bound, which I illustrated in a particular case with phcpack and Sage:




Friday, September 18, 2009

More polytopal animations

I was inspired by a still image from the Wikipedia entry on the 24-cell to make an animation of rotating and then stereographically projecting the 24-cell, showing the images of the original polytope edges. Math on Wikipedia is pretty spotty, but the polytope entries have really become top-notch in the last few years.
Here's a still from the animation:



and a medium and small resolution version of the animation:

small (300x300, 6 MB)
medium (512x512, 17 MB).

Thursday, September 3, 2009

600-cell animations

Over the last year or so, when I have time, I've been trying to fine tune ray-traced animations of polytopes (using Sage, Tachyon, ffmpeg, and cddlib). My latest effort was to do a loop of Schlegel projections of the beautiful 600-cell. The 600-cell is one of the six regular polytopes in 4 dimensions; its usually considered the 4D analog of the icosahedron. Here's a still from my animation:



Since Blogger's re-encoding butchers my movies, I will just post links. Here are four sizes:

small (320x200, 3.5 MB)
medium (640x400, 7 MB)
large (1280x800, 13 MB)
large, high-res (1280x800, 33 MB).

Friday, July 24, 2009

Twenty Four Cell, take 2

Hmm...blogger re-encodes my video and for some reason their version looks like crap, so I won't even leave it up. I think my new attempt has much better lighting, and the faces have translucent panes now. But here is a still shot:



Three sizes of the new version:
small (320x200)
medium (640x400)
large (1280x800).

Thursday, July 23, 2009

Witch of Maria Agnesi

There's one on wikipedia like this, but for an upcoming class I wanted to do it in Sage:




xtreme = 4.1
myaxes = line([[-xtreme,0],[xtreme,0]],rgbcolor = (0,0,0))
myaxes = myaxes + line([[0,-1],[0,2.1]],rgbcolor = (0,0,0))
a = 1.0
t = var('t')
npi = RDF(pi)
def agnesi(theta):
mac = circle((0,a),a,rgbcolor = (0,0,0))
maL = line([[-xtreme,2*a],[xtreme,2*a]])
maL2 = line([[0,0],[2*a*cot(theta),2*a]])
p1 = [2*a*cot(theta),2*a*sin(theta)^2]
p2 = [2*a*cot(theta)-cot(theta)*(2*a-2*a*sin(theta)^2),2*a*sin(theta)^2]
maL3 = line([p2,p1,[2*a*cot(theta),2*a]], rgbcolor = (1,0,0))
map1 = point(p1)
map2 = point(p2)
am = line([[-.05,a],[.05,a]], rgbcolor = (0,0,0))
at = text('a',[-.1,a], rgbcolor = (0,0,0))
yt = text('y',[0,2.2], rgbcolor = (0,0,0))
xt = text('x',[xtreme + .1,-.1], rgbcolor = (0,0,0))
#tt = text('t',[.15,.1], rgbcolor = (0,0,0))
matext = at+yt+xt
ma = mac+myaxes+maL+am+matext+maL2+map1+maL3+map2
return ma

def witchy(theta):
ma = agnesi(theta)
agplot = parametric_plot([2*a*cot(t),2*a*sin(t)^2],[t,.001,theta], rgbcolor = (1,0,1))
return ma+agplot

a2 = animate([witchy(i) for i in srange(.1,npi-.1,npi/60)]+[witchy(i) for i in srange(npi-.1,.1,-npi/60)], xmin = -3, xmax = 3, ymin = 0, ymax = 2.3, figsize = [6,2.3], axes = False)

a2.show()

Wednesday, July 15, 2009

24 cell movie

This is basically a test of my workflow for a more ambitious project, but its somewhat amusing in its own right. The original 48 MB version is here (much better quality).

video

Tuesday, July 7, 2009

Michael Corral's Calculus 3 book

Last year I became aware of the fantastic free calc 3 book by Michael Corral. His website for it is here. I wanted to be able to compile the latex source files myself but couldn't get it to work on my mac or windows machines. I just gave it another try and finally succeeded on OS X.

Besides using his calc3book.sh script, I found it necessary to:

1) install pgf/tigz.
2) put picins.sty in my tex directory
3) Put the metapost files from m3Dplain in my tex directory.

Its a beautifully done book, so I am excited to learn some of the tricks Corral uses.

Monday, July 6, 2009

Hearing a trigonometric identity

If you force a harmonic oscillator with natural frequency w_0 with a sinusoidal force of frequency w, the resulting steady-state is a linear combination of those two frequencies. If its something in the audible range, you hear either the two seperate frequencies or one frequency with a beat if they are close together. In other words, you hear either the right or left hand side of the identity shown below.



Sage source code available here. Ironically, because of my use of html I can't seem to show the source directly here.

Small frequency difference.

Smallish frequency difference (close to the Ma Bell tone).

Intermediate frequency difference.

Large frequency difference - you definitely hear it as a 2-note chord.

Wednesday, June 24, 2009

symmetry in chaos

Recently SIAM had a deal to get some books from their catalog cheap if you bought the new edition of "Symmetry in Chaos" by Field and Golubitsky. So I did, and couldn't help but try to reproduce some of their figures. I think they might have a typo in their parameters for their figure 2.3 (or I am making some mistake, quite likely), but after exploring a bit with other parameters I got the following, with iterates of

Saturday, June 13, 2009

Mixmead

Recipe:

1.5 lbs Late Summer Wildflower Honey (Talking Oak Farm, WI)
3 lbs Northern Brewer Orange Blossom Honey (CA)
3 lbs Skalko's Honey Bee Farm Honey
3 lbs Duluth Whole Foods Coop (not the chain) Honey
1 cup Northern Brewer Gold Malt Extract
1 handful o' hops from Grant Anderson
Lalvin EC-1118 S.bayanus Champagne Yeast
...after 2 months added 1/2 cup of Adro Hungarian Forest Honey (great stuff)
...after 7 months added 1/4 cup of brown sugar and 2 Ceylon teabags
...bottled after 9 months with another 2 bags of Chai Black Tea.

All the tea is to offset the sweet taste - the champagne yeast should have gobbled it up but at the 7 month point it was still too cloying for me. Now it tastes pretty good...

Sunday, May 31, 2009

Two recipes: beer and biscotti

I tried two experiments this weekend, a beer and a variation on a biscotti recipe.

I won't know how good the beer is for another 2 months or so. Here is the ingredient list:

Wayward Monk Ale



  • 6 lbs Northern Brewer Amber Malt Extract

  • 3.15 lbs Northern Brewer Dark Malt Extract

  • 1 1b Dark Belgian Candi Sugar

  • Wyeast Belgian Abbey II yeast (#1762)

  • 1 oz Fuggle hops

  • 1 oz Saaz hops

  • 1 oz Hallertau Mittelfruh hops

  • 1 gm of Myrica gale

  • 1 pinch of Wormwood

  • 1 lbs Belgian Biscuit Malt

  • 1 lbs Franco-Belges Kiln Coffee Malt



The last two ingredients I forgot to order, and they will have to be added later. I'm not sure what effect that will have. I'm also not sure what this beer will be like - its kind of a winter-warmer/scotch ale/Belgian abbey hybrid. But that's why I homebrew - why make something you can buy in a store?

The biscotti is already a clear success. The recipe is essentially from Baking Illustrated, which I highly recommend.


  • 2 cups of flour (I like to use some whole wheat in there)

  • 1 tsp baking powder

  • 1/2 tsp salt

  • 3 tbsp unsalted butter

  • 1 cup sugar (I like to use some portion of brown sugar)

  • 2 eggs

  • 1/2 tsp vanilla extract

  • 2 oz sliced almonds, roasted briefly in a pan

  • 1/2 cup of cocoa nibs (I used the organic Dagoba ones, which are the only thing I have ever seen in a supermarket)


You make the dough into two loaves, cook for about 25 minutes at 350 F. Take it out and slice into strips, then rebake at 325 for about 15 minutes. Its very easy but seems to impress people as much as much more difficult baked goods.

Monday, May 25, 2009

Polytopes in Sage, take 1

Here's a first attempt at a short video intro to polytopes in Sage. Sage 4.0, which should be released soon, has some new functionality that was added during Sage Days 15 (thanks to David Perkinson for reviewing some of that, and Rob Beezer for helping David learn the review ropes).

The video is about 4 MB and can be found here. I am not sure how the format will work on other computers so if anyone takes a look and it doesn't work let me know. Also, I am interested in getting constructive criticism on the video.

Tuesday, May 12, 2009

boolean Adelaide


Just a little follow-up post to my Adelaide Venn diagram post. I wanted to double-check its correctness, so I made this diagram showing whether each set was included or not. Color by numbers!

Monday, May 4, 2009

Protein of the Day #20: Sirtuin1

This week there is an set of articles in Science on the protein Sirtuin1. The sirtuin family is very interesting, involved in ageing, epigenetic gene silencing, and other cellular regulation. The Science articles provide some new links of Sirtuin1 to circadian rhythms and matebolism.

Here's a static shot of the common 3D domain of the sirtuin superfamily:



The NAD+ dependence of Sirtuin1 seems to be an important link between the circadian system, the metabolic state of the cell, and genetic regulation. As always, I am wondering if there are connections here to mammalian hibernation...

Thursday, April 30, 2009

Slouching towards Adelaide

At some point when I was in grad school I became aware of some work on symmetric Venn diagrams. If you google this, you will find this link, which has been maintained but not changed too much since 1997. Other than that, there isn't a lot on the web and there is a particular lack of quantitative direction on how to construct the beautiful rotationally symmetric Venn diagrams such as Adelaide. This was named by Anthony Edwards after the city in which he discovered it. I have always wanted to go to Adelaide, it holds a strange attraction for me, so perhaps that is why that particular 7-set Venn diagram stuck in my head.

When I started working on my coloring book, I immediately thought of the Adelaide diagram but I didn't know how to construct it. After some mistakes today, I think I finally have it down. Here is a colored version:



Code (in Sage) for some version of this will be in the final coloring book.

Tuesday, April 28, 2009

Mixmead

I've had a mead going for quite a while now - started on September 6th, 2008 - which I just racked for a second time. Its proving to be a troublesome brew, perhaps because I never had a clear vision of what it was supposed to be. I have been calling it the "Mixmead" since its a hodgepodge of all sorts of honey that I was able to get in 2008. Here's the exact recipe:




  1. 1.5 lbs Late Summer Wildflower Honey (Talking Oak Farm, WI)

  2. 3 lbs Northern Brewer Orange Blossom Honey (CA)

  3. 3 lbs Skalko's Honey Bee Farm Honey (Esko, MN)

  4. 3 lbs Duluth Whole Foods Coops Honey (God Knows Where, USA)

  5. 1 cup Northern Brewer's Gold Malt Extract (for protein, rather than that nasty chemical mead nutrient)

  6. 1 handful o'hops from Grant Anderson (thank you Grant!)

  7. Lalvin EC-1118 Sabayanus Champagne yeast (Champagne yeast:beer yeast::SWAT team:suburban cop)



I racked this on November 16th, 2008, and added 1/2 cup of Hungarian Adro Forest Honey (fantastic stuff). Tasted too sweet then, despite the commando-like efforts of the champagne yeast.


This second racking, I added a tiny bit (3/16 cup) of brown sugar and 2 heavily steeped tea bags of some rather bitter Ceylon tea. I hope the tea will cut the excessive sweetness a bit (this is a pretty traditional thing to add to meads).


If all goes well, this will be bottled in a month.

Tuesday, April 21, 2009

Cayley Cubic

To further my polynomial education I've been thinking some lately about the Cayley cubic, which in the affine form I was using is given by x^2 + y^2 + z^2 + z(y^2-x^2) -1 = 0.

I made a little movie of some of the real solution set of the Cayley cubic. Here's one of the stills:

I think the quicktime version works better in browsers, or you can download a slightly higher-quality mp4.

Monday, April 20, 2009

Protein of the Day #19: Fto (Fatso)

Protein names are funny things. Often they are chosen before much of the functionality of the protein is characterized, which means they are usually misleading. I wonder how much progress in biology has been retarded over the years by that simple fact.

The abbreviation Fto comes from "fused toes" mutation, but was also initially called Fatso because it is a relatively large protein (about 500 amino acids, nothing close to the huge ones like titin). Ironically, this name is quite important since it seems that Fto is very important in energy homeostasis in mammals. It is highly expressed in the arcuate nucleus. There is some correlation between Fto mutations and susceptibility to diabetes. Because of all that, the preferred descriptive name now is "fat mass- and obesity-associated gene".

Friday, April 17, 2009

Protein of the Day #18: Cruciferina

Cruciferina: sounds like an all-girl punk group or something. I couldn't find out too much about it, its a cupin-superfamily protein that is a desiccation-tolerant seed storage globulin. "Cupin" comes from the Latin "cupa" for small barrel; cupin proteins have a beta-barrel motif that apparently is useful for all sorts of things. Here's one representation of the barrel (not from Cruciferina in particular) from topsan.org:



Various cupin proteins seem to heavily expressed in the floral nectary tissues studied in my friend Clay Carter's lab.

Wednesday, April 15, 2009

Books I am reading right now

Fiction:

0a. Anathem, by Neal Stephenson. I finished this one, but I am including it because I liked it so much. Not that Neal needs much advertising.

0b. The Algebraist, by Iain Banks. Fantastic cover, at least the US paperback. I finished this while in South Africa too, but it was one of my favorites this year.

1. The Sacred Book of the Werewolf, by Victor Pelevin. Trippy, odd, hard to describe - but good.

2. Wizard of the Crow, by Ngugi Wa'Thiong'O. Sort of like 100 Years of Solitude in Africa.

3. Victory of Eagles, by Naomi Novik. Good series.

4. Turn Coat, by Jim Butcher. I think I have read everything by him, he doesn't disappoint.

Non-fiction (I am leaving out a lot of math and bio books):

1. Imagining India, by Nandan M. Nilekani. Very good book about modern India, where its going and how it got there.

2. The Manga Guide To Statistics, by Shin Takahashi. Surprisingly good. The Manga Guide to Databases is also pretty good.