标签:style blog http color os 2014
双曲线有点麻烦,因为它是两条线,而我的程序逻辑中对于渲染只是处理一条线,所以在图形中会有多余的线出现,这不太漂亮,容我以后解决.而且双曲线上的顶点容易过大,造成无效的浮点数,这也要特殊处理.
双曲线(东西开口)
vertices = 12000 t = from 0 to (2*PI) a = rand2(0.1, 10) b = rand2(0.1, 10) x = a*sec(t) y = b*tan(t) x = limit(x, -50, 50) y = limit(y, -50, 50)
双曲线(南北开口)
vertices = 12000 t = from 0 to (2*PI) a = rand2(0.1, 10) b = rand2(0.1, 10) x = a*tan(t) y = b*sec(t) x = limit(x, -50, 50) y = limit(y, -50, 50)
双曲线2(东西开口)
vertices = 12000 t = from (-2*PI) to (2*PI) a = rand2(0.1, 10) b = rand2(0.1, 10) x = a*cosh(t) y = b*sinh(t) x = limit(x, -50, 50) y = limit(y, -50, 50)
双曲线2(南北开口)
vertices = 12000 t = from (-2*PI) to (2*PI) a = rand2(0.1, 10) b = rand2(0.1, 10) x = a*sinh(t) y = b*cosh(t) x = limit(x, -50, 50) y = limit(y, -50, 50)
圆锥双曲线
vertices = 12000 t = from 0 to (2*PI) e = rand2(1, 8) p = rand2(0, 10) r = e*p / (1 - e*cos(t)) x = r*sin(t) y = r*cos(t) x = limit(x, -25, 25) y = limit(y, -25, 25)
直角双曲线
vertices = 2000 x = from -20 to 20 y = 1/x y = limit(y, -20, 20)
标签:style blog http color os 2014
原文地址:http://www.cnblogs.com/WhyEngine/p/3824351.html