0% found this document useful (0 votes)
83 views

Surface Curves With Mathematica: Curves On A Sphere

This document discusses drawing curves on 3D surfaces using Mathematica. It provides examples of drawing curves on a sphere, cone, torus, and other user-defined surfaces. Key steps include using parametric equations to define the surface, then defining parametric equations for the curve's coordinates as functions of a parameter t. Options like PlotPoints and changing the curve's radius are used to refine the visualization. Additional challenges encourage experimenting with different parametric functions, views, and lighting effects.

Uploaded by

hammoudeh13
Copyright
© Attribution Non-Commercial (BY-NC)
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
0% found this document useful (0 votes)
83 views

Surface Curves With Mathematica: Curves On A Sphere

This document discusses drawing curves on 3D surfaces using Mathematica. It provides examples of drawing curves on a sphere, cone, torus, and other user-defined surfaces. Key steps include using parametric equations to define the surface, then defining parametric equations for the curve's coordinates as functions of a parameter t. Options like PlotPoints and changing the curve's radius are used to refine the visualization. Additional challenges encourage experimenting with different parametric functions, views, and lighting effects.

Uploaded by

hammoudeh13
Copyright
© Attribution Non-Commercial (BY-NC)
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
You are on page 1/ 2

Surface Curves with Mathematica

This lesson and sample code shows you how to draw a curve that is on a given surface. First, open the following packages: <<Graphics`Shapes` <<Graphics`Animation` <<RealTime3D`

Curves on a Sphere
Draw a sphere: sphere1=ParametricPlot3D[ {Cos[theta]Sin[phi],Sin[theta]Sin[phi],Cos[phi]}, {theta,0,2Pi},{phi,0,Pi},Boxed->False,Axes->False] In this sphere, theta and phi are acting as the two parameters for the surface. To make a curve that lies on this surface, convert each surface parameter to a function of t. Define: theta[t_]=t; phi[t_]=t; spherecurve=ParametricPlot3D[ {Cos[theta[t]]Sin[phi[t]],Sin[theta[t]]Sin[phi[t]],Cos[phi[t]]}, {t,0,1},Boxed->False,Axes->False] Notice that theta is now theta[t] and phi is phi[t] and the domain has changed for t. Type and execute: solidcombo=Show[sphere1,spherecurve] Change theta and phi to theta[t_]=10Pi*t and phi[t_]=Pi*t; and re-execute. Add the option ,PlotPoints->200 inside the plot command for spherecurve and re-execute. Try: SpinShow[spherecurve,Frames->20] and double-click on one of the images. You can stack the images by double-clicking the middle blue bracket on the right side of the window. The animation controls are on the bottom left of the window. Try the following changes: theta(t) = 25B t and phi(t) = 2B t theta(t) = cos(5t) and phi(t) = 4t with 0 # t # 2B Experiment with your own functions. Go back to the ParametricPlot3D command for spherecurve and type 1.1 in front of each of the vector components. This will make the radius of the curve slightly larger than the sphere. Be sure to show both the sphere and your new curve together. - Continued -

Surface Curves with Mathem atica ~ Page 2

Curves on a Cone
To draw a cone, lets set this up so it will be easier to change the surface. x[u_,v_]=u*Cos[v]; y[u_,v_]=u*Sin[v]; z[u_,v_]=u; cone1=ParametricPlot3D[{x[u,v],y[u,v],z[u,v]},{u,-1,1}, {v,0,2Pi},Boxed->False] To create a curve, copy and paste that same code to a new part beneath the cone. Add the following two lines to the top: u[t_]=t; v[t_]=10Pi*t; and delete the x, y, and z functions. Change cone1 to conecurve, make each u and v in the ParametricPlot3D command a function of t by inserting [t] and change to domain for t to go from -1 to 1. Include the option ,PlotPoints->200 in the plot command as well. Try the following for u(t) and v(t): u(t) = cos(4B t) and v(t) = 3B t and make the radius of the curve 1.2, show cone1 and conecurve together.

Curves on Other Surfaces


The parametric equations of a torus are listed below. Use these to create curves on a torus. See if you can raise the curve just slightly above the surface. x(u, v) = (2 + sin v) cos(u), y(u, v) = (2 + sin v) sin(u), z(u, v) = (2 + cos v) Try: x(u, v) = (1/u) cos(v), y(u, v) = (1/u) sin(v), z(u, v) = u Can you predict what it will look like?

Create curves on paraboloids and cylinders too. Design your own surfaces and create curves that fit on them.

Copy and paste your favorite images into a new Mathematica file for easier demonstration.

Additional Challenges
Experiment with the different options of SpinShow. Use <<Default3D` and ViewPoint to create alternate views of your curves. Experiment with LightSources (its the only way to color 3D graphs)

Reference: Multivariable CalcLabs with Mathematica for use with James Stewarts Calculus: Early Transcendentals, 4th Edition, by Selwyn Hollis

Abby Brown ~ www.abbymath.com ~ June 2003

You might also like