數學圖形之圓環

來源:互聯網
上載者:User

標籤:style   blog   http   color   os   strong   2014   div   

(1)圓環

vertices = D1:72 D2:72u = from 0 to (2*PI) D1v = from 0 to (2*PI) D2 r = 3*cos(u) + 7 z = 3*sin(u)y = r*sin(v)x = r*cos(v) y = y + 5

 

 

(2)隨機半徑的圓環

這裡提供了兩種寫法:

vertices = D1:72 D2:72u = from 0 to (2*PI) D1v = from 0 to (2*PI) D2a = 10.0b = rand2(0.5, a)x = (a + b*cos(v))*sin(u)y = b*sin(v)z = (a + b*cos(v))*cos(u)
#http://www.mathcurve.com/surfaces/tore/tore.shtmlvertices = D1:100 D2:100

u = from 0 to (PI*2) D1v = from 0 to (PI*2) D2
a = rand2(1, 10)b = rand2(1, 10)
x = (a + b*cos(v))*cos(u)z = (a + b*cos(v))*sin(u)y = b*sin(v)

(3)Horn Torus

其特點是小圈半徑等於大圈的一半

#http://mathworld.wolfram.com/HornTorus.htmlvertices = D1:100 D2:100u = from 0 to (PI*2) D1v = from 0 to (PI*2) D2x = (1 + cos(v))*cos(u)y = sin(v)z = (1 + cos(v))*sin(u)a = 10x = x*ay = y*az = z*a

(4)環桶

vertices = D1:72 D2:72u = from 0 to (2*PI) D1v = from 0 to (2*PI) D2a = 10.0b = rand2(0.5, a)x = (a + b*cos(v))*sin(u)y = b*sin(v) + if(sin(v) > 0, 10, -10)z = (a + b*cos(v))*cos(u)

(5)輪子

vertices = D1:72 D2:72u = from 0 to (2*PI) D1v = from 0 to (2*PI) D2a = 10.0b = rand2(0.5, a)x = (a + b*cos(v))*sin(u)y = b*sin(2*v)z = (a + b*cos(v))*cos(u)

(6)tore de klein

#http://www.mathcurve.com/surfaces/klein/toredeklein.shtmlvertices = D1:100 D2:100u = from 0 to (PI*2) D1v = from 0 to (PI*2) D2a = rand2(1, 10)b = rand2(1, 10)k = rand_int2(1, 20)k = k / 2x = (a+b*cos(v))*cos(u)z = (a+b*cos(v))*sin(u)y = b*sin(v)*cos(k*u)

(7)擰著的圓環

#http://www.mathcurve.com/surfaces/tore/tore.shtmlvertices = D1:100 D2:100u = from 0 to (PI*2) D1v = from 0 to (PI*2) D2a = rand2(1, 10)b = rand2(0.5, a)t = sqrt(a*a - b*b)e = rand2(-2,2)x = t*sin(v)*cos(u) - e*(b + a*cos(v))*sin(u)z = t*sin(v)*sin(u) + e*(b + a*cos(v))*cos(u)y = b*sin(v)

(8)多圈的環

vertices = D1:100 D2:100u = from 0 to (2*PI) D1v = from 0 to (2*PI) D2a = sin(u)b = cos(u)c = sin(v)d = cos(v)r = 3 + c + bo = 2 * vx = r*sin(o)y = a + 2*dz = r*cos(o)x = x*5y = y*5z = z*5

(9)偏圓環

vertices = D1:100 D2:100u = from 0 to (2*PI) D1v = from 0 to (2*PI) D2a = rand2(5, 10)c = rand2(1, a/2)b = sqrt(a*a - c*c)d = rand2(1, 10)w = a - c*cos(u)*cos(v)x = d*(c - a*cos(u)*cos(v)) + b*b*cos(u)y = b*sin(u)*(a - d*cos(v))z = b*sin(v)*(c*cos(u) - d)x = x/wy = y/wz = z/w

 

(10)最後再補充下,圓環可以看做是一個圓圈繞一個軸旋轉產生的,所以可以有以下指令碼代碼

vertices = D1:100 D2:100u = from (0) to (2*PI) D1v = from 0 to (2*PI) D2r = 2m = rand2(r, r*10)n = r*cos(u) + my = r*sin(u)x = n*cos(v)z = n*sin(v)

 

 (11)補充一種環曲面:Bohemian

#http://http://www.mathcurve.com/surfaces/boheme/boheme.shtmlvertices = D1:100 D2:100u = from 0 to (2*PI) D1v = from 0 to (PI*2) D2a = rand2(1, 10)b = rand2(1, 10)x = a*cos(u)y = b*cos(v)z = a*sin(u) + b*sin(v)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.