Drawing vector graphics using a command line

Joel Rees joel.rees at gmail.com
Wed Sep 23 01:28:03 UTC 2015


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.

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/5e3ac2c1/attachment.html>


More information about the ubuntu-users mailing list