Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 18 Aug 2017, 12:32
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Graphics
SymSketch - for doodling symmetrical shapes
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
SFR


Joined: 26 Oct 2011
Posts: 1628

PostPosted: Thu 07 Aug 2014, 08:47    Post subject:  SymSketch - for doodling symmetrical shapes  

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!
SymSketch-0.1.tar.gz
Description  MD5: a3cc7d4cb87603bc7a71f687905c0646 SymSketch-0.1.tar.gz
gz

 Download 
Filename  SymSketch-0.1.tar.gz 
Filesize  4.84 KB 
Downloaded  142 Time(s) 
Screenshot.gif
 Description   
 Filesize   97.61 KB
 Viewed   503 Time(s)

Screenshot.gif


_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.

Last edited by SFR on Sat 03 Jun 2017, 15:55; edited 1 time in total
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 6457
Location: Valåmoen, Norway

PostPosted: Thu 07 Aug 2014, 10:06    Post subject:  

cool Smile
_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
don570


Joined: 10 Mar 2010
Posts: 4648
Location: Ontario

PostPosted: Thu 07 Aug 2014, 20:37    Post subject:  

I sent an email to mtpaint maintainer, Dimitri,
to look at this.
Back to top
View user's profile Send private message 
dejan555


Joined: 30 Nov 2008
Posts: 2795
Location: Montenegro

PostPosted: Mon 10 Nov 2014, 17:57    Post subject:  

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!

_________________
Dpup 487 | Puppy Gallery | My photo gallery | mtPaint works
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
SFR


Joined: 26 Oct 2011
Posts: 1628

PostPosted: Tue 11 Nov 2014, 11:00    Post subject:  

Hey Dejan, very nice loops you've made there. Smile
Quote:
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!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1628

PostPosted: Sat 03 Jun 2017, 15:53    Post subject:  

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!
symsketch-0.3.tar.gz
Description  MD5: e77b6d836e977c57eba40a44e453ce61 symsketch-0.3.tar.gz
gz

 Download 
Filename  symsketch-0.3.tar.gz 
Filesize  15.93 KB 
Downloaded  20 Time(s) 
SymSketch.jpg
 Description   
 Filesize   226.62 KB
 Viewed   172 Time(s)

SymSketch.jpg


_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.

Last edited by SFR on Thu 08 Jun 2017, 04:53; edited 1 time in total
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 4648
Location: Ontario

PostPosted: Wed 07 Jun 2017, 20:18    Post subject:  

It worked nicely in fatdog64, however there is a bug Rolling Eyes
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:
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)
SymSketch_image.png
 Description   
 Filesize   5 KB
 Viewed   116 Time(s)

SymSketch_image.png

Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1628

PostPosted: Thu 08 Jun 2017, 04:54    Post subject:  

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!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Graphics
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0753s ][ Queries: 15 (0.0068s) ][ GZIP on ]