SVG N-gons

This slideshow requires JavaScript.

Lots of subtle improvements in XVG yesterday.

For example, it can now create n-gons automatically at the user’s request.

Time now to think about how XVG is going to turn into a bona fide SVG generator for geometric design.

So far I have been relying on two global 2-dim JS arrorys to keep track of things: the angles array and the markers (ie, the blue dots)  one.

Time now to build more intelligence into the  app.

I am thinking of something along these lines.

class vector (object) {
internal data:
head (aka marker)

class chain (double linked list) {

public methods


marker 0 // previous
marker 1 // current
marker 2 // next


class marker {


methods… inlcuding clone()


on-off switch // XVG connects ON markers at user’s request



Will keep y’all posted.

Meanwhile, here is another screenshot of what working with XVG in full screen mode currently looks like.  I might add some sort of ability that is non modal (modal = uncool)  that allows users to do stuff other than just click and connect.

IRL this is SVG

A dream would be contextual menus and panels, a la Sketch.

Dream on.

A continuing problem is the SVG painter’s approach to layering.  What this mean is that u have to be real delicate to grab the marker and not a connecting line that overlays the marker, when you want to connect it to a different marker.

A crude solution would be to make the markers bigger.  I am going to have to think about this some, like I need to disguise even further the way SVG works. (Note: clicking again on the Mark button solves the problem.)

Notice how the lines overlay the markers. Major issue. I want the line to representially connect to a marker’s circumference, yet internally connect to the fractional xy pixel position of where the marker is located on the SVG art board. So the marker object would have to contain private over / under  xy location attributes and methods that hide the complexity of dealing with this issue.