Quantcast

joint-and-wire-type polylines/fixed length line segments?

classic Classic list List threaded Threaded
12 messages Options
Amy
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

joint-and-wire-type polylines/fixed length line segments?

Amy
Hi,

I'm after some functionality in Inkscape but unfortunately I don't know what it's called, but I will try to describe it:

1. I draw a polyline (a path of straight line segments with a few nodes).
2. I use the node tool to grab one of the nodes and reposition it.


Currently in Inkscape when I do (2) the line segments either side of the node adjust their lengths to accomodate the new position of the node.

What I'm after is where the entire line is treated as if the segments were *rigid* (i.e. fixed length) and think of the nodes as hinges. So I drag one of the nodes to a new position, and by virtue of the fixed length line segments the rest of the line is dragged with the node, to some extent.

For example you could imagine if I had a straight line with two segments and nodes A/B/C:

(A) --- (B) --- (C)

If I grab (B) and drag it upwards, this is what Inkscape does (on the left) compared to what I want (on the right):

        (B)            |       (B)
        / \            |       / \
       /   \           |      /   \
      /     \          |     (A)  (C)
     /       \         |
    /         \        | 
   /           \       | 
  /             \      | 
(A)            (C)     | 

(it renders OK for me in monospace)

On the left, the segments AB and BC are lengthened and A and C remain in their original positions.
On the right, AB and BC preserve their length, and as a result the entire line is dragged upwards.

The particulars of exactly how (A) and (C) reposition themselves is not important to me, as long as they act in a way consistent with AB and BC having the same length before and after.

1. what is this feature called (so I can ask about it/search for it better)? 
2. Does Inkscape support this? (say I can toggle between the fixed-length and variable-length modes)?

cheers,
Amy

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: joint-and-wire-type polylines/fixed length line segments?

alvinpenner
This is a very interesting idea, but I don't know what it is called and am fairly certain that Inkscape does not currently support it.
The problem is that there will be some ambiguity as to how to impose these constraints. For example if you have a line segment with 5 points ABCDE, and you start pulling on A to make the line longer. Initially you will be able to deal with this just by adjusting B alone. But at some point ABC will be a straight line, so you will now have to adjust C as well. So now there is ambiguity, should you adjust C on the assumption that ABC remains straight, Or should you adjust both B and C simultaneously to deal with the change in A? And what happens when the entire line ABCDE is completely straight? Should all stretching movement now be forbidden or should the entire line move as a straight line? And when you start to compress the straight line length by moving A inwards, should you adjust only B, or should you perhaps move all the points equally to introduce curvature to the whole line?
Anyways, I would be very interested to see if anyone has ever tackled this problem.

Alvin Penner
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: joint-and-wire-type polylines/fixed length line segments?

M.H. van der velde
Maybe we could look at it from another 'angle'? This way of reasoning can also be  founnd in programs like SolidWorks (parametric modelling), where it's all about 'degrees of freedom' . Looking at two points in a 2-dimensional plain with a line between them, there are 4 degrees of freedom(*). Presently, Inkscape doesn't fix any of these. But you could image that when two nodes are selected, Inkscape would allow us to partially  'fix' the relation between them. We should be able to tell Inkscape, for example:

-Node A is always 3 centimetres to the right of node B and 4 centimetres to to the top

        or
 
-Node A is always 3 centimetres to the right of node B, but the vertical position is free

        or

-the distance between A and B should always be 5 centimer, but their angle is free (this situation reflects the idea of the original question)

        or

-the angle between A and B is always 36 degrees, but the distance is free.

These relations could be made pair-wise, so also between A and C and B and D. But, the number of relations should not be larger then the total degrees of freedom.


(*) You can look at this in a number of ways:
        (1) two points have both two ordinates (x,y) that can all be set independently, which makes 2 cordinates x 2 points = 4 D.O.F. .
        (2) One point has one set of ordinates, the other has a relative distance to the previous.

On Sep 24, 2013, at 12:49 PM, alvinpenner <[hidden email]> wrote:

