Message Boards Message Boards

4
|
2329 Views
|
0 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Physics, with Love

Posted 4 years ago

Unusual chapter header:

pts = {{0, -0.25}, {0, 0}, {0.75, 0.7}, {2, 
   0}, {2, -1.25}, {1, -2}, {0.25, -2.5}, {0, -2.75}, {0, -3}}; mask =
  ColorNegate[
  Graphics[FilledCurve[
    BSplineCurve[
     Join[pts, {Last[pts]}, Reverse[pts /. {x_, y_} -> {-x, y}]]]]]];
physchapters = {{"Physics", 1}, {"Mechanics", 1}, {"Optics", 
    1}, {"Heat", 1}, {"Magnetism", 1}, {"Kinematics", 1}, {"Dynamics",
     1}, {"Statics", 1}, {"Hydrostatics", 1}, {"Electricity", 
    1}, {"Electromagnetism", 1}};
si = {{"Newton", 1}, {"Pascal", 1}, {"Coulomb", 1}, {"Huygens", 
    1}, {"Carnot", 1}, {"Weber", 1}, {"Henry", 1}, {"Watt", 
    1}, {"Joule", 1}, {"Ampere", 1}, {"Volt", 1}, {"Becquerel", 
    1}, {"Meter", 1}, {"Kilogram", 1}, {"Faraday", 1}, {"Ohm", 
    1}, {"Siemens", 1}, {"Kelvin", 1}, {"Mol", 1}, {"Candela", 
    1}, {"Celsius", 1}, {"Hertz", 1}, {"Tesla", 1}, {"Lumen", 
    1}, {"Lux", 1}, {"Gray", 1}, {"Sievert", 1}, {"Second", 1}};
phys = {{"Lorentzforce", 1}, {"Centripetalforce", 1}, {"Normalforce", 
    1}, {"Energy", 1}, {"Entropy", 1}, {"Puls", 1}, {"Mass", 
    1}, {"Volume", 1}, {"Area", 1}, {"Length", 1}, {"Time", 
    1}, {"Voltage", 1}, {"Pressure", 1}, {"Current", 1}, {"Density", 
    1}, {"Weight", 1}, {"Resistance", 1}, {"Conductance", 
    1}, {"Capacity", 1}, {"Induction", 1}};
nonsi = {{"Liter", 1}, {"Minute", 1}, {"Hour", 1}, {"Year", 
    1}, {"Angström", 1}, {"mmHg", 1}, {"Torr", 1}, {"Dioptrie", 
    1}, {"Calorie", 1}};
sipre = {{"Kilo", 1}, {"Nano", 1}, {"Mega", 1}, {"Micro", 
    1}, {"Milli", 1}, {"Hecto", 1}, {"Giga", 1}, {"Peta", 
    1}, {"Centi", 1}, {"Deci", 1}};
names = {{"Einstein", 1}, {"Euler", 1}, {"Riemann", 1}, {"Doppler", 
    1}, {"Planck", 1}, {"Braun", 1}, {"Brown", 1}, {"Oersted", 
    1}, {"Schrödinger", 1}};
data = Join[physchapters, si, nonsi, phys, sipre, 
    names] /. {"Mechanics", 1} -> {"Mechanics", 4};
wc = WordCloud[data, mask, FontFamily -> "Comic Sans MS", 
  ScalingFunctions -> (#^.75 &)];
Graphics[{LightGreen, EdgeForm[{Red, Thick}], 
  FilledCurve[
   BSplineCurve[
    Join[pts, {Last[pts]}, Reverse[pts /. {x_, y_} -> {-x, y}]]]], 
  Inset[wc, Automatic, Automatic, 4.2]}]

Here Mechanics is higlighted:

enter image description here

POSTED BY: Oliver Seipel
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract