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)

  • 相关阅读:
    一种复杂的情感--“外戚”
    追~
    神受的孩子
    不好的习惯
    思杨改编的朝代歌
    siyang入厕
    小思趣事
    今天周三啦~~时光啊
    Python(6)——装饰器
    Python(5)——关于描述符的三种操作方法
  • 原文地址:https://www.cnblogs.com/WhyEngine/p/3844138.html
Copyright © 2011-2022 走看看