Hello all,
can i create mandala images with ImageMagick?
Something like this for example: https://www.pinterest.de/pin/609252655810502594
Greetings lelldorin
Creating mandala graphics
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Creating mandala graphics
There are no automatic tools to generate such patterns that I know about. But you can create Mandelbrot and JuliaSet patterns with my scripts of the same name at my link below. I also have scripts, kaleidoscope and kaleidoscopic.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Creating mandala graphics
I just uploaded a new script, mandala, to create Mandala type image from simple graphic shapes. See my link below.
- GeeMack
- Posts: 718
- Joined: 2015-12-01T22:09:46-07:00
- Authentication code: 1151
- Location: Central Illinois, USA
Re: Creating mandala graphics
It looks like your link to the script hasn't updated yet, but the example figures look like the script can do some pretty cool stuff.
I've been fascinated by ImageMagick's power to do some wildly complex things within a single command, and I spent a lot of time working up a kaleidoscope script for IM7 and Windows. This command takes any image or even the system clipboard as input, makes a kaleidoscope of the given number of slices, and outputs the final design as a square the size of the height of the input image.
Code: Select all
set INIMAGE=input.jpg
set OUTFILE=kaleidoscope.png
set SLICES=12
magick ^
%INIMAGE% ^
-alpha set ^
-background none ^
-virtual-pixel mirror ^
-set option:distort:viewport %[fx:ceil(h*tan((180/%SLICES%)*pi/180))]x%[h] ^
-distort affine "%[fx:w/2],0 0,0" ^
-distort affine "0,0 %[w],0 0,%[h] 0,%[h] 1,%[h] 1,%[h]" ^
-virtual-pixel none ^
-distort affine "0,%[h] %[w],%[h] 0,0 0,0 1,0 1,0" ^
-virtual-pixel mirror ^
-set option:distort:viewport %[fx:w*2]x%[h] ^
-distort SRT 0 ^
-duplicate %[fx:%SLICES%-1] ^
-virtual-pixel none ^
-set option:distort:viewport %[h]x%[h] ^
-distort SRT "%[fx:w/2],%[h] 0.71 %[fx:t*360/n] %[fx:h/2],%[fx:h/2]" ^
+repage ^
-flatten ^
-alpha off ^
%OUTFILE%
To convert to a *nix script requires changing the continued line carets "^" to backslashes "\", and may need quoting or escaping some other characters. The way the variables are set and read would also need a tweak. I don't have IM7 on a *nix system to check it.
For my own use I generate a random number for the %SLICES% variable. I also "-normalize" just before the output to punch up the colors. The command above is pretty much just the engine that does the real work of calculating the angles, cutting the slices, and assembling them to create the ouput image.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Creating mandala graphics
GeeMack,
Thanks for notifying me of the problem. It was a cut and paste error. I have fixed it, so the script can be download.
Thanks for you kaleidoscope command. I have two scripts also: kaleidoscope and kaleidoscopic.
I will check your code out when I have time tomorrow.
Thanks for notifying me of the problem. It was a cut and paste error. I have fixed it, so the script can be download.
Thanks for you kaleidoscope command. I have two scripts also: kaleidoscope and kaleidoscopic.
I will check your code out when I have time tomorrow.