Drawing a semiplane

Post questions on how to use or achieve an effect in Inkscape.
mihaita9999
Posts: 1
Joined: Mon Oct 17, 2011 7:43 am

Drawing a semiplane

Postby mihaita9999 » Mon Oct 17, 2011 7:59 am

I want to represent graphically in a system of coordinates (rectangular Ox and Oy axis) the solution of the inequation 2x+3y<=6.

First I have to draw the system of coordinates, than the 2 points A(0, 2) and B(3, 0) where the line of equation 2x+3y=6 intersects the axis.

Then I need to draw the line AB.

Finally, the solution of that inequation from above is a semiplane, the one containing the origin O(0, ) and delimited by the line AB.

I want that semiplane stay white, but the opposite semiplane, which doesn't contain the origin, be somehow hachured (hatched), along the line AB, with short lines.

Could you help me please? I have no idea how to start. Thanks, Michael.

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

Re: Drawing a semiplane

Postby brynn » Mon Oct 17, 2011 7:49 pm

Image
Welcome Michael!

Oh, I loved Algebra and Geometry! Although it was nearly 40 years ago, in high school, when I studied it (Image) ! But it was a fundamental part of my education, that I've used nearly every day since.

So way back then, I remember we would have to draw the x and y axises and plot the points, then draw the line. And of course that was with pencil and paper :D Is that what you want to do with Inkscape? Assuming I understand correctly, then yes, Inkscape can do that!

I think a rectangular grid will be very useful here, so I would suggest doing that first. Please find File menu > Document Properties > Grid, then choose Rectangular grid, and click New. Then you will see a bunch of options displayed, where you can choose the parameters of the grid, if the default grid settings won't work.

Next, engage the Pen or Bezier tool :tool_pen: . Look on the tool control bar (above ruler, below command and/or snap bar, depending on your Inkscape version) and click the 3rd button from the left, 'Draw a sequence of straight line segments'. Now you can draw the axises, and the grid will help you make everything exact. But if you need precision, I would suggest enabling snapping.

Depending on your Inkscape version, the snap bar will either be across the top or along the right side of the window (vertical). Select the first button to turn on snapping. Make sure 'Snap bounding box corners' is not engaged. Click 'Snap nodes and handles', and also 'Snap to grid'. So 3 buttons should be engaged, and all the others not. This will cause the Pen tool to start drawing exactly at the nearest grid intersection to where you click, and also to place nodes, and to stop the line. (single-click to start the line, single click to place nodes, and double-click to end the line or place the last end node)

Thus you can draw the axises, and make very short lines to mark the increments (if you want). If you want to make dots at the two points, you can use the same Pen/Bezier tool, or Pencil tool, the press the Ctrl key + click. Snapping will cause the dot to be centered exactly at a grid intersection! The dot is actually a tiny circle/ellipse, and you can change the size of it, either after you draw it, with the Selection tool (Shift + Ctrl + drag a corner arrow); or you can change the size of dot that's made initially from File menu > Inkscape Preferences > Pen or Pencil.

I had to look up "semiplane" because I wasn't sure. And I couldn't find it using wikipedia. But I did find "half plane" in an online dictionary. Is that the same as semi plane? Even so, I'm not sure what this means:
Finally, the solution of that inequation from above is a semiplane, the one containing the origin O(0, ) and delimited by the line AB

Does it mean that the semiplane is a right triangle with corners at points A, B, and (0,0)? Or does the line AB represent one edge of the semiplane, that extends infinitely below and to the left of the line AB? My best understanding is that it extends infinitely from AB. But even so, we can't have even a computer graphic that extends infinitely. So you'll still have to draw a triangle to represent the plane.

You can use the Pen tool again, to draw the triangle, with diagonal line passing through points A and B. Next switch to the Selection tool :tool_selector: and select the new triangle. Then click white on the color palette that's shown along the bottom of the window. Tah-daaaahh!

And now for the hatchmarks. Select the white triangle, then Edit menu > Duplicate. Next Object menu > Flip Horizontal, then Flip Vertical. If the triangle is perfect, then after the duplicate is flipped, it will be positioned perfectly. If the triangle is not quite true, you'll see it after the duplicate is flipped around.

So anyway, there are a couple of ways to fill the 2nd triangle with hatchmarks, and it depends on how you want them to look. If you need it to look more like diagonal stripes, I would suggest filling with a pattern. And there are many stripe patterns to choose from in the Fill and Stroke dialog > Fill tab > Pattern button. But if you need it to look more like they're hand drawn with a pencil, I would suggest using the Live Path Effect (LPE) Hatchmarks. It's an amazing tool! There are many settings, and you can control just about everything about the hatchmarks. This is in Path menu > Path Effects Editor > Hatchmarks.

Also, please don't miss the manual, found with an internet connection and Help menu > Inkscape manual. If you look at my signature, there are some other resources as well, which you can consult for instructions with all this. But if you get stuck, don't hesitate to post a reply, and we'll do our best to get you back on track :D

PS - If you need a grid that's displayed as part of the image, rather than just a guide, you can draw one using an extention, Extensions menu > Render > Grid. But you won't be able to use snapping for precision.....unless you can manage to align the 2 grids....that might be a bit tricky though. If it proves too difficult, you can place the points precisely by entering the coordinates in the Node tool control bar.

Also, I'm still not sure I understand the semi plane. If I've gotten it wrong, hopefully I've given you enough information to do the project anyway. But please feel free to set me straight, and I'll try again. Or there are plenty of others who can help as well :D


Return to “Help with using Inkscape”