数学图形(1.32) 鸡蛋

鸡蛋的数学图形实现

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

egg

#http://www.mathcurve.com/courbes2d/oeuf/oeufgranville.shtml
vertices = 10000
t = from 0 to (2*PI)
a = 3
b = 2
c = 0.25
y = a*cos(t) + c*cos(2*t)
x = b*sin(t)

Granville egg

#http://www.mathcurve.com/courbes2d/oeuf/oeufgranville.shtml
vertices = 10000
t = from 0 to (2*PI)
a = rand2(0.1, 10)
b = rand2(0.1, 10)
r = 1.0
y = b+r*cos(t)
x = a*r*sin(t)/y

Hugelschaffer egg

#http://www.mathcurve.com/courbes2d/oeuf/oeuf.shtml
vertices = 10000
t = from 0 to (2*PI)

a = 6
b = 4
d = 1

s = sin(t)
c = cos(t)

y = (sqrt(a*a - d*d*s*s) + d*c)*c
x = b*s

Hugelschaffer egg(随机)

#http://www.mathcurve.com/courbes2d/oeuf/oeuf.shtml
vertices = 10000
t = from 0 to (2*PI)

a = rand2(0.1, 10)
b = rand2(0.1, 10)
d = rand2(0.1, 10)

s = sin(t)
c = cos(t)

y = (sqrt(a*a - d*d*s*s) + d*c)*c
x = b*s

posted on 2014-07-08 15:16  叶飞影  阅读(1550)  评论(0编辑  收藏  举报