For this exploration of how Pencil2D vector graphic work, I started off my drawing a target shape using Inkscape and then loading it into bitmap layer within Pencil2D.

Next using the Polyline too I overdrew the shape. I started with the top control point which are marked by squares filled with grey colour.

Next I used the Pencil2D Smudge Tool to move the control point, to the right of the top grey rectangle until it was over the control point square. With this simple shape I Realised that all i needed to do was add 2 extra control points. I drew the black line and as a result I added the required points.

All I then had to do was move these point to achieve the desired line. Thatâs the process to perform the task by trial and error method, now let us examine the .VEC file to work out how to possibly automate the process.

Firstly let us examine the relivent part of the original .SVG file. Please note that I have reformatted the data so we can examine the relationship between the .SVG and the Pencil2D .VEC file.

SVG File Listing

Pencil2D VEC LIsting

The way that i have reformatted the .SVG information. The first line of the .SVG coreesponds with the first line of the Pencil2D .VEC file. This pattern continues until the last line of the .SVG, just before the id=âpath-1â />. The line before this ends with z", this indicates that at this point the path connects with the initial point, in the second line d="m 129.253, 59.281438, these are the start coodinates of the path.

Each line after the second line, in the reformatted file contains 6 sets of X and Y coordinates.

The first pair are the X and Y coordinates of Control Point 1, followed by the X and Y for Control Point 2 and then the X and Y coordinates of finish of the path segment. This is also the start of the next segment of the path.

The final line of the Pencil2D .VEC file replaces the z" at the end of the final line of the .SVG file, with the Control Point Values and the start point of the path.

We need to set the final X and Y of the path to the start X and Y coordinates. The the X part od Control Point 1 needs to be the same as the X coodinate of the previous point and the X coordinate of Control Point needs to agree with the X coordonate of the path Finish point.

The Y part of Control Point 1 is the Y coordinate of the Previous point - minus 4. The Y coordinate of Control Point 2 is the same value. This value might sound arbitrary, but if its wrong the plot point can be adjusted using the Smudge Tool. Whatâs most important is that the point is not on top of the Previous point, because Pencil2D will lock the two points together.

The shape below is the final shape, which is produced by the modified version of the Pencil2D .VEC file.

This is an initial attempt to automate the process, it will require some refinement. The circle case is the most difficult curve type because of the way that Pencil2D Bezier Curves work and the case we have just examined is significantly easier case.

The case that Mary tackled before this entry is what can be considered the âGeneral Caseâ.

If the curve at the point of joining the two ends of the path is a larger radius, then it is harder to smooth the join, by moving control points within Pencil2D.

For examples covered in this posting, the radius of the join area is smaller and thus the join can be manipulated using the control points within Pencil2D.