+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Forum Newbie
    Using
    AutoCAD 2007
    Join Date
    May 2007
    Location
    Karachi, Pakistan
    Posts
    2

    Unhappy How to draw a Parabola?

    How do i draw a 2D parabola?

    i am a beginner, using AutoCAD2007

  2. #2
    Banned Alan Cullen's Avatar
    Using
    Map 3D 2009
    Join Date
    Jun 2006
    Location
    Cairns, Queensland, Australia
    Posts
    4,181

    Default

    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. #3
    Super Member
    Using
    not specified
    Join Date
    Dec 2004
    Location
    YUL
    Posts
    503

    Default

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

  4. #4
    Forum Newbie
    Using
    AutoCAD 2007
    Join Date
    May 2007
    Location
    Karachi, Pakistan
    Posts
    2

    Default

    now whats this Lisp routine?

  5. #5
    Banned Alan Cullen's Avatar
    Using
    Map 3D 2009
    Join Date
    Jun 2006
    Location
    Cairns, Queensland, Australia
    Posts
    4,181

    Default

    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. #6
    Super Member
    Using
    not specified
    Join Date
    Dec 2004
    Location
    YUL
    Posts
    503

    Default

    Quote Originally Posted by Avid Idler View Post
    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. #7
    Senior Member
    Using
    AutoCAD 2002
    Join Date
    Apr 2007
    Location
    North Carolina
    Posts
    188

    Default

    You also could use simple goemetry on a cone slice

  8. #8
    Forum Newbie
    Using
    AutoCAD 2010
    Join Date
    Jul 2011
    Posts
    1

    Default

    that lisp code is pretty good.

  9. #9
    Forum Deity
    Using
    Civil 3D 2013
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    4,543

    Default

    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.

Similar Threads

  1. How best to draw a DPM
    By ScottWMcQ in forum AutoCAD Beginners' Area
    Replies: 9
    Last Post: 27th Feb 2007, 04:21 pm
  2. Drawing parabola
    By murrief in forum AutoCAD General
    Replies: 5
    Last Post: 20th Apr 2006, 05:23 am
  3. a question about my lisp program for ploting parabola
    By winglj in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 24th Feb 2006, 03:23 am
  4. How to Draw 3-D
    By Gracie in forum AutoCAD Beginners' Area
    Replies: 4
    Last Post: 16th Feb 2005, 06:01 pm
  5. how to draw in 3d
    By Dan in forum AutoCAD Beginners' Area
    Replies: 1
    Last Post: 6th Dec 2002, 10:15 am

Bookmarks

Posting Permissions

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