2009-04-30

利用 Variable Expression 建構參數曲面

(這是前一篇文章 Parametric Surface using Variable Expression 的中文版)如果你懂得參數曲面,或者你知道如何利用參數方程式建構三維曲面,從數學軟體(如 Mathcad 或 Mathematica)轉換到 Grasshopper 的過程應該是非常容易的。舉例來說,在 Mathcad 中參數曲面的方程式看起來像是這樣子:

喜愛螺線圖形(或旋輪線圖形)的人也許對這個方程式感到似曾相識。在 Grasshopper 裡的定義則會成為這樣:

下載 Grasshopper 定義檔: paramsurf01_ch.ghx

其中我用了三個 Variable Expression (變數算式)元件分別作為 x, y, z 座標值的方程式(參數式)計算。請記得將三者的資料對應(Data matching)設為 Cross Reference(交叉配對),u 和 v 間的配對關係才會構成二維陣列。

最後產生的形體:

2009-04-29

Parametric Surface using Variable Expression

Please Note: articles in English will be moved to my new blog on grasshopper3d.

If you know parametric surface well -- or to be more specific, you know how to construct 3D surfaces using parametric equations -- it is a smooth transition from mathematical tools (such as Mathcad or Mathematica) to Grasshopper. In Mathcad, the equation for a parametric surface is:

For those who love spirograph may find it familiar. In Grasshopper, the definition looks like this:

Downloaded Grasshopper definition file: paramsurf01.ghx

In which I use Variable Expression component to hold the functions (parametric equations) for x, y, and z coordinates of the surface. Remember to set the data matching to Cross Reference so that u and v make up a 2D matrix.

And the result model of this exercise is: