蓝色可以表示冬季,绿色表示春季,黄色表示夏季,红色表示秋季。
再上几张图:
从正顶向下看:
从侧下向上看
进到胎里面看:
附:
环面构造的图形学算法。其实,就是根据环面的参数方程算出每点的(x,y,z)。
u = 6.28
For u = 0 To 6.28 Step du
For v = 0 To 6.28 Step dv
xx = (100# + r * Cos(u)) * Cos(v)
yy = (100# + r * Cos(u)) * Sin(v)
zz = 100# + r * Sin(u)
x1 = xx * Cos(cy) + zz * Sin(cy) + 200
y1 = xx * Sin(cy) * Sin(cx) + yy * Cos(cx) _
- zz * Cos(cy) * Sin(cx) + 200
z1 = -xx * Sin(cy) * Cos(cx) + yy * Sin(cx) _
+ zz * Cos(cy) * Cos(cx)
xx = (100# + r * Cos(u)) * Cos(v + dv)
yy = (100# + r * Cos(u)) * Sin(v + dv)
zz = 100# + r * Sin(u)
x2 = xx * Cos(cy) + zz * Sin(cy) + 200
y2 = xx * Sin(cy) * Sin(cx) + yy * Cos(cx) - _
zz * Cos(cy) * Sin(cx) + 200
z2 = -xx * Sin(cy) * Cos(cx) + yy * Sin(cx) + _
zz * Cos(cy) * Cos(cx)
xx = (100# + r * Cos(u + du)) * Cos(v + dv)
yy = (100# + r * Cos(u + du)) * Sin(v + dv)
zz = 100# + r * Sin(u + du)
x3 = xx * Cos(cy) + zz * Sin(cy) + 200
y3 = xx * Sin(cy) * Sin(cx) + yy * Cos(cx) - _
zz * Cos(cy) * Sin(cx) + 200
z3 = -xx * Sin(cy) * Cos(cx) + yy * Sin(cx) + _
zz * Cos(cy) * Cos(cx)
xx = (100# + r * Cos(u + du)) * Cos(v)
yy = (100# + r * Cos(u + du)) * Sin(v)
zz = 100# + r * Sin(u + du)
x4 = xx * Cos(cy) + zz * Sin(cy) + 200
y4 = xx * Sin(cy) * Sin(cx) + yy * Cos(cx) - _
zz * Cos(cy) * Sin(cx) + 200
z4 = -xx * Sin(cy) * Cos(cx) + yy * Sin(cx) + _
zz * Cos(cy) * Cos(cx)
xx1 = x2 - x1: xx2 = x3 - x1
yy1 = y2 - y1: yy2 = y3 - y1
zz1 = z2 - z1: zz2 = z3 - z1
x = yy1 * zz2 - yy2 * zz1
y = zz1 * xx2 - zz2 * xx1
z = xx1 * yy2 - xx2 * yy1
If (z > 0) Then
xd(0) = x1: yd(0) = y1
xd(1) = x2: yd(1) = y2
xd(2) = x3: yd(2) = y3
xd(3) = x4: yd(3) = y4
dd = -(x * x1 + y * y1 + z * z1)
Call tc(4, 100) //不要管这句,这句是调用光照渲染算法的。
End If
Next
Next
End Sub
https://blog.sciencenet.cn/blog-33982-562711.html
上一篇:
三层的单圆轨流形会是什么样子的东西?下一篇:
一元四次方程通用公式解法问题出在哪?