CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
Czech English Deutsch
Login/Register:
 Visitors: 2380 
RSS tips RSS channel - CAD tips
RSS discussion RSS channel - CAD discussion

Discussion Discussion forum

HelpCAD discussion

CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.

How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

modeling a mathematical shape

 Post Reply Post Reply
Author
Frank98 View Drop Down
Newbie
Newbie


Joined: 15.Feb.2017
Location: Bahamas
Using: autocad 2015
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Frank98 Quote  Post ReplyReply Direct Link To This Post Topic: modeling a mathematical shape
    Posted: 15.Feb.2017 at 21:28
how can i model such a plot in autocad.
this plot what created using a mathematical formula ,demostrated in mathlab.
thanks

Back to Top
Kent Cooper View Drop Down
Senior Member
Senior Member


Joined: 12.Mar.2013
Location: United States
Using: AutoCAD, Architectural Desktop
Status: Online
Points: 305
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kent Cooper Quote  Post ReplyReply Direct Link To This Post Posted: 15.Feb.2017 at 22:13
The equations would be necessary....
 
That looks like some kind [two kinds, really] of formula in which the angle to a point on the curve is based on the inverse of a trigonometric function whose value swings between positive and negative without ever going to infinity [such as sine or cosine], applied to some multiplier of the local radius, and for the browner curve with a constant angle [looks like 45 degrees] added to the result.  That shouldn't be very hard to work out -- for a related routine that draws polynomial functions [y = ax^n + bx^(n-1) + .... + px^2 + qx + r], see my PolynomialFunction.lsp routine, available here.  But this one, being radial, would not involve X and Y coordinates, but instead (polar) functions measured from the origin as basepoint, in a (repeat) function stepping through small increments of radius as the distance arguments, and calculating the angle arguments for each based on the equation, and presumably used in a SPLINE, or perhaps a POLYLINE that you could spline-curve to smooth it out.
Back to Top
Vladimir Michl View Drop Down
Moderator Group
Moderator Group

CAD Studio a.s.

Joined: 26.Jul.2007
Location: Czech Republic
Using: Autodesk software
Status: Offline
Points: 1668
Post Options Post Options   Thanks (0) Thanks(0)   Quote Vladimir Michl Quote  Post ReplyReply Direct Link To This Post Posted: 17.Feb.2017 at 08:34
You can use our 2DPLOT utility (see http://www.cadstudio.cz/en/apps/2dplot/). You equation then should be expressed in cartesian space (X/Y):
 
; for range (0-1.5>
(defun fPolar1 (u / r tau alfa R0)
;x = (* r (cos th))
;y = (* r (sin th))
 (setq r u)
 (setq tau 1.1) ; example
 (setq alfa 1.0) ; example
 (setq R0 0.1) ; example
 (setq th (* alfa (sin (/ (* pi (log (/ r R0))) (log tau))))) ; your expression
 (list (* r (cos th)) (* r (sin th))) ; return (X Y)
)
Then call:
 
(2Dplot fPolar1 0.001 1.5 0.001)
 
meaning - draw my function "fPolar1" from 0.001 to 1.5 (the radius), with ministeps of 0.001
 
Vladimir Michl (moderator)
CAD Studio - www.cadstudio.cz
(Autodesk reseller and developer)
Back to Top
Kent Cooper View Drop Down
Senior Member
Senior Member


Joined: 12.Mar.2013
Location: United States
Using: AutoCAD, Architectural Desktop
Status: Online
Points: 305
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kent Cooper Quote  Post ReplyReply Direct Link To This Post Posted: 17.Feb.2017 at 20:56
Another, (polar)-based, solution (along with Vladimir's solution above) is over here. See also other Posts in that same thread.

EDIT:  That link doesn't seem to work.  Try copy/pasting this:

https://forums.autodesk.com/t5/autocad-2013-2014-2015-2016-2017/modeling-a-mathematical-shape/m-p/6886507#M163554


Edited by Kent Cooper - 17.Feb.2017 at 21:02
Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,055 seconds.