Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

The Battle of Gettysburg was fought July 1–3, 1863, in and around the town of Gettysburg, Pennsylvania, by Union and Confederate forces during the American Civil War. The battle resulted in the largest number of casualties of the entire war and is often described as the turning point of the war. Union Major General George Meade's Army of the Potomac repulsed attacks by Confederate General Robert E. Lee's Army of Northern Virginia, ending Lee's attempt to invade the North. On July 4, Lee's withdrawal took place without pursuit by the Union forces, which had been too worn down by the battle, to Lincoln's great disappointment [1].


This Demonstration simulates three relevant phases of the battle:

1. The capture of Gettysburg by Confederate forces and the subsequent defensive retreat of Union forces, assuming positions in a fishhook shape.

2. The frontal unfolding of Confederate forces and the first diversionary attack carried out by Confederate Major General Edward "Allegheny" Johnson's division at Culp's Hill.

3. On the third day of the battle, General Lee commanded an infantry assault to strike the Union center. Although some Confederates were able to breach the low stone wall that shielded many of the Union defenders, they could not maintain their hold and were repulsed with over 50% casualties, a decisive defeat that ended the three-day battle and Lee's campaign in Pennsylvania, which ended in the reconquest of Gettysburg by the Union forces [2].


Contributed by: D. Meliga, S. Z. Lavagnino and A. Ratti  (October 2016)
Historical contribution by: E. Angelino
Open content licensed under CC BY-NC-SA



Snapshot 1: the conquest of Gettysburg by General Lee's forces; General Meade withdraws toward Cemetery Ridge and Culp's Hill

Snapshot 2: the Confederate forces carry out a diversionary attack but face heavy casualties (indicated by the faded color)

Snapshot 3: last stage of the battle, heavy casualties on both sides; however, the Union forces prevail and manage to reconquer Gettysburg


[1] Wikipedia. "Battle of Gettysburg." (Oct 26, 2016)

[2] Wikipedia. "Pickett's Charge." (Oct 26, 2016) s_Charge.

[3] Civil War—Battle of Gettysburg [Video]. (Oct 26, 2016)

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.