Negativeコンポーネントの使い方について解説します。


グラスホッパー上では上の2つのどちらかで表されます。
数値に-1をかける
Negativeは、数値に-1をかけるので、正負が逆になります。

今回は10の数値にNegativeコンポーネントをつなげました。
その結果、10が-10になりました。

今度は-10をNegativeにつなげてみましょう。
すると、-10が10になりました。
このように、正負が逆になることが分かりました。
向きを反転するのに使われることが多い
よく使われる使用例として、Negativeは、向きを反転するのに使われることが多いです。

使用コンポーネント:①Rectangle ②Surface ③Negative ④Unit Z ⑤Extrude
四角形を作成し、Extrudeで厚みを付け、角柱を作成するプログラムを用意しました。
1つの角柱は、Negativeで押し出される方向が逆になるようになっています。

このように、Negativeを使用して正負を反対にすることで、厚みを作る方向を反転します。
Negativeコンポーネントを使用しているグラスホッパー記事はこちら↓
Comment