Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have added some of the lines but I still need help to fill up the to do parts. Can someone help me. I managed

I have added some of the lines but I still need help to fill up the to do parts. Can someone help me. I managed to have the spiral print out and the sphere so far.

(* radius of the sphere *) r = 1.0;

(* calculate an x,y,z point on a sphere given parameters r, theta, \ phi *)

(* TO DO: *) (* Implement the parametric sphere equation *) (* \

// I NEED TO FILL THIS ONE OUT: WHAT GOES IN THE CURLY BRACKETS?: spherept[r_, theta_, phi_] := r*{ }; *)

(* Construct Equator from a line in then domain of sphere *) (* TO \ DO: *) (* Create an equation of a line in the domain corresponding to \ the equator. *)

//I NEED TO DO THIS ONE, WHAT GOES IN THE "YOUR CODE HERE" part?: (* equatorLine[t_] := your code here; *)

(* Equator CONS *) (* Input: t parameter for equator line *) (* \ Output: {x,y,z} on sphere *) (* t value generates a point on a 2d \ line, which are interpreted as (theta, phi) parameters. *) (* These \ parameters define a point on the sphere by calling spherept *) (* TO \ DO: *) (*Complete the routine *)

//I NEED TO FILL OUT WHAT THE ROUTINE SHOULD EQUAL???

(* equatorLineCons[t_] :=(

); *)

(* Spiral is {t*Cos[4*t], t*Sin[4*t]} for t in [0, 2Pi] *) (* Spiral \ is mapped to the domain of the sphere: [0,2Pi]x[0, Pi] *) (* TO DO: *) \ (* Modify the spiral to live in the sphere domain. *) (* You need to \ scale and translate the coordinates *) (* Try plotting it as it is to \ figure out what you need to do.*)

//I NEED TO SCALE AND TRANSLATE THIS LINE TOO: spiral[t_] := {t*Cos[4*t], t*Sin[4*t]} ;

(* Curve on Surface *) (* Input: parameter t on spiral *) (* Use \ spiral point to generate theta and phi use these to generate a \ point on the sphere *) (* TO DO: *) (* Complete this code *) (* \ //I DO NOT KNOW WHAT GOES HERE EITHER??? : cons[t_] := (

); *)

(* GRAPHICS *)

(* Plot curve in domain *) (* Sphere domain is roughly [0,6] x [0,3], \ so curve should live in that space *) ParametricPlot[ spiral[t], {t, 0, 2 Pi}]

(* Create graphics objects *) (* TO DO: *) (* put appropriate \ coordinates in Point[] for North and South by calling spherept with \ correct parameters *) (*plotNorthPole = Graphics3D[{Blue, \ PointSize[0.05], Point[spherept[ ]]}]; *) (*plotSouthPole = \ Graphics3D[{Green, PointSize[0.05], Point[spherept[]]}]; *)

(* The next two plots are ready to use once you have written the \ routines *) (*plotEquatorCons = ParametricPlot3D[equatorLineCons[t], \ {t,0,1}, PlotStyle\[Rule]{Red,Thick}]; *)

(*plotcons = ParametricPlot3D[cons[t], {t,0,2Pi}, \ PlotStyle\[Rule]{Cyan,Thick}]; *)

plotsphere = Graphics3D[{LightBlue, Opacity[0.5], Sphere[{0, 0, 0}, r]}];

(* plot together; sphere needs to be listed first so full range of \ plot is shown *) (* TO DO: *) (* Add the plots once you have created \ them above *) Show[{ plotsphere (*,plotcons,plotEquatorCons, plotNorthPole, plotSouthPole*)}]`

This was done in mathematica !!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Building Database Driven Catalogs

Authors: Sherif Danish

1st Edition

0070153078, 978-0070153073

More Books

Students also viewed these Databases questions

Question

9. Describe the characteristics of power.

Answered: 1 week ago