少年IPhone终于有得买了,你的肾准备好了吗?这一节给大家展示一个由数学公式生成一个肾的形状。上一节讲的是,其中提到虽然意思是肾形的,但它不像个肾。而有种曲线名为Bean曲线,却可以看成是肾形。
The formula of the bean curve can be easily rewritten in Cartesian coordinates as
(x2 + y2)2 = x3 + y3
其极坐标方程为:
相关软件参见:,使用自己定义语法的脚本代码生成数学图形.该软件免费开源.QQ交流群: 367752815
脚本代码:
#http://www.2dcurves.com/quartic/quarticbn.htmlvertices = 1000t = from 0 to (2*PI)r = pow(sin(t), 3) + pow(cos(t), 3)x = r*sin(t)y = r*cos(t)
下一步我会将二维的Bean曲线转化成一个三维的肾形(当然你也可以认为它是豆形):
vertices = D1:64 D2:64u = from 0 to (PI) D1v = from (-PI/2) to (PI/2) D2r = pow(sin(u), 3) + pow(cos(u), 3)x = r*sin(u) - 0.3y = r*cos(u) - 0.3a = 10b = 2.5x = x*a*cos(v)y = y*a*cos(v)z = b*sin(v)