zoukankan      html  css  js  c++  java
  • 数学图形之鞍面

    在这一节中,将展示几个鞍面图形,或与鞍面类似的图形,如马鞍面,猴鞍面,狗鞍面等.有点奇怪的是马鞍面是让人骑在马上的曲面, 而猴鞍面是让猴骑的曲面,狗鞍面是让狗骑的曲面.此外,还这一节提供了类似沙发,板凳之类的曲面.

    使用自己定义语法的脚本代码生成鞍面图形.相关软件参见:数学图形可视化工具,该软件免费开源.QQ交流群: 367752815

    (1)马鞍面

    之前我发布过关于双曲抛物面的文章,见:数学图形之双曲抛物面

    vertices = dimension1:320 dimension2:320
    
    a =0.7
    
    x = from (-a) to (a) dimension1
    z = from (-a) to (a) dimension2
    
    y = x*x - z*z
    
    s = 10
    
    x = s*x
    y = s*y
    z = s*z

    (2)猴鞍面

    #http://xuxzmail.blog.163.com/blog/static/25131916200961311531402/
    #猴鞍面  (Monkey saddle) 是数学家为猴子量身定做的一种鞍面
    
    vertices = dimension1:320 dimension2:320
    a = 1
    x = from (-a) to (a) dimension1
    z = from (-a) to (a) dimension2
    
    y = x*(x*x - 3*z*z)

    (3)狗鞍面

    #http://xuxzmail.blog.163.com/blog/static/25131916201232494954783/
    #狗鞍面的方程为:z=x*y^3-y*x^3。这是一个4次曲面。
    vertices = dimension1:320 dimension2:320
    x = from (-2) to (2) dimension1
    z = from (-2) to (2) dimension2
    y = x*(z^3)-z*(x^3)

    (4)Shoe Surface

    #http://mathworld.wolfram.com/MennsSurface.html
    
    vertices = D1:100 D2:100
    
    u = from -4 to 4 D1
    v = from -4 to 4 D2
    
    a = 0.1
    
    x = u
    z = v
    y = pow(u, 3)/3 - v*v/2

    (5)Quartoid(板凳)

    #http://mathworld.wolfram.com/Quartoid.html
    
    vertices = D1:100 D2:100
    
    u = from -10 to 10 D1
    v = from -10 to 10 D2
    
    x = u
    z = v
    y = 40 - pow(u*u + v*v, 2)*0.001

    (6)Peninsula Surface(sofa)

    #http://mathworld.wolfram.com/PeninsulaSurface.html
    
    vertices = D1:100 D2:100
    
    u = from -2 to 2 D1
    v = from -2 to 2 D2
    
    a = 0.1
    
    x = u
    z = v
    y = pow_sign(1 - u*u - pow(v, 5), 1/3)

    (7)Peano Surface

    #http://mathworld.wolfram.com/PeanoSurface.html
    
    vertices = D1:100 D2:100
    
    u = from -10 to 10 D1
    v = from -10 to 10 D2
    
    x = u
    z = v
    y = (2*u*u - v)*(v - u*u) * 0.001

    (8)Menn's Surface

    #http://mathworld.wolfram.com/MennsSurface.html
    
    vertices = D1:100 D2:100
    
    u = from -10 to 10 D1
    v = from -20 to 20 D2
    
    a = 0.1
    
    x = u
    z = v
    y = a*pow(u, 4) + u*u*v - v*v
    
    y = y/100

    (9)Handkerchief Surface

    #http://mathworld.wolfram.com/HandkerchiefSurface.html
    
    vertices = D1:100 D2:100
    
    u = from -4 to 4 D1
    v = from -4 to 4 D2
    
    a = 0.1
    
    x = u
    z = v
    y = pow(u, 3)/3 + u*v*v + 2*(u*u - v*v)
    y = y*0.1

  • 相关阅读:
    Eclipse+Java+OpenCV246人脸识别
    Eclipse+Java+OpenCV246环境搭建和代码测试
    Request对象和Response对象详解
    request与response对象详述
    request对象和response对象
    减少HTTP请求之将图片转成二进制并生成Base64编码,可以在网页中通过url查看图片(大型网站优化技术)
    base64码通过http传输 +号变 空格 问题解决
    RSA Android加密的数据服务器上无法解密?
    RSA解密时javax.crypto.BadPaddingException: Data must start with zero
    SRA解密报错:Data must start with zero
  • 原文地址:https://www.cnblogs.com/WhyEngine/p/3939111.html
Copyright © 2011-2022 走看看