Download MuPAD from SciFace

MuPAD Pro Computing Essentials - Examples 

Example 7.2 - Parametric plots in 2D

In this example we will plot hypocycloid given by parametric equations:

export(plot,Curve2d):
 
   R:=3: // here we declare temporary values for R and r
   r:=0.5:
 
Hp := Curve2d(
   [(R-r)*cos(t) + r*cos((R-r)*t/r),
   (R-r)*sin(t) - r*sin((R-r)*t/r)],
   t = 0..2*PI,
   Grid = [400],
   Color = [0, 0, 0],
   LineWidth = 11
):

 
Circle := Curve2d(
   [R*cos(t),R*sin(t)],
   t = 0..2*PI,
   Grid = [400],
   Color = [1, 0.2, 0.3],
   LineWidth = 12
):
 
plot(
   Hp, Circle,
   Scaling = Constrained,
   BackGround = [0.8, 0.8, 1],
   ForeGround = [1, 0, 0],
   Arrows = TRUE,
   Title = "Hypocycloid",
   FontSize = 10,
   FontStyle = "bold",
   GridLines = [6, 6],
   GridLinesColor = [0, 0, 1]
)

 

TOP