1

I need to create a bunch of simple shapes for a game. The shapes themselves are very simple, but I need them to be precise. For example, I want to tell the program "draw a white circle and divide it into five equally long sections" or "draw multiple circles inside each other, with each circle getting smaller with a factor of 0.8". So I'm basically looking to create these shapes programmatically, instead of drawing them all manually by myself.

So two questions:

  1. Is there a word for creating drawings in such a way?
  2. What kind of software could I use to accomplish this?
  • 1
    What type of files do you want as a result, raster or vector images? For raster images: Do you need a special style (line width, color, anti-aliasing, ...)? – Socowi Feb 14 '17 at 14:30
  • Vector images... which I'll turn into raster images later. :) Basically, I want to create the shapes first using vectors, then make normal images out of them later. I use Gimp, so it would be great if I can just import those shapes as paths. – noClue Feb 15 '17 at 14:40
  • Then you could try Inkscape and its tiled clones feature. No coding involved, but not hand drawn either. Maybe this answer can give you a good example for your usecase. – Socowi Feb 15 '17 at 17:03
  • @Socowi Interesting... I'll give it a try. Tnx! – noClue Feb 16 '17 at 15:12
2

Well, there are many ways to skin the cat(fish). What you describe goes right down the alley of GeoGebra. However i'm not exactly sure this is your usecase.

If it was me then I would write this in PostScript or EPS, since its by far easiest to write out for me. You can use Illustrator, Imagemagic, GhostScript or even the printer to render the results.

Script 1: Draw a circle split into 5

%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 200 200
%%Title: CircleSplit
%%Creator: joojaa
%%CreationDate:  2017-14-2
%%EndComments

100 100 translate

0 1 5{ 
  360 5 div rotate
  newpath 
  0 0 moveto 
  0 0 90 0 360 5 div arc 
  closepath 
  stroke
} for

%%EOF

enter image description here

Image 1: Result of script 1

Script 1: Draw a circle scaled consequently by 0.8

%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 200 200
%%Title: CircleScale
%%Creator: joojaa
%%CreationDate:  2017-14-2
%%EndComments

100 100 translate

0 1 4{ 
  newpath 
  0 0 90 0 360  arc 
  closepath 
  stroke
  0.8 0.8 scale
} for

%%EOF

enter image description here

Image 2: Result of script 2

But perhaps you want top actually test Logo.

  • This is pretty much what I was looking for (the scripting that is - not sure about GeoGebra). Will have to experiment with that. I guess I'll have to go with GhostScript, since I work with Gimp. Is it generally hard to learn? I'm not code-shy, but it would be nice to know what the difficulty curve is. – noClue Feb 15 '17 at 14:52
1

I'm no means an expert, but I think you can achieve these with scripting in Illustrator. 'Scripting' is the word you are looking for and multiple software has options to be scripted. Illustrator is one of them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.