How should I write this mathematical definition in rhinoscript

How should I write this mathematical definition in rhinoscript
so that it works and to be able to see the graph on the Rhino screen?
{(u, v) | 0 ≤ u ≥ 2π, 0 ≤ v ≥ π}
x = sin (v) cos (u)
y = sin (v) sin (u)
z = cos (v)

It is to obtain a geometric shape
from that mathematical formula … but it always gives me an error.
Help
Thanks

For future reference, it would be easier to help if you would provide the code you are using and show the error message you are getting.

This is one way to solve this in grasshopper (with components and python):

math_definition_re.gh (8.5 KB)

This could be simplified since your u-value is 2 times your v-value, but I left it as is to allow using different values for u and v.

-Kevin

Thanks!
…………