Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'How to import my own image for manipulation?' topicStudent Support Forum > General > Archives > "How to import my own image for manipulation?"

Help | Reply To Topic
Author Comment/Response
ERS
02/08/12 10:32am

My brother has Mathematica 8 on his laptop which he uses for work. I however am more of an artist and would like to use mathematica in that area. How do I use my own image in this source code.Source Code Example:

RandomInkBlot[mu_, sigma_, seed_, resolution_] :=
Block[{pStart = Range[0, 1, 1/resolution], pX, pY},

BlockRandom[SeedRandom[seed];
pX = FoldList[(#1 +
RandomReal[NormalDistribution[mu[[1]], sigma[[1]]]]) &, 0,
Rest@pStart];
pY = FoldList[(#1 +
RandomReal[NormalDistribution[mu[[2]], sigma[[2]]]]) &, 0,
Rest@pX];
];
Graphics[
Polygon[Join[Transpose[{pX, pY}], Reverse@Transpose[{-pX, pY}]]],
AspectRatio -> 1, ImageSize -> {400, 400}]]


Manipulate[
RandomInkBlot[\[Mu], \[Sigma], seed, vertices],
{{vertices, 350}, 5, 2500, 1, Appearance -> "Labeled"},
{{seed, 164, "random seed"}, -1000, 1000, 1, Appearance -> "Labeled"},
{{\[Mu], {-.5, 0}}, {-1, -1}, {1, 1}, Slider2D,
ControlPlacement -> Left}, {{\[Sigma], {5, 5}}, {.01, .01}, {100,
100}, Slider2D, ControlPlacement -> Left},
SaveDefinitions -> True]

URL: ,
Help | Reply To Topic