zoukankan      html  css  js  c++  java
  • 数学图形(1.44)超圆

    超圆是什么?

    找了很久也没找到其正式中文定义.

    维基上的定义为:http://en.wikipedia.org/wiki/Superellipse

    那我用自己的话说吧,

    超圆就是方程式x^a+y^b= c所生成的图形.当a==b==2时,为一个圆.

    超椭圆是m*x^a+n*y^b= c所生成的图形.当a==b==2时,为一个椭圆.

    前面写的数学图形(1.14) 十字星形线就是一种超圆.

     

    超圆脚本代码1

    vertices = 1000
    r = 10.0
    
    t = from 0 to (2*PI)
    
    s = rand2(0.1, 10)
    
    x = r*pow_sign(sin(t), s)
    y = r*pow_sign(cos(t), s)

    超圆脚本代码2

    vertices = 1000
    r = 10.0
    
    t = from 0 to (2*PI)
    
    a = rand2(0.1, 10)
    b = rand2(0.1, 10)
    
    x = r*pow_sign(sin(t), a)
    y = r*pow_sign(cos(t), b)

    超椭圆脚本代码1

    vertices = 1000
    r = 10.0
    
    t = from 0 to (2*PI)
    
    s = rand2(0.1, 10)
    
    w = rand2(0.2, 5)
    
    x = r*pow_sign(sin(t), s)
    y = r*w*pow_sign(cos(t), s)

    超椭圆脚本代码2

    vertices = 1000
    r = 10.0
    
    t = from 0 to (2*PI)
    
    a = rand2(0.1, 10)
    b = rand2(0.1, 10)
    
    w = rand2(0.2, 5)
    
    x = r*pow_sign(sin(t), a)
    y = r*w*pow_sign(cos(t), b)

    超圆面

    vertices = D1:1000 D2:100
    
    u = from 0 to (2*PI) D1
    v = from 0 to (10) D2
    
    r = 10.0
    
    x = r*pow_sign(sin(u), v)
    y = r*pow_sign(cos(u), v)

    超椭圆面

    vertices = D1:1000 D2:100
    
    u = from 0 to (2*PI) D1
    v = from 0 to (10) D2
    
    r = 10.0
    w = rand2(0.2, 5)
    
    x = r*pow_sign(sin(u), v)
    y = r*w*pow_sign(cos(u), v)

    有种曲线名为kiss curve也是超圆的一种:

    #http://www.2dcurves.com/sextic/sextick.html
    
    vertices = 2000
    
    t = from 0 to (2*PI)
    x = sin(t)
    y = pow(cos(t), 3)

  • 相关阅读:
    Shell 字符串
    shell 使用变量
    shell 数组
    shell 注释
    shell 输出双引号
    shell wc命令 统计行数
    shell :
    shell 函数调用
    pyqt 调用颜色选择器
    Navicat+Premium+12+破解补丁
  • 原文地址:https://www.cnblogs.com/WhyEngine/p/3844138.html
Copyright © 2011-2022 走看看