Introduction to Mathematica 
        - a College Course

Name: Thomas A. Roman

Affiliation: Dept. of Mathematical Sciences, Central Connecticut
                  State University

Course Description

- aimed primarily at math and science majors, and designed for those with no prior experience with the        
   software. (sophomore level, but had mainly juniors and seniors)
 - 4 credits
 - Calculus II and either Calculus III or Linear Algebra (C - or higher) as prerequisites, or permission of instructor.

Grading: 

- no exams. 

- HW assignments                   60%

 - a final course project            40%

Topics included: 
 
 A. Basics
  1. Syntax.
  2. Calculations.
  3. Arithmetics,  working with Functions (Simplify, Evaluate) and lists.
  4. Working with notebooks.
  
  B. Algebra
  1. Vectors and Matrices.
  2. Equations and Solutions (Numerical and Analytic)

C. Graphics
1.  2 - dimensional graphics (plotting functions, style options, coordinate systems, parametric and contour plots)
2.  3 - dimensional graphics (surfaces, vector fields, spherical and cylindrical coordinates, parametric and     
      contour plots)
3. Animations

D. Calculus
1. Limits
2. Differentiation
3. Integration
4. Series

E. Programming
1. Simple programs, Loops

- homework assigned at weekly or bi-weekly intervals. 
- completed work submitted electronically in the form of Mathematica notebooks containing both the problems 
  and their solutions. 
- comments and corrections made within the files submitted.

Final Project: 

 - submittable demonstration to the Wolfram Demonstrations Project (WDP) on a topic of interest to the student.

Sample Homework Assignment

HW Assignment 4

1) Make a three-dimensional plot of the function sin(xy) cos(x+y)  over the interval in x,y given by 
  0≤x≤2π and -(π/2)≤y≤(π/2).

Plot3D[Sin[x y] Cos[x+y],{x,0,2 Pi},{y,-Pi/2,Pi/2}]

2) Now color your plot in “Rainbow”, and increase the Mesh to 50. 
(Keep this Mesh setting for the next two questions.)

Plot3D[Sin[x y] Cos[x+y],{x,0,2 Pi},{y,-Pi/2,Pi/2},ColorFunction->"Rainbow",Mesh->50]

3) Replot your graph, excluding the regions where sin(xy)>0.

Plot3D[Sin[x y] Cos[x+y],{x,0,2 Pi},{y,-Pi/2,Pi/2},ColorFunction->"Rainbow",Mesh->50,RegionFunction->Function[{x,y,z},0≥Sin[x y]]]

4) Plot the original function of Question 1 (no excluded regions), using PlotStyle to change the color of the graph to orange.

Plot3D[Sin[x y] Cos[x+y],{x,0,2 Pi},{y,-Pi/2,Pi/2},Mesh->50,PlotStyle->Directive[Orange]]

5) Now change the Specularity of your graph in Question 4 to yellow with a value of 10. Label the x - axis “time”, and the y - axis “space”, and name your plot “A Goofy Function”.

Plot3D[Sin[x y] Cos[x+y],{x,0,2 Pi},{y,-Pi/2,Pi/2},Mesh->50,PlotStyle->Directive[Orange,Specularity[Yellow,10]],AxesLabel->{"time","space"},PlotLabel->"A Goofy Function"]

6) Reset the Mesh to 20. Use Manipulate to make the transparency of the plot decrease with time and make the color change with time, as the time t  varies from 1 to 0.

Manipulate[Plot3D[Sin[x y] Cos[x+y],{x,0,2 Pi},{y,-Pi/2,Pi/2},Mesh->20,AxesLabel->{"time","space"},PlotLabel->"A Goofy Function",PlotStyle->Directive[Hue[t],Opacity[t]]],{t,1,0}]

7) Make a three-dimensional plot of the two functions sin(x) cos(x) and (cos^2)(x) on the same graph. Color the graph of the first function green and that of the second one red.

Plot3D[{Sin[x]Cos[x],Cos[x]^2},{x,0,3 Pi},{y,0,3 Pi},PlotStyle->{Green,Red}]

8) Repeat your plot of Question 7), but now make the color of the functions vary with height, z.

Plot3D[{Sin[x]Cos[x],Cos[x]^2},{x,0,3 Pi},{y,0,3 Pi},ColorFunction->Function[{x,y,z},Hue[z]]]

9) Generate the plot given by: 

Plot3D[Sqrt[1-x^2-y^2],{x,-1,1},
{y,-1,1},Mesh->8,ColorFunction->Hue,
MeshShading->{{Yellow,Orange},{Pink,Red}}]

a) Modify the plot to include both the top and “bottom” of the sphere. Use the BoxRatios command to make all the axes of your bounding box the same size. (The sphere should look like a pancake.)


