# Thread: How to draw a Parabola?

1. ## How to draw a Parabola?

Registered forum members do not see this ad.

How do i draw a 2D parabola?

i am a beginner, using AutoCAD2007

2. You're going to have to go back to the basics of maths here....parabolas are a bit beyond acad....but not engineering/surveying specific software. Acad civil 3d can do it.....but not isolate it.

If you use the formula for parabolars and get hold (or write) a lisp routine you can do it.

Having said that, I'm sure someone will be along shortly and shoot me down in flames....

3. Connect points equally distant from a point (focus) and a line.

4. now whats this Lisp routine?

5. Avid Idler....

Funny you should ask that.....I was expecting it.....

Lisp is a programing language that automates acad. There are many members here who are absolute experts with it.....and I'm sure they will be along soon to assist you.

edit.....
I can't help you with the formula at the moment.....I'm at home and all my survey books are at work. I'll see what happens between now and going back to work in the morning....then I can help you....

6. Originally Posted by Avid Idler
now whats this Lisp routine?
This is a lisp routine to draw parabola:

Code:
```; draws parabola
; to draw parabola with given width (w) and height (h)
; calculate focus-vertex distance (f): f=w^2/16/h,
; draw parabola, trim the height, verify dimensions

(defun c:pbl (/ f mxx x ip y cp1 cp2 p1 p2 e1 e2 osn)
(setq osn (getvar "OSMODE"))
(setvar "cmdecho" 0)
(if (= ff nil)
(setq ff 1.0)
)
(princ "\n Focus to center point of parabola <distance> < ")
(princ ff)
(princ " > ??: ")
(initget 2)
(setq f (getdist))
(if (= f nil)
(setq f ff)
)
(setq ff f)

(if (= mxxx nil)
(setq mxxx 2.0)
)
(princ "\n Height < ")
(princ mxxx)
(princ " > ?? : ")
(setq mxx (getdist))
(if (= mxx nil)
(setq mxx mxxx)
)
(setq mxxx mxx)
(setq mx (+ mxx f))

(if (= x1 nil)
(setq x1 0.1)
)
(princ "\n Precision < x distance > < ")
(princ x1)
(princ " > ?? : ")
(setq x (getdist))
(if (= x nil)
(setq x x1)
)
(setq x1 x)
(if (> x 1)
(setq x 1)
)
; -- FIRST SEGMENT ---
(setq ip (getpoint "\n Insert by focus: "))	; ip = focus point
(setq y (+ f (/ (expt x 2) (* 4 f))))	; y = distance of point from base line
(setq cp1 (polar ip (* pi 1.5) (* f 2)))
(setq p1 (polar cp1 (* pi 0.5) f))
(setq cp2 (polar cp1 0 x))
(setq p2 (polar cp2 (* pi 0.5) y))
(setvar "osmode" 0)
(command "pline" p1 "w" 0 0 p2 "")
(setq e1 (entlast))
(setq xx x)

(while (> mx y)
(setq xx (+ xx x))
(setq y (+ f (/ (expt xx 2) (* 4 f))))
(setq cp2 (polar cp1 0 xx))
(setq p2 (polar cp2 (* pi 0.5) y))
(command "line" "" p2 "")
(setq e2 (entlast))
(command "pedit" e1 "j" e2 "" "")
)
(command "mirror" e1 "" ip cp1 "")
(command "circle" ip x)
(setvar "osmode" osn)
(princ)
)
(prompt "\n type  pbl  for parabola")```

7. You also could use simple goemetry on a cone slice

8. that lisp code is pretty good.

9. Registered forum members do not see this ad.

Another trick is put the formula into excel and calcaulate x & y values then use excel to join the x plus , plus y X,Y then in autocad do PLINE just cut & paste the x,y values from excel to the autocad command line parabola will appear.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts