Pensieve header: January 27: Textbook (EIWL) chapters 9-12, unevaluated.

9. Interactive Manipulation

Manipulate[Table[Orange,n],{n,1,5,1}]

Table[Table[Orange,n],{n,1,5,1}]

Manipulate[Column[{n,n^2,n^3}],{n,1,10,1}]

Table[Column[{n,n^2,n^3}],{n,1,10,1}]

Manipulate[Column[{n,n^2,n^3}],{n,1,10}]

Manipulate[BarChart[{1,a,4,2*a,4,3*a,1}],{a,0,5}]

Manipulate[PieChart[{1,a,4,2*a,4,3*a,1}],{a,0,5}]

Manipulate[Graphics[Style[RegularPolygon[n],Hue[h]]],{n,5,20,1},{h,0,1}]

Manipulate[Graphics[Style[RegularPolygon[5],color]],{color,{Red,Yellow,Blue}}]

10. Images

CurrentImage[]

$ImagingDevices

$ImagingDevice=$ImagingDevices[[2]]

img=CurrentImage[]

ColorNegate[img]

Blur[img]

Blur[img,10]

Table[Blur[img, n], {n, 0, 15, 5}]

ImageCollage[Table[Blur[img, n], {n, 0, 15, 5}]]

DominantColors[img]

Binarize[img]

DominantColors[Binarize[img]]

img1=EdgeDetect[img]

ImageAdd[img, img1]

Manipulate[Binarize[img, t], {t, 0, 1}]

imgs=WikipediaData["knot theory","ImageList"]

ImageCollage[Scaled[1]->imgs, Method -> "ClosestPacking", Background -> White]

11. Strings and Text

"This is a string."

StringLength["hello"]

StringReverse["hello"]

ToUpperCase["I'm coding in the Wolfram Language!"]

StringTake["this is about strings",10]

StringLength[StringTake["this is about strings",10]]

StringJoin["Hello"," ","there!"," How are you?"]

{"apple","banana","strawberry"}

StringTake[{"apple","banana","strawberry"},2]

StringJoin[{"apple","banana","strawberry"}]

Characters["a string is made of characters"]

Sort[Characters["a string of characters"]]

InputForm[Sort[Characters["a string of characters"]]]

TextWords["This is a sentence. Sentences are made of words."]

StringLength[TextWords["This is a sentence. Sentences are made of words."]]

StringTake[WikipediaData["knot theory"],100]

WordCloud[DeleteStopwords[WikipediaData["knot theory"]]]

Take[WordList[],20]

WordCloud[StringTake[WordList[],1]]

RomanNumeral[1988]

Table[RomanNumeral[n],{n,20}]

ListLinePlot[Table[StringLength[RomanNumeral[n]],{n,100}]]

IntegerName[56]

ListLinePlot[Table[StringLength[IntegerName[n]],{n,100}]]

Alphabet[]

LetterNumber[{"a","b","x","y","z"}]

FromLetterNumber[{10,11,12,13,14,15}]

Alphabet["Russian"]

Rasterize[Style["ABC",100]]

EdgeDetect[Rasterize[Style["ABC",100]]]

FromCharacterCode /@ Range[1000]

12. Sound

Sound[SoundNote["C"]]

Sound[{SoundNote["C"],SoundNote["C"],SoundNote["G"]}]

Sound[Table[SoundNote[RandomInteger[12],0.1,"Violin"],20]]

Play[Sin[440 2 Pi t],{t,0,1}]

Manipulate[
{(E^f),Play[Sin[(E^f) 2 Pi t],{t,0,1}, SampleRate->100000]},
{{f,Log@440},Log@10,Log@30000}
]

A 48-crossing knot

Xp[4,88,5,87] Xp[5,75,6,74] Xp[6,62,7,61] Xp[7,49,8,48] Xp[8,36,9,35] Xp[9,23,10,22] Xp[16,4,17,3] Xp[17,87,18,86] Xp[18,74,19,73] Xp[19,61,20,60] Xp[20,48,21,47] Xp[21,35,22,34] Xp[28,16,29,15] Xp[29,3,30,2] Xp[30,86,31,85] Xp[31,73,32,72] Xp[32,60,33,59] Xp[33,47,34,46] Xp[40,28,41,27] Xp[41,15,42,14] Xp[42,2,43,1] Xp[43,85,44,84] Xp[44,72,45,71] Xp[45,59,46,58] Xp[52,40,53,39] Xp[53,27,54,26] Xp[54,14,55,13] Xp[55,1,56,96] Xp[56,84,57,83] Xp[57,71,58,70] Xp[64,52,65,51] Xp[65,39,66,38] Xp[66,26,67,25] Xp[67,13,68,12] Xp[68,96,69,95] Xp[69,83,70,82] Xp[76,64,77,63] Xp[77,51,78,50] Xp[78,38,79,37] Xp[79,25,80,24] Xp[80,12,81,11] Xp[81,95,82,94] Xp[88,76,89,75] Xp[89,63,90,62] Xp[90,50,91,49] Xp[91,37,92,36] Xp[92,24,93,23] Xp[93,11,94,10]