# Drawing parabola in Graphics

Graphics[{Line[{{0, 3}, {0, 0}, {1, 0}, {1, 3}}], Line[{{2, 3}, {2, 0}, {3, 0}, {3, 3}}]}]


However, I want the output like this: Parabola of different width inside the two boxes. There are previous posts on similar questions. I can draw the first parabola, but not the second one. In fact, I do not understand that answer fully.

• The easiest way is to use Show and add Plot with your parabola. – Kuba Nov 22 '17 at 7:02

I guess, this is easy to do by combination of the Plot with Lines in Epilog: Choosing the right function allows the change of the width of parabola, as you see.

UPD.: I guess, code is so simple that even beginner can realize how to do it..

Framed@Plot[{(x - 100)^2, 10 (x + 100)^2}, {x, -150, 150},
PlotRange -> {-5, 500}, Axes -> False,
Prolog -> {Black, Thick,
Line@{{-130, 700}, {-130, 0}, {-70, 0}, {-70, 700}},
Line@{{130, 700}, {130, 0}, {70, 0}, {70, 700}}}]


You can make an elliptic shape with Graphics. For example

Graphics[{Circle[{0.5, 1.5 (*centre*)}, {0.5, 1.5(*minor and major axes*)},
{Pi, 2 Pi (*angular range*)}]}] Graphics[{Line[{{0,3},{0,0},{1,0},{1,3}}],Circle[{0.5,1.5},{0.5,1.5},{Pi,2Pi}], • While parabola is a special case of ellipse I don't think Circle syntax allows this. Or did I miss the point? – Kuba Nov 23 '17 at 9:59
• It can be saved but you need to get math straight, start with: Show[ Graphics[{Circle[{0, 1000 }, {10, 1000}, {Pi, 2 Pi }]}, PlotRange -> 1], Plot[5 (x + .1)^2, {x, -1, 1}] , Frame -> True ] parameters for circle are out of the blue but you can try to provide approximate formula. – Kuba Nov 23 '17 at 13:25
• The only problem is, there is no specification for the parabola. Otherwise, appearance can be deceived, at least for a certain range. For example ContourPlot[{x^2/1 + (y - 3)^2/9 == 1, x^2 == 2/3 y}, {x, -1.5, 1.5}, {y, 0, 3}] and ContourPlot[{x^2/1 + (y - 3)^2/9 == 1, x^2 == 2/3 y}, {x, -1.5, 1.5}, {y, 0, 0.5}] – Sumit Nov 23 '17 at 14:03