找回密码
 注册
搜索
查看: 42906|回复: 30

[个人作品] 伪数学曲面

 火.. [复制链接]
发表于 2012-8-15 01:52:34 | 显示全部楼层 |阅读模式
本帖最后由 panhao1 于 2012-8-15 02:01 编辑

看了SimingMei的帖子 觉得挺好看的 于是模仿她做了个紫菜(做法大概相同吧)

http://www.grasshopper3d.com/photo/parametric-curve?context=user


其实就是2种数学曲面拼接的 一种必须是曲线曲面 另外一种随意


3.jpg

2.jpg

01.jpg



评分

参与人数 1强度 +1 照度 +9 收起 理由
cloudone + 1 + 9 很有启发!

查看全部评分

相关帖子

 楼主| 发表于 2012-8-15 01:59:43 | 显示全部楼层
打不开gh官网链接的可以看下图

QQ截图20120815015825.jpg
回复

使用道具 举报

 楼主| 发表于 2012-8-15 02:00:47 | 显示全部楼层
本帖最后由 panhao1 于 2012-8-15 02:04 编辑

QQ截图20120815013651.jpg

rhino文件
Untitled.rar (467.18 KB, 下载次数: 177, 售价: 1 lux照度)
回复

使用道具 举报

发表于 2012-8-15 08:02:55 | 显示全部楼层
厉害!!!!
回复

使用道具 举报

发表于 2012-8-15 08:05:36 | 显示全部楼层
{:07:}给力!
回复

使用道具 举报

发表于 2012-8-15 08:20:05 | 显示全部楼层
Trefoil Knot
Graphics by Paul Bourke
November 2004      x = 41 cos(u) - 18 sin(u) - 83 cos(2 u) - 83 sin(2 u) - 11 cos(3 u) + 27 sin(3 u)
y = 36 cos(u) + 27 sin(u) - 113 cos(2 u) + 30 sin(2 u) + 11 cos(3 u) - 27 sin(3 u)
z = 45 sin(u) - 30 cos(2 u) + 113 sin(2 u) - 11 cos(3 u) + 27 sin(3 u)
where 0 < u < 2 pi
回复

使用道具 举报

发表于 2012-8-15 08:21:00 | 显示全部楼层
看到这些公式,什么去用gh应用它呢  截个gh图看看,谢谢!
回复

使用道具 举报

发表于 2012-8-15 08:21:49 | 显示全部楼层
Supershapes (Superformula)
Written by Paul Bourke
March 2002
Based upon equations by Johan Gielis
Intended as a modelling framework for natural forms.


See also Superellipse and Supershape in 3D
     




--------------------------------------------------------------------------------


The supershape equation is an extension of the both the equation of the sphere and ellipse

(x / a)2 + (y / b)2 = r2
and even the superellipse given here. The general formula for the supershape is given below.



Where r and phi are polar coordinates (radius,angle). n1, n2, n3, and m are real numbers. a and b are real numbers excluding zero.

m = 0
This results in circles, namely r = 1   
n1 = n2 = n3 = 1
Increasing m adds rotational symmetry to the shape. This is generally the case for other values of the n parameters. The curves are repeated in sections of the circle of angle 2pi/m, this is apparent in most of the following examples for integer values of m.  m=1 m=2
m=3 m=4
m=5 m=6

n1 = n2 = n3 = 0.3
As the n's are kept equal but reduced the form becomes increasingly pinched.  m=1 m=2
m=3 m=4
m=5 m=6

If n1 is slightly larger than n2 and n3 then bloated forms result. The examples on the right have n1 = 40 and n2 = n3 = 10.  m=1 m=2
m=3 m=4
m=5 m=6

Polygonal shapes are achieved with very large values of n1 and large but equal values for n2 and n3.  m=3 m=4
m=5 m=6

Asymmetric forms can be created by using different values for the n's. The following example have n1 = 60, n2 = 55 and n3 = 30.  m=3 m=4
m=5 m=6

For non integral values of m the form is still closed for rational values. The following are example with n1 = n2 = n3 = 0.3. The angle phi needs to extend from 0 to 12 pi.  m=1/6 m=7/6
m=13/6 m=19/6

Smooth starfish shapes result from smaller values of n1 than the n2 and n3. The following examples have m=5 and n2 = n3 = 1.7.  n1=0.50 n1=0.20
n1=0.10 n1=0.02


Other examples

   

   

   
Source code
Given a value of phi the following function evaluates the supershape function and calculates (x,y).


void Eval(double m,double n1,double n2,double n3,double phi,double *x,double *y)
{
   double r;
   double t1,t2;
   double a=1,b=1;

   t1 = cos(m * phi / 4) / a;
   t1 = ABS(t1);
   t1 = pow(t1,n2);

   t2 = sin(m * phi / 4) / b;
   t2 = ABS(t2);
   t2 = pow(t2,n3);

   r = pow(t1+t2,1/n1);
   if (ABS(r) == 0) {
      *x = 0;
      *y = 0;
   } else {
      r = 1 / r;
      *x = r * cos(phi);
      *y = r * sin(phi);
   }
}

So it might be called as follows


   for (i=0;i<=NP;i++) {
      phi = i * TWOPI / NP;
      Eval(m,n1,n2,n3,phi,&x,&y);
      --- do something with the point x,y ---
   }

回复

使用道具 举报

 楼主| 发表于 2012-8-15 08:26:55 | 显示全部楼层
看你是啥图形引擎咯 一般源码是openGL C++源码 转译一下。。。
回复

使用道具 举报

发表于 2012-8-15 09:51:24 | 显示全部楼层
谢谢
回复

使用道具 举报

发表于 2012-8-16 00:22:17 | 显示全部楼层
这么给力。。。
回复

使用道具 举报

发表于 2012-8-16 10:02:19 | 显示全部楼层
这么给力啊
回复

使用道具 举报

发表于 2012-8-16 13:14:42 | 显示全部楼层
厉害!!!!
回复

使用道具 举报

发表于 2012-8-19 22:27:27 | 显示全部楼层
牛啊。。。
回复

使用道具 举报

发表于 2012-8-20 10:13:00 | 显示全部楼层
下来研究一下
回复

使用道具 举报

发表于 2012-8-20 11:12:20 | 显示全部楼层
做的不错啊
回复

使用道具 举报

发表于 2012-8-24 11:53:16 | 显示全部楼层
数学没学好伤不起
回复

使用道具 举报

发表于 2012-8-31 15:04:09 | 显示全部楼层
一直在找这类东西 谢谢分享
回复

使用道具 举报

发表于 2012-9-5 23:10:14 | 显示全部楼层
有ghx的文件下载么?光看编程还是不知道怎么做
回复

使用道具 举报

发表于 2012-9-7 14:53:41 | 显示全部楼层
嘿嘿 潘总这些东西 误导我走上 数学不归路 {:08:}
回复

使用道具 举报

NCFZ微信公众号

手机版|小黑屋|NCF参数化建筑论坛 ( 浙ICP备2020044100号-2 ) 辽公网安备21021102000973号

GMT+8, 2026-11-23 17:19 , Processed in 0.088335 second(s), 36 queries , Gzip On.

Powered by Discuz! X5.0 Licensed

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表