【grasshopper】【犀流堂】【算法】Anemone雨水径流模拟-笔记

文章目录

Anemone雨水路径模拟

image-20230716090832552

image-20230716092956754

本文是一篇学习笔记,课程来自于【【犀流堂】100GH运算器详解】及知乎大佬的文章,原文如下。

Anemone雨水路径模拟https://www.rhinostudio.cn/course/1529/task/2795/show

Y原创 | 利用循环电池Anemone模拟雨水流向https://mp.weixin.qq.com/s/Q3-9D8N9wbfmfiZ3F-RmYg

第169期-Anemone循环学习笔记①https://mp.weixin.qq.com/s/7F4vHeHi8bs4NUjNbhFvoA

available options可用选项

  • 粒子模拟
  • 3dmax物理模型
  • grasshopper面切线

grasshopper面切线几何原理

image-20230716093452780

循环,让每一个点``每次在他当前的位置都去找一下他像该向哪个方向流

然后将这个点投影到原来曲面上

2023-07-16_14-35-07

案例1:surface地形

1. 拾取地形曲面surface

2. 曲面上根据divide surface划分点points

image-20230716105352137

3.将曲面上的划分点用surface closest point投影到曲面上

image-20230716105446076

曲面进行投影投影之后呢会得到每一个点在曲面上的uv坐标,也就是曲面的二维坐标系

image-20230716105557886

frame:点在曲面上的切面

frame:点在曲面上的切面

切面,我们已经得到了,但是呢现在每一个切面,它的方向都是曲面的uv方向。

image-20230716110106797

4.align plane旋转平面x轴与世界Z夹角最小

image-20230716114341036


image-20230716122729645

指定法向,旋转平面的X轴,与指定方向夹角最小

将本地的视频上传到阿里云

  • https://oss.console.aliyun.com/bucket
  • picgo u “C:\Users\myearning\AppData\Roaming\Typora\typora-user-images\image-20230501212248235.png”

这个命令是用 PicGo 上传一个名为 image-20230501212248235.png 的图片。该图片位于您的 Typora 编辑器的用户图片文件夹中。

根据命令的格式,picgo 是 PicGo 的命令行工具,uupload 的缩写,用于上传文件。而 "C:\\Users\\myearning\\AppData\\Roaming\\Typora\\typora-user-images\\image-20230501212248235.png" 则是您要上传的图片的本地路径。

当您在命令行中执行这个命令时,PicGo 将会读取该文件,然后将其上传到您预设的图片上传器中,例如阿里云 OSS、七牛云等。

5.沿着面的向下negative方向移动点

  • 对工作平面解析并旋转x轴为沿平面,与-z最小
  • 移动上一步的点

image-20230716123807052

case:有些点会移出到曲面之外

image-20230716125031789

通用方法:surface closes point所有点拉回到曲面

6.接入数据循环

image-20230716125927064

image-20230716130059701

指定15次循环

默认不record记录数据历史

2023-07-16_13-04-31

record记录数据历史

image-20230716130530794

2023-07-16_13-06-37

7.数据结构处理——生成径流线

原来数据结构——每步一组

image-20230716130852174

  • 15次循环,分了15个组
  • 每组里是每次位移之后,在平面上的点

image-20230716131536891

flip matrix翻转矩阵——每条径流一组

image-20230716144409596

案例2:mesh地形

surface 和 mesh 是rhino中完全独立的几何模式

1. 拾取地形网格mesh

image-20230716145330852

2. 网格上几何填充populate geometry 随机布置点

image-20230716145552356

image-20230716145740016

3.生成地形等距断面线

4.mesh closest points 点在网格上投影 | mesh eval网格计算得到网格质心和法向量

image-20230716174014263

image-20230716175445470

Mesh Closest Point

IMAGE

This component will calculate the position on a mesh that is closest to a given point. This component outputs three pieces of data: the coordinates of the calculated point on the mesh, the index of the face which contains that point, and the mesh parameter. This parameter is extremely useful in conjunction with the Mesh Eval component discussed below.

这个组件将计算网格上最接近给定点的位置。该组件输出三部分数据:计算点在网格上的坐标,包含该点的面索引和网格参数。该参数在与下面讨论的Mesh Eval组件结合使用时非常有用。

IMAGE

  1. Given a point in space, We want to find the closet point on the mesh

  2. The face that contains the closest point is identified

  3. The parameters of the closest point on the face are calculated

  4. 给定空间中的一个点,我们想要找到网格上的最近点

  5. 包含最近点的mesh面被识别

  6. 计算出曲面上最近点的参数

For those users interested in a little more detail about how a mesh is parameterized, we can take a closer look at how a mesh parameter is structured. You can see this structure by attaching a panel to the parameter output of a Mesh Closest Point component. The mesh parameter has the form: N[A,B,C,D]. The first number, N, is the index of the face which contains the calculated point.

对于那些对网格参数化细节感兴趣的用户,我们可以仔细看看网格参数是如何结构的。你可以通过将面板附加到Mesh nearest Point组件的参数输出来看到这个结构。网格参数形式为:N[A,B,C,D]。第一个数字N是包含计算点的面的索引

The following four numbers define the barycentric coordinates of the point within that face. The coordinates of the referenced point can be found by multiplying each vertex of the face by these numbers in order and then add the results together. (Of course, this is already done for us, and is given in the Point output). Also note that barycentric coordinates are only unique for triangular faces, meaning that on a quad face the same point could have multiple different parameterizations. Grasshopper avoids this problem by internally triangulating a quad face when calculating a parameter, the result of which is that of the four numbers in a mesh parameter, at least one of them will always be zero.

