SymmetriSketch: A simple app for playing with symmetry

We were recently contacted by a mathematics instructor, who suggested that it might be interesting to have a program like Snowflake, but with the option of picking and choosing different symmetry properties.

Natural snowflakes have (approximate) sixfold rotation symmetry plus reflection symmetry. However, a lot of things that you can draw by hand have absolutely no resemblance to snowflakes at all-- and it is somewhat fun to explicitly play with the rules.

Our new program, SymmetriSketch, sticks to the same basic design principles as Snowflake: it's cross platform, open source, and able to export a true vector drawing with a closed path. However, SymmetriSketch is a much more flexible program that allows you to play with different symmetries, and create all kinds of different things that would never be mistaken for frozen water.


Here's what it looks like when the program first opens:

SymmetriSketch 1


The initial shape is an overall pentagon-- an object with five-fold rotation symmetry and reflection symmetry. The figure is generated by taking the editable slice-- highlighted here and when you start the program-- and reflecting and rotating it to complete the full shape that you see.

Within the editable slice, you can also see three highlighted control points that can be dragged around. There is control point at every vertex and at the midpoint of every line segment between two vertices. If you drag a control point that is the midpoint of a line segment, it turns that control point into a new vertex. That new vertex also gets new control points at the midpoints to its neighbors.

Every vertex point can be moved to any location on the screen with the exception of the vertex that is initially at the top point of the pentagon-- that vertex is constrained to move along the vertical axis-- the axis of reflection symmetry.


SymmetriSketch 6

The controls are purposefully kept simple. There are two symmetry controls-- for the order of rotational symmetry and to toggle reflection-- which you can change in the lower left hand corner of the screen.

The number, with its +/- controls, refers to the order of discrete rotational symmetry. If the number shown is n, then n-fold rotational symmetry is applied, which means that the displayed object is unchanged when rotated by 360 degrees/n. In the screenshot above, 9-fold rotational symmetry is applied.

Orders from 1 to 99 are allowed-- note that 1-fold rotational symmetry is "no symmetry at all" since it requires 360/1 = 360 degrees of rotation to return to the original shape.


The second control is for reflection symmetry, and toggles between "reflect" or "rot. only," where it either does, or does not apply a mirror reflection across the vertical axis.


SymmetriSketch 3

With reflection symmetry turned off, the figure is drawn with pure rotational symmetry. (This screenshot was taken while editing the shape, and you can see control points, indicated by little circles.)


Going for higher orders of rotational symmetry can lead to interesting looking shapes as well:

SymmetriSketch


At the lower right corner of the window are "Clear" and "Save" buttons. The "Clear" button that erases your drawing and resets the vertices on the screen. The "Save" button saves your drawing as a PDF file. The file is automatically saved in the same folder as the SymmetriSketch program, with file name SymmetriSketch-####.pdf, where #### is a number.


SymmetriSketch 7 SymmetriSketch 7b

Here is what the PDF output looks like, in comparison to the program that generated it on screen.


The PDF files are saved with single-stroke output. That is to say, any shape drawn by this program can be drawn in one pass, without lifting a pen-- although lines are allowed to cross. That makes the program suitable for designing continuous paths for pen plotters, vinyl cutters, engraving machines, and other CNC and art robots.





Download the SymmetriSketch program!

The current version is SymmetriSketch 1.0, uploaded July 22,2009.

Programs written in Processing are called sketches. The SymmetriSketch sketch can be either opened and run directly-- as an application-- or executed from within the Processing environment.


Method 1: Download the SymmetriSketch application directly for your choice of platform:

  • Linux (1.2 MB .ZIP archive)
  • Mac (1.3 MB .ZIP archive)
  • Windows (1.2 MB .ZIP archive)

Method 2: Download SymmetriSketch source code and Processing

  • 2A: Download Processing for your platform.
  • 2B: Download the SymmetriSketch sketch file (60 kB .ZIP archive)






