Restrict a function in 3D view

Drako shared this question 1 year ago
Answered

Hello,


I need restrict this function:


  1. z=1-x^2

in the intervals

  1. 0<=x<=1
  2. 0<=y<=2

But, I get a error when I use the function if.

please, help me

Comments (7)

photo
1

Hi,


z=If[0<=x<=1&&0<=y<=2,1-x^2]


works for me... what exactly did you type in?


Cheers,

Zbynek

photo
1

Thanks, its work, my error was the logic connection "and". I didn't know the correct form.

photo
photo
1

Will the If() command work in 3D only when the function is stated explicitly? I have tried

If(0<=x<=85, (x-z)^2 + y^2 = z^2) and

If(0<=x<=85 && z>=0, (x-z)^2 + y^2 = z^2)

but get an input error. I don't require any restriction on y.

photo
1

you can not use a condition on z for 3D surface at this moment

in your case you can try if(0<=x,(x^2+y^2)/(2x))

photo
1

Thanks mathmagic. So z has to be expressed explicitly in terms of x & y. Is it possible to restrict the surface by restricting the values of z, say 76<z<114?

photo
1

first define a(x,y)=(x^2+y^2)/(2x) then if(76<=a(x,y)<=114,a(x,y))

I think better if you can parametrize the function and use surface() because you can have a problem with discontinuity

photo
1

in your case you have horizontal circles centred in (z,0,z)

surface(u+ucos(v),u sin(v),u,76,114,v,0,2 pi)

© 2018 International GeoGebra Institute