You can edit almost every page by Creating an account. Otherwise, see the FAQ.

Sarit2d (software)

From EverybodyWiki Bios & Wiki

Sarit2d
Sarit2d geometry library.
Original author(s)Cosimo Saccone
Initial releaseAugust 1, 2017; 6 years ago (2017-08-01)
Stable release
1.01 / March 1, 2018; 6 years ago (2018-03-01)
Written inJavascript
Engine
    Operating systemLinux, Mac OS X, Windows, Android
    TypeInteractive geometry software
    Licenseproperty
    Websitesarit2d.altervista.org

    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.

    Philosofy[edit]

    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.

    Transformations[edit]

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

    Programming[edit]

    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;
    drawCircle(0,0,r);
    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];
    drawSegment(ax,ay,cx,cy);
    drawRectangle(ax,ay,cx,cy);
    var BC = getDistance(cx,cy,bx,by);
    drawCircle(cx,cy,BC);
    q = getIntersectionBetweenTwoCircles(0,0,r,cx,cy,BC);
    var dx = q[2], dy = q[3];
    drawSegment(bx,by,dx,dy);
    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];
    drawSegment(jx,jy,kx,ky);
    drawText("A",-10,6);
    drawText("B",9,6);
    drawText("C",9,-7);
    drawText("D",-3,-11);
    drawText("E",4,-2);
    drawText("J",4,3);
    drawText("K",4,-15);
    var JK = getDistance(jx,jy,kx,ky);
    print(JK);
    

    See also[edit]

    References[edit]

    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.