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

数学图形(1.1) 圆,椭圆

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

标签:blog   http   使用   os   2014   div   log   images   

vertices = 360
w = from 0 to (2*PI)
r = 10.0
x = r*sin(w)
y = r*cos(w)

bubuko.com,布布扣

圆面,面上有纹理坐标,有顶点色

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

x = sin(u)
y = cos(u)

r = (x+1)/2
g = (y+1)/2
b = v/10

x = v*x
y = v*y

bubuko.com,布布扣

bubuko.com,布布扣

椭圆

vertices = 1000
r = 10.0
e = 0.75
t = from 0 to (2*PI)
p = r/(1.0 - e*cos(t))
x = p*sin(t)
y = p*cos(t)

bubuko.com,布布扣

随机生成的椭圆

vertices = 360
w = from 0 to (2*PI)
a = rand2(1, 20)
b = rand2(1, 20)
x = a*sin(w)
y = b*cos(w)

bubuko.com,布布扣

 使用圆内旋轮线原理生成的椭圆

vertices = 12000
a = 10
r = 5
d = rand2(0.5, 10)
t = from 0 to (2*PI)
x = (a - r)*cos(t) + d*cos((a/r - 1)*t)
y = (a - r)*sin(t) - d*sin((a/r - 1)*t)

bubuko.com,布布扣

椭圆面

vertices = D1:360 D2:100

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

r = 10

x = r*v*sin(u)
y = r*cos(u)

bubuko.com,布布扣

数学图形(1.1) 圆,椭圆,布布扣,bubuko.com

数学图形(1.1) 圆,椭圆

标签:blog   http   使用   os   2014   div   log   images   

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

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