b) Use Manipulate to make the “pancake” grow and become rounder in shape with time, t , as t varies from 0.1 to 1.

Plot3D[Sqrt[1-x^2-y^2],{x,-1,1},{y,-1,1},Mesh->8,ColorFunction->Hue,MeshShading->{{Yellow,Orange},{Pink,Red}}]

Manipulate[Plot3D[{t Sqrt[1-x^2-y^2],-t Sqrt[1-x^2-y^2]},{x,-1,1},{y,-1,1},Mesh->8,ColorFunction->Hue,MeshShading->{{Yellow,Orange},{Pink,Red}},PlotRange->{-1,1},BoxRatios->{1,1,1}],{t,0.1,1}]

10) Generate the sound of the function sin(1000 t) + cos(990t) and make it last for 6 seconds.

Play[ Sin[1000 t] + Cos[990 t],{t,0,6}]

11) Now modify the function in Question 10) so that the amplitude (i.e., loudness) of the sound increases as the time goes from 0 to 6 seconds.

Play[ t (Sin[1000 t] + Cos[990 t]),{t,0,6}]

12) Plot the function ((((x^5)+(y^3)+x-2))^(-1)) from  -2≤x≤2 and -2≤y≤2, excluding the region where the denominator of the function is zero.

Plot3D[1/(x^5+y^3+x-2),{x,-2,2},{y,-2,2},Exclusions->{(x^5+y^3+x-2)==0}]

A Sample Group Homework Assignment

MATH 250  Group HW Assignment 5

Instructions: Start this assignment in class by working in an assigned group. 

Do as much as you can in class, and then finish the assignment at home. 

E-mail it to me as a Mathematica notebook with the output deleted. 

Type each question in a separate text cell in the notebook, followed by your solution code in an input cell. 
Be sure to include your name, as well as the names of the people in your group, in your notebook.  
However, each person turns in their own notebook! 

Name your notebook: “Your Name_HW 5.nb”. 
Use this naming format from now on when turning in notebooks.

Group HW Set 5 Questions and Solutions

Question 1

Review the Cylinder and Cuboid 3D Graphics primitives. 
a) Draw a cylinder with radius 5 around the line from (0,0,0) to (1,1,1). 
b) Draw a cuboid whose opposite corners have coordinates (0,0,0) and (3,3,3). 
c) Now show both together in the same graphic.

Graphics3D[Cuboid[{0,0,0},{3,3,3}]]

Graphics3D[Cylinder[{{0,0,0},{1,1,1}},5]]

Show[Graphics3D[Cuboid[{0,0,0},{3,3,3}]],Graphics3D[Cylinder[{{0,0,0},{1,1,1}},5]]]

Question 2

Use the Manipulate command to create a slider control that will allow your cuboid from the previous question to move along the x-axis from x = -4 to x = 1, without changing shape.

Manipulate[Graphics3D[Cuboid[{u,0,0},{u+3,3,3}],PlotRange->5],{u,-4,1}]

Question 3

Use the Manipulate command to create a slider control that will allow your cuboid from the question 2 to move along the x-axis from x = -10 to x = 7, without changing shape. Show the cylinder from question 1 in the same graphic. (The cuboid should "pass through" the cylinder.) Try setting your PlotRange from -10 to 10 in each coordinate direction.

Manipulate[Show[Graphics3D[Cuboid[{u,0,0},{3+u,3,3}]],Graphics3D[Cylinder[{{0,0,0},{1,1,1}},5]],PlotRange->{{-10,10},{-10,10},{-10,10}},BoxRatios->{1,1,1},Boxed->False],{u,-10,7}]

Question 4

Now modify your graphic from question 3 by adding another slider control which will allow the cylinder to move diagonally (along the line of its axis), without changing shape. (You should now have two sliders, one which controls the motion of the cuboid and one which controls the motion of the cylinder.)

Manipulate[Show[Graphics3D[Cuboid[{u,0,0},{3+u,3,3}]],Graphics3D[Cylinder[{{t,t,t},{t+1,t+1,t+1}},5]],PlotRange->{{-10,10},{-10,10},{-10,10}},BoxRatios->{1,1,1},Boxed->False],{u,-10,7},{t,-5,5}]

Question 5

a) Create a new graphic, using the Manipulate command. Draw a cylinder whose axis lies along the x-axis. Expand the cylinder to expand along its axis line, from one end of the bounding box to the other, while keeping its radius fixed. Pick a nice PlotRange for viewing.

Manipulate[Show[Graphics3D[Cylinder[{{-10,0,0},{-9+u,0,0}},5]],PlotRange->{{-10,10},{-10,10},{-10,10}}],{u,0,18}]

b) Now modify your code from part a) to allow the radius of the cylinder to expand, while keeping its length fixed. Pick a nice parameters for viewing.

