# Copy and paste a matematic formula

Hi!
I’m just beginning to learn from zero Grasshopper.
I know maybe it’s not the best way, but, as i’d like to create an object with mathematic formula:

x=ucos (v)
y= u
sin (u)
z= c*v

I’d like to know step by step where, and how i can write this on grasshopper, please?

It’s a tutorial on youtube, the link is:

Thanks so much!

You create a new Expression object (it’s in the Maths.Script panel), rename the inputs `u` and `v`, and then type `u * cos(v)` in the expression field. You can only have single equation per expression component, but since you’re making coordinates you could combine it all into one. For this you’ll have to zoom in on the expression inputs, add one, rename it to `c` and then type the following expression:

``````{u * Cos(v), v * Sin(u), c * v}
``````

This will create a point coordinate from x, y, z values.

1 Like

Hi David! Thanks so much! Sorry… i’m beginning from zero!
Is it ok what i have done, showing here my screenshots?
Here i’m at 4min56 of the video tutorial, the thing is maybe i did a mistake, because the pannel i created is in red, and so, i think it’s showing a problem, no?
Thanks so much!!

I don’t see any wires connected to the Expression inputs? Click the little box at the upper right corner of the red component to read the error message.

2 Likes

As @Joseph_Oster said, you haven’t put any numbers into the u, v, and c inputs, and Cos, Sin and * aren’t defined for null values.

1 Like

Hi Joseph! Thanks so much!

Hi David! Thanks so much!

Hi!
Thanks so much for help me!
Now, it’s ok!
As you can see on the picture here!
Only that the line on the bottow is a try i do, in order to create a shell, frm the formula. As you see, i think i made a mistake, it doesn’t work, i don’t know why!
I would like to create two other surfaces from mathematic formulas: shell and elliptic hyperbole. For this, now, i will create two new topics on the forum. As i put on my screenshot, i think i made mistakes, because it doesn’t work! Thanks so much!

Post file… Btw you opened 3 threds on nearly the same question.

1 Like

Hi Tim! Sorry!