We suspect that this app will lead to some good geometric play time-- and maybe even interesting objects via the vector export. We'd love to see the drawings that you produce in the Evil Mad Science Auxiliary!

18 comments

The following comments are owned by whomever posted them. This site is not responsible for what they say.
Authored by: Anonymous on Wednesday, July 22 2009 @ 02:41 PM PDT SymmetriSketch: A simple app for playing with symmetry
License?
Authored by: Windell on Wednesday, July 22 2009 @ 07:00 PM PDT SymmetriSketch: A simple app for playing with symmetry
Per the source code, it's distributed under the GPL 3.0. If you'd like to see it released under additional licenses as well, please let us know.

---
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/
Authored by: Anonymous on Thursday, July 23 2009 @ 12:53 AM PDT SymmetriSketch: A simple app for playing with symmetry
I thought it was possible to publish Processing sketches right on the web page as a Java applet?

http://processing.org/reference/environment/#applet
Authored by: Windell on Thursday, July 23 2009 @ 01:10 AM PDT SymmetriSketch: A simple app for playing with symmetry
It is possible, but the performance is (almost always) *terrible.* This is a smooth graphic app, and isn't beautiful when it runs in a browser.

---
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/
Authored by: Anonymous on Thursday, July 23 2009 @ 12:59 AM PDT SymmetriSketch: A simple app for playing with symmetry
Caused quite a problem with Ubuntu 9.14. Had to restart the x server after the desktop borked.
Authored by: Windell on Thursday, July 23 2009 @ 01:12 AM PDT SymmetriSketch: A simple app for playing with symmetry
Was this with the sketch version, from with processing, or the compiled app (or both)?

---
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/
Authored by: Windell on Thursday, July 23 2009 @ 01:38 AM PDT SymmetriSketch: A simple app for playing with symmetry
I just tried my local copy of Ubuntu 9.0.4 (I think) and it seemed to be working flawlessly-- running the executable version.

(I did have to install the latest Java Runtime in order to do so, but that's a matter of adding it from the menu option....)

---
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/
Authored by: Anonymous on Thursday, July 23 2009 @ 04:07 AM PDT SymmetriSketch: A simple app for playing with symmetry
Very nice, runs fine on my MacBook Pro. This would make a cute iPhone app, too!
Authored by: zifmia on Thursday, July 23 2009 @ 05:11 AM PDT SymmetriSketch: A simple app for playing with symmetry
I saw some of these pictures and immediately thought-- coloring book. At least for some images that create interlocking regions (e.g. example 6986) rather than single regions with complex edges.

I can certainly print images and to this the old-fashioned way with crayons, colored pencils, etc. Can I get these images into a paint program on the computer? No paint program I have knows how to read a pdf image.

I did a bit of looking online to find either a paint program that could read pdfs or a simple converter to turn pdf into jpg/bmp/whatever. I found a few programs but they were all over my budget for this, which being something I might use just a few times for fun is basically free.

Any suggestions?
Authored by: Windell on Thursday, July 23 2009 @ 07:51 AM PDT SymmetriSketch: A simple app for playing with symmetry
Inkscape might do what you're looking for-- it can import PDF and export bitmaps (png, etc). It's free, open source, and cross platform as well. :)

You can also take a screenshot of the SymmetriSketch window -- that's a quick way to get the image into a bitmap! Or, you could edit the code of the program to produce a bitmap output instead of PDF.

---
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Authored by: Anonymous on Thursday, July 23 2009 @ 07:54 AM PDT SymmetriSketch: A simple app for playing with symmetry
Simple!

Use your "print screen" button and paste the screen into your (any) paint program.

best of luck from
NoLuck
Authored by: zifmia on Thursday, July 23 2009 @ 07:58 AM PDT SymmetriSketch: A simple app for playing with symmetry
Doh! Thanks, that worked great.
Authored by: Anonymous on Thursday, July 23 2009 @ 07:59 AM PDT SymmetriSketch: A simple app for playing with symmetry
Well, I see Windell beat me to the answer (with a better answer) by 3 minutes!

