2
$\begingroup$

I am looking to plot math functions in Blender using the Z function surface Add-On.

It works great for functions such as:

1/x**2

But fails for functions like:

1/x**X

which gives error:

Error evaluating expression: 1/( x**x ) (Check the console for more info)

The console shows:

TypeError: can't convert complex to float

...despite Google and Wolfram Alpha being able to plot these easily:

enter image description here

$\endgroup$

1 Answer 1

3
$\begingroup$

You can wrap your expression in parens add a .real or .imag to get the real or imaginary part, e.g. (1/(x**x)).real.

$\endgroup$
1
  • $\begingroup$ Beautiful. Thank you. $\endgroup$
    – Cybernetic
    Commented May 21, 2020 at 13:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .