随笔 - 373  文章 - 1  评论 - 771  阅读 - 137万

数学图形之Boy surface

这是一个姓Boy的人发现的,所以取名为Boy surface.该图形与罗马图形有点相似,都是三分的图形.它甚至可以说是由罗马曲面变化而成的.

本文将展示几种Boy曲面的生成算法和切图,使用自己定义语法的脚本代码生成数学图形.相关软件参见:数学图形可视化工具,该软件免费开源.QQ交流群: 367752815

In geometry, Boy's surface is an immersion of the real projective plane in 3-dimensional space found by Werner Boy in 1901 (he discovered it on assignment from David Hilbert to prove that the projective plane could not be immersed in 3-space). Unlike the Roman surface and the cross-cap, it has no singularities (i.e. pinch-points), but it does self-intersect.

 

boy surface 01

复制代码
#http://www.mathcurve.com/surfaces/boy/boy.shtml
vertices = D1:100 D2:100
u = from 0 to (PI) D1
v = from 0 to (PI) D2
a = sin(u)
b = cos(u)
c = sin(v)
d = cos(v)
m = sqrt(2)
k = rand2(0.1, 1.4)
t = b/(m - k*sin(2*u)*cos(3*v))
x = t*(b*cos(2*v) + m*a*d)
y = t*(b*sin(2*v) - m*a*c)
z = 3*t*b
复制代码

boy surface 02

复制代码
#http://mathworld.wolfram.com/BoySurface.html

vertices = D1:100 D2:100
u = from (-PI/2) to (PI/2) D1
v = from 0 to PI D2

a = SQRT2*pow(cos(v), 2)
d = 2 - SQRT2*sin(3*u)*sin(2*v)

x = a*cos(2*u) + cos(u)*sin(2*v)
y = a*sin(2*u) - sin(u)*sin(2*v)
z = 3*pow(cos(v), 2)

x = x/d
y = y/d
z = z/d
复制代码

boy surface 03

我在这套公式上花费的时间最多,因为它最复杂,而且也不完美.它的曲面没能闭合.我研究了很久才发现,当r取无穷大时,该曲面才会闭合.

复制代码
#http://www.ipfw.edu/departments/coas/depts/math/coffman/steinersurface.html
#x = (1+r^2*cos(t)^2)*(sqrt(2)-sqrt(2)*r^2*cos(t)^2+2*r*sin(t)) / (3*(1+r^2*cos(t)^2)*(1+r^2*cos(t)^2+r^2*sin(t)^2) + 3*sqrt(2)*r^2*cos(t)*sin(t)*(3-r^2*cos(t)^2))
#y = 2*(1+r^2*cos(t)^2)*(sqrt(2)*r*cos(t) - r^2*cos(t)*sin(t)) /  (3*(1+r^2*cos(t)^2)*(1+r^2*cos(t)^2+r^2*sin(t)^2) + 3*sqrt(2)*r^2*cos(t)*sin(t)*(3-r^2*cos(t)^2))
#z = (1+r^2*cos(t)^2)^2 / ((1+r^2*cos(t)^2)*(1+r^2*cos(t)^2+r^2*sin(t)^2) + sqrt(2)*r^2*cos(t)*sin(t)*(3-r^2*cos(t)^2))

vertices = D1:100 D2:100
t = from 0 to (PI*2) D1
r = from 0 to 10 D2
c = cos(t)
s = sin(t)
i = (r*c) ^ 2
j = (r*s) ^ 2
m = sqrt(2)
a = (1+i)*(1+i+j)
b = m*r*r*c*s*(3-i)
x = (1+i)*(m-m*i+2*r*s) / (3*a + 3*b)
y = 2*(1+i)*(m*r*c - r*r*s*c) / (3*a + 3*b)
z = (1+i)*(1+i) / (a + b)
复制代码

 

posted on   叶飞影  阅读(2002)  评论(0编辑  收藏  举报
编辑推荐:
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· DeepSeek如何颠覆传统软件测试?测试工程师会被淘汰吗?
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示