Sunday, December 15, 2019

Interactive Polar Plotting


Manipulate[PolarPlot[Sin[6t]^2,{t,0,i*Pi/6},
ColorFunction->Function[t,Hue[12*Sin[t]/i]],
                                  PlotStyle->Thick,ImageSize->Large],

{i,Range[1,12,1]}]


ContourPlot Examples


ContourPlot[{x1^2+x1*x2+x2^2+2*x1+6*x2+3==0,
                           x1^2+x1*x2-x2^2+2*x1+6*x2+3==0,
                           x1^2-x1*x2+x2^2+2*x1+6*x2+3==0,
             -x1^2+x1*x2+x2^2+2*x1+6*x2+3==0},
                     {x1,-10,10},{x2,-10,10},ContourStyle->"Pastel",
            GridLines->Automatic,ImageSize->Large,

PlotLegends->"Expressions"]


PolyhedronData Examples


Show[PolyhedronData["GreatRhombicosidodecahedron"] /.
        Polygon[p_]:> MapIndexed[{Glow[Hue[Mod[First[#2],64]/64]],
        Black,Opacity[0.8],Polygon[#1]} &,p],
    Boxed->False,ImageSize->Large]


3D Graphics Interactive Objects


Manipulate[Graphics3D[{Hue[n],EdgeForm[{Gray,Thickness[0.01]}],Opacity[.5],
                                                  PolyhedronData[p,"GraphicsComplex"]},
                                                 Boxed->False,ImageSize->Large],
          {p,PolyhedronData["Archimedean"]},{n,Range[0.1,0.9,0.1]}]


Interactive Parameters


Manipulate[Show[ParametricPlot[
{(Cos[a*t]^n+Sin[b*t]^m+1/c)*Sin[t],
      (Cos[a*t]^n+Sin[b*t]^m+1/c)*Cos[t]},{t,0,2\[Pi]}],
    Plot[Cos[a*t]^n+Sin[b*t]^m+1/c,{t,0,2\[Pi]},PlotStyle->Dashed],
    PlotRange->{{-2.2,2.2},{-2.2,2.2}},ImageSize->Large],
    {a,Range[2,4,1]},{b,Range[4,8,1]},{c,Range[4,8,1]},
    {n,Range[2,8,1]},{m,Range[2,8,1]}]


SuperFunctions: LearnDistribution


boston=ResourceData["Sample Data: Boston Homes"];
LDB=LearnDistribution[boston[All,{"RM","MEDV"}]]



syntheticboston=Table[SynthesizeMissingValues[LDB,
{n,Missing[]}],{n,Range[4,8,0.2]}];
syntheticboston[[1;;3]]


p1=ListPlot[boston[All,{"RM","MEDV"}],PlotLegends -> {"Data"}];
p2=ListPlot[syntheticboston,PlotStyle->Red,
PlotLegends -> {"Synthetic Data"}];
Show[p1,p2,GridLines->Automatic,ImageSize->Large]


Taylor Series


p1=Plot[Sin[z]Exp[-z],{z,0,5},PlotStyle->{Thickness[0.02],Opacity[0.5]}];
p2=Plot[Evaluate[Table[Normal[Series[Sin[z]Exp[-z],
{z,0,n}]],{n,1,24}]],{z, 0,5},PlotStyle->"BrightBands"];
Show[p1,p2,ImageSize->Large]


Parametric Drawing 3


PPRT3[n_,m_,col_,s_]:=Module[{a,b,c,u},
u=Pi/n; a=RandomInteger[{5,12}];

b=RandomInteger[{13,36}];c=2*RandomInteger[{3,6}];
PF1[i_,t_]:=Cos[u*t+2i*Pi/c]+Cos[a*u*t+2i*Pi/c]+Cos[b*u*t+2i*Pi/c];
PF2[i_,t_]:=Sin[u*t+2i*Pi/c]-Sin[a*u*t+2i*Pi/c]+Sin[b*u*t+2i*Pi/c];
Graphics[Table[{ColorData[col][1-i/(2c)],Opacity[.1],
Polygon[Table[{PF1[i,t], PF2[i,t]}, {t, 0,m*Pi,Pi/c}]]},{i,2c}],
Background->RGBColor["lightgrey"],

PlotLabel->{"a"->a,"b"->b,"c"->c},ImageSize->s]];
PPRT3[9,6,"CherryTones",600]



Parametric Drawing 2


PPRT2[n_,m_,col_,s_]:=Module[{a,b,c,u},
u=Pi/n; a=RandomInteger[{5,12}];

b=RandomInteger[{13,36}];c=2*RandomInteger[{3,6}];
PF1[i_,t_]:=Cos[u*t+2i*Pi/c]+Cos[a*u*t+2i*Pi/c]+Cos[b*u*t+2i*Pi/c];
PF2[i_,t_]:=Sin[u*t+2i*Pi/c]-Sin[a*u*t+2i*Pi/c]+Sin[b*u*t+2i*Pi/c];
Graphics[Table[{EdgeForm[ColorData[col][1-i/(2c)]],FaceForm[None],
Polygon[Table[{PF1[i,t], PF2[i,t]}, {t, 0,m*Pi,Pi/c}]]},{i,2c}],
Background->RGBColor["lightgrey"],

PlotLabel->{"a"->a,"b"->b,"c"->c},ImageSize->s]];
PPRT2[12,6,"DeepSeaColors",600]


Parametric Drawing


PPRT[n_,col_,s_]:=Module[{a,b,c,u},
u=Pi/n; a=RandomInteger[{5,12}];

b=RandomInteger[{13,24}];c=2*RandomInteger[{3,6}];
PF1[i_,t_]:=Cos[u*t+2i*Pi/c]+Cos[a*u*t+2i*Pi/c]+Cos[b*u*t+2i*Pi/c];
PF2[i_,t_]:=Sin[u*t+2i*Pi/c]-Sin[a*u*t+2i*Pi/c]+Sin[b*u*t+2i*Pi/c];
Show[Table[ParametricPlot[{PF1[i,t],PF2[i,t]},{t,0,12Pi},
PlotStyle->{ColorData[col][i/c],Thickness[.001]}],{i,c}],
PlotRange->All,Background->RGBColor["silver"],PlotPoints->200,
Axes->False,PlotLabel->{"a"->a,"b"->b,"c"->c},ImageSize->s]]
PPRT[11,"BrightBands",600]


AnglePath Examples 4


A=RandomReal[2,36]; T=Flatten[Table[A*Pi,{i,90}]];
Graphics[{RGBColor[{.5,.1,RandomReal[]}],Thickness[.001],
Line[AnglePath[T]]/.Line->BSplineCurve},ImageSize->400]


AnglePath Examples 3


Graphics[Table[{Hue[.05i],Thickness[.1^5],
Line[AnglePath[Array[ThueMorse,2^12](1.27+.0001i)Pi]]/.Line->BSplineCurve},
{i,13}],ImageSize->400]



Function Drawing in Polar Coordinates


Inclination and Elevation


Spherical Plots 3d


Histogram Examples

<script src='https://d3js.org/d3.v4.min.js'></script> was added in the page head.

Forms of Complex Numbers


One Neuron


The Nth Prime