標籤:style blog http color 使用 os 2014 div
超球,自然界有很多果實屬於超球的形狀.之前曾經寫過關於超圓的文章:數學圖形(1.44)超圓, 這篇文章將對其擴充一下,由超圓的二維曲線轉化為超球三維曲面.
超圓就是方程式:x^a+y^b= c 產生的圖形.當a==b==2時,為一個圓.
超橢圓是方程式:m*x^a+n*y^b= c 產生的圖形.當a==b==2時,為一個橢圓.
那麼超球則是如下定義:
超球的方程式:x^a+y^b+z^c= d
超橢球的方程式:m*x^a+n*y^b+k*z^c= d
我使用自己定義文法的指令碼代碼產生超球圖形.相關軟體參見:數學圖形視覺化檢視,該軟體免費開源.QQ交流群: 367752815
(1)將超圓沿X軸或Y軸旋轉產生的圖形也是超球的一種
vertices = D1:100 D2:100u = from (-PI/2) to (PI/2) D1v = from 0 to (2*PI) D2a = rand2(0.1, 4)b = rand2(0.1, 4)r = 10.0x = r*pow_sign(sin(u), a)n = r*pow_sign(cos(u), b)y = n*cos(v)z = n*sin(v)
vertices = D1:100 D2:100u = from 0 to (PI) D1v = from 0 to (2*PI) D2a = rand2(0.1, 4)b = rand2(0.1, 4)r = 10.0n = r*pow_sign(sin(u), a)y = r*pow_sign(cos(u), b)x = n*cos(v)z = n*sin(v)
(2)超球面(瘦)
vertices = D1:100 D2:100u = from 0 to (2*PI) D1v = from (-PI*0.5) to (PI*0.5) D2a = 10m = rand2(1, 5)x = a*pow_sign(cos(u)*cos(v), m)y = a*pow_sign(sin(v), m)z = a*pow_sign(sin(u)*cos(v), m)
(3)超球面(胖)
vertices = D1:100 D2:100u = from 0 to (2*PI) D1v = from (-PI*0.5) to (PI*0.5) D2a = 10m = rand2(0.1, 1)x = a*pow_sign(cos(u)*cos(v), m)y = a*pow_sign(sin(v), m)z = a*pow_sign(sin(u)*cos(v), m)
(4)超球面(雙參)
vertices = D1:100 D2:100u = from 0 to (2*PI) D1v = from (-PI*0.5) to (PI*0.5) D2a = 10m = rand2(0.2, 5)n = rand2(0.2, 5)x = a*pow_sign(cos(u)*cos(v), m)y = a*pow_sign(sin(v), n)z = a*pow_sign(sin(u)*cos(v), m)
(5)超球面(三參)
vertices = D1:100 D2:100u = from 0 to (2*PI) D1v = from (-PI*0.5) to (PI*0.5) D2r = 10a = rand2(0.2, 5)b = rand2(0.2, 5)c = rand2(0.2, 5)x = r*pow_sign(cos(u)*cos(v), a)y = r*pow_sign(sin(v), b)z = r*pow_sign(sin(u)*cos(v), c)
(6)超橢球面
vertices = D1:100 D2:100u = from (-PI*0.5) to (PI*0.5) D1v = from (-PI) to (PI) D2a = rand2(1, 5)b = rand2(1, 5)c = rand2(1, 5)m = 5n = 3x = a*(cos(u)^m)*(cos(v)^n)z = b*(cos(u)^m)*(sin(v)^n)y = c*(sin(u)^m)
vertices = D1:100 D2:100u = from (-PI*0.5) to (PI*0.5) D1v = from (-PI) to (PI) D2a = rand2(1, 5)b = rand2(1, 5)c = rand2(1, 5)m = 0.6n = 0.3x = a*(pow_sign(cos(u), m))*(pow_sign(cos(v),n))z = b*(pow_sign(cos(u),m))*(pow_sign(sin(v),n))y = c*(pow_sign(sin(u),m))