相关软件参见:,使用自己定义语法的脚本代码生成数学图形.该软件免费开源.QQ交流群: 367752815
双曲线有点麻烦,因为它是两条线,而我的程序逻辑中对于渲染只是处理一条线,所以在图形中会有多余的线出现,这不太漂亮,容我以后解决.而且双曲线上的顶点容易过大,造成无效的浮点数,这也要特殊处理.
双曲线(东西开口)
vertices = 12000t = 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 = 12000t = 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 = 12000t = 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 = 12000t = 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 = 12000t = 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 = 2000x = from -20 to 20y = 1/xy = limit(y, -20, 20)
vertices = D1:360 D2:100u = from -10 to 10 D1v = from -1 to 1 D2x = uy = v/xy = limit(y, -100, 100)v = v*5
双曲面(北开口)
vertices = D1:512 D2:100u = from (-2*PI) to (2*PI) D1v = from (0.1) to (10) D2x = v*sinh(u)y = cosh(u)x = limit(x, -50, 50)y = limit(y, -50, 50)
双曲面(东开口)
vertices = D1:512 D2:100u = from (-2*PI) to (2*PI) D1v = from (0.1) to (10) D2x = v*cosh(u)y = sinh(u)x = limit(x, -50, 50)y = limit(y, -50, 50)