Manipulate[Show[Graphics3D[Cylinder[{{-10,0,0},{18,0,0}},u]],PlotRange->{{-10,10},{-10,10},{-10,10}}],{u,1,8}]

c) Create a new graphic, using the cylinder of question 1 and the Manipulate command. Make a graphic which has a single slider control that allows you to vary the length and radius of the cylinder of question 1 simultaneously.

Manipulate[Graphics3D[Cylinder[{{0,0,t},{2,1,2+ t}},t],BoxRatios->{2,2,2}],{t,0,10}]

Question 6

Generate the graphic given in the code below.

Graphics3D[Table[{EdgeForm[Opacity[.3]],Hue[RandomReal[]],Cylinder[RandomReal[10,{2,3}]]},{20}]]

Use the Manipulate command to create an animation with a single slider control which varies the opacity, hue, and cylinder sizes simultaneously. 
Pick nice parameters for viewing.

Manipulate[Graphics3D[Table[{EdgeForm[Opacity[.3 t]],Hue[t^2 RandomReal[]],Cylinder[t RandomReal[10,{2,3}]]},{20 t}],BoxRatios->{1,1,1}],{t,0,10}]

Question 7

Generate the graphic given by the code below.

Graphics3D[{Opacity[.3],EdgeForm[Opacity[.3]],Table[Cylinder[{{0,0,0},{0,0,2r}},r],{r,1,5}]},Boxed->False]

Use the Manipulate command to vary the opacity of the nested cylinder graphic.

Manipulate[Graphics3D[{Opacity[.1 t],EdgeForm[Opacity[.1 t]],Table[Cylinder[{{t,0,0},{t,0,2r}},r  ],{r,1,5}]},Boxed->False,BoxRatios->{1,1,1}],{t,0,10}]

Question 8

Generate the graphic given by the code below. 
Then use the Manipulate command to vary the number of spheres and cuboids with time.

rcoord:=RandomReal[1.,{3}]
Graphics3D[Table[{Cuboid[10 rcoord],Sphere[10 rcoord]},{10}],BoxRatios->{1,1,1}]

Manipulate[Graphics3D[Table[{Cuboid[10 rcoord],Sphere[10 rcoord]},{n}],BoxRatios->{1,1,1}],{n,0,20}]

Question 9

Generate the graphic given in the code below.

Graphics3D[Polygon[Table[{Cos[2π k/5],Sin[2π k/5],0},{k,0,8,2}]]]

a) Look up the Rotate command and use it to rotate the "star" in the x-y plane by an angle of Pi/2.

Graphics3D[Rotate[Polygon[Table[{Cos[2π k/5],Sin[2π k/5],0},{k,0,8,2}]],Pi/2,{0,0,1}]]

b) Now use the Manipulate command to vary the rotation angle with time. 
[Extra Credit: see if you can keep the rotation axis fixed so that the star does not "wobble" as it rotates.]

Manipulate[Graphics3D[Rotate[Polygon[Table[{Cos[2π (k +t)/5],Sin[2π (k+t) /5],0},{k,0,8,2}]],t,{0,0,1}],BoxRatios->{1,1,1}],{t,0,2 Pi}]

Extra Credit: see if you can make the star "dance" around in the bounding box, i.e., vary the rotation axis with time.

Manipulate[Graphics3D[Rotate[Polygon[Table[{Cos[2π k/5],Sin[2π k/5],0},{k,0,8,2}]],t,{1,1,1}],BoxRatios->{1,1,1}],{t,0,10}]

A Sample Lecture Notebook

PolarPlot command

PolarPlot[r, {θ, min, max}] generates a polar plot of a curve with radius r as a function of angle .

PolarPlot[Sin[3 t],{t,0,Pi}]

PolarPlot[{1,1+1/10 Sin[10 t]},{t,0,2 Pi}]

Manipulate[PolarPlot[{1,1+1/10 Sin[10 u t]},{t,0,2 Pi},PlotRange->{-1.3,1.3}],{u,0,1}]

PolarPlot[{1,1+1/10 Sin[10 t]},{t,0,2 Pi},PlotStyle->{Green,Directive[Dashed,Thick,Orange]}]

PolarPlot[Sin[12 θ],{θ,0,2 Pi}]

Question: Use an animation to "grow" the previous figure.

Manipulate[PolarPlot[Sin[12 θ],{θ,0,t},PlotRange->{-1,1}],{t,0.001,2 Pi}]

PolarPlot[{1,2,3},{θ,0,2 Pi}]

PolarPlot[{1,2,3},{θ,0,2 Pi},PlotStyle->{Blue,Directive[Red,Dashed],Directive[Purple,Thick]}]

