6
$\begingroup$

What do you type into Z Math Surface to get the function of log (x).

I tried 'log x' and 'log(x)' with no success.

$\endgroup$
1

2 Answers 2

8
$\begingroup$

The problem is that the surface is evaluated over positive and negative values, and log is undefined for negative values. If you look in the console, you'll see that when you use log in your equation (for instance: log(x)+log(y), you'll get the following error: enter image description here

If you square the values of x and y, though, there will be no negative values and the equation works: enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you so very much! $\endgroup$
    – Theart Guy
    Commented Jul 12, 2021 at 10:33
7
$\begingroup$

Shift the domain.

As explained the domain of log(x) is for x > 0 Related using XYZ surface and setting a default when undefined

$\log(x)$ is asymptotic towards x = 0. ie

$$\lim_{x \to 0} \log(x) = -\infty$$

If the equation z = 0 is used the domain of x and y used by the operator is [-1, 1], (default size 2, 2) hence can shift to x, y > 0 domain by replacing

x with x + 1.00001
y with  y + 1.00001

or taking operator size property into account, x has the domain [-x_size / 2, x_size / 2]

So to plot log(x) * log(y) on size 10 * 20, on the positive x, y quadrant use

log(x + 5.00001) * log(y + 10.00001)

May wish to move the resulting mesh, in EDIT mode by selecting all and shifting 5.00001 in x and 10.00001 in y, such that the mesh origin (0, 0, 0) is x, y origin

$\endgroup$

You must log in to answer this question.

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