Colour pinstripe/Display: Difference between revisions

Content deleted Content added
→‎{{header|Java}}: small changes
Added Mathematica
Line 433:
}
}</lang>
 
=={{header|Mathematica}}==
<lang Mathematica>color[y_] := {Black, Red, Green, Blue, Magenta, Cyan, Yellow, White}[[
Mod[y, 8] + 1]];
Graphics[Join[{Thickness[1/400]},
Flatten[{color[#], Line[{{#, 400}, {#, 301}}]} & /@
Range[400]], {Thickness[1/200]},
Flatten[{color[#], Line[{{2 # - 1, 300}, {2 # - 1, 201}}]} & /@
Range[200]], {Thickness[1/100]},
Flatten[{color[#], Line[{{4 # - 2, 200}, {4 # - 2, 101}}]} & /@
Range[100]], {Thickness[1/50]},
Flatten[{color[#], Line[{{8 # - 4, 100}, {8 # - 4, 1}}]} & /@
Range[50]]], ImageSize -> {400, 400}]</lang>
{{out}}
See [https://www.dropbox.com/s/tg4zk4jkddkok8w/Mathematica_Pinstripes_Colored.png?dl=0 here].
 
=={{header|OCaml}}==