Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

3D graphics, contour plot and labels

This code works perfectly

 w, w1, w2, p, a=var('w w1 w2 p a')
Uf1(w,a)= w^a # La fonction doit être fonction de ses variables et paramètres
a=.6
p=0.5
G3D1 = plot3d(p * Uf1(w1,a) + (1-p)* Uf1(w2,a),(w1,0.0001,5),(w2,0.0001,5), frame=False, color='wheat',
              opacity=0.6)
G3D1+= arrow3d((0,0,0), (5,0,0), color='green')
G3D1+= arrow3d((0,0,0), (0,5,0), color='green')
G3D1+= arrow3d((0,0,0), (0,0,3), color='green')
G3D1+= text3d("$U(w)= w^a$", (1,2,3), color=(0.5,0,0))
contour_plot(p * Uf1(w1,a) + (1-p)* Uf1(w2,a), (w1,0,5),(w2,0,5))

show(G3D1,viewer='threejs')
contour_plot(p * Uf1(w1,a) + (1-p)* Uf1(w2,a), (w1,0,5),(w2,0,5))

I have 4 questions

1) is it possible to include latex text in a 3D setting ? 2) is it possible to label the axes (preferably in the same way) ? 3) is it possible to combine the coutour_plot on the surface ? 4) is it possible to project the coutour_plot on (x, y) plane? 3) is it possible to project the coutour_plot on the (x, y) plane ? 4)

3D graphics, contour plot and labels

This code works perfectly

 w, w1, w2, p, a=var('w w1 w2 p a')
Uf1(w,a)= w^a # La fonction doit être fonction de ses variables et paramètres
a=.6
p=0.5
G3D1 = plot3d(p * Uf1(w1,a) + (1-p)* Uf1(w2,a),(w1,0.0001,5),(w2,0.0001,5), frame=False, color='wheat',
              opacity=0.6)
G3D1+= arrow3d((0,0,0), (5,0,0), color='green')
G3D1+= arrow3d((0,0,0), (0,5,0), color='green')
G3D1+= arrow3d((0,0,0), (0,0,3), color='green')
G3D1+= text3d("$U(w)= w^a$", (1,2,3), color=(0.5,0,0))
contour_plot(p * Uf1(w1,a) + (1-p)* Uf1(w2,a), (w1,0,5),(w2,0,5))

show(G3D1,viewer='threejs')
contour_plot(p * Uf1(w1,a) + (1-p)* Uf1(w2,a), (w1,0,5),(w2,0,5))

I have 4 questions

1) is it possible to include latex text in a 3D setting ? 2) is it possible to label the axes (preferably in the same way) ? 3) is it possible to combine the coutour_plot on the surface ? 4) is it possible to project the coutour_plot on (x, y) plane? 3) is it possible to project the coutour_plot on the (x, y) plane ? 4)plane?

3D graphics, contour plot and labels

This code works perfectly

 w, w1, w2, p, a=var('w a = var('w w1 w2 p a')
Uf1(w,a)= Uf1(w, a) = w^a  # La fonction doit être fonction de ses variables et paramètres
a=.6
p=0.5
G3D1 = plot3d(p a = 0.6
p = 0.5
f = p * Uf1(w1,a) Uf1(w1, a) + (1-p)* Uf1(w2,a),(w1,0.0001,5),(w2,0.0001,5), (1 - p) * Uf1(w2, a)
G3D1 = plot3d(f, (w1, 1e-4, 5), (w2, 1e-4, 5), frame=False, color='wheat',
              color='wheat', opacity=0.6)
G3D1+= arrow3d((0,0,0), (5,0,0), G3D1 += arrow3d((0, 0, 0), (5, 0, 0), color='green')
G3D1+= arrow3d((0,0,0), (0,5,0), G3D1 += arrow3d((0, 0, 0), (0, 5, 0), color='green')
G3D1+= arrow3d((0,0,0), (0,0,3), G3D1 += arrow3d((0, 0, 0), (0, 0, 3), color='green')
G3D1+= text3d("$U(w)= G3D1 += text3d("$U(w) = w^a$", (1,2,3), color=(0.5,0,0))
contour_plot(p * Uf1(w1,a) + (1-p)* Uf1(w2,a), (w1,0,5),(w2,0,5))

show(G3D1,viewer='threejs')
contour_plot(p * Uf1(w1,a) + (1-p)* Uf1(w2,a), (w1,0,5),(w2,0,5))
(1, 2, 3), color=(0.5, 0, 0))
contour_plot(f, (w1, 0, 5), (w2, 0, 5))

show(G3D1, viewer='threejs')
contour_plot(f, (w1, 0, 5), (w2, 0, 5))

I have 4 questions

1)

  1. is it possible to include latex text in a 3D setting ? 2) setting?
  2. is it possible to label the axes (preferably in the same way) ? 3) way)?
  3. is it possible to combine the coutour_plotcontour_plot on the surface ? 4) surface?
  4. is it possible to project the coutour_plotcontour_plot on (x, y) plane?

3D graphics, contour plot and labels

This code works perfectly

w, w1, w2, p, a = var('w w1 w2 p a')
Uf1(w, a) = w^a  # La fonction doit être fonction de ses variables et paramètres
a = 0.6
p = 0.5
f = p * Uf1(w1, a) + (1 - p) * Uf1(w2, a)
G3D1 = plot3d(f, (w1, 1e-4, 5), (w2, 1e-4, 5), frame=False, color='wheat', opacity=0.6)
G3D1 += arrow3d((0, 0, 0), (5, 0, 0), color='green')
G3D1 += arrow3d((0, 0, 0), (0, 5, 0), color='green')
G3D1 += arrow3d((0, 0, 0), (0, 0, 3), color='green')
G3D1 += text3d("$U(w) = w^a$", (1, 2, 3), color=(0.5, 0, 0))
contour_plot(f, (w1, 0, 5), (w2, 0, 5))

show(G3D1, viewer='threejs')
contour_plot(f, (w1, 0, 5), (w2, 0, 5))

I have 4 questions

  1. is it possible to include latex text in a 3D setting?
  2. is it possible to label the axes (preferably in the same way)?
  3. is it possible to combine the contour_plot on the surface?
  4. is it possible to project the contour_plot on (x, y) plane?

3D graphics, contour plot and labels

This code works perfectly

w, w1, w2, p, a = var('w w1 w2 p a')
Uf1(w, U(w, a) = w^a  # La fonction doit être fonction de ses variables et paramètres
a = 0.6
p = 0.5
f = p * Uf1(w1, U(w1, a) + (1 - p) * Uf1(w2, U(w2, a)
G3D1 G = plot3d(f, (w1, 1e-4, 5), (w2, 1e-4, 5), frame=False, color='wheat', opacity=0.6)
G3D1 G += arrow3d((0, 0, 0), (5, 0, 0), color='green')
G3D1 G += arrow3d((0, 0, 0), (0, 5, 0), color='green')
G3D1 G += arrow3d((0, 0, 0), (0, 0, 3), color='green')
G3D1 G += text3d("$U(w) = w^a$", (1, 2, 3), color=(0.5, 0, 0))

show(G3D1, show(G, viewer='threejs')
contour_plot(f, (w1, 0, 5), (w2, 0, 5))

I have 4 questions

  1. is it possible to include latex text in a 3D setting?
  2. is it possible to label the axes (preferably in the same way)?
  3. is it possible to combine the contour_plot on the surface?
  4. is it possible to project the contour_plot on (x, y) plane?