DMUG-Archiv 2015

Frühere   Chronologischer Index   Spätere
Vorherige   Thematischer Index   Nächste

FNJ 2015 HNY

Liebe Freundinnen und Freunde des Neuen Jahres, 

Remove[segment, hilF]
segment[m_, (* vorheriger Mittelpunkt *)
n_, (* vorheriger Endpunkt *)
{sh_, (* Richtung: vor 1, zurück -1 *)
t_, (* Drehsinn: links 1, rechts -1 *)
r_, (* Radius *)
w_ (* Winkel *)}] :=
Block[{x = sh Normalize[n - m] r, \[Delta] = Ceiling[w/N[\[Degree]]],
w0},
w0 = Arg[x[[1]] + I x[[2]]];
{{n + x},
Plus[n +
x, #] & /@ (r Table[{Cos[y], Sin[y]}, {y, w0 + \[Pi],
w0 + \[Pi] + t w, t w/\[Delta]}])}
] /; Chop[Sqrt[(n - m).(n - m)]] !=
0 && (sh == -1 || sh == 1) && (t == 1 || t == -1) && w > 0 && r > 0
hilF[{l1_, l2_}, l3_] := segment[First[l1], Last[l2], l3]


Remove[diskSchlange]
diskSchlange[l_List] :=
With[{coloS = RandomInteger[{1, 113} (* found max *)]},
Graphics[{{FaceForm[
Opacity[0.3,
ColorData[coloS, "ColorList"][[
RandomInteger[{1,
Length[ColorData[coloS, "ColorList"]]}]]]]],
Polygon[#]} & /@
Rest[Last[Transpose[FoldList[hilF, {{{-1, 0}}, {{0, 0}}}, l]]]],
Line[Flatten[
Rest[Last[Transpose[FoldList[hilF, {{{-1, 0}}, {{0, 0}}}, l]]]],
1]]},
PlotLabel ->
Text[Style["Frohes Neues Jahr!", Hue[RandomReal[]], Italic, 28]]]
]


diskSchlange[Table[{-1,
-1, RandomReal[{0.1, 11}],
RandomReal[{\[Pi]/RandomReal[{1, 180}],
2 \[Pi]}]}, {RandomInteger[{Prime[9], Prime[29]}]}]]



mit anderen Worten

Frohes Neues Jahr!
Udo.

Attachment: diskSchlange1.png
Description: PNG image

Frühere   Chronologischer Index   Spätere
Vorherige   Thematischer Index   Nächste

DMUG DMUG-Archiv, http://www.mathematica.ch/archiv.html