Wiki-valley-lg-cyan 200px.png Did you know a wiki could be used internally in your company ? For better knowledge management and internal communication. Less email and office files. 30 days free trial. (Ad)

Welcome to EverybodyWiki ! Nuvola apps kgpg.png Sign in or create an account to improve, watchlist or create an article like a company page or a bio (yours ?)...

Sarit2d (software)

From EverybodyWiki Bios & Wiki
Jump to navigation Jump to search

Sarit2d geometry library.
Sarit2d cover.jpg
Original author(s)Cosimo Saccone
Initial releaseAugust 1, 2017; 2 years ago (2017-08-01)
Stable release
1.01 / March 1, 2018; 2 years ago (2018-03-01)
  • {{URL||optional display text}}
Written inJavascript
    Operating systemLinux, Mac OS X, Windows, Android
    TypeInteractive geometry software
    Licenseproperty Logo.png Search Sarit2d (software) on Amazon.

    Sarit2d is a Javascript library that allows its users to design and solve 2d-geometric problems. The library contains many functions for drawing the main geometric shapes: segments, arcs, points, texts, etc. But the very core of the library are the functions for solving the most common geometry problems: intersections between shapes, areas calculation, geometric formulas, etc. With Sarit2d library it's possible solving hard problems through few code rows.


    Sarit2d, created by Cosimo Saccone, can be used without downloading anything. For using the library it's enough to write the code in the online sandbox and push the run button. If not there are errors, the drawing will be shown or the result will be printed. Sarit2d contains essentially three types of functions: drawing functions, calculating functions, control functions.

    Drawing functions[edit]

    They are the functions that allow to design a shape (point, line, polygon, etc). They make calculations within them but they don't return any value. Their purpose is to draw.

    Calculating functions[edit]

    They are the functions that make calculations and return results (intersections, distances, etc).

    Control functions[edit]

    They are the functions that control various aspects of the library.


    1. reflexion
    2. symmetry
    3. translation
    4. rotation
    5. scale


    Circles and intersections
    Geometry problem solved with Sarit2d

    Below is a brief example about the operation of the library:

    var m = -2/3, r = 10;
    var q = getIntersectionBetweenLineAndCircle(0,0,5,5*m,0,0,r);
    var ax = q[2], ay = q[3], bx = -q[2], by = q[3], cx = q[0], cy = q[1];
    var BC = getDistance(cx,cy,bx,by);
    q = getIntersectionBetweenTwoCircles(0,0,r,cx,cy,BC);
    var dx = q[2], dy = q[3];
    q = getIntersectionBetweenTwoLines(ax,ay,cx,cy,bx,by,dx,dy);
    var ex = q[0], ey = q[1];
    q = getIntersectionBetweenLineAndCircle(ex,ey,ex,ey+10,cx,cy,BC);
    var jx = q[0], jy = q[1], kx = q[2], ky = q[3];
    var JK = getDistance(jx,jy,kx,ky);

    See also[edit]

    • Compass-and-straightedge construction
    • Interactive geometry software


    External links[edit]

    This article "Sarit2d (software)" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Sarit2d (software). Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.

    Compte Twitter EverybodyWiki Follow us on !

    Farm-Fresh comment add.png You have to Sign in or create an account to comment this article !