> This is a very interesting idea, but I don't know what it is called and am
> fairly certain that Inkscape does not currently support it.
> The problem is that there will be some ambiguity as to how to impose these
> constraints. For example if you have a line segment with 5 points ABCDE, and
> you start pulling on A to make the line longer. Initially you will be able
> to deal with this just by adjusting B alone. But at some point ABC will be a
> straight line, so you will now have to adjust C as well. So now there is
> ambiguity, should you adjust C on the assumption that ABC remains straight,
> Or should you adjust both B and C simultaneously to deal with the change in
> A? And what happens when the entire line ABCDE is completely straight?
> Should all stretching movement now be forbidden or should the entire line
> move as a straight line? And when you start to compress the straight line
> length by moving A inwards, should you adjust only B, or should you perhaps
> move all the points equally to introduce curvature to the whole line?
> Anyways, I would be very interested to see if anyone has ever tackled this
> problem.
>
> Alvin Penner
>
>
>
>
> --
> View this message in context: http://inkscape.13.x6.nabble.com/joint-and-wire-type-polylines-fixed-length-line-segments-tp4968180p4968181.html
> Sent from the Inkscape - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
> _______________________________________________
> Inkscape-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/inkscape-user


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: joint-and-wire-type polylines/fixed length line segments?

john cliff-2
In reply to this post by alvinpenner
Isnt this the difference between the select tool and the node tool? Ones modifying the shape structure, ones modifying its position.

Sent from my iPhone

On 24 Sep 2013, at 11:49, alvinpenner <[hidden email]> wrote:

> This is a very interesting idea, but I don't know what it is called and am
> fairly certain that Inkscape does not currently support it.
> The problem is that there will be some ambiguity as to how to impose these
> constraints. For example if you have a line segment with 5 points ABCDE, and
> you start pulling on A to make the line longer. Initially you will be able
> to deal with this just by adjusting B alone. But at some point ABC will be a
> straight line, so you will now have to adjust C as well. So now there is
> ambiguity, should you adjust C on the assumption that ABC remains straight,
> Or should you adjust both B and C simultaneously to deal with the change in
> A? And what happens when the entire line ABCDE is completely straight?
> Should all stretching movement now be forbidden or should the entire line
> move as a straight line? And when you start to compress the straight line
> length by moving A inwards, should you adjust only B, or should you perhaps
> move all the points equally to introduce curvature to the whole line?
> Anyways, I would be very interested to see if anyone has ever tackled this
> problem.
>
> Alvin Penner
>
>
>
>
> --
> View this message in context: http://inkscape.13.x6.nabble.com/joint-and-wire-type-polylines-fixed-length-line-segments-tp4968180p4968181.html
> Sent from the Inkscape - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
> _______________________________________________
> Inkscape-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/inkscape-user

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: joint-and-wire-type polylines/fixed length line segments?

Arlo Barnes
In reply to this post by M.H. van der velde
Depending on how you plan to apply this, it might be feasible to write a program in Javascript or Python or whatever to modify an SVG file on the fly based on some "physics" rules you make up - I think Maarten's email would be a good starting point for research. I have heard the word for this before, I just do not remember it.
-Arlo James Barnes

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: joint-and-wire-type polylines/fixed length line segments?

Chris Tooley
I believe what is being described is similar to 3d model "rigging" - where you define a skeleton, angles of movement, and lengths of appendages, etc.


On Tue, Sep 24, 2013 at 9:27 AM, Arlo Barnes <[hidden email]> wrote:
Depending on how you plan to apply this, it might be feasible to write a program in Javascript or Python or whatever to modify an SVG file on the fly based on some "physics" rules you make up - I think Maarten's email would be a good starting point for research. I have heard the word for this before, I just do not remember it.
-Arlo James Barnes

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Amy
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: joint-and-wire-type polylines/fixed length line segments?

Amy
Cheers - will have a search around rigging/skeleton/degrees of freedom and see what I can find. (I think 'rigging' was the word I was looking for, although I want a simple 2d case and inthe case of ambiguity as to how the skeleton moves when I drag one of the joints, I do not care so much how this is resolved so long as it "feels" natural.
I suppose one way to address the ambiguity alvinpenner mentioned would be to pick some (fairly arbitrary) direction along which "gravity" is applied. Which brings me back to a 2D physics engine, I think).

I am just trying to write an Inkscape extension for drawing crochet diagrams (!), and there is a use case where you might have a "string" of stitches laid out into some particular shape an you want to adjust this shape, keeping the string (and stitches) the same length and size - that is, each stitch has a fixed size an each stitch is connected to the stitch next to it. I had the idea of representing the pattern where the stitches are nodes along a path (that way not only do I get the shape all the stitches together should make, but the use of a path with nodes gives me the *order* the stitches are done in so that I can generate a word pattern from a diagram).


On 25 September 2013 03:13, Chris Tooley <[hidden email]> wrote:
I believe what is being described is similar to 3d model "rigging" - where you define a skeleton, angles of movement, and lengths of appendages, etc.


