Octave graphic add-on, Octplot



česky

2.3 Ellipse, hyperbola, parabola



Function file: ellipse(m,n,a,b,q,fmt)


This function plots an ellipse defined by:
  • 1 ellipse - centre of is in [m,n] a length of half-axis "a" and "b"; all values are scalars
  • n-ellipses - centres of is in [m,n] a length of half-axis "a" and "b"; all values are vectors (expect fmt)

Parameters m,n describe centre of the ellipse in axes x,y.
Parameters a,b describe length of main and lateral half-axis.
Parameter q is for change compute points on the ellipse, so quality.
Parameter fmt describe format of ellipse lines. You can change format of lines (color and style) and format of points.

Example:
ellipse([5,3],[-2,0],[5,2],[3,5],[80,50]);



download m-file



Function file: hyperbola(m,n,a,b,v,q,fmt)


This function plots a hyperbola, defined by:
  • 1 hyperbola - centre of is in [m,n] and length of half-axis "a" aand "b"; all values are scalars
  • n-hyperbolas - centres of is in [m,n] and length of half-axis "a" and "b"; all values are vectors (expect fmt)

Parameters m,n describe centre of the hyperbola in axes x,y.
Parameters a,b describe length of main and lateral half-axis of teh hyperbola.
Parameter v is high of the hyperbola. Parameter q is for change compute points on the hyperbola, so quality.
Parameter fmt describe format of hyperbola lines. You can change format of lines (color and style) and format of points.

Example:
hyperbola(2,2,2,5,10,60,"k--");





Function file: parabola(m,n,p,v,q,type,fmt)


This function plots a parabola, defined by:
  • 1 parabola - centre of is in [m,n] and length of half-axis "a" and "b"; all values are scalars
  • n-parabolas - centres of is in [m,n] aand length of half-axis "a" and "b"; all values are vectors (expect fmt)

Parameters m,n describe centre of the parabola in axes x,y.
Parameters a,b describe length of main and lateral half-axis of the parabola.
Parameter v is high of the parabola. Parameter q is for change compute points on the parabola, so quality.
Parameter fmt describe format of parabola lines. You can change format of lines (color and style) and format of points.

Example:
parabola([0 1],[0 -2],[2 -2],[10 10],[50 70],"xy");








<<< 2.2 Tetragon, n-square, circle 2.4 Involute, cycloid, epicycloid >>>

© 2008 David Prokop