The Defeat Of the Humans
Mandeep Kaur
mkaur114@qc.cuny.edu

Objective :  This file focuses on how manipulating a disk's thickness, twist, rotation, sharpness, and numbers of points can generate various images. I will then use these images to create a storyline, which will allow me to dictate a story, as a result. In addition, sound effects will be used to set the atmosphere of the story. Furthermore, I will demonstrate how math, art, and music -- all universal entities -- can evoke the same emotions as when one views a scuplture, painting, or even a movie. Ultimately, I conclude that the essence of art, math, and music lies in their universiality.

Section 1..1: Introduction


The essence of art (which I consider to be the portion in which I manipulate the mulitude of images] and math [which I consider to be the portion in which I manipulate mathematical statements to program the image generator] and music (the part where I use sound effects) lies in their universiality. When brought together, they can elicit the same emotion or awe when one views a sculpture, painting, or even a movie that really touches them. The essence of my project lies in this universiality that holds no barrier, and that even an alien from a distant galaxy or planet would not have trouble understanding what the images portray. Before proceding, I shall warn everyone that this medium of reaching out is always subjective. Just as I might find Rembrant's paintings strikingly touching, you might not. With the same token, you might find my storyline absolutlely horrendous to listen to. Therefore, I am not guranteeing anything. Just for the record, my problem statement is how can I use an image generator and sound effects to dicate a storyline effectively in Mathematica? Below I will discuss obscure commands in Section 1.2, and procede to the mainwork and reveal my codes in Section 1.3. Underneath my code contains the storylinein section 1.4, and the conclusion in Section 1.5.

Section 1..2 - Obscure Commands

1. Polygon - generates polygon (s).
2. Graphics - represents a two-dimensional graphical image.
3. With - Replaces x and y values with your own desginated values in an expression in this form: With [{ x= x0, y=y0, .......} , expr]
4. Dynamic - If you represent an object using dynamic, and interactively change or edit it, it will display the object as you change it.
5. ControlPlacement - an option for Manipulate that specifies where the controls should be placed. 
6. ImageSize - Specifies what the overall image size of the object you be. This can be tiny, small,medium, or large. You can also specifiy the width and the height with this command.

?Graphics

?With

?Dynamic

?ControlPlacement

?ImageSize

Section 1..3 - MainWork

