let’s make the 3d graphics20010570/mathematica/mathem… · let’s make the 3d graphics 18th...
TRANSCRIPT
![Page 1: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/1.jpg)
Let’s Make the 3D Graphics
18th May, 2019
Gakushuin University, Faculty of Economics
Prof. Yukari SHIROTA
![Page 2: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/2.jpg)
3D Plot
Plot3D[ x^0.2 * y^0.6, {x, 0, 20}, {y, 0, 20}, PlotRange -> {0, 10}]
![Page 3: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/3.jpg)
3D Plot with other options
Plot3D[ x^0.2 * y^0.6, {x, 0, 20}, {y, 0, 20}, PlotRange -> {0, 10},
BoxRatios -> 1, PlotStyle -> {Opacity[0.7], Green},
AxesLabel -> {"Hamburger", "Orange squash", "Utility"},
ImageSize -> 200]
![Page 4: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/4.jpg)
Pallet for special characters from the menu
![Page 5: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/5.jpg)
Conduct the Lagrange method.Definition of Lagrange function:
F[x_,y_,λ_]:=x0.2 * y0.6+λ (M-(P1 x+P2 y));
![Page 6: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/6.jpg)
Partial differentiation
• Set of equations
![Page 7: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/7.jpg)
Conduct the Lagrange method.
We can get the 5 answers. We will use the first real number one.
![Page 8: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/8.jpg)
Select the first answer by First command
![Page 9: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/9.jpg)
Replace {x,y,u} by the first answer
Then pts definition
We will use the pts definition repeatedly.
Replace a variable with a value:
/.
pts:=0.25𝑀
P1,0.75𝑀
P2, 0.637712
𝑀
P1
0.2𝑀
P2
0.6
![Page 10: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/10.jpg)
Calculate intersection.
M=2900; P1=130; P2=170;
zvals=Table[{xx, (M/P2-xx*P1/P2), xx0.2 * (M/P2-xx*P1/P2)0.6}, {xx,0,20}]
This is the result.21 points
Let’s draw the points.
![Page 11: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/11.jpg)
Draw the 21 points.
M=2900;P1=130;P2=170;
zvals=Table[{xx,(M/P2-xx*P1/P2),xx0.2*(M/P2-xx*P1/P2)0.6}, {xx,0,20}]
ListPointPlot3D[zvals, PlotStyle->Red]
![Page 12: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/12.jpg)
ShowDisplay several items at the same time.
Show[AAAAAA,BBBBBB,CCCCCC]
![Page 13: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/13.jpg)
U’ s contour
From 0.5 to 20 by a step 0.1
• Given x and U
• Unknown y
𝑦 =𝑢𝑣𝑎𝑙
53
𝑥13
![Page 14: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/14.jpg)
U’ s contour• Maximum point
pts[[3]] is
Find the u’s contour curve
From 0.5 to 20 by a step 0.1
![Page 15: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/15.jpg)
Budget Restriction Plane &Maximum point noted by Arrow
Graphics3D[{Polygon[{{0,M/P2,0},{M/P1,0,0},{M/P1,0,10},{0,M/P2,10},{0,M/P2,0}}],
Arrow[{pts-{2,2,0}, pts}]]
2 graphics items
(1) Polygon
(2) Arrow
The arrow vector is set to be {2,2,0}.
![Page 16: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/16.jpg)
Plane &Arrow
![Page 17: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/17.jpg)
Manipulatesmall test
![Page 18: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/18.jpg)
Change M, P1 and P2 by using slidersManipulate
Repeated part
M with the initial value 3000 of which range is from 100 to 5000 by step 100
![Page 19: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/19.jpg)
Final combine of all parts
• Remove M=2900; P1=130; P2=170;so that the Manipulator can change the values
![Page 20: Let’s Make the 3D Graphics20010570/MATHEMATICA/mathem… · Let’s Make the 3D Graphics 18th May, 2019 Gakushuin University, Faculty of Economics Prof. Yukari SHIROTA](https://reader031.vdocuments.mx/reader031/viewer/2022041000/5ea00fef304f8f757518a7e0/html5/thumbnails/20.jpg)
Drill
• Change the target function to 𝑥 + 𝑦
• When you are making the drill program, please close the other manipulation program, because in Mathematica variables may be affected by other program variables.