modeling a mathematical shape

modeling a mathematical shape

Anonymous
Not applicable
864 Views
9 Replies
Message 1 of 10

modeling a mathematical shape

Anonymous
Not applicable

Dear Community,

 I am really new in Autocad. I am using it just because I need to create a mathematical shape and fit it to a point cloud.

 

I need to plot the following offset paraboloid

(-6.4/18.6)*(u*cos(v))-(0.26/18.6)*(u*sin(v))-u^2/(4*(4.5))

 

with the following limit for variable u:[0:3.1] and v:[0:2*pi]

 

I tried to reproduce the model of another post: https://forums.autodesk.com/t5/autocad-forum/modeling-a-mathematical-shape/m-p/6880790#M163266

 

But when I uploaded I can not see anything.

 

Could you please give some advice?  Is there some place in Autocad where I just write my code without making a lisp "programm"?

 

regards,

Eugenia

0 Likes
Accepted solutions (2)
865 Views
9 Replies
Replies (9)
Message 2 of 10

john.vellek
Alumni
Alumni

Hi @Anonymous,

LISP and/or VBA might be the best way to get this done. I found this older thread that explores something similar to what you are trying to express.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 3 of 10

dbroad
Mentor
Mentor

If you just want to enter math formulas and generate a shape, then AutoCAD is not the best program to use.

 

Wolfram-Alpha will take your equation and generate what you want.  If you go-pro, then you might be able to export the data in a form that could be input to AutoCAD as a point cloud.  If you want to do it in AutoCAD, you need to write a program to translate the equation in to a surface.  AutoCAD used to include such a program, called fplot.lsp as part of its bonus tools.

 

I used to use MathCAD.  Others use Maple or Mathmatica.

 

Here is a clipped image from wolfram-alpha

Screenshot_1.png

Architect, Registered NC, VA, SC, & GA.
Message 4 of 10

SEANT61
Advisor
Advisor
Accepted solution

The parametric span on V (0:2PI) suggests a revolution.  If the derived data is plotted as such, the resultant geometry is along this line.  I set everything symmetrical about the XZ plane, though the derived data indicates a slight rotation off of that plane.  Conceivably, the rotation is needed but, maybe even more conceivable, I've got an error in my spreadsheet setup.  Either way, this is what I ended up with:

 


************************************************************
May your cursor always snap to the location intended.
Message 5 of 10

vladimir_michl
Advisor
Advisor
Accepted solution

You can get the model also directly in AutoCAD. Just load our 3DPLOT Lisp utility, enter your function definition in Lisp and call (3dplot).

 

See:

http://www.cadstudio.cz/en/apps/3dplot/

 

(defun MYFUNC (u v)
(list
 u
 v
 (- (* (/ -6.4 18.6) u (cos v)) (* (/ 0.26 18.6) u (sin v)) (/ (* u u)(* 4 4.5)))
))

 

(3dplot MYFUNC 0 3.1 0.1 0 6.28 0.1)

 

You will get this:

 

myfunc.jpg

 

 

Vladimír Michl, www.cadstudio.cz  www.cadforum.cz 

Message 6 of 10

Anonymous
Not applicable

Thanks, but the idea was not just building shapes. It was building a 3D object and matching with a point cloud.

Anyway I liked the tool you mentioned. I didn't know it.

0 Likes
Message 7 of 10

Anonymous
Not applicable

Thanks. I did it as you suggested but I couldn't  visualize it.

But maybe it is my AUTOCAD version...

0 Likes
Message 8 of 10

Anonymous
Not applicable

Many thanks! It worked fine for me. I could open it and the model was correct.

 

Now I've got my point cloud and model in the same drawing.

 

Regards

 

0 Likes
Message 9 of 10

ara_neresesian
Collaborator
Collaborator

hi

I think if you are using autocad LT (limited) it is not possible to load lsp file or 3d object

you have to run it in  autocad

0 Likes
Message 10 of 10

dbroad
Mentor
Mentor

Nice post @vladimir_michl ! Looks like a great tool. I'm going to mark this as a solution also since many AutoCAD users would use such a program rather than hand modelling the shape.

Architect, Registered NC, VA, SC, & GA.
0 Likes