Drawing a parabola ?

Post questions on how to use or achieve an effect in Inkscape.
JackMayol
Posts: 2
Joined: Tue Jul 14, 2009 6:12 pm

Drawing a parabola ?

Postby JackMayol » Wed Nov 17, 2010 12:06 am

Hello !

I wanted to know if there is possible to draw a parabola in inkscape (0.48) ?
I drew a parabola starting with a line and editing the path but this is not a proper method..
Is there a method or a trick or something ?

Thanks in advance!

Slow Dog
Posts: 180
Joined: Wed Sep 24, 2008 7:51 pm

Re: Drawing a parabola ?

Postby Slow Dog » Wed Nov 17, 2010 1:28 am

I've seen a page on how to draw a sine wave using splines before, so I did a web search...

This page (http://forum.datacad.com/viewtopic.php?t=8312&sid=c9e8f110662284f23e5110e9f342f156) says
A three-point Bézier curve should produce a parabolic segment
.

So, assuming that's true, draw a single (two point) horizontal line using :tool_pen:. Use :tool_node: to bend it. Put a guide at the centre of the line. Place the cusp nodes of each end point on top of each other at the guide, at whatever height. The bent line is a parabola.

dvlierop
Posts: 139
Joined: Sat Sep 08, 2007 4:25 am

Re: Drawing a parabola ?

Postby dvlierop » Wed Nov 17, 2010 6:56 am

There's an extension to plot any mathematical function you like (Menu: extension -> render -> function plotter)

JackMayol
Posts: 2
Joined: Tue Jul 14, 2009 6:12 pm

Re: Drawing a parabola ?

Postby JackMayol » Thu Nov 18, 2010 12:13 am

Thanks a lot for the replies. The "function plotter" is very handy :)

Eiowjroie
Posts: 21
Joined: Fri Oct 12, 2012 7:20 pm

Re: Drawing a parabola ?

Postby Eiowjroie » Mon Oct 21, 2013 11:33 am

Sorry for necroing, but this page seems to be very popular on google.

A cubic bezier with the two handles on top of each other is NOT a quadratic bezier. So Slow Dog's method for making parabolas will not work. (the reason is that the bezier nodes for the cubic travel at a quadratic pace instead of linearly)

To see this graphically, try making a "parabola" using his method. Then, cut off the ends and rescale it to be as big as the first "parabola". It won't match. However, a real parabola would. That is, you can scale any parabola to get any other parabola.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Drawing a parabola ?

Postby Lazur » Mon Oct 21, 2013 12:25 pm

Just a note: cutting off cannot be done in inkscape precisely.
With a boolean operation nodes are recalculated and they move a bit.

Still a good point with the scaling though.

Eiowjroie
Posts: 21
Joined: Fri Oct 12, 2012 7:20 pm

Re: Drawing a parabola ?

Postby Eiowjroie » Wed Oct 23, 2013 6:12 pm

Lazur URH wrote:Just a note: cutting off cannot be done in inkscape precisely.
With a boolean operation nodes are recalculated and they move a bit.

That's very interesting, and I just confirmed it to be true. Why does this happen? Floating point precision issues?

As for the cutting off ends method, the ends can be cut off imprecisely by inserting two extra nodes, since the cut location doesn't matter. As far as I'm aware, adding nodes doesn't modify the path in any way (but I could be wrong).

Here's an interesting observation: the parabola is a local minimum. That is, if you keep on cutting off ends on any bezier whatsoever, then the resulting curve will be a parabola. Try it!
(lines count as parabolas too :D )

So, if you ever want a parabola, then just make an arbitrary curve, then make two nodes really close together on the curve. That short section will be very close to the parabola you want.

say_cheese74
Posts: 1
Joined: Sat Oct 20, 2018 3:31 am

Re: Drawing a parabola ?

Postby say_cheese74 » Sat Oct 20, 2018 3:43 am

There is a real easy way to draw any curve based on an equation:
In Libre Calc or Excel create x values say 0 to 10 in one column and in the second column type the function you want say y=2*x^2 (a parabola)

cell A1 type 0 and in cell B1 type in the formula bar =2*(click on cell A1)^2)
click A2 and in the formula bar type =a1+1; copy B1 and paste in B2
Click on A2 and B2 (shift key) and drag it down however long you want the x and y values to be.

Now all these cells are filled with x and y values for a parabola y=2*x^2 (x being the first column and y being the second).

Select all the cells > go to chart > xy scatter >smooth curve finish
You get the plot of a parabola.
Now click on the curve (make sure it is only the curve), copy and paste into inkscape window. I only got an image of the curve. May be it is possible to get a vector plot directly. I just drew a brazier curve to conform to the image and deleted the copied image.

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

Re: Drawing a parabola ?

Postby brynn » Sun Oct 21, 2018 2:49 pm

As this message was answered 8 years ago, Inkscape can draw parabolas using an extension. There's no need to use other programs, unless you just want to.


Return to “Help with using Inkscape”