Total Pageviews

Blog Archive

Teaching (237) Mathematica (155) 3Q (48) Excel (45) SPSS (32) Cat (24) LaTeX (23) Mac (22) 君達呀 (15) Kaohsiung (14) 論文測試 (13) Mathematica教學講義 (3)

 

Followers

Mathematica 教學 Plot 圖形旋轉

Chung-Yuan Dye 於 Monday, December 12, 2011 9:48 PM 發表

g=Plot[10Sin[x]/x,{x,0,10}]

(*將圖形座標取出並旋轉,接著再指定顏色*)
f[scale_,theta_,color_]:=g/.{Line[a___]:>Line[scale*RotationMatrix[thetaDegree].#&/@a],
Hue[___]:>color}

Manipulate[
Show[g,f[s,t,Green],PlotRange->{{-20,20},{-20,20}},
AspectRatio->1],{{s,1,"Scale"},0,2},{{t,45,"Degree"},0,360}]
Tags:

讀者回應 ( 0 意見 )

Post a Comment

Please leave your name and tell me what you thought about this site. Comments, suggestions and views are welcomed.

如果這篇文章對你有幫助,那請留個訊息給我~