zoukankan      html  css  js  c++  java
  • 数学图形(1.15) 水滴线

    水滴线的轮廓像一颗小水滴.

    相关软件参见:数学图形可视化工具,使用自己定义语法的脚本代码生成数学图形.该软件免费开源.QQ交流群: 367752815

    vertices = 1000
    
    t = from 0 to (2*PI)
    
    a = 10
    b = rand2(0.1, 10)
    
    x = a*cos(t)*cos(t)
    y = a*a*(cos(t)^3)*sin(t) / b

    另一种写法:

    vertices = 1000
    
    u = from 0 to (2*PI)
    
    a = 10
    b = rand2(0.1, 10)
    
    x = a/2*(1 + cos(u))
    y = a*a/8*(sin(2*u) + 2*sin(u))/b

    还有一种曲线名为Larme,也是水滴的样子:

    #http://www.mathcurve.com/courbes2d/larme/larme.shtml
    vertices = 1000
    t = from 0 to (2*PI)
    n = rand2(1, 10)
    x = 10*cos(t)
    y = 10*sin(t)*pow(sin(t/2), n)

    水滴面:

    vertices = D1:1000 D2:100
    
    u = from 0.01 to (2*PI - 0.01) D1
    v = from 0.01 to 32 D2
    
    a = 10
    
    y = a*cos(u)*cos(u)
    x = a*a*(cos(u)^3)*sin(u) / b

    larme面:

    vertices = D1:1000 D2:100
    
    u = from 0.01 to (2*PI - 0.01) D1
    v = from 0.01 to 32 D2
    
    y = 10*cos(u)
    x = 10*sin(u)*pow(sin(u/2), v)

    再补充一种曲线梨线

    pear

    #http://www.2dcurves.com/quartic/quarticp.html#pearshapedcurve
    
    vertices = 1000
    
    t = from 0 to (2*PI)
    
    y = -1 - sin(t)
    x = 0.5*(1 + sin(t))*cos(t)

     

  • 相关阅读:
    3.15第三周编程总结
    2019.3.9编程总结
    2019.3.3编程总结2
    编程总结1
    编程总结2
    编程总结3
    我的老师
    关于sublime text 3使用记录
    12. 整数转罗马数字
    4. 寻找两个有序数组的中位数
  • 原文地址:https://www.cnblogs.com/WhyEngine/p/3829498.html
Copyright © 2011-2022 走看看