Manipulate[
If[rotation>1000/n,rotation=1000/n] (*I'm using an If statement here so I can take control of how long I can rotate the image. If I replace 360 with a 1000, I won't be able to rotate it much*);
Graphics[{{Disk[],Red,Disk[{0,0},radius]} (* I used Graphics to create a disk, and the color red. I choose red for a reason, It goes with my story*),
Polygon[Table[
With[{m=(rotation+90 + i 180/n + If[OddQ[i],twist,0])°} (*I'm using the with command here, because as the number of points change, I want the entire imaging moving as well, and with makes that possible*),
If[EvenQ[i],1,sharpness]radius{Cos[m],Sin[m]}],{i,0,22n-1}]] 
},ImageSize->{600,600}],
{{n,1,"points"},1,24,1,ImageSize->Large},
{{sharpness,.56,"sharpness"},0,1,ImageSize->Large},(* There are small numbers after the variable. Over here, it represents the sharpness I want to start with. The sharpness ranges from 0 to 1, and so the sharpness I want to start with has to be between those two numbers. In this case, its 0.56 *)
{{twist,0,"Twist"},0,360,ImageSize->Large},(*Same case here. Twist ranges from 0 to 360 degrees, and I want it to start from 0. *)
{{radius,0.93,"Radius"},0,1,ImageSize->Large},(*ImageSize specifies the overall size for the image*)
{{rotation,0,"Rotation"},0,Dynamic[1000/n],ImageSize->Large},(* Dynamic needs to used here, because as I rotate it, the images moves and Dynamic is the command that will allow for that*)
ControlPlacement->Right] (* ControlPlacement decides where to put the commands, on the right side or left. I chose right.*)

playString[note_,length_,instrument_]:=EmitSound[Sound[SoundNote[note,{0,length},instrument]]]
stringNotes["standard"]={"E4","B3","G3","D3","A2","E2"};
stringNotes["-1/2 step"]={"E♭4","B♭3","G♭3","D♭3","A♭2","E♭2"};
stringNotes["-1 step"]={"D4","A3","F3","C3","G2","D2"};
stringNotes["+1/2 step"]={"F4","C4","G♯3","D♯3","A♯2","F2"};
stringNotes["+1 step"]={"F♯4","C♯4","A3","E3","B2","F♯2"};
stringNotes["dropped D"]={"E4","B3","G3","D3","A2","D2"};
stringNotes["open A"]={"E4","A3","E3","C♯3","A2","E2"};
stringNotes["open C"]={"E4","C4","G3","C3","G2","C2"};
stringNotes["open D"]={"D4","A3","F♯3","D3","A2","D2"};
stringNotes["open E"]={"E4","B3","G♯3","E3","B2","E2"};
stringNotes["open F"]={"F4","C4","F3","C3","A2","F2"};
stringNotes["open G"]={"D4","B3","G3","D3","G2","D2"};
tuningList={"standard","-1/2 step","-1 step","+1/2 step","+1 step","dropped D","open A","open C","open D","open E","open F","open G"};
instrumentList={"ReverseCymbal","Bird","FretNoise","Gunshot","Whistle"};
Manipulate[Column[{Dynamic@Grid[Table[With[{i=i},{Button[" string " <> ToString[i]<>" ",selectedString=i;playString[stringNotes[tuning][[i]],length,instrument];Pause[length];selectedString=0,Appearance->"Palette",Method->"Queued"],
Graphics[{AbsoluteThickness[If[selectedString==i,4,2]],If[selectedString==i,Red,Black],Line[{{0,0},{1,0}}]},AspectRatio->0.1,ImageSize->200],Style[StringReplace[stringNotes[tuning][[i]],DigitCharacter->""],Larger,If[selectedString==i,Bold,Plain],If[selectedString==i,Red,Black]]}],{i,1,6}],Spacings->{0,0},ItemSize->Automatic,Alignment->Left],
Row[{Button["low to high",Do[selectedString=i;playString[stringNotes[tuning][[i]],length,instrument];Pause[length+0.2],{i,6,1,-1}];selectedString=0,Method->"Queued"],Spacer[100],
Button["high to low",Do[selectedString=i;playString[stringNotes[tuning][[i]],length,instrument];Pause[length+0.2],{i,1,6}];selectedString=0,Method->"Queued"]}]},Left,Spacings->2],
{{instrument,"Guitar","instrument sound"},instrumentList,PopupMenu},
{{tuning,"standard","tuning"},tuningList,PopupMenu},
{{length,2,"note duration"},0.5,5},
{{selectedString,0},None},
SaveDefinitions->True,TrackedSymbols->Manipulate,AutorunSequencing->{1}]

Section 1..4 - StoryLine     (the  following context is double spaced for readability)

A simple rock. Red........red is blood which promises to turn pain into light...war into victory...and death into life. It leaves a straight 

thinking person filled with evilness that conquers all, it was called the pendant of the spiral. Inside 

this rock, lived a civilization in the lonely planet that ever existed in the Pegasus Galaxy, filled with creatures who feed on human 

beings that disobeyed to worship them. The humans, sick and tired of these blood sucking creatures called the Pixels that crawled 

into their skins, and ate them alive inside out. The humans sought after this pendant that conquered all.  Once they had it in their 

hands, it gave them magical power to create a tiny black hole near the enemy territory. This tiny black hole would only suck in a 

substance unique only to the Pixels. The humans dreamt of their destruction since their existence. And, so they continued to live 

without the disturbance of the Pixels. They lived in underground no more, and so they evolved in the most bizarre manner once 

they reached above ground. Slowly over time, their arms and legs disappeared. Ever since the disappearance of the Pixels, strange 

and unusual things began to happen. A month later, they evolve again, but this time their arms were placed as their legs, and their 

legs placed as their arms.  Soon, the humans realized that their motivation to live was limited of their dream of destroying the 

Pixels. Their dream was no longer a fantasy. If they had it, it was never a dream. Amidst all of the unusualness, the humans soon 

realized that this was all happening because of the pendant. They used the Pendant to destroy and to conquer all, and so in return 

the Pendant, as its own entity was working to conquer them. Knowing this, they sought to get rid of the Pendant. However, the 

Pendant already knew of their intentions as soon as they sought its destruction. After 2 minutes, the star that gave their planet 

energy suddenly caused the skies to blaze with fire. Two minutes later, the star went supernova, giving off gamma rays that 

obliterated their planet into pieces. Miraculously, a group of humans took off the planet and observed the remnants of their once 

fertile planet. Among the remnants, they saw a star shining amidst the absolute silence that fell. The star was shining with such 

intensity. A shine of strength and hope.

Section 1. 5 - Conclusion

After observing the combination of math,art, and music that I have used above, I conclude that they can indeed evoke emotions that are universal to anyone, and it's not just gibberish. Everyone can relate to the struggle to  survive that is played out in reality by the evolution theory.  Furthermore, I am pretty confident that if my images were displayed to an alien living at the corner of some distant galaxy, they would know the sequence of events that took place in my story. That is how I justify the combination of math,art, and music of being universal. The hardest part of my project was definitely aligning the story with the images, and the music. At first, I played around with the image generator, and thought that I would just work with certain number of images and concoct a story out of it. That wasn't so successful as the story I came up with lacked basically everything. After discarding my first story, I decided to take a different approach. This time, I came up with the story first, and then played around with the image generator. However, this added a lot more difficulty to my project because generating the images was not just me playing around with the image generator as I thought it would be. It took a lot of effort, and not to mention, the time, to complete the bigger picture. However, I'm predicting that presenting my story will be the most difficult task, as I will have to read the story and generate the images, simultaneously. Since I do not have the images pin pointed, I will have to memorize the positions of the images, and the order as well. Furthermore, the timing of the words have to be right as well, because if it's not, nothing will make any sense to my audience. If I had more time I would definetly like to find some way of playing the music as the images are moving with the story.