I want to create a custom node that can do complex math such as julia sets. I’ve tried using the script node in cycles, but I can’t even get a simple bit of code to work. the script is just a test. I know I can do the same thing with math nodes. this is just a test to make sure I know what I am doing before I move on to more complex things that the math nodes can’t do.

here’s the code I used:

```
shader Sphere(
float X = 0,
float Y = 0,
float Z = 0,
output float X_out = 0,
output float Y_out = 0,
output float Z_out = 0)
{
X_out = X*X;
Y_out = Y*Y;
Z_out = Z*Z;
}
```

can someone either link a guide on how to do math in a script node or tell me what I am doing wrong.