下面四个数字定义了该面内点的“质心”的坐标。参考点的坐标可以通过将面部的每个顶点按顺序乘以这些数字来找到,然后将结果相加。(当然,这已经为我们完成了,并且在Point输出中给出了)。还要注意,质心坐标仅对三角形面是唯一的,这意味着在四边形面上相同的点可以有多个不同的参数化。Grasshopper通过在计算参数时对一个四边形进行内部三角化来避免这个问题,其结果是网格参数中的四个数字,其中至少有一个总是零

IMAGE

Barycentric Coordinates

Mesh Eval

IMAGE

The Mesh Eval component uses a mesh parameter as an input and returns the referenced point, as well as the normal and color at that point. The color and normal are calculated as interpolations of the vertex colors and vertex normals, using the same barycentric coordinates as the mesh parameter.

Mesh Eval组件使用网格参数作为输入,并返回参考点,以及该点的法线和颜色。颜色和法线作为顶点颜色和顶点法线的插值计算,使用与网格参数相同的质心坐标。

6.用mesh eval得到的质心点+法线,使用Plane normal构造工作平面

image-20230716183041711

  • 工作平面与网格相切

7. 工作平面x-axis转到与z轴夹角最小,negative 反向

image-20230716185513649

8.移动点并投影到mesh上(mesh closest point同时可以防止移出)

9.Record,Flap Matrix,Poly line连线

image-20230716190146796

2023-07-16_19-03-39

10.地形着色

bounding box获得地形的三维范围

image-20230716201235688

image-20230716191054134

Mesh spray 1:沿两个点之间的mesh,指定颜色渐变

image-20230716202410374

image-20230716203427634

Mesh spray 2:沿多个点之间的mesh,指定色彩渐变器渐变

image-20230716202909812

Gradient色彩渐变

image-20230716203727698

Gradient案例1——根据长度

image-20230716203915758

Gradient案例2——根据面积

image-20230716204108400

Gradient案例3

image-20230716204954225

11.拆解网格——更通用的方法

以上的沿bounding box的edge,因高度较小,着色均不明显。

image-20230716211132532

image-20230716211301824

image-20230716211429475

图纸绘制插件human

【food4Rhino】https://www.food4rhino.com/en/app/human

从Rhino+Grasshopper显示模式说起——如何用Rhino绘制各式图纸(三)Grasshopper 显示相关电池与插件

https://zhuanlan.zhihu.com/p/503702789

循环程序插件 Anemone

在GH中,原生电池是不支持任何形式的循环的:

【food4Rhino】https://www.food4rhino.com/en/app/anemone

代替Hoopsnake的新循环器----Anemone!! 发布于 2014-3-19 36 点赞 334 评论 114415 浏览https://www.xuexiniu.com/thread-65174-1-1.html

林师兄的汉化-海葵(Anemone)04
更新时间 : 2017-07-10 程序/插件下载https://www.xuexiniu.com/thread-130981-1-1.html

image-20230716111726372

extended. fitness landscape 景观舒适度——地形着色工具

image-20230716205659483

image-20230716205838291

几个电池原理查看工具

官网教程grasshopper primer

image-20230716152022171

http://grasshopperprimer.com/en/1-foundations/1-6/1_What%20is%20a%20Mesh.html

https://github.com/modelab/grasshopper-primer/tree/master/en

  • 其中github可获得markdown格式原文档

Grasshopper 中文版运算器详解2022(中英文对照)

image-20230716174219343

https://www.bilibili.com/video/BV1rZ4y1U76A/?spm_id_from=333.337.search-card.all.click&vd_source=03f46161f85a0a5c828c31ed7544a9e7

同类大佬作品

Y原创 | 利用循环电池Anemone模拟雨水流向

原创 Y [Y的学习笔记](javascript:void(0)😉 2021-07-15 20:30

img

img

img

img

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
Grasshopper插件大全是指包含了所有与Grasshopper相关的插件的集合。Grasshopper是Rhino 3D建模软件的插件,它是一种可视化编程工具,用于创建和修改三维模型。通过使用Grasshopper插件,用户能够扩展Rhino的功能,实现更复杂和高级的设计和建模任务。 Grasshopper插件大全通常包含了各种各样的扩展组件,用于添加新的功能和工具到Grasshopper的用户界面。这些插件可以帮助用户实现各式各样的设计需求,如参数化设计、算法设计、结构优化、形态生成、仿真分析等。 在Grasshopper插件大全中,可以找到各式各样的分类,如数学建模插件,用于实现数学函数和方程的计算和显示;形态生成插件,用于生成复杂的形状和曲线;参数化设计插件,用于实现基于参数的设计和自动化;物理仿真插件,用于模拟物理现象和行为;结构优化插件,用于优化建筑结构的效能等等。 通过安装和使用Grasshopper插件大全,用户可以根据自己的需求选择适合的插件,轻松扩展和定制Grasshopper的功能。这些插件提供了更多的建模工具和算法,可以大大提高设计师和工程师的工作效率,并且使其能够更加灵活和创造性地处理复杂的设计任务。 总的来说,Grasshopper插件大全是一个非常有用和强大的资源,为用户提供了丰富的功能和工具,使其能够更好地应对各种设计和建模需求。无论是初学者还是专业人士,都可以从中找到满足自己需求的插件,并且通过应用它们来实现更好的设计和创意。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

hmywillstronger

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值