Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Drawing a Parabola

jrs_spedleyjrs_spedley Member Posts: 71 ✭✭
I needed a parabola and couldn't find a tutorial but luckily it was actually quite easy (didn't fancy intersecting cones etc).
So here is how to draw a parabola directly on a sketch. I then fix the point in place to demonstrate the fixed focus property of a parabola.

https://cad.onshape.com/documents/d261b0ef08e360e65b19c076/w/4b151cf9efaac9256aa6c440/e/4a4c98b6a19e1de28c3f61d9




Comments

  • StephenGStephenG Member Posts: 370 ✭✭✭
    How did you know that constraining the two end tangency descriptors of a 2 point Onshape spline curve to a location 2/3's along the equal length sides of an isosceles triangle would produce a parabola?    
     

  • jrs_spedleyjrs_spedley Member Posts: 71 ✭✭
    edited April 2017
    Made a parabola from a conic section and then snapped a spline to it using onshape's excellent snapping tools and then did the very basic maths.  Didn't expect it to be that easy :smiley:

    Not sure if there is an easier way to do a 2/3rds snap?
  • Brian_HuangBrian_Huang Member Posts: 1
    edited June 2023
    Interesting approach. The conic curve (Rho = 0.5) makes it a parabola! I did something similar, but drew a line below the parabola (directrix) that is the same distance from the curve as the focal point. 

    https://www.varsitytutors.com/hotmath/hotmath_help/topics/directrix

    I set up a few constraints that allow me to change the focus point and the parabola is re-drawn. 

    This is a simple sketch that I made to do some testing with a solar cooker idea I have. It's still very early in the design concept.

    https://cad.onshape.com/documents/f65c2941af2e800381e4a85d/w/1ca8ccf3b7a4fb3dff3eda88/e/ad4680a025b7ffbff64643f7?renderMode=0&uiState=6490ef607fc6d26a71511f87

    I don't know if this is helpful, but I wanted to share my approach as well - in case anyone else is looking to do their own. 
  • S1monS1mon Member Posts: 2,964 PRO
    A degree-2 (AKA quadratic) Bézier is also by definition, a parabola. 

    If the Bézier is symmetric around an axis then you can apparently find the focus fairly easily. My math is rusty, but GPT4 says:

    "If the Bézier curve has control points P0 and P2 symmetric about the y-axis and P1 (the control point in the middle) is at x=0, then the curve is a standard parabola that opens either upwards or downwards. This greatly simplifies the problem.

    Let's denote:

    P0 = (-a, b)
    P1 = (0, c)
    P2 = (a, b)

    In this case, the vertex of the parabola will be P1. The axis of symmetry will be the y-axis, and the parabola will open upwards if b < c and downwards if b > c.

    You can get the equation of the parabola in the form y = k(x - h)^2 + j, where (h, j) is the vertex.

    The equation will be:

    y = kx^2 + c  (since h = 0 and j = c)

    You can substitute one of the symmetric points, say P0, into the equation to solve for k:

    b = k(-a)^2 + c  => k = (b - c) / a^2

    So, the equation of the parabola is:

    y = ((b - c) / a^2) * x^2 + c

    The focus of the parabola in the form y = kx^2 + j is given by (h, j - 1/(4k)), since we are dealing with a vertically-oriented parabola. In your case, h = 0, j = c, and k = (b - c) / a^2. 

    So the focus is at:

    (0, c - 1 / (4 * (b - c) / a^2))
    (0, c - a^2 / (4 * (b - c)))

    Just be careful with the signs, remember that a parabola opening upwards has a positive k, and a parabola opening downwards has a negative k. Also, the focus of an upward-opening parabola is above the vertex, and the focus of a downward-opening parabola is below the vertex."
  • john_lopez363john_lopez363 Member Posts: 110 ✭✭
    @S1mon.. sounds like you have the basis for a feature script there!  :)
  • gzgz Member Posts: 14 ✭✭
    I don't understand why this feature is so difficult.

    Who exactly is drawing parabolas with no care as to the directrix or focus?

    You'd think those would be the "control" points for the conic tool.

    Is everybody just doing decorative items in the sketches?
  • S1monS1mon Member Posts: 2,964 PRO
    @gz

    It's not difficult. It's just not something that a lot of people need unless they're doing optics or acoustics. I'm sure someone could create a pretty simple Featurescript which would take whichever knowns and produce a parabolic curve. 
  • gzgz Member Posts: 14 ✭✭
    @S1mon

    I agree.  I don't think it's a difficult thing.

    Apparently most people don't in fact need it, unless it's for optics or acoustics or RF or anything anyone might actually conceivably want a parabola for.

    So my point stands -- what exactly are people doing with parabolas where they don't need the most important features of a parabola for?  Artwork?


  • S1monS1mon Member Posts: 2,964 PRO
    Degree-2 Béziers or conics with Rho = 0.5 or parabolas or quadratics. All the same thing. They get used to describe curves on anything and everything. Conics were some of the first curves used to encode the shape of aircraft during WWII before there were CAD systems. TrueType fonts use degree 2 Béziers to encode the shapes of letters in fonts. (Postscript and Opentype use degree 3),
  • EvanReeseEvanReese Member, Mentor Posts: 2,122 ✭✭✭✭✭
    edited August 2023
    @gz
    Sounds like you probably already have a workflow, but here's an approach if it helps. This one is driven by focal point, and gives you a directrix. If you haven't seen the Ray Tracer feature set, you might like that too. I've used it to prove to myself that I do in fact have a parabola with the focus set right.

    I agree it could be nice sometimes to just have a tool for it though; ideally just a sketch tool.

    https://cad.onshape.com/documents/250e1277f6e85046721d2a20/w/4f8f1fc12122c7a3d46bdf26/e/7af2c6d09a2dc85c95d2f907


    Evan Reese
Sign In or Register to comment.