-
-
-
-
-
-
-
-
-
-
proc[img1_, cf_: ColorData[1], mode_: None, blur_: 8] := Module[{img, components, rank, largest, colored}, img = RemoveAlphaChannel[ColorNegate@ColorConvert[img1, "Grayscale"]]; components = MorphologicalComponents[img]; Module[{measurements, sorted}, measurements = ComponentMeasurements[components, "Count"]; sorted = First /@ Reverse@SortBy[measurements, Last]; rank[label_] := (rank[label] = Position[sorted, label][[1, 1]])]; colored = Colorize[components, ColorFunction -> (cf[rank[#]] &), ColorFunctionScaling -> False]; If[mode == "Angelic", colored = ImageMultiply[img, colored]]; ColorNegate[ImageMultiply[ColorNegate[img], Blur[#, blur] &@ColorNegate[colored]]] // ImageAdjust]; (**)im = Draw[Iterations -> 17, {F -> {B, left[.020944], B}, B -> {L, F}}, RandomStuff -> None, Angle -> Pi/5, ImageSize -> 1280, ViewPoint -> {0, 0, Infinity}] // Rasterize; GradientFilter[im, 5] // ColorNegate // proc[#, Blue &] & // ColorNegate // ImageResize[#, Scaled[1/2]] & (**)Draw[{A -> {B, L, B}, B -> {A, R, A}}, Primitive -> (Rotate[Line[#], -Pi/24, {0, 0, 1}] &), Iterations -> 13, Angle -> 7 Pi/12, Definitions -> {B -> forward, A -> forward}, DrawStyle -> Opacity[.5], RandomStuff -> None, ViewPoint -> {0, 0, Infinity}] (**)Draw[Iterations -> 9, {A -> {B, L, B}, B -> {A, R, A}}, Definitions -> {B -> forward, A -> forward}, RandomStuff -> {Transparent, Sphere[{0, 0, 0}, .05]}, DrawStyle -> {Opacity[.8], Yellow, Glow[Green]}, ViewPoint -> {0, 0, Infinity}] (**)d = Draw[{swirl -> ConstantArray[{BF, F, BF, swirl, FO[Pi/12]}, 5]}, DrawStyle -> Opacity[.9], RandomStuff -> None, Primitive -> (Line[First@#, VertexColors -> (Darker[#, 1/8] & /@ ColorData["AvocadoColors"] /@ Range[0., 1, 1/(Length[First[#]] - 1)])] &), Definitions -> {swirl -> backward}, Iterations -> 6, ImageSize -> 2 1280, Method -> {"ShrinkWrap" -> True}, Background -> Lighter[LightGray, 7/12]] // Rasterize; d // ImageResize[#, Scaled[1/4]] & // ImageReflect[#, Top -> Bottom] & // ImagePad[#, 2, Lighter[LightGray, 7/12]] & (**)Draw[Iterations -> 8, {F :> {F, flipout[.2 RandomReal[], Pi RandomReal[]], F}}] (**)h = Draw[{R -> {B, R, R, R, F}}, Iterations -> 8, Primitive -> Line, RandomStuff -> None, Angle -> 1907/2048, ImageSize -> 2 1280, ViewPoint -> {0, 0, Infinity}] // Rasterize; proc[h // ImageAdjust, Yellow &, "Anglic", 13] // ImageResize[#, Scaled[1/4]] & (**)diff = ImageDifference @@ Table[ Draw[{arc, F, arc}, {F -> {F, F, arc, F, arc, F, arc, F, F}}, Primitive -> (Tube[#, .115] &), Angle -> Pi/6, Definitions -> {F -> forward[6], arc -> Flatten[Table[{forward[.1], backflip[.899 .1047], right[1/4 .1047]}, {160}]]}, Iterations -> 2, DrawStyle -> color, RandomStuff -> None, Lighting -> "Neutral", Method -> {"ShrinkWrap" -> True}, ViewPoint -> {3, -0.25, -1.5}, ViewVertical -> {0.56, -0.66, -0.7}, ImageSize -> 2 1280] // Rasterize, {color, {LightGray, White}}]; diff // ColorNegate // ImageAdjust // ImageResize[#, Scaled[1/4]] &
This page is an excerpt from the sierpinski triangle page to end most sierpinski triangle pages .