PolarPlot[Sin[4 θ],{θ,0,2 Pi},AxesLabel->{x,y},PlotLabel->Sin[4 θ]]

PolarPlot[{Tooltip[1],Tooltip[2],Tooltip[3]},{θ,0,2 Pi}]

PolarPlot[θ,{θ,0,4 Pi},Mesh->20]

PolarPlot[θ,{θ,0,4 Pi},Mesh->20,PlotStyle->Thick,Mesh->20,MeshShading->{Red,Orange,Yellow}]

PolarPlot[θ,{θ,0,4 Pi},PlotStyle->Thick,ColorFunction->Function[{x,y,θ},Hue[θ/(2 Pi)]],ColorFunctionScaling->False]

Question: Vary the color of the previous graphic with time as well as angle.

Manipulate[PolarPlot[θ,{θ,0,4 Pi},PlotStyle->Thick,ColorFunction->Function[{x,y,θ},Hue[t θ/(2 Pi)]],ColorFunctionScaling->False],{t,0,1}]

PolarPlot[θ,{θ,0,4 Pi},PlotStyle->Thick,ColorFunction->Function[{x,y,t,r},Hue[t/(2 Pi)]],ColorFunctionScaling->False]

{PolarPlot[Sqrt[θ],{θ,0,2 Pi},Mesh->Full],PolarPlot[Sqrt[θ],{θ,0,2 Pi},Mesh->All]}

PolarPlot[Sqrt[θ],{θ,0,2 Pi},Mesh->{{Pi/4,5 Pi/4}}]

PolarPlot[Sqrt[θ],{θ,0,2 Pi},Mesh->{{{Pi/4,PointSize[Large]},{5 Pi/4,Red}}}]

Question: In the previous graphic, delete the red dot. Then make the large dot 
move outward along the spiral.

Manipulate[PolarPlot[Sqrt[θ],{θ,0,2 Pi},Mesh->{{{t Pi/4,PointSize[Large]},{t Pi/4,PointSize[Large]}}}],{t,0,10,0.1}]

PolarPlot[Sin[4 θ],{θ,0,2 Pi},PlotStyle->Directive[Thick,Yellow],Mesh->15,MeshShading->{Red,Automatic}]

Question: Vary the color of the alternating regions in the previous graphic with time, while insuring that the alternating regions are always different colors.

Manipulate[PolarPlot[Sin[4 θ],{θ,0,2 Pi},PlotStyle->Directive[Thick,Hue[ t]],Mesh->15,MeshShading->{Hue[t+0.3],Automatic}],{t,0,0.9}]

Table[PolarPlot[Sin[4 θ],{θ,0,2 Pi},PlotStyle->ps],{ps,{Red,Thick,Dashed,Directive[Red,Thick]}}]

PolarPlot[{θ,-θ},{θ,0,4 Pi}]

PolarPlot[{θ,-θ},{θ,0,4 Pi},PlotStyle->{Purple,Orange}]

Question: Use an animation to make the spirals in previous figure "grow" outward from the origin.

Manipulate[PolarPlot[{θ,-θ},{θ,0,t},PlotStyle->{Purple,Orange},PlotRange->{-12,12}],{t,0.001,4 Pi}]

PolarPlot[Sin[4 θ],{θ,0,2 Pi},PlotStyle->Thick,Mesh->15,MeshShading->{Red,Blue}]

PolarPlot[1,{θ,0,2 Pi}]

PolarPlot[θ,{θ,0,2 Pi}]

PolarPlot[1+1/10 Sin[10 θ],{θ,0,2 Pi}]

{PolarPlot[θ^(1/2),{θ,0,20},Frame->True,PlotLabel->r==θ^(1/2)],PolarPlot[θ,{θ,0,20},Frame->True,PlotLabel->r==θ]}

{PolarPlot[θ^-1,{θ,0.1,25},PlotRange->{{-1/2,2.5},All},Frame->True,PlotLabel->r==θ^-1],PolarPlot[θ^(-1/2),{θ,0.1,25},PlotRange->{{-3/5,2.5},All},Frame->True,PlotLabel->r==θ^(-1/2)]}

Question: Use an animation to "grow" the second graphic in the previous list.

Manipulate[PolarPlot[θ^(-1/2),{θ,0.1,t},PlotRange->{{-3/5,2.5},{-0.5,0.9}},Frame->True],{t,0.001,25}]

Question: Now add a second slider control to vary the "tightness" of the spiral as well.

Manipulate[PolarPlot[ θ^(-n/2 ),{θ,0.1,t},PlotRange->{{-3/5,2.5},{-0.5,0.9}},Frame->True],{t,0.001,25},{n,1,3}]

PolarPlot[E^(θ/10),{θ,0,30},Frame->True,PlotLabel->r==E^(θ/10)]

