Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
6 views
2 pages
Python MT
Uploaded by
muhammad komail
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF, TXT or read online on Scribd
Download now
Download
Save PYTHON MT For Later
Download
Save
Save PYTHON MT For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
6 views
2 pages
Python MT
Uploaded by
muhammad komail
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF, TXT or read online on Scribd
Download now
Download
Save PYTHON MT For Later
Carousel Previous
Carousel Next
Download
Save
Save PYTHON MT For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 2
Search
Fullscreen
import numpy as np def eq5_z(x, y):
import matplotlib.pyplot as plt return -y**2
from mpl_toolkits.mplot3d import Axes3D
def eq6_z(x, y):
def plot_3d_surface(x_range, y_range, z_func, return 1 - y**2
title):
""" def eq7_z(x, y):
Function to plot 3D surface for a given return x**2 + y**2
equation z = f(x, y)
def eq8_z(x, y):
:param x_range: Tuple containing (x_min, return x**2 + 2*y**2
x_max)
:param y_range: Tuple containing (y_min, # Plot the equations with their respective ranges
y_max) # 9x^2 + 4y^2 + 36z^2 = 36
:param z_func: A function that calculates z plot_3d_surface((-2, 2), (-2, 2), eq1_z, "9x^2 +
from x and y 4y^2 + 36z^2 = 36")
:param title: Title for the graph
""" # 9y^2 + z^2 = 16
x = np.linspace(x_range[0], x_range[1], 400) plot_3d_surface((-4/3, 4/3), (-4/3, 4/3), eq2_z,
y = np.linspace(y_range[0], y_range[1], 400) "9y^2 + z^2 = 16")
X, Y = np.meshgrid(x, y)
Z = z_func(X, Y) # 4y^2 + x + z^2 = 4
plot_3d_surface((-2, 2), (-2, 2), eq3_z, "4y^2 + x +
fig = plt.figure() z^2 = 4")
ax = fig.add_subplot(111, projection='3d')
ax.plot_surface(X, Y, Z, cmap='viridis') # x^2 + y^2 - z^2 = 1
ax.set_title(title) plot_3d_surface((-2, 2), (-2, 2), eq4_z, "x^2 + y^2
ax.set_xlabel('x-axis') - z^2 = 1")
ax.set_ylabel('y-axis')
ax.set_zlabel('z-axis') # z + y^2 = 0
plt.show() plot_3d_surface((-2, 2), (-0.5, 2), eq5_z, "z + y^2
= 0")
# Define functions for each equation, using
np.maximum to avoid negative values inside the # z = 1 - y^2
square root plot_3d_surface((-2, 2), (-2, 2), eq6_z, "z = 1 -
def eq1_z(x, y): y^2")
return np.sqrt(np.maximum(0, (36 - 9*x**2 -
4*y**2) / 36)) # z = x^2 + y^2
plot_3d_surface((-3, 3), (-3, 3), eq7_z, "z = x^2 +
def eq2_z(x, y): y^2")
return np.sqrt(np.maximum(0, 16 - 9*y**2))
# z = x^2 + 2y^2 with different limits
def eq3_z(x, y): plot_3d_surface((-3, 3), (-3, 3), eq8_z, "z = x^2 +
return np.sqrt(np.maximum(0, 4 - 4*y**2 - x)) 2y^2, (-3 <= x <= 3, -3 <= y <= 3)")
plot_3d_surface((-1, 1), (-2, 3), eq8_z, "z = x^2 +
def eq4_z(x, y): 2y^2, (-1 <= x <= 1, -2 <= y <= 3)")
return np.sqrt(np.maximum(0, x**2 + y**2 - 1)) plot_3d_surface((-2, 2), (-2, 2), eq8_z, "z = x^2 +
2y^2, (-2 <= x <= 2, -2 <= y <= 2)")
plot_3d_surface((-2, 2), (-1, 1), eq8_z, "z = x^2 +
2y^2, (-2 <= x <= 2, -1 <= y <= 1)")
You might also like
Engineers Guide To MATLAB 3rd Edition Magrab Solutions Manual - Download PDF
PDF
100% (2)
Engineers Guide To MATLAB 3rd Edition Magrab Solutions Manual - Download PDF
49 pages
Engineers Guide To MATLAB 3rd Edition Magrab Solutions Manual download
PDF
100% (2)
Engineers Guide To MATLAB 3rd Edition Magrab Solutions Manual download
52 pages
Engineers Guide To MATLAB 3rd Edition Magrab Solutions Manual pdf download
PDF
100% (1)
Engineers Guide To MATLAB 3rd Edition Magrab Solutions Manual pdf download
51 pages
Advanced CAD-Surfaces
PDF
No ratings yet
Advanced CAD-Surfaces
186 pages
Intensive Care Chart Malaysia
PDF
100% (2)
Intensive Care Chart Malaysia
1 page
Engineers Guide To MATLAB 3rd Edition Magrab Solutions Manual - Download Instantly To Explore The Full Content
PDF
100% (2)
Engineers Guide To MATLAB 3rd Edition Magrab Solutions Manual - Download Instantly To Explore The Full Content
46 pages
Python Program For 3D Surface Graph
PDF
No ratings yet
Python Program For 3D Surface Graph
1 page
Engineers Guide To MATLAB 3rd Edition Magrab Solutions Manual download
PDF
100% (1)
Engineers Guide To MATLAB 3rd Edition Magrab Solutions Manual download
44 pages
Effects-of-Bank-Charges-on-Banks
PDF
No ratings yet
Effects-of-Bank-Charges-on-Banks
12 pages
E Record
PDF
No ratings yet
E Record
50 pages
Lab Record 2018-19 Mathematical Models Using Python Programming MAT451 Name: Yamuna.A Reg No:1740370
PDF
No ratings yet
Lab Record 2018-19 Mathematical Models Using Python Programming MAT451 Name: Yamuna.A Reg No:1740370
32 pages
Graphics DA 3
PDF
No ratings yet
Graphics DA 3
23 pages
Three Dimensional Concepts
PDF
No ratings yet
Three Dimensional Concepts
52 pages
Engineers Guide To MATLAB 3rd Edition Magrab Solutions Manualinstant download
PDF
100% (5)
Engineers Guide To MATLAB 3rd Edition Magrab Solutions Manualinstant download
43 pages
L1 Functions of Several Variables Kmutt
PDF
No ratings yet
L1 Functions of Several Variables Kmutt
62 pages
3.3D_graph_plotting[1]
PDF
No ratings yet
3.3D_graph_plotting[1]
23 pages
02 practicle bar graphs
PDF
No ratings yet
02 practicle bar graphs
20 pages
Matlab
PDF
No ratings yet
Matlab
4 pages
Prac2-8869
PDF
No ratings yet
Prac2-8869
6 pages
Yash Python Practical 2 = 3D Graph - Jupyter Notebook
PDF
No ratings yet
Yash Python Practical 2 = 3D Graph - Jupyter Notebook
15 pages
3D GRAPH - batch 1
PDF
No ratings yet
3D GRAPH - batch 1
11 pages
Against The Dark Master
PDF
100% (2)
Against The Dark Master
109 pages
lab 3D plotting-1
PDF
No ratings yet
lab 3D plotting-1
13 pages
Gráficos Tridimensionales: T - 6:0.2:8 X T Vy 3-t Z Sin (T) Plot3 (X, Y, Z) Grid
PDF
No ratings yet
Gráficos Tridimensionales: T - 6:0.2:8 X T Vy 3-t Z Sin (T) Plot3 (X, Y, Z) Grid
15 pages
Lesson - 13 - Functions of Several Variable
PDF
No ratings yet
Lesson - 13 - Functions of Several Variable
38 pages
Practical 2 233331072
PDF
No ratings yet
Practical 2 233331072
6 pages
Latihan Membuat Grafik
PDF
No ratings yet
Latihan Membuat Grafik
23 pages
Python Theory Class 25092024-2 (3)
PDF
No ratings yet
Python Theory Class 25092024-2 (3)
8 pages
Che334 (Matlab) Lecture 5
PDF
No ratings yet
Che334 (Matlab) Lecture 5
21 pages
Practical 2 (223321027)
PDF
No ratings yet
Practical 2 (223321027)
6 pages
Atlab For Chemical Engineer: Computer Programming Second Class Part
PDF
No ratings yet
Atlab For Chemical Engineer: Computer Programming Second Class Part
47 pages
Practical 2
PDF
No ratings yet
Practical 2
7 pages
MAE 376-Homework 1 PDF
PDF
No ratings yet
MAE 376-Homework 1 PDF
3 pages
DOC-20250212-WA0007.
PDF
No ratings yet
DOC-20250212-WA0007.
11 pages
Tarea 1 - MODELACIÓN DE SISTEMAS DE ENERGÍA ELÉCTRICA
PDF
No ratings yet
Tarea 1 - MODELACIÓN DE SISTEMAS DE ENERGÍA ELÉCTRICA
11 pages
BTL Calculus 1e Tiến Phát
PDF
No ratings yet
BTL Calculus 1e Tiến Phát
7 pages
Useful Jupyter
PDF
No ratings yet
Useful Jupyter
2 pages
Python - How To Draw A Heart With Pylab - Stack Overflow
PDF
No ratings yet
Python - How To Draw A Heart With Pylab - Stack Overflow
5 pages
Experiment 1.3 Pde Lab
PDF
No ratings yet
Experiment 1.3 Pde Lab
4 pages
Slip NO - 5
PDF
No ratings yet
Slip NO - 5
11 pages
ECE120L - Activity 5
PDF
No ratings yet
ECE120L - Activity 5
5 pages
Lines3d Demo
PDF
No ratings yet
Lines3d Demo
1 page
Harmonics
PDF
No ratings yet
Harmonics
3 pages
test type 1
PDF
No ratings yet
test type 1
3 pages
3D Scanning: Computer-Aided Design (CAD)
PDF
No ratings yet
3D Scanning: Computer-Aided Design (CAD)
20 pages
metodos tabla
PDF
No ratings yet
metodos tabla
2 pages
Surface Plots - Jan 6th - LAB4 Jupyter Notebook
PDF
No ratings yet
Surface Plots - Jan 6th - LAB4 Jupyter Notebook
6 pages
Sci Lab 2
PDF
No ratings yet
Sci Lab 2
5 pages
unejhertttt
PDF
No ratings yet
unejhertttt
2 pages
3D Transformation Using Cube
PDF
No ratings yet
3D Transformation Using Cube
4 pages
NEWEN
PDF
No ratings yet
NEWEN
4 pages
TALLER MECANICA COMPUTACIONAL
PDF
No ratings yet
TALLER MECANICA COMPUTACIONAL
9 pages
computacion 3 ultima tarea
PDF
No ratings yet
computacion 3 ultima tarea
2 pages
main5
PDF
No ratings yet
main5
5 pages
Mse Practical
PDF
No ratings yet
Mse Practical
1 page
Triple Integration With Maple: D D D E F,, Xyz Zyx D D D D H, Xy K, Xy F,, Xyz Zyx
PDF
No ratings yet
Triple Integration With Maple: D D D E F,, Xyz Zyx D D D D H, Xy K, Xy F,, Xyz Zyx
4 pages
m259_w09_rhandout5
PDF
No ratings yet
m259_w09_rhandout5
10 pages
Three-Dimensional Plotting in Python Using Matplotlib
PDF
No ratings yet
Three-Dimensional Plotting in Python Using Matplotlib
5 pages
MODULE 6 - The Range of Research Topics in The Area of Inquiry
PDF
No ratings yet
MODULE 6 - The Range of Research Topics in The Area of Inquiry
5 pages
Activity #5
PDF
No ratings yet
Activity #5
5 pages
MBA-CM - Kemilembe Bais - 2017
PDF
No ratings yet
MBA-CM - Kemilembe Bais - 2017
100 pages
Spiral 2
PDF
No ratings yet
Spiral 2
2 pages
Assgnmet CFT
PDF
No ratings yet
Assgnmet CFT
2 pages
Procedure in The Opening of The Bank, During and After Banking Hours
PDF
100% (1)
Procedure in The Opening of The Bank, During and After Banking Hours
22 pages
Oppenheimer Reflection
PDF
No ratings yet
Oppenheimer Reflection
4 pages
PP-2018-ICAS-SC-ENG-D-E
PDF
No ratings yet
PP-2018-ICAS-SC-ENG-D-E
26 pages
GHG-TNI-01 Rev.08 Procedure For The Verification of GHG Statements
PDF
No ratings yet
GHG-TNI-01 Rev.08 Procedure For The Verification of GHG Statements
60 pages
CV El Mehdi Dehbi Alaoui #1
PDF
No ratings yet
CV El Mehdi Dehbi Alaoui #1
1 page
Chapter 09
PDF
No ratings yet
Chapter 09
16 pages
I. Educationalbackground: Highereducation
PDF
No ratings yet
I. Educationalbackground: Highereducation
3 pages
Boukhriss Compeng Italy 2022
PDF
No ratings yet
Boukhriss Compeng Italy 2022
5 pages
Service Cloud Summer 2018
PDF
No ratings yet
Service Cloud Summer 2018
45 pages
International Journal of Medical Science and Innovative Research (IJMSIR)
PDF
No ratings yet
International Journal of Medical Science and Innovative Research (IJMSIR)
18 pages
Blohm & Voss BV 238
PDF
No ratings yet
Blohm & Voss BV 238
21 pages
DMM360
PDF
No ratings yet
DMM360
44 pages
TVL Empowerment Technologies q3 m4
PDF
No ratings yet
TVL Empowerment Technologies q3 m4
15 pages
Sound System Equalization
PDF
No ratings yet
Sound System Equalization
17 pages
MSL 202 L05a Patrol Base Operations
PDF
100% (1)
MSL 202 L05a Patrol Base Operations
8 pages
Annexure-11 Major Bill of Materials (BOM) - DelCEN 2500 HV
PDF
No ratings yet
Annexure-11 Major Bill of Materials (BOM) - DelCEN 2500 HV
2 pages
Word Work Portfolio
PDF
No ratings yet
Word Work Portfolio
11 pages
HDD RAW Fix Partition !
PDF
No ratings yet
HDD RAW Fix Partition !
18 pages
Review 2 Number N Simple Present
PDF
No ratings yet
Review 2 Number N Simple Present
2 pages
JSA For NSE Project
PDF
No ratings yet
JSA For NSE Project
7 pages
SPEC of Pipes For Shipbuilding
PDF
No ratings yet
SPEC of Pipes For Shipbuilding
13 pages
Nomination For Meeting/Workshop and National Consultant: Internal Auditing and Compliance of Quality Assurance Plan
PDF
No ratings yet
Nomination For Meeting/Workshop and National Consultant: Internal Auditing and Compliance of Quality Assurance Plan
2 pages
Contract For International Sale of Goods: Seller Cataclysm Equipment LTD
PDF
No ratings yet
Contract For International Sale of Goods: Seller Cataclysm Equipment LTD
6 pages
MATH 1052 - Engineering Mathematics SOCS
PDF
No ratings yet
MATH 1052 - Engineering Mathematics SOCS
3 pages
Lighting Calculation 17
PDF
No ratings yet
Lighting Calculation 17
1 page
Solving Math Problems
From Everand
Solving Math Problems
George N. Frempong
No ratings yet
Analytic Geometry: Graphic Solutions Using Matlab Language
From Everand
Analytic Geometry: Graphic Solutions Using Matlab Language
Ing. Mario Castillo
No ratings yet