Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Generate random Rorschach tests
ResourceFunction["RandomRorschach"][] makes a random Rorschach test image. | |
ResourceFunction["RandomRorschach"]["Graphics"] makes a random Rorschach test graphics object. | |
ResourceFunction["RandomRorschach"]["HalfGraphics"] makes the left half of a random Rorschach test graphics object. | |
ResourceFunction["RandomRorschach"]["Image"] makes a random Rorschach test image. | |
ResourceFunction["RandomRorschach"]["HalfImage"] gives the left half of a random Rorschach test image. |
"NumberOfStrokes" | Default | number of strokes in the scribble seed |
"OrderedStrokePoints" | False | whether to order the scribble stroke points or not |
"ConnectingFunction" | FilledCurve@*BezierCurve | connecting function for the scribble strokes |
"ImageEffects" | Default | image effects to be applied |
"CropSeed" | True | whether to crop the seed or not |
Make a random Rorschach image:
In[1]:= |
Out[1]= |
Make a random Rorschach graphics object:
In[2]:= |
Out[2]= |
RandomRorschach takes a string argument that is expected to be one of "Graphics", "HalfGraphics", "Image" or "HalfImage". Here is a table with corresponding results:
In[3]:= |
Out[3]= |
The RandomRorschach results are controlled using options:
In[4]:= |
Out[4]= |
The option "CropSeed" specifies whether the seed is cropped (from its right side):
In[5]:= |
Out[5]= |
If the values Automatic or Random are given, then a logical value is randomly selected.
The value of the option "ConnectingFunction" is passed to RandomScribble. Here are examples:
In[6]:= |
Out[6]= |
The option "ImageEffects" can take a sequence of ImageEffect specs and other image manipulation functions:
In[7]:= |
Out[7]= |
If the value is Default, then the value is {{"OilPainting",5}}.
If the value is Automatic, then the code RandomChoice[{{"Jitter",10},"EdgeStylization",{"OilPainting",16}},2] is used.
The value of the option "NumberOfStrokes" can be Default, Automatic, a positive integer or a list of positive integers. It is passed to RandomScribble. Here are examples:
In[8]:= |
Out[8]= |
If the value is Default, then the code RandomInteger[{6,20}] is used.
If the value is Automatic, then the code RandomInteger[{5,20},3] is used.
The option "OrderedStrokePoints" takes a logical value. The value is passed to RandomScribble. Here are examples:
In[9]:= |
Out[9]= |
Using different color functions would, generally, produce different Rorschach interpretations. Here is a set of Rorschach test images:
In[10]:= |
Out[10]= |
Here is another set of images with the same random seed and image effects as shown previously and a different color function:
In[11]:= |
Out[11]= |
In some sense, the option "ImageEffects" is redundant because similar behavior can be achieved with standard Wolfram Language code. Nevertheless, using that option provides a quicker (and shorter) way to get desired results. Here is a Rorschach image creation specification:
In[12]:= |
Out[12]= |
Here we generate the Rorschach "initial" image first and then modify it with the functions that correspond to the "ImageEffects" specification above:
In[13]:= |
Out[13]= |
The repository functions RandomScribble and RandomMandala are closely related to RandomRorschach:
In[14]:= |
Out[14]= |
The values of the option "ImageEffects" might contain wrong second arguments for ImageEffect. In those cases, errors of ImageEffect are shown and the result is $Failed:
In[15]:= |
Out[15]= |
$Failed is also returned if an element of the list is not a function that gives an image result:
In[16]:= |
Out[16]= |
A table of random Rorschach test images:
In[17]:= |
Out[17]= |
Another table with the same random seed as shown previously but with a different color function and image effects:
In[18]:= |
Out[18]= |
"Poodles", or "frogs", or an "electric bolts guy":
In[19]:= |
Out[19]= |
The resource function XKCDConvert can be applied to the graphics results of RandomRorschach:
In[20]:= |
Out[20]= |
This work is licensed under a Creative Commons Attribution 4.0 International License