随笔 - 80  文章 - 0  评论 - 0  阅读 - 30171 

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

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

复制代码
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
复制代码

椭圆

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)

随机生成的椭圆

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

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

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)

椭圆面

复制代码
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)
复制代码

posted on   ZiCheng  阅读(769)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
点击右上角即可分享
微信分享提示