Forum Index > Projects > Egg-Bot
 simplifying an svg
 |  Printable Version
By: Anonymous: Stef () on Tuesday, April 12 2011 @ 08:06 PM PDT (Read 4004 times)  
Anonymous: Stef

The svg below is ~240 kb. I am new to inkscape and don't know the best way to simplify it. The problem is that it is a tesselation. So any attempt at using 'simplify' ruins the alignment of the individual tiles. The completed mosaic (with all of the tiles added) is 700 kb. From what I've read on these forums, it is advisable to keep the files <200kb. If someone could take a look and help out with their inkscape knowledge, it would be appreciated.

https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B5V-Xo2jQsRSYTBlZDhjZmUtNDNhMi00YmZmLThkNGEtZTYwNDAyYzRiZjIx&hl=en

tnx.

Stefan





       
   
By: Anonymous: Stef () on Tuesday, April 12 2011 @ 08:14 PM PDT  
Anonymous: Stef

btw, that link is to a google docs page that contains the svg file. it can be downloaded and edited in inkscape.





       
   
By: dnewman (offline) on Tuesday, April 12 2011 @ 08:25 PM PDT  
dnewman

Well, I pulled the file and then edited until there was just one lizard. A single lizard is pretty large -- 24k. I selected that single lizard and then used Path > Simplify. I saved that to a new file. The result was only 12k.

Now, the way to do the tessellation and save space is to use clones. ("Clone" is the Inkscape term. In actual SVG, it's the <use> tag.) Clones work by saying, "Here's a reference copy which I'll call A". Now, I want you to apply this translation, rotation, and scaling to A and draw it. Okay, now apply this different translation, rotation, and scaling to A and draw it again. Each clone doesn't contain all the data of A. It just contains the translation, scaling, and rotation information and the reference to A.

So, you may want to read up on Inkscape's Edit > Create tiled clones. I find them a little frustrating to use in Inkscape and I myself generally just work out the rotation & translation and write the SVG directly. I'd offer to do that for you except I'm under the gun to prepare for some talks I'm giving on Friday. (And I'm just giving myself a break from the tedium at the moment.)

Looks like it will be a very nice plot when it's finished.

BTW, as to the 200kb size. I think you're okay with the file being huge. It may be slow to draw layer by layer as you wait for the Eggbot Control extension to scan through the file finding the correct layer. However, that's no big deal IMO. OTOH, if Inkscape crashes, then yes you have a problem.

Dan


Cow Canyon Saddle Clear Sky Chart


Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 09/08/10
Posts: 149
Mt. Baldy,
California

Profile Email    
   
By: Anonymous: Stef () on Wednesday, April 13 2011 @ 05:29 AM PDT  
Anonymous: Stef

yep, clone reduces file size enormously, almosta factor of 10 for 7 tiled copies compared to 7 real copies. thanx. now i just have to get the angles right-that's hard/ and the displacements as well with the rotations.





       
   



 All times are PDT. The time is now 07:12 PM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to Post 
Filtered HTML Allowed 
Censored Content 

Evil Mad Scientist Forum Archives — Read only!

Please visit our new forums for new discussions.


DIY Hardware for Electronic Art


The Original Egg-Bot Kit


Octolively
Interactive LED kits


Meggy Jr RGB
LED matrix game
development kit.


Business-card sized
AVR target boards


Peggy 2
LED Pegboard kits

My Account






Lost your password?