Print Page | Close Window

Draw Line from natural log functio

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=9172
Printed Date: 16.May.2026 at 13:25


Topic: Draw Line from natural log functio
Posted By: javik
Subject: Draw Line from natural log functio
Date Posted: 23.Apr.2013 at 07:52
Is it possible to draw a line in autocad from a predefined function? For example, natural log?



Replies:
Posted By: John Connor
Date Posted: 23.Apr.2013 at 11:40
Take a look at QuickCalc specifically the Scientific Area.

Evaluates trigonometric, logarithmic, exponential, and other expressions commonly associated with scientific and engineering applications.

In (Natural Log)

Specifies the natural log of the number in the Input box.




-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: heinsite
Date Posted: 24.Apr.2013 at 07:58
Simple answer:  No.

A line is a line with a linear distance.  You can choose between different units of measurement (inches, feet, meters, parsecs, etc), and you can view/display it later at different scales (1:1, 1/4"=1'0", custom, etc), but you can't draw it in AutoCAD any other way that I'm aware of.

If what you want to do is subdivide a line using some other type of scale, logarithmic for example, you'll need to do the math and provide the ticks yourself.

Dave.


-------------
Dave Hein, P.E.
Hawaii District Engineer
Kona International Airport
AutoCAD Certified Professional
Autodesk Expert Elite


Posted By: John Connor
Date Posted: 24.Apr.2013 at 11:58
Maybe it could be done using a custom lisp routine?

-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: heinsite
Date Posted: 24.Apr.2013 at 12:40
I'm starting to think we need to drill down to the "why" in this case.  Why, for example, would he want to draw a line 2e units long, or ln(7.389) units long?  But if he's trying to draw a graphic that will fit on ANSI A paper and he needs to understand how to subdivide the axes to represent a particular order of magnitude of data, then we'll get a clearer picture.  But as it stands the question is ambiguous or if not, at least incomplete.

Dave.


-------------
Dave Hein, P.E.
Hawaii District Engineer
Kona International Airport
AutoCAD Certified Professional
Autodesk Expert Elite


Posted By: javik
Date Posted: 25.Apr.2013 at 01:05
First year engineering group project. Designing a ferry terminal. Need the pier to be a specific shape. 


More specifically the shape above the x axis (if it wasn't clear)


Posted By: CarlB
Date Posted: 25.Apr.2013 at 02:19
I'd say calculate your y coordinates in Excel, for x values/spacing you specify.
In one column, combine your x and y values, separated by a comma, using "&" or "concatenate" function.
Then in AutoCAD, start the "pline" command. When prompted for a point, just paste in a selected range of coordinates.
Can "pedit" with "fit" for a smoother look.
 
 


Posted By: heinsite
Date Posted: 26.Apr.2013 at 13:41
Originally posted by CarlB CarlB wrote:

I'd say calculate your y coordinates in Excel, for x values/spacing you specify.
In one column, combine your x and y values, separated by a comma, using "&" or "concatenate" function.
Then in AutoCAD, start the "pline" command. When prompted for a point, just paste in a selected range of coordinates.
Can "pedit" with "fit" for a smoother look.
 
 


Try also simply plotting the points from Excel, and then fit a spline thru them.  The concatenate idea works to plot points too which can later be made "invisible" by changing their style.  Compare the results with Carl's method above and keep the one you like best.

Dave.


-------------
Dave Hein, P.E.
Hawaii District Engineer
Kona International Airport
AutoCAD Certified Professional
Autodesk Expert Elite


Posted By: CarlB
Date Posted: 26.Apr.2013 at 22:11
"Try also simply plotting the points from Excel, and then fit a spline thru them."
 
Dave, how would you do this? I don't know of a simpler way than I described.
I described using the "pline" command, but could substitute "spline" as well.
 


Posted By: javik
Date Posted: 27.Apr.2013 at 02:52
Thanks guys for the tips! Been a great help and will post any results!


Posted By: heinsite
Date Posted: 27.Apr.2013 at 06:11
Originally posted by CarlB CarlB wrote:

"Try also simply plotting the points from Excel, and then fit a spline thru them."
Dave, how would you do this? I don't know of a simpler way than I described.
I described using the "pline" command, but could substitute "spline" as well.


Carl,  it's not as simple... in fact it adds a few steps.  But there is a slight difference in the outcome.  This uses the same general idea you proposed, but instead of concatenating and creating just a set of coordinates I add POINT in front of them.  So each line becomes POINT X,Y.  That column is then pasted into the drawing to yield a set of plotted points.  From there draw a spline thru them.

What I noted was that the fit can be slightly different between this method and the PLINE method.

Dave.


-------------
Dave Hein, P.E.
Hawaii District Engineer
Kona International Airport
AutoCAD Certified Professional
Autodesk Expert Elite


Posted By: javik
Date Posted: 27.Apr.2013 at 13:09
Ok, I'm having a bit of of a problem. When using & or concantate, the cell is just an amalgamation of the two numbers, not seperated by a comma.

*edit: solved

used the following formula: =CONCATENATE(A1,", ",B1)


Posted By: heinsite
Date Posted: 27.Apr.2013 at 13:43
If you want to use a spline, use the following formula to plot points:

=CONCATENATE("POINT"," ",A1,",",B1)

and then use them to plot a spline.

Dave.


-------------
Dave Hein, P.E.
Hawaii District Engineer
Kona International Airport
AutoCAD Certified Professional
Autodesk Expert Elite


Posted By: javik
Date Posted: 27.Apr.2013 at 13:51
Ok, having problems using the pline tool. Type in pline, press paste, input my location point, and it just inserts a text array of the coordinate points??? Please excuse how inexperienced I am with this area of the software.

http://s1112.photobucket.com/user/adamklasicki/media/ScreenShot2013-04-27at95419PM.png.html" rel="nofollow">


Posted By: CarlB
Date Posted: 29.Apr.2013 at 01:22
When you pasted your selection, was the command line active, with he prompt "First point:"" ?


Posted By: Vladimir Michl
Date Posted: 29.Apr.2013 at 07:48
You can also use the 2DPLOT utility (free, see Download). After you load it you can start the 2Dplot LISP function with the definition of your math expression - e.g.:
 

(2DPlot (lambda (v) (list v (log v))) 0.5 100 0.5)
 
The parameters are: the function fXY(v), from, to, step


-------------
Vladimir Michl (moderator)
ARKANCE - https://arkance.world" rel="nofollow - https://arkance.world - Autodesk Platinum Partner


Posted By: heinsite
Date Posted: 29.Apr.2013 at 09:13
You need to copy and paste it to the command line, not as an OLE object.  What you're doing is essentially automating exactly what you would type it if you had to do it all by hand.  The column of concatenated results would be your inputs.

Dave.


-------------
Dave Hein, P.E.
Hawaii District Engineer
Kona International Airport
AutoCAD Certified Professional
Autodesk Expert Elite



Print Page | Close Window