ποΈ Visualization of surfaces and curvesΒΆ
With this small project, you can learn how to visualize surfaces and curves in three-dimensions using Python.
Before startΒΆ
Install Python and learn basic skill of it.
Python is a very (probably the most) useful programming language for general purpose programming. Youβd better learn it ASAP if you want to keep up-to-date.
StepsΒΆ
Step #1ΒΆ
Install numpy, matplotlib packages for your Python using command
$ pip install numpy
$ pip install matplotlib
Step #2ΒΆ
Download the Python scripts to be used be clicking on:
You will see the following functions in these scripts. Study the scripts carefully to learn how to use them to plot curves or surfaces.
Plot a curve in three-dimensions.
- curve.curve(x, y, z, t_range)[source]ΒΆ
Plot a curve in three-dimensions.
- Parameters:
x β the
parametric function.
y β the
parametric function.
z β the
parametric function.
t_range β the range of the parameter
.
Plot a surface in three-dimensions.
- surface.surface(z, x_range, y_range)[source]ΒΆ
Plot a surface in three-dimensions.
- Parameters:
z β
The function that represents the surface.
- If you have the equation of the figure in the form
You should first re-write it into the form
x_range β The range of
-coordinates.
y_range β The range of
-coordinates.
β©οΈ Back to π§© Workshop.
π οΈ Back to Math is cheap.