SymSketch - for doodling symmetrical shapes

Paint programs, vector editors, 3d modelers, animation editors, etc.
Post Reply
Message
Author
User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

SymSketch - for doodling symmetrical shapes

#1 Post by SFR »

Back in the Windows days I spent some time searching for a simple and free graphic program that would allow drawing symmetrical shapes.
My best find was UltimatePaint, but the symmetry is only a small part of it and I wanted something small and simple; besides, being on Linux now, I also prefer a native solutions.

Of course I haven't found anything what would suit my needs, so having no choice, I decided to take things into my own hands again.
Bash/Gtkdialog are too slow for that and C/BaCon/(and similar) are still out of my reach, so I learned Icon language enough to write a primitive app of this kind.

The result is nothing fancy, it's just for drawing b/w, snowflake/rosette-like shapes.
Left mouse button to draw, right to erase. No lines, rects, circles, only freehand.

Instructions:
1. Download and unpack the attached SymSketch-0.1.tar.gz.
It contains compiled (or actually "tokenized") symsketch executable as well as source code (symsketch.icn).
2. It's also necessary to obtain iconx executor - download Icon for Linux (32bit or 64bit), unpack it, go to ./icon-v951/bin/ and copy iconx into the same directory where symsketch is (or somewhere into $PATH, e.g. /usr/bin/, /usr/local/bin/, etc.).
3. Make sure both files (iconx and symsketch) are executable and click on symsketch.

Keyboard shortcuts:
1-9: pixel size
+/-: increase/decrease the amount of symmetry points (1-100)
m: toggle mirror mode
c: clear drawing area
s: save image (as SymImage_X.xpm, in $HOME directory)
q: quit

Written and tested on Slacko-5.7.0.
___________

Update 2017-06-03: See this post for version 0.2.

Enjoy the doodling &
Greetings!
Attachments
SymSketch-0.1.tar.gz
MD5: a3cc7d4cb87603bc7a71f687905c0646 SymSketch-0.1.tar.gz
(4.84 KiB) Downloaded 302 times
Screenshot.gif
(97.61 KiB) Downloaded 538 times
Last edited by SFR on Sat 03 Jun 2017, 19:55, edited 1 time in total.
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#2 Post by zigbert »

cool :)

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#3 Post by don570 »

I sent an email to mtpaint maintainer, Dimitri,
to look at this.

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#4 Post by dejan555 »

Nice, this is fun. Also what a coincidence, I didn't see this post before but I talked in mtpaint thread recently how you can simulate this effect - not in realtime like in yours app though.
I actually started doing some symetric images in mtpaint (link to gallery in signature)
Also, I've been wondering if some graphic app has this feature, or at least as a plugin - the only time before that I've seen this is on Amiga's "Deluxe Paint" progam in an emulator.
Good job on this, works on dpup 487!
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#5 Post by SFR »

Hey Dejan, very nice loops you've made there. :)
Also, I've been wondering if some graphic app has this feature, or at least as a plugin
Well, some kind of such an effect is available in InkScape, but it needs to be enabled at compile-time, as described here.

Btw - interesting, randomly generated, fractal-ish symmetric patterns: http://rfractals.net/hex/index.php

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#6 Post by SFR »

Here's v0.2, which is C/GTK+ port.

I barely know C, this is my first C/GTK+ app and 70% of the code was done using 'web search for some examples -> copy -> paste -> adjust' routine, so it's not state-of-the-art coding, to put it mildly.
BUT, it works, more or less, as intended.

The attached archive contains the source + build script.
It also contains 2 binaries (x86_32 & x86_64), both built in Fatdog64-710 - may or may not work in other Puppies.
To build from sources, make sure devx.sfs is loaded and then just launch ./build script.

Some notes:
- left mouse button = draw, right mouse button = erase, middle mouse button = invert (<- very recommended, adds nice, "artistic" noise; see screenshots),
- images are saved in $HOME directory as "SymSketch_<date>_<time>.png".
___________

Version 0.3:
- 'colon' replaced with 'dot' in output filename, to avoid problems with FAT filesystem (thanks to don570),
- 'Mirror' is now relative to the Y-axis (thanks to don570),
- fixed some minor memory leaks (not all, though).

Have fun &
Greetings!
Attachments
symsketch-0.3.tar.gz
MD5: e77b6d836e977c57eba40a44e453ce61 symsketch-0.3.tar.gz
(15.93 KiB) Downloaded 136 times
SymSketch.jpg
(226.62 KiB) Downloaded 209 times
Last edited by SFR on Thu 08 Jun 2017, 08:53, edited 1 time in total.
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#7 Post by don570 »

It worked nicely in fatdog64, however there is a bug :roll:
When I tried to drag the image file to a USB stick I discovered that
the filename has colon symbol : which is not allowed by fat32

Code: Select all

filename = g_strdup_printf ("%s/%s_%d-%02d-%02d_%02d:%02d:%02d.%s",
__________________________________________________
Also I have a request....

If you can modify the code so that a symmetrical face can be drawn so that it is upright rather than on its side. ( see image)
Attachments
SymSketch_image.png
(5 KiB) Downloaded 148 times

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#8 Post by SFR »

don570 wrote:the filename has colon symbol : which is not allowed by fat32
Yeah, I made it like this, because images go straight to $HOME, which can't be FAT.
But ok, changed it to 'dot'.
don570 wrote:upright rather than on its side
Makes sense, corrected.

New version in my previous post.

Thanks for the feedback &
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

Post Reply