{ListPolarPlot[Table[θ,{θ,0,2 Pi,0.1}]],PolarPlot[θ,{θ,0,2 Pi}]}

PolarPlot[Exp[Cos[θ]]-2 Cos[4 θ]+Sin[θ/12]^5,{θ,0,20 π}]

PolarPlot[Evaluate[Table[Abs[Sin[θ+i]],{i,0,2 Pi,2 Pi/16}]],{θ,0,2 Pi},PlotStyle->Thick,ColorFunction->Function[{x,y,t,r},Hue[r]],Axes->False,RegionFunction->Function[{x,y,t,r},r<0.555],ColorFunctionScaling->False,PlotPoints->20,MaxRecursion->3]

PolarPlot[θ+Sin[θ^2],{θ,0,10 Pi},AspectRatio->Automatic,PlotPoints->400,Axes->False]

Question: "Grow" the spiral pattern in the previous figure using Manipulate.

Manipulate[PolarPlot[θ+Sin[θ^2],{θ,0,t},PlotPoints->400,Axes->False,PlotRange->30],{t,0.001,10 Pi}]

Question: Increase the thickness of the curve in the previous graphic. Now vary the color as it grows.

Manipulate[PolarPlot[θ+Sin[θ^2],{θ,0,t},PlotPoints->400,Axes->False,PlotStyle->{Hue[t/(10 Pi)],Thick},PlotRange->30,PerformanceGoal->"Speed"],{t,0.001,10 Pi}]

Question:  Now simultaneously vary the thickness and color of the previous graphic as it grows.

Manipulate[PolarPlot[θ+Sin[θ^2],{θ,0,t},PlotPoints->400,Axes->False,PlotStyle->{Hue[t/(10 Pi)],Thickness[t/(500 Pi)]},PlotRange->30,PerformanceGoal->"Speed"],{t,0.001,10 Pi}]

Now go back to:

PolarPlot[{1,1+1/10 Sin[10 t]},{t,0,2 Pi}]

Question: With the circle fixed in the background, "grow" the sinusoidal spiral around it.

Manipulate[Show[{PolarPlot[{1,1},{θ,0,2 Pi},PlotRange->{-1.3,1.3}]},{PolarPlot[{1,1+1/10 Sin[10 θ]},{θ,0,t},PlotRange->{-1.3,1.3}]}],{t,0.001,2 Pi}]

PolarPlot[{1,1+1/10 Sin[10 t]},{t,0,2 Pi},PlotStyle->{Green,Directive[Dashed,Thick,Orange]}]

Question: With the circle fixed in the background, gradually change the color of the circle to green as you "grow" the dashed sinusoidal spiral around it.

Manipulate[Show[{PolarPlot[{1,1},{θ,0,2 Pi},PlotRange->{-1.3,1.3}]},{PolarPlot[{1,1+1/10 Sin[10 θ]},{θ,0,t},PlotStyle->{Green,Directive[Dashed,Thick,Orange]},PlotRange->{-1.3,1.3}]}],{t,0.001,2 Pi}]

Student Final Project - Douglas Rivers

http://demonstrations.wolfram.com/CantorFunction/

Cantor Function

SequenceOf01[n_]:=IntegerDigits[Range[0,2^n-1],2,n]

Manipulate[Graphics[Table[d=2 SequenceOf01[p];Line[Table[{{Sum[d[[i,j]]/3^j,{j,1,p}]+1/3^p,i/2^p},{Sum[d[[i+1,j]]/3^j,{j,1,p}],i/2^p}},{i,1,2^p-1,2}]],{p,1,k}],PlotRange->{{0,1/b},{0,1/b}},Axes->True,ImageSize->{450,400},ImagePadding->25],
{{k,8,"iterations"},1,8,1,Appearance->"Labeled"},
{{b,1,"magnification"},1,10,Appearance->"Labeled"},SaveDefinitions->True,TrackedSymbols->Manipulate]

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Cantor Function" from The Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/CantorFunction/

Contributed by: Douglas Rivers

A full-function Wolfram Mathematica 6 system is required to edit or run this notebook.
(Mathematica Player runs only Demonstrations published on this site.)
GET WOLFRAM MATHEMATICA 6 »

© The Wolfram Demonstrations Project & Contributors   |   Terms of Use   |   Make a new version of this Demonstration »

Student Final Project - Cassandra Irish

http://demonstrations.wolfram.com/
HowTallIsThatBuilding/

How Tall Is That Building?

