Graphics in 2D

SimulaMath has a rich area for graphics 2D. You can do the following :

  • graph of a function given an expression \(f(x)\)

  • graph of a function given by an implicit equation \(f(x, y) = 0\)

  • area given by an implicit equation \(f(x, y) > 0\), \(f(x, y) >= 0\), \(f(x, y) < 0\) and \(f(x, y) <= 0\).

  • graph of a parametric function \(x(t), y(t)\).

  • geometric construction for about 100 objects: line, ray, segment, cercle, polygon, …

  • choose different types of themes

  • customize the theme of your graphics

Note

you can also plot your graph by using your own Simula code.

Functions f(x)

Let us plot the following graphs:

  • \(3\cos(x)\)

  • \(1 - 2x\)

  • \(\dfrac{x+1}{2x-1}\)

../_images/2d-func.en.PNG

Simula allows you to plot a function on a specific interval. To do this, you must first enter the expression of the function followed by a comma and then the interval.

Let us plot the graph of \(\frac{1}{x}\) on the interval \([0, 6]\).

../_images/2d-func-int.en.PNG

Implicit plots

  • Graph of \(y^2 - x^2 = 4\)

../_images/2d-implicit1.en.PNG
  • Graph of \(y^2 = x^3 - 3x + 1 = 0\)

../_images/2d-implicit2.en.PNG
  • Graph of \((x^2+y^2 - 1)^3 -x^2y^3 = 0\)

../_images/2d-implicit3.en.PNG

Graph of

\[\frac{sin(x^2+y^2)}{1+y+xy} > 0\]
../_images/2d-implicit-sin.en.PNG

Parametric functions


  • let us plot the parametric function \(x(t)=3\cos(t); y(t)=3\sin(t)\) where \(t\in [0, 2\pi]\).

../_images/2d-param.en.PNG
  • Lissajous figures : \(x(t)=\sin(5t); y(t)=\cos(3t)\) where \(t\in [0, 2\pi]\).

../_images/2d-param2.en.PNG

Graphics 2D & Programming


../_images/2d-programming.en.PNG

Themes of your graphics


You can choose between 8 customized themes.


../_images/2d-themes.en.PNG

../_images/2d-theme1.en.PNG

You can also customized your own theme.


../_images/2d-customized.PNG

Geometry objects in 2D


You can construct about 100 geometric objects:

  • Points

  • Lines,

  • Rays,

  • Segments,

  • Circles,

  • Semi-circles,

  • Arcs

  • Sectors

  • Polygons,

  • Parallel lines,

  • Perpendicular lines,

  • Vectors,

  • Angles,

  • Angle Bisector,

  • Ellipsis,

  • Parabolas,

  • Hyperbolas,

  • Rotation,

  • Homothety,

  • Translation,

  • Reflect about a point and a line,

  • Areas,

  • Barycenter

  • Texts,

  • Images,

  • etc.

Note

  • All constructions of geometric objects start and end by a double-click.

  • For a polygone or barycenter, double-click on the first point, and then a click on each intermediate point, and finally double-clic on the last point.

Lines, Segments and Rays


../_images/2d-geom.en.PNG

Triangles and Circles


../_images/2d-geom-triang.PNG

Transformations : Reflects, Rotations, translations and Homothety


../_images/2d-geom-reflect.PNG

Ellipsis, Parabolas and Hyperbolas


../_images/2d-geom-isom.PNG