Snapping perpendicular to lines

Post questions on how to use or achieve an effect in Inkscape.
Ailurus
Posts: 115
Joined: Fri Oct 22, 2010 9:53 am
Location: The Netherlands
Contact:

Snapping perpendicular to lines

Postby Ailurus » Mon Jul 16, 2012 9:26 pm

Hi all, I'm trying to find the intersection points of an excircle of a triangle (see Wikipedia) with some lines. I know it's possible to draw the excircles using Extensions → Render → Draw From Triangle, but I can't seem to locate the intersections of those circles with the lines.

The thing is, you don't really need the circle to find such an intersection point -- it can be found creating a new line perpendicular to the relevant line (say BC), such that this new line goes through the center of the excircle (say J).

So, what would be the easiest way to draw a new line from point J (center of an excircle, see attached file) to, for instance, line BC, such that this new line is perpendicular to BC?

[Edit]
So to make it perhaps a little more clear, I would like to find the green points as indicated in the figure below.
Image
Attachments
ExCircle1.svg
(5.84 KiB) Downloaded 237 times

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Snapping perpendicular to lines

Postby brynn » Mon Jul 16, 2012 11:45 pm

Wow! Excircle is my new thing to learn for today, lol. Ok, well I suspect that druban might know some clever way to do this. He's really good with geometry. I don't know of any way to automatically draw a line perpendicular to any other line, unless the original line is horizontal or vertical. But I have potentially helpful comments, if no better other comments come along.

To find the point where the circle touches.....let's say line AB or AC (I'm thinking they are tangents??). Anyway, to find that point, you could zoom way, way in, as far as Inkscape will zoom. At that point, the width of a 1 pixel wide line will take up the whole screen. If you then make the circle and line partially transparent, you can visually estimate the middle of the area where they intersect. By the time you zoom all the way back to 100%, it won't be obvious that it might not be precisely in the right place. Of course, if you need precision, this will not be a good way to do it.

But how to make a line intersecting at that point, perpendicular, without having the circle's center to connect to, I just don't know...... OH! :idea: I do know a way to do that....I think! Duplicate line AB or AC. Use Selection tool and click twice (but not a double-click) to reveal the rotation center of the line. Enable snapping with proper settings, so that you can snap the rotation center to one end of the line. (those are Snap nodes and handles, and Snap to cusp nodes -- and if the new node (intersecting point) is smooth, also enable Snap to smooth nodes) Now drag the line (with Selection tool) and whichever end you snapped the rotation center, snap its end node to the new node at the intersecting point. Now open Transform dialog > Rotate. Enter 90 degrees and click Apply. It works, I tried it! :lol:

So that whole process should work, as long as you don't need absolute precision. Actually it frustrates me that snapping can't be made to have new nodes placed with the Node tool, to snap to path intersections. If you're drawing a new path with Pen/Bezier tool, you can place new nodes that snap to snapping targets (such as path intersections). But not with the Node tool. OH -- maybe another idea!! After you've made the new line perpendicular, then as long as you move both of its nodes, then it will stay perpendicular from any point along the line AB or AC! That means that you could place the new node at any place along line AB or AC, make the line perpendicular, then set up snapping to path intersections. Now select the perpendicular line with Selection tool (or Node tool, making sure both nodes are selected), and drag until the end node snaps to the intersection of the circle and line AB or AC. That should work, as long as the circle is a path :D

Look what I did, druban! Although you probably just posted the same answer, lol :mrgreen: Ailurus, let me know if you run into any problems :D

Edit
Note that you will probably have to zoom way in again, to snap the perpendicular line to the intersection. You'll see why, but it's because the line's end node will try to snap to every place along the circle's path. Zooming will allow you to drag slowly, and locate the intersection. Watch the tiny text which tells you which target you're snapping to ;)

User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Re: Snapping perpendicular to lines

Postby Grobe » Tue Jul 17, 2012 12:05 am

Hi.

Finding perpendicular to lines is pretty easy to do in Inkscape, but you have to do it manually. Say you have a line and a point that is located so that it is possible to find it's perpendicular point on the line.

  • Activate snap to paths
  • Place a guide and make it snap near one end of the line
  • Grab the guideline (not the guide origin) and rotate it by holding Shift down (actually you shall hold Shift down before grabbing the guideline)
  • Move/rotate the guide line so that it snap near the other end of the line. The guide shall now be placed exact parallell to the line.
  • Double click on the guide, select Relative change and set angle to 90 degrees.
    This rotates the guide 90 degress to the line.
  • Move the guide so that it snaps to the object (point) that you want to find it's perpendicular point on te line.
    The intersection between the guide and the line is now your intersection point.
:lol:

Ailurus
Posts: 115
Joined: Fri Oct 22, 2010 9:53 am
Location: The Netherlands
Contact:

Re: Snapping perpendicular to lines

Postby Ailurus » Tue Jul 17, 2012 1:36 am

Thanks Brynn and Grobe for your replies!

@Brynn, I always like your creative thoughts :D. Actually, it's even easier to do it -- duplicate for instance AC, click two times, hold Ctrl and rotate 6 steps of 15 degrees = 90 degrees. Then grab this new perpendicular line, enable node snapping, and snap one end to the center of the circle (I created the center using some inner and outer bisectors of the triangle -- I read that thanks to Druban we'll soon have a tool to do this with less effort?). Done! By the way, I don't draw the actual circle, I only have its center. So no snapping "conflicts" :)

@Grobe, I've yet to try your method. To be honest, I forgot how to place a guide, I have to look into that again. Will let you know when I have tried it!
Last edited by Ailurus on Tue Jul 17, 2012 5:10 am, edited 1 time in total.

