Hello guys,

I struggle a bit to use the `expression`

component…

Someone can enlighten me ? Rules, how to, etc

Regards

-CC

Hello guys,

I struggle a bit to use the `expression`

component…

Someone can enlighten me ? Rules, how to, etc

Regards

-CC

It’s the same as VBScript, but with a bunch of extra notation (squares, cubes, factorials, mathematical constants, point/vector notation). The dialog @ivelin.peychev linked contains all the functions you can use. The buttons in the expression editor show you some of the other features.

Hello guys,

I already saw this tab with all the functions… I understand words… but I cannot make phrases.

So I must learn VBscripting in order to correctly use the Expression component ?

-CC

learn Python instead and refrain using Expression

Well, the maths part of VB is pretty standard. Addition is like `1+2`

, multiplication `2*3`

, exponentiation `3^4`

. Invoke functions using their name `Sin(6)`

or `Sqrt(12)`

, text is entered with double quotes `"Hello Scripting"`

. If you have a specific question someone can type up an example.

The major difference between Expressions and VBscript is that expression only allow you to enter a single statement. So no variable declaration or ifs or loops. It’s really very limited, but that often suffices.

Here’s an example where I simply couldn’t work it out with the expression component:

This is the equation of the Wigley Hull.

How can I get the points coordinates.

You can also input a point, a color (automatic conversion to the cube {-1,-1,-1} {1,1,1} and you can access each component of the vector with vector.X, …

Thanks @lando.schumpich,

, I was trying to use cross-reference with the outputs of the expression component not the input.

Yeah that setup pretty much works for all parametric equations, its even easier if its not such a pesky `+-`

equation as you don’t need the second expression component

1 Like