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}\)
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]\).
Implicit plots¶
Graph of \(y^2 - x^2 = 4\)
Graph of \(y^2 = x^3 - 3x + 1 = 0\)
Graph of \((x^2+y^2 - 1)^3 -x^2y^3 = 0\)
Graph of
Parametric functions¶
let us plot the parametric function \(x(t)=3\cos(t); y(t)=3\sin(t)\) where \(t\in [0, 2\pi]\).
Lissajous figures : \(x(t)=\sin(5t); y(t)=\cos(3t)\) where \(t\in [0, 2\pi]\).
Graphics 2D & Programming¶
Themes of your graphics¶
You can choose between 8 customized themes.
You can also customized your own theme.
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.