Manipulate[
g1={Darker[Green],Rectangle[{-1,.5},{10,2}]};
g2={EdgeForm[Directive[Thin,Dashed,Blue]],Polygon[{{2,2},{2,4},{4 + 2 t,2 }}],Text["building shadow",{4 ,1.5}]};
g3={EdgeForm[Directive[Thin,Dashed,LightYellow]],Blue,Rectangle[{1,2 },{2,4}],Blend[{Blue,White},t],Text["\!\(\*FractionBox[\(my\\ height\), \(my\\ shadow\\ length\)]\)=\!\(\*FractionBox[\(height\\ of\\ building\), \(shadow\\ of\\ building\)]\)",{6,4}]};
g4={Yellow,Rectangle[{1.1,2.1},{1.2,2.2}],
Hue[t],Rectangle[{1.3,2.3},{1.4,2.4}],
Yellow, Rectangle[{1.5,2.5},{1.6,2.6}],Rectangle[{1.7,2.7},{1.8,2.8}], Rectangle[{1.9,2.9},{2,3.0}],Rectangle[{1.1,2.3},{1.2,2.4}],
Hue[2 t], Rectangle[{1.1,2.5},{1.2,2.6}],
Yellow,Rectangle[{1.1,2.7},{1.2,2.8}], Rectangle[{1.1,2.9},{1.2,3.0}], Rectangle[{1.3,2.5},{1.4,2.6}],Rectangle[{1.3,2.7},{1.4,2.8}], Rectangle[{1.3,2.9},{1.4,3.0}], Rectangle[{1.5,2.5},{1.6,2.6}],Rectangle[{1.5,2.7},{1.6,2.8}],
Hue[5 t], Rectangle[{1.5,2.9},{1.6,3.0}],
Yellow, Rectangle[{1.7,2.5},{1.8,2.6}],Rectangle[{1.7,2.7},{1.8,2.8}], Rectangle[{1.7,2.9},{1.8,3.0}], Rectangle[{1.9,2.5},{2,2.6}],Rectangle[{1.9,2.7},{2,2.8}], Rectangle[{1.9,2.9},{2,3.0}],
Hue[12 t], Rectangle[{1.1,3.1},{1.2,3.2}],
Hue[t],Rectangle[{1.3,3.3},{1.4,3.4}],
Yellow, Rectangle[{1.5,3.5},{1.6,3.6}],Rectangle[{1.7,3.7},{1.8,3.8}],
Hue[8 t], Rectangle[{1.9,3.9},{2,4.0}],
Yellow,Rectangle[{1.1,3.3},{1.2,3.4}], Rectangle[{1.1,3.5},{1.2,3.6}],Rectangle[{1.1,3.7},{1.2,3.8}], Rectangle[{1.1,3.9},{1.2,4.0}], Rectangle[{1.3,3.5},{1.4,3.6}],Rectangle[{1.3,3.7},{1.4,3.8}],
Hue[t], Rectangle[{1.3,3.9},{1.4,4.0}],
Yellow, Rectangle[{1.5,3.5},{1.6,3.6}],Rectangle[{1.5,3.7},{1.6,3.8}], Rectangle[{1.5,3.9},{1.6,4.0}], Rectangle[{1.7,3.5},{1.8,3.6}],
Hue[6 t],Rectangle[{1.7,3.7},{1.8,3.8}],
Yellow, Rectangle[{1.7,3.9},{1.8,4.0}], Rectangle[{1.9,3.5},{2,3.6}],Rectangle[{1.9,3.7},{2,3.8}], Rectangle[{1.9,3.9},{2,4.0}]};

g5={EdgeForm[Directive[Thin,Dashed,Orange]],Hue[t],Disk[{1.25 -t,5},.25,{Pi,3Pi}]};
g6={Red,Thick,Disk[{5.99,2.5},.10,{Pi,3 Pi}]};
g7={EdgeForm[Directive[Thin,Dashed,Red]],Polygon[{{6,2},{6,2.5},{6.5 + .5 t,2 }}],Text["my shadow",{6.5 , 1.5}]};
g8={EdgeForm[Directive[Thin,Dashed,Yellow]],Orange,Disk[{1.25 -t,5},.18,{Pi,3 Pi}]};
g9={EdgeForm[Directive[Thick,Dashed,Black]],Red,Thick,Line[{{5.99,2.55 },{5.99,2.15}}]};
g10={EdgeForm[Directive[Thick,Black]],Red,Thick,
Line[{{5.99,2.15},{5.89,2}}]};
g11={EdgeForm[Directive[Thick,Black]],Red,Thick,
Line[{{5.99,2.15},{6.09,2}}]};
g12={EdgeForm[Directive[Thick,Black]],Red,Thick,
Line[{{5.99,2.25},{5.89,2.27}}]};
g13={EdgeForm[Directive[Thick,Black]],Red,Thick,
Line[{{5.99,2.25},{6.09,2.27}}]};


Graphics[{g1,g2,g3,g4,g5,g6,g7,g8,g9,g10,g11,g12,g13},Background->Blend[{LightBlue,Blue}, t],PlotRange-> {{-1,10},{.5,6}},ImageSize->{550,275}],{{t,0,"time"},0,1.0},SaveDefinitions-> True,TrackedSymbols->Manipulate]

