This comes to mind. A simple macro. You do the math. If you want 3D use a 3D spline. Paste the text below into an empty macro.
TOP
Option Explicit
'
****************************************************************************** ' macro recorded on 12/26/07 by kellnerp '
****************************************************************************** Dim swApp As Object Dim Part As Object Dim boolstatus As Boolean Dim longstatus As Long, longwarnings As Long Dim FeatureData As Object Dim Feature As Object Dim Component As Object Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc boolstatus = Part.Extension.SelectByID("Front Plane", "PLANE", 0, 0,
0, False, 0, Nothing) boolstatus = Part.Extension.SelectByID("Front Plane", "PLANE", 0, 0,
0, False, 0, Nothing) Part.InsertSketch2 True Part.ClearSelection2 True
Dim x0, xn, a, b, c As Double Dim x(20), y(20) As Double Dim i As Long
x0 = 0# xn = 1# a = 2# b = 2# c = 2#
'y=ax^2+bx+c
For i = 0 To 20 x(i) = x0 + (xn - x0) / 20 * i y(i) = a * x(i) * x(i) + b * x(i) + c Part.SketchSpline 20 - i, x(i) * 0.0254, y(i) * 0.0254, 0 Next i
Part.ClearSelection2 True Part.InsertSketch2 True End Sub