Windell = FIRST PRIZE!

Best of luck from
NoLuck
Authored by: zifmia on Thursday, July 23 2009 @ 08:30 AM PDT SymmetriSketch: A simple app for playing with symmetry
http://www.flickr.com/photos/28311558@N04/3750115140/in/pool-evilmadscience
http://www.flickr.com/photos/28311558@N04/3750115246/in/pool-evilmadscience

I'll have to play with this more when I'm not hiding this at work. I think some of my kids will like this a lot too. Thanks.
Authored by: Anonymous on Saturday, July 25 2009 @ 06:22 PM PDT SymmetriSketch: A simple app for playing with symmetry
It's awesome... simple awesome
Authored by: Anonymous on Monday, July 27 2009 @ 02:09 AM PDT Portable App?
Can this be packaged as a Portable App? I'd love to be able to take it with me. I know they have the shell available, but I know nothing of how to put the two together...

http://portableapps.com/apps/development/portableapps.com_installer

don't even know how to make the durn link code work here.
Authored by: Windell on Monday, July 27 2009 @ 06:51 AM PDT Portable App?
This program is already *much* more portable than what they call "Portable Apps." Those so-called "portable" things only run on windows-- this has three separate versions for Windows, Macs, and Linux. There is no installer program, just the program itself, and no files are saved except in the directory with the application.

So far as I can tell, you can just copy it to a USB drive and run it from there... unlike with those so-called "Portable Apps," which require a special installer.

---
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/
Authored by: Anonymous on Wednesday, August 05 2009 @ 08:30 PM PDT SymmetriSketch: A simple app for playing with symmetry
This is a neat and fun lil app- thanks for putting it out there for me (and others, of course) to play with! Great way to make a tattoo design too! :-)
Welcome to Evil Mad Scientist Laboratories. New projects are posted on most Wednesdays.


Bookmark EMSL

EMSL RSS Feed
Twitter: @EMSL
del.icio.us
feedburner
Feed on Google Reader
YouTube Channel

Subscribe to get new articles by E-mail:

E-mail address:


Preview | Powered by FeedBlitz

My Account





Sign up as a New User
Lost your password?

Who's Online

Guest Users: 10

DIY Hardware for Electronic Art


Interactive LED Panel kits


Meggy Jr RGB
LED matrix game
development kit.


Business-card sized
AVR target boards


Peggy 2
LED Pegboard kits

Forumposts

Order: New Views Posts
Latest 10 Forum Posts
 
Re: Coffee table Vs. Dining ta..
 By:  Windell
 Saturday, March 13 2010 @ 12:56 AM PST
Re: Coffee table Vs. Dining ta..
 By:  Chris
 Friday, March 12 2010 @ 11:25 AM PST
Re: Coffee table Vs. Dining ta..
 By:  Windell
 Friday, March 12 2010 @ 10:15 AM PST
Coffee table Vs. Dining table ..
 By:  Chris
 Friday, March 12 2010 @ 06:13 AM PST
Re: 3D Routed Interactive Wall
 By:  wgarris
 Tuesday, March 09 2010 @ 11:31 AM PST
Re: 3D Routed Interactive Wall
 By:  Lenore
 Tuesday, March 09 2010 @ 10:39 AM PST
3D Routed Interactive Wall
 By:  wgarris
 Tuesday, March 09 2010 @ 10:12 AM PST
Re: 2nd Panel Problem Panel.
 By:  Windell
 Monday, March 08 2010 @ 01:49 PM PST
Re: 2nd Panel Problem Panel.
 By:  xDGx
 Monday, March 08 2010 @ 01:14 PM PST
Re: Atmega328p cannot be progr..
 By:  Windell
 Sunday, March 07 2010 @ 03:48 PM PST