Ailurus
Posts: 115
Joined: Fri Oct 22, 2010 9:53 am
Location: The Netherlands
Contact:

Re: Snapping perpendicular to lines

Postby Ailurus » Tue Jul 17, 2012 5:06 am

@Grobe, nice method! However, two questions arise.

1.) Is it possible to draw the guides a little thicker (i.e. more than 1px in width), it's quite difficult to select them and move them around.

2.) I managed to create a guide parallel to my line, then rotate it 90 degrees, and snapped the guide origin to my point. But, how to get the intersection between the guide and the line? Even though I enabled snapping to paths, guides and intersection, Inkscape doesn't detect this intersection. What am I doing wrong?

Edit: Ah, by moving the guide origin (Ctrl+drag) to the line and snap it, I got my intersection point. Is this what you meant?

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Snapping perpendicular to lines

Postby druban » Tue Jul 17, 2012 7:28 am

Ailurus wrote:I read that thanks to Druban we'll soon have a tool to do this with less effort

Absolutely not! I am only another user and the programmer(s) who wrote the code for the angle bisector extension are the ones to thank.
I'm unclear as to what you are asking, since it seems that you have solved your problem even in your first post!
What version of Inkscape are you on? In my development version, snapping for perpendicular and tangent relations are possible, making this task a ... wait for it ... a snap! ROFL!
image3185.png
image3185.png (32.63 KiB) Viewed 11695 times


Since the center of an excircle is the intersection of the internal bisector of one angle and the external/supplementary bisectors of the other two, you can use the angle bisection method to find the center, even if you don't have the angle bisector extension in your version of inkscape. I think you have already seen my post in this topic http://www.inkscapeforum.com/viewtopic.php" onclick="readonly();return false;"http://www.inkscapeforum.com/viewtopic.php" onclick="readonly();return false;" class="postlink">http://www.inkscapeforum.com/viewtopic.php?f=5&t=10219&p=41591&hilit=tangent#p41530
Your mind is what you think it is.

Ailurus
Posts: 115
Joined: Fri Oct 22, 2010 9:53 am
Location: The Netherlands
Contact:

Re: Snapping perpendicular to lines

Postby Ailurus » Tue Jul 17, 2012 7:40 pm

druban wrote:Absolutely not! I am only another user and the programmer(s) who wrote the code for the angle bisector extension are the ones to thank.

Hmm I must have misread something... But you are to thank for your enthusiasm about these new bits, and the illustrative how-to examples.

druban wrote:I'm unclear as to what you are asking, since it seems that you have solved your problem even in your first post!

Not really, drawing that circle is not difficult (indeed, determining the center can be done using the inner and outer bisectors, they are also showed in that picture). The green dots (and red lines) in my OP are only approximations.

druban wrote:What version of Inkscape are you on? In my development version, snapping for perpendicular and tangent relations are possible, making this task a ... wait for it ... a snap! ROFL!

I'm using Arch Linux as my OS, so I'm sure my Inkscape is fairly recent: Inkscape 0.48.3.1 r9886. I Might take a look at the development version, those new tools seem quite useful.

druban wrote: I think you have already seen my post in this topic http://www.inkscapeforum.com/viewtopic.php" onclick="readonly();return false;"smilies" src="images/smilies/icon_e_biggrin.gif" alt=":D" title="Very Happy" />) I talk about orthogonal projections when the object (to project) is a line, not a point -- but you can certainly talk about orthogonal projections of a point. But anyway, yes that's the way I started with.


Ok thanks, I'll take a look at that as well!

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Snapping perpendicular to lines

Postby druban » Tue Jul 17, 2012 8:44 pm

Ailurus wrote:The green dots (and red lines) in my OP are only approximations

So sorry, I didn't get that part, no wonder I couldn't figure out what you were asking!
Ailurus wrote:I Might take a look at the development version, those new tools seem quite useful.

take a look at the LPEs line segment, mirror symmetry, tangent to curve (drag your tangent to any point on the curve! In real time!), and perpendicular bisector as well as angle bisector of course.
Also more circle drawing tools, by 3 points and by center and radius. bear in mind that these are LPEs, which means that the path you use can be edited using the node tool after applying the effect, allowing you to resize the circle for example by snapping the radius - or the center, or 3 points on the circumference - to various targets... quite useful! AND the nodes snap with perpendicular and tangential snaps so you can draw a circle tangent to a line, from the center ... well, sounds pretty dry to some people probably...
How about drawing a circle tangent to an ellipse ... with no construction? Come on, that's got to excite anybody!
rect3236.png
rect3236.png (15.45 KiB) Viewed 11682 times
Your mind is what you think it is.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Snapping perpendicular to lines

Postby ~suv » Tue Jul 17, 2012 11:00 pm

druban wrote:take a look at the LPEs line segment, mirror symmetry, tangent to curve (drag your tangent to any point on the curve! In real time!), and perpendicular bisector as well as angle bisector of course.
Also more circle drawing tools, by 3 points and by center and radius.

Just a word of caution, since you so eagerly promote the usage of these experimental path effects recently: it is very unlikely that those will be available in a stable release any time soon, and having them available in unstable development builds depends on either the packager having modified the source to enable them, or the user being able to edit the sources and compile Inkscape him-/herself (AFAIK the official PPAs for trunk do not have them enabled either).

Perpendicular and tangential snapping OTOH will be part of the next major release (0.49) - note: with current unstable development builds, those snap targets need to be enabled in the document properties of the current drawing - for existing as well as new documents (since the default template has not been modified).


Return to “Help with using Inkscape”