THIS NOTEBOOK IS THE SOURCE CODE FROM

"How Tall Is That Building?" from The Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/HowTallIsThatBuilding/

Contributed by: Cassandra Irish

A full-function Wolfram Mathematica 6 system is required to edit or run this notebook.
(Mathematica Player runs only Demonstrations published on this site.)
GET WOLFRAM MATHEMATICA 6 »

© The Wolfram Demonstrations Project & Contributors   |   Terms of Use   |   Make a new version of this Demonstration »

Student Final Project - Darlene Bauer

http://demonstrations.wolfram.com/AnimatedButterfly/

Animated Butterfly

Manipulate[
g1=ParametricPlot[{5 flap Cos[u^2],1v Sin[2 u^2]},
{u,0,1.95 Pi},{v,0,5},BoundaryStyle->None,
PlotRange->All,PlotPoints->15,MaxRecursion->ControlActive[2,3],
PlotStyle->Directive[Opacity[1],Hue[flap]],
Background->LightBlue,
Axes->False,Frame->False,PerformanceGoal->"Quality"];
Show[g1,g2,g3,g4,PlotRange->2 Pi,
AspectRatio->Automatic,ImageSize->{500,450}],
{flap,1.25,0.1},
Initialization:>{
g2=ParametricPlot[{.3v Cos[u],2 v Sin[u]-.45},{u,0,2Pi},{v,-1,1},
PlotStyle->Directive[Opacity[1],Black]];
g3=Plot[6 Sqrt[(x^(1/3))-0.35],{x,0,.4},
PlotStyle->Directive[Opacity[1],Black]];
g4=Plot[6 Sqrt[((-x)^(1/3))-0.35],{x,-.4,0},
PlotStyle->Directive[Opacity[1],Black]];
},TrackedSymbols:>Manipulate]

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Animated Butterfly" from The Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/AnimatedButterfly/

Contributed by: Darlene Bauer

A full-function Wolfram Mathematica 6 system is required to edit this notebook.
GET WOLFRAM MATHEMATICA 6 »

© The Wolfram Demonstrations Project & Contributors   |   Terms of Use   |   Make a new version of this Demonstration »

Student Final Project - Michael Zajac

http://demonstrations.wolfram.com/
InducedEMFThroughAWire/

Induced EMF through a Wire

