Drawing vector graphics using a command line

Joel Rees joel.rees at gmail.com
Wed Sep 23 01:44:52 UTC 2015


And, come to think of it, ...

2015/09/23 10:28 "Joel Rees" <joel.rees at gmail.com>:
>
> 2015/09/20 21:45 "Johnny Rosenberg" <gurus.knugum at gmail.com>:
>
> >
> > Hi!
> >
> > Anyone know of a tool to create SVG files (or similar) using some kind
of macro or command line?
> >
> > For instance, if I want to draw several lines start starts at the same
point, have the same length but different angles (this example is written
in some kind of Basic looking pseudo code):
> > x=150
> > y=100
> > length=100
> > drawline x,y,length,0
> > drawline x,y,length,1.4
> > drawline x,y,length,2,8
> > drawline x,y,length,4.2
> > drawline x,y,length,5.6
> > drawline x,y,length,7.0
> >
> >
> > Or maybe even better; something like this:
> > x=150
> > y=100
> > length=100
> > For Angle=0 To 180 Step 1.4
> > drawline x,y,length,angle
> > Next Angle
> >
> > Another acceptable approach would be:
> > xStart=150
> > yStart=100
> > Length=100
> > For Angle=0 To 180 Step 1.4
> > xEnd=xStart+Length*sin(Angle*π/180)
> > yEnd=xStart+Length*cos(Angle*π/180)
> > drawline xStart,yStart,xEnd,yEnd
> > Next Angle
> >
> > I've had a quick look at Inkscape but I couldn't find any kind of
command line or macro programming IDE there.
> >
> >
> > Kind regards
> >
> > Johnny Rosenberg
>
> I have the feeling you're probably looking for gnu plotutils (packaged
under plotutils).
>
> FWIW, I've written svg graphics directly into html or xml files and
displayed them in a web browser. It has been a while, I don't remember
specifics.
>

... you may also find gnuplot intersting. It's a separate utility/package.

> Joel Rees
>
> Computer memory is just fancy paper,
> CPUs just fancy pens.
> All is a stream of text
> flowing from the past into the future.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20150923/ade364cd/attachment.html>


More information about the ubuntu-users mailing list