shp = splineShape()
select shp
spln = addNewSpline shp
for i = 1 to 1000 do
(
addKnot shp spln #corner #line [i*5,0,i*5]
)
converttosplineshape shp
updateShape shp
---螺旋线函数
shp = splineShape()
select shp
spln = addNewSpline shp
for i = 1 to 1000 do
(
x =sin (i)--+80
y =cos (i)--+80
z=(i/20.)-----这个里面就是能形成梯形台
---** 这个要是使用整数就是梯形台效果。
addKnot shp spln #corner #line [x*20,y*20,z]
addKnot shp spln #corner #line [x*20,y*20,z]
)
converttosplineshape shp
updateShape shp
--- 张口螺旋线函数
shp = splineShape()
select shp
spln = addNewSpline shp
a=10.
b=10.
for i = 1 to 1000 do
(
x =sin (i)--+80
y =cos (i)--+80
z=(i/20.)
a=a+1
b=b+1
z=(i/2.)
addKnot shp spln #corner #line [(x*a),(y*b),z]
)
converttosplineshape shp
updateShape shp
--- 闭口螺旋线函数
shp = splineShape()
select shp
spln = addNewSpline shp
a=990
b=990
for i = 1 to 1000 do
(
x =sin (i)--+80
y =cos (i)--+80
a=a-1
b=b-1
z=(i/2.)
addKnot shp spln #corner #line [(x*a),(y*b),z]
)
converttosplineshape shp
updateShape shp
----渐开线
shp = splineShape()
select shp
spln = addNewSpline shp
r=1
for i = 1 to 1000 do
(
ang=360*i
s=2*3.14*r*i
x0= s*cos(ang)
y0 =s*sin (ang)
x =x0+s*sin(ang)
y =y0+s*cos(ang)
z=0
addKnot shp spln #corner #line [x*20,y*20,z]
)
converttosplineshape shp
updateShape shp
----飞碟线
shp = splineShape()
select shp
spln = addNewSpline shp
a=990
b=990
z
for i = 1 to 1000 do
(
x =sin (i)--+80
y =cos (i)--+80
if a <=-10 then
(
exit
)else
(
a=a-1
b=b-1
z=(i/2.)
)
addKnot shp spln #corner #line [(x*a),(y*b),z]
)
for i = 1001 to 2000 do
(
x =sin (i)--+80
y =cos (i)--+80
a=a+1
b=b+1
z=((i)/2.)
addKnot shp spln #corner #line [(x*a),(y*b),z]
)
converttosplineshape shp
updateShape shp
------------- 抛物线的绘制
shp = splineShape()
select shp
spln = addNewSpline shp
for i = 1 to 100. do
(
x =4*i
y =(3*i+5*i^2)
z=0
addKnot shp spln #corner #line [x,z,y]
)
converttosplineshape shp
updateShape shp