CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
Czech English Deutsch
Login/Register:
 Visitors: 1813 
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

Help with 3DPlot

 Post Reply Post Reply
Author
joefromhersey View Drop Down
Newbie
Newbie


Joined: 22.Jun.2012
Location: United States
Using: Inventor2012
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote joefromhersey Quote  Post ReplyReply Direct Link To This Post Topic: Help with 3DPlot
    Posted: 24.Jun.2012 at 02:37
Hi I am pretty new to AutoCad and need some help plotting 3D surfaces from mathematical functions. I downloaded the 3DPlot utility and followed the instructions from this site: http://www.cadstudio.cz/en/apps/3dplot/.

I defined a shape myFunc using:
(defun myFunc (x y) (list x y (cos(x)+cos(y))))

However when I try to plot using:
(3DPlot myFunc -1.0 1.0 0.1 -1.0 1.0 0.1)

I get this error:
error: bad function: -1.0

What am I doing wrong? Also would it be possible for me to get repeating units of the function cos(x)+cos(y)?

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: 1379
Post Options Post Options   Thanks (0) Thanks(0)   Quote Vladimir Michl Quote  Post ReplyReply Direct Link To This Post Posted: 17.Jul.2012 at 09:36
Hi, your function definition is not properly formated in AutoLISP syntax. Assuming you want to draw Z = cos(x) + sin(x), the proper syntax is:
 
(defun myFunc (x y) (list x y (+ (cos x) (cos y))))
 
This will draw a part of a 3D sphere.
Vladimir Michl (moderator)
CAD Studio - www.cadstudio.cz
(Autodesk reseller and developer)
Back to Top

Related CAD tips:
Tip 8903:Draw normals of 3DFaces in AutoCAD DWG.
Tip 8479:How to generate 3D surface with a mathematic expression?


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,656 seconds.