数学图形(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)

原文地址:https://www.cnblogs.com/WhyEngine/p/3844138.html