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

数学图形之Boy surface

时间:2014-08-08 09:31:35      阅读:255      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   使用   os   io   strong   

这是一个姓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

bubuko.com,布布扣

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

bubuko.com,布布扣

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)

bubuko.com,布布扣

 

数学图形之Boy surface,布布扣,bubuko.com

数学图形之Boy surface

标签:style   blog   http   color   使用   os   io   strong   

原文地址:http://www.cnblogs.com/WhyEngine/p/3898580.html

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