Jump to content

How to draw a Parabola?


Avid Idler

Recommended Posts

Guest Alan Cullen

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....:lol:

Link to comment
Share on other sites

Guest Alan Cullen

Avid Idler....

 

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

 

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. o:)

 

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....

Link to comment
Share on other sites

now whats this Lisp routine?

 

This is a lisp routine to draw parabola:

 

; 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")

Link to comment
Share on other sites

  • 4 years later...

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.

Link to comment
Share on other sites

  • 8 years later...
On 7/11/2011 at 11:55 AM, BIGAL said:

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.

hi, i tried that, it did draw a line but the starting point is way off, nowhere near where I wanted...can you mention a solution? Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...