### More Mathematica Fun for Memorial Day

May 30th, 2011 by **erb**

Mathematica Users LinkedIn contributor Sol Lederman posted a Mathematica Programming Contest on his Playing with Mathematica blog this weekend for Memorial Day:

Draw the US Flag in

Mathematica. To be eligible to win you should get the colors roughly right as well as the number of stars and stripes. I’ll give extra points if your flag has creases in it, as if it were flapping in the wind. I’ll give double extra brownie points if you create an animated GIF of your Mathematica US flag flapping in the wind.

So I did just that!

The *Mathematica* notebook is available, as is the Computable Document Format file, and a PDF file.

(CDF files are a new format from Wolfram Research, allowing you to actually load and interact with *Mathematica* notebooks on your own computer, with the free downloadable CDF Player.)

erbwrote on 05/30/11 at 2:37 am :I’ll make the .nb and .cdf available AFTER Sol’s Tuesday deadline… Though the PDF file is available (as it doesn’t show the code).

erbwrote on 05/30/11 at 9:04 pm :`C`

A

b

d

e E

a

c

D

B

A B C D E A

A e c B a d C b e D c a E d b A

`A D B E C`

A e D c B a E d C b

(AB,CD) (DE,AB) (BC,DE) (EA,BC) (CD,EA)

12,34 45,12 23,45 51,23 34,51

12 45 23 51 34

1 4 2 5 3

34 12 45 23 51

3 1 4 2 5

Playing With Mathematica » Blog Archive » Contest submissions received, judging underwaywrote on 06/1/11 at 3:31 pm :[…] Eric Brodeur […]

Mike Croucherwrote on 06/3/11 at 8:18 am :Cool flag!

You can embed .cdf files in your web pages. See the tutorial

http://www.walkingrandomly.com/?p=3323

Cheers,

Mike