码迷,mamicode.com
首页 > 其他好文 > 详细

数学图形之螺旋管

时间:2014-08-09 15:48:28      阅读:322      评论:0      收藏:0      [点我收藏+]

标签:blog   http   os   2014   div   log   images   rom   

(1)螺旋管

vertices = D1:720 D2:72
u = from 0 to (10*PI) D1
v = from 0 to (2*PI) D2

a = 3

x = (a + cos(v)) * cos(u)
z = (a + cos(v)) * sin(u)
y = sin(v) + u

bubuko.com,布布扣

(2)螺旋管随机

vertices = D1:720 D2:72
u = from 0 to (6*PI) D1
v = from 0 to (2*PI) D2

a = rand2(2, 5)
b = rand2(0.5, 1)
c = rand2(0.5, 2)

x = c * (a + b * cos(v)) * cos(u)
y = c * (a + b * cos(v)) * sin(u)
z = c * b * sin(v) + u * 2/PI - 6

bubuko.com,布布扣

(3)螺旋管(逐渐变细)

可以将螺旋管想象成一个圆圈曲线绕一轴旋转+平移

vertices = D1:720 D2:72
u = from 0 to 1 D1
v = from 0 to (2*PI) D2

a = 3
b = 5

x = (1 - u)*(a + cos(v)) * cos(b*PI*u)
z = (1 - u)*(a + cos(v)) * sin(b*PI*u)
y = (1 - u)*sin(v) + a*u + PI

u = u*10

bubuko.com,布布扣

(4)Circle 旋转管

vertices = D1:100 D2:600

u = from (0) to (2*PI) D1
v = from 0 to (12*PI) D2

r = 2
m = rand2(r, r*10)

n = r*cos(u) + m

y = r*sin(u) + v

x = n*cos(v)
z = n*sin(v)

bubuko.com,布布扣

(5)麻花曲面

vertices = D1:3600 D2:100
u = from 0 to (PI*10) D1
v = from 0 to (PI*2) D2

a = 10
b = rand2(5, 10)

x = a*cos(u)*cos(v)
z = a*sin(u)*cos(v)
y = a*sin(v) + b*u

bubuko.com,布布扣

数学图形之螺旋管,布布扣,bubuko.com

数学图形之螺旋管

标签:blog   http   os   2014   div   log   images   rom   

原文地址:http://www.cnblogs.com/iflewless/p/3901133.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!