On Tue, Sep 24, 2013 at 9:27 AM, Arlo Barnes <[hidden email]> wrote:
Depending on how you plan to apply this, it might be feasible to write a program in Javascript or Python or whatever to modify an SVG file on the fly based on some "physics" rules you make up - I think Maarten's email would be a good starting point for research. I have heard the word for this before, I just do not remember it.
-Arlo James Barnes

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: joint-and-wire-type polylines/fixed length line segments?

M.H. van der velde
Other Inkscapers might be of better help for your idea, but you can also set 'mid markers' for paths. Usually, you use start and end markers to create arrows and so on. But you also put them in evey node in the path. It's even possible to define your own custom mid-marker, but I believe it requires editing the SVG directly in a text-editor.


On Sep 25, 2013, at 8:01 AM, Amy <[hidden email]> wrote:

crochet 


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: joint-and-wire-type polylines/fixed length line segments?

Tavmjong Bah
On Wed, 2013-09-25 at 11:24 +0200, Maarten van der Velde wrote:
> Other Inkscapers might be of better help for your idea, but you can
> also set 'mid markers' for paths. Usually, you use start and end
> markers to create arrows and so on. But you also put them in evey node
> in the path. It's even possible to define your own custom mid-marker,
> but I believe it requires editing the SVG directly in a text-editor.

Editing the SVG directly will get you a "cleaner" marker but you can
also use the Object -> Object to Marker command to create custom
markers. See:

http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Attributes-Stroke.html#Attributes-Stroke-Markers


I think what is required here is the ability to have different markers
along the path such as o-x-o-x-o-x. That is not possible with SVG 1.1.
SVG 2 will allow such patterns. See:

http://www.w3.org/TR/SVG2/painting.html#RepeatingMarkers

Tav






------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: joint-and-wire-type polylines/fixed length line segments?

john cliff-2
In reply to this post by Chris Tooley
The term for the math is inverse kinematics or IK. 

Sent from my iPhone

On 24 Sep 2013, at 18:13, Chris Tooley <[hidden email]> wrote:

I believe what is being described is similar to 3d model "rigging" - where you define a skeleton, angles of movement, and lengths of appendages, etc.


On Tue, Sep 24, 2013 at 9:27 AM, Arlo Barnes <[hidden email]> wrote:
Depending on how you plan to apply this, it might be feasible to write a program in Javascript or Python or whatever to modify an SVG file on the fly based on some "physics" rules you make up - I think Maarten's email would be a good starting point for research. I have heard the word for this before, I just do not remember it.
-Arlo James Barnes

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Amy
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: joint-and-wire-type polylines/fixed length line segments?

Amy
Tavmjong: Aye, I need arbitrary mid-markers (can put different stitches next to each other). I was thinking of either waiting for SVG 2 (that will take forever I guess) or in the meantime just using Inkscape's connector functionality to try preserve connected-ness of my paths of stitch symbols.

John Cliff: cheers, will check it out


On 25 September 2013 20:20, John Cliff <[hidden email]> wrote:
The term for the math is inverse kinematics or IK. 

Sent from my iPhone

On 24 Sep 2013, at 18:13, Chris Tooley <[hidden email]> wrote:

I believe what is being described is similar to 3d model "rigging" - where you define a skeleton, angles of movement, and lengths of appendages, etc.


On Tue, Sep 24, 2013 at 9:27 AM, Arlo Barnes <[hidden email]> wrote:
Depending on how you plan to apply this, it might be feasible to write a program in Javascript or Python or whatever to modify an SVG file on the fly based on some "physics" rules you make up - I think Maarten's email would be a good starting point for research. I have heard the word for this before, I just do not remember it.
-Arlo James Barnes

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: joint-and-wire-type polylines/fixed length line segments?

Martin Owens-2
On Thu, 2013-09-26 at 11:51 +1000, Amy wrote:
> Tavmjong: Aye, I need arbitrary mid-markers (can put different
> stitches next to each other). I was thinking of either waiting for SVG
> 2 (that will take forever I guess) or in the meantime just using
> Inkscape's connector functionality to try preserve connected-ness of
> my paths of stitch symbols.
>
One solution would be to have arbitrary connecting points and metrics
between shapes. But when you think about how to make even two simple
paths have a single point that occupies the same point, even outside the
svg spec it gets rather hard to imagine how to do it.

No matter how useful such a thing would be ;-)

Martin,


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Loading...