Manipulate[ 
With[{max=First[Maximize[-2 f m π Cos[ϕ] Sin[2 f π T] Sin[θ]+2 f m π Cos[2 f π T] Sin[θ] Sin[ϕ],T]]},
Grid[{{
Show[
Graphics3D[{Thick,
Line[{{-0.5` Sin[2 f π t],0.5` Cos[2 f π t],1} ,{0.5` Sin[2 f π t],-0.5` Cos[2 f π t],1}}],
Line[{{-0.5` Sin[2 f π t],0.5` Cos[2 f π t],0} ,{-0.5` Sin[2 f π t],0.5` Cos[2 f π t],1}}],
Line[{{0.5` Sin[2 f π t],-0.5` Cos[2 f π t],0} ,{0.5` Sin[2 f π t],-0.5` Cos[2 f π t],1}}],
Line[{{-0.5` Sin[2 f π t],0.5` Cos[2 f π t],0} ,{-0.05` Sin[2 f π t],0.05` Cos[2 f π t],0}}],
Line[{{0.5` Sin[2 f π t],-0.5` Cos[2 f π t],0} ,{0.05` Sin[2 f π t],-0.05` Cos[2 f π t],0}}],
Line[{{-0.05` Sin[2 f π t],0.05` Cos[2 f π t],0} ,{-0.05` Sin[2 f π t],0.05` Cos[2 f π t],-0.1`}}],
Line[{{0.05` Sin[2 f π t],-0.05` Cos[2 f π t],0} ,{0.05` Sin[2 f π t],-0.05` Cos[2 f π t],-0.1`}}]
},
Boxed->True,BoxRatios->{1,1,1},ImageSize->{290,290}, PlotRange->{{-1.1,1.1},{-1.1,1.1},{-0.6,1.6}},Axes->True,AxesLabel->{Style["x",Italic],Style["y",Italic],Style["z",Italic]}
] ,

VectorFieldPlots`VectorFieldPlot3D[{Cos[ϕ] Sin[θ],Sin[θ] Sin[ϕ],Cos[θ]},{x,-1.1,1.1},{y,-1.1,1.1},{z,-0.6,1.6},VectorHeads->True,PlotPoints->4,ColorFunction->Function[Blue],ScaleFactor->.2]
],

Show[
Plot[
-2 f m π Cos[ϕ] Sin[2 f π T] Sin[θ]+2 f m π Cos[2 f π T] Sin[θ] Sin[ϕ],{T,0,2 Pi}, PlotRange->{-85,75},ImageSize->{300,300},AxesLabel->{"time","voltage"},PlotLabel->Row[{"induced EMF in a square loop with area 1 ",Superscript["m",2]}],
Epilog->{PointSize[Medium],Point[{t,-2 f m π Cos[ϕ] Sin[2 f π t] Sin[θ]+2 f m π Cos[2 f π t] Sin[θ] Sin[ϕ]}]},
PerformanceGoal->"Quality",MaxRecursion->10
],

Graphics[{
Text[If[max < 0.0001,"0",ToString[max]]<>" V maximum",{2,-78}],
Text[If[Abs[-2 f m π Cos[ϕ] Sin[2 f π t] Sin[θ]+2 f m π Cos[2 f π t] Sin[θ] Sin[ϕ]] <0.0001,"0",ToString[(-2 f m π Cos[ϕ] Sin[2 f π t] Sin[θ]+2 f m π Cos[2 f π t] Sin[θ] Sin[ϕ])]]<> " V",{2,-68}]
}]
]
}}]],

{{t,0,"animate"},0,2 Pi,.001,
ControlType->Animator,
AppearanceElements->{"PlayPauseButton","FasterSlowerButtons"},
AnimationRate->30,
AnimationRunning->False},
{{t,0,"time (seconds)"},0, 2 Pi},
{{f, 2, "angular frequency of loop (Hz)"},0,10,Appearance->"Labeled"},
{{ϕ,0,"B field angle from x axis"},0, 2 Pi,Appearance->"Labeled"},
{{θ,Pi/2,"B field angle from z axis"},0, Pi,Appearance->"Labeled"},
{{m,0.4,"B field magnitude (tesla)"},0,1,Appearance->"Labeled"},
Initialization:>{Get["VectorFieldPlots`"]},AutorunSequencing->{2,3,4,5,6}
]

Summary

What I thought worked and did not work:

students really like the interactivity afforded by the Manipulate command

students really liked the group problems and group in-class assignments

students were very proud that their final projects are on the web with their names on them for all to see. 
(10 out of 13 students finshed the course. All 10 had their projects published on WDP).
I will continue to make this a large part of the course in the future.

during the last two weeks of the term, each student had to give a short talk on his/her demonstration project in front of the class. Since many of our students are going to be teachers, this was a useful exercise.

students thought that the assignments could be clearer (I agree) and that the HW grading was too tough

too much typing for the students during lecture

What I would do differently and some advice:

in the future, I hope to make the lectures less typing intensive for the students by giving them more portions of notebooks at the beginning of each class. After taking some of the Wolfram workshops and seeing how they are presented,  I have more ideas on how to do this.

too much time spent on exploring the options of each command. It is easy to waste a lot of time this way. This also contributed in part to making the course too typing intensive for the students. Since there were no texts on Mathematica 6 when I taught the course, I tried to emphasize features of Version 6, because students would not find that material in their textbooks. That preparation was very time consuming for the instructor. Fortunately, the two texts I used are currently being updated for Version 6.

I found that one difficulty was to write HW problems which were clear and unambiguous for the students (as opposed to, for me). Part of that was due to first time preparation and trying to do too many things at once. That should be easier next time. However, it's all too easy to think that your problems are unambiguous, until you see the various ways students interpret them when they hand in the assignment! I think this contributed to the students' perception that HW grading was too tough.

the classes where I had group assignments were some of the most dynamic and fun (for the students and for me!). I hope to include more of these in the future.

I limited the class to no more than 15 students. Unless you have a teaching assistant or a low teaching load, I would definitely recommend that you do the same. With more students than that, it is very difficult to run around the room and adequately help enough of the students when they get stuck.

take advantage of the low rates for 6 month / 1 year student Mathematica home use licenses (~$40 for 6 months ?)  I did not require them to get it, but I definitely will make it a requirement next time.

the course was taught during a fall semester. I had the students to meet with me prior to Thanksgiving regarding their projects, and to submit their projects prior to Thanksgiving. This was done so that we would have enough turn-around time with the folks at WDP, and could fix any problems and have time to resubmit if necessary. At first I thought this might be pushing the students too hard, but it worked out well, and we needed the extra time. Also, the students liked it because they felt less pressured by the end of the course, when everything else was piling up on them in their other courses. I would strongly recommend that, if you require demo projects, have the students get them in early!

Although very time consuming, teaching a Mathematica course is great fun!

[To get the list of URL's for all of the student projects, go to www.math.ccsu.edu, and click on the left where it says "Additional Links." The link to the projects is on the lower right hand side of the page.]