zoukankan      html  css  js  c++  java
  • 直线y=x

    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

  • 相关阅读:
    java.lang.ClassNotFoundException:org.springframework.web.context.ContextLoaderListener问题解决
    开发人员系统功能设计常用办公软件分享
    微信自定义菜单url默认80端口问题解决
    Servlet再度学习
    JSP九大内置对象
    linux下安装apache(httpd-2.4.3版本)各种坑
    Ajax原理学习
    Shell脚本了解
    生成Webservice的两种方式(Axis2,CXf2.x)
    Webservice发布
  • 原文地址:https://www.cnblogs.com/gaitian00/p/2178346.html
Copyright © 2011-2022 走看看