Skip to content

2D object gallery ​

Each topic is a separate project with complete, editable Eidolang source. Previews are rendered from that same source by the actual runtime and show its initial state; open a project to explore it.

In Eidograph, use Open or drop in a downloaded file, then drag free points, change parameters and use Save As to keep your own version. View in Viewer opens it in a browser for viewing and playback; edit it in the installed app.

Also explore the 3D object gallery, basic examples and animations.

Points and linear objects ​

Compare free points A and B, bound point P, derived midpoint M, segments, lines, rays, vectors, parallels and perpendiculars. Drag A or B to update the construction.

Points and linear objects

Download 2d-lines.eido · View in Viewer

Full Eidolang source
txt
space plane
# Free, bound and derived points; four kinds of linear objects.
point A -3 -1
point B 1 1
segment base A B
point P on base at 0.35
midpoint M A B
line axis (-3,3) (1,3)
ray beam (-3,-3) (1,-2)
vector arrow (2,-1) (4,1)
parallel offset (0,2) base
perpendicular upright B base
style offset stroke #8b949e dash 6 4
style upright stroke #8b949e dash 6 4
label base text "segment"
label axis text "line"
label beam text "ray"
label arrow text "vector"

Triangle circles and centers ​

One triangle shows its circumcircle, incircle, incenter, circumcenter, orthocenter, centroid and internal angle bisector. Drag the vertices to compare how the centers move.

Triangle circles and centers

Download 2d-triangle.eido · View in Viewer

Full Eidolang source
txt
space plane
# Drag A, B or C to update circles, centers and the angle bisector.
point A -3 -2
point B 3 -2
point C -1 3
polygon triangle A B C
circumcircle outer A B C
incircle inner A B C
point I = incenter(A,B,C)
point O = circumcenter(A,B,C)
point H = orthocenter(A,B,C)
point G = centroid(A,B,C)
angle_bisector bis B A C
style triangle fill #4c8dff opacity 0.2
style outer stroke #8b949e dash 6 4
style inner stroke #3fb68b width 2
style bis stroke #d9a53f
label I text "incenter"
label O text "circumcenter"
label H text "orthocenter"
label G text "centroid"

Circles, arcs and conics ​

Compare a circle, a three-point arc, a focal ellipse, a focus/directrix parabola and a hyperbola, with a tangent and normal to the circle. Gray dashed lines identify the normal.

Circles, arcs and conics

Download 2d-conics.eido · View in Viewer

Full Eidolang source
txt
space plane
circle round (-5,2) radius 1.3
arc bow (-6,-2) (-5,-1) (-4,-2)
ellipse oval (-1,2) (1,2) through (0,2.7)
point F 4 2
line directrix (3,0) (5,0)
parabola bowl F directrix directrix from -2 to 2
hyperbola branches (-1,-3) (1,-3) through (0.6,-3) from -1.3 to 1.3
tangent touch round at 45deg
normal radial round at 45deg
style touch stroke #d9a53f
style radial stroke #8b949e dash 6 4
label round text "circle"
label bow text "arc"
label oval text "ellipse"
label bowl text "parabola"
label branches text "hyperbola"

Bezier curves and interpolating splines ​

Four control points define a cubic Bezier, with gray endpoint handles. The lower spline interpolates its points; a closed spline sits in the middle. Drag A, B, C, D or bound point P to explore the curves, tangent and normal.

Bezier curves and interpolating splines

Download 2d-smooth-curves.eido · View in Viewer

Full Eidolang source
txt
space plane
point A -4 1
point B -2 4
point C 1 -1
point D 4 2
bezier cubic A B C D
segment handleA A B
segment handleB C D
spline interpolated (-4,-2) (-2,-1) (0,-3) (2,-1) (4,-2)
spline closedLoop (-1,1) (0,2.5) (1,1) (0,0) closed
point P on cubic at 0.5
tangent touch cubic at 0.5
normal radial cubic at 0.5
style handleA stroke #8b949e dash 6 4
style handleB stroke #8b949e dash 6 4
style interpolated stroke #3fb68b width 2
style closedLoop stroke #b58cf2 width 2
style touch stroke #e0447c
style radial stroke #8b949e dash 6 4
label cubic text "Bezier"
label interpolated text "spline"
label closedLoop text "closed spline"

Polygons and filled regions ​

A regular hexagon, triangle, sector, circular segment, intersection of two disks and inequality region show different ways to construct filled geometry. The inequality is sampled within its domain.

Polygons and filled regions

Download 2d-regions.eido · View in Viewer

Full Eidolang source
txt
space plane
# Domain corners also keep the sampled regions inside the initial fitted view.
point domainMin 2.5 -3.5
point domainMax 5.5 3.5
hide domainMin
hide domainMax
regular_polygon hex (-4,2) (-2.5,2) sides 6
polygon tri (0,1) (2,1) (1,3)
sector wedge (4,1.5) radius 1.6 from 0 to 120deg
circular_segment cap (-4,-2) radius 1.6 from 0 to 140deg
circle leftDisk (-0.6,-2) radius 1.3
circle rightDisk (0.6,-2) radius 1.3
region lens = intersection(leftDisk,rightDisk)
inequality patch ((x-4)^2+(y+2)^2 <= 1.8) domain 2.5 5.5 -3.5 -0.5
style hex fill #d9a53f opacity 0.65
style tri fill #4c8dff opacity 0.6
style wedge fill #3fb68b opacity 0.6
style cap fill #e0447c opacity 0.6
style lens fill #b58cf2 opacity 0.8
style patch fill #5bbcbf opacity 0.7
label hex text "regular polygon"
label wedge text "sector"
label cap text "circular segment"
label lens text "intersection"
label patch text "inequality"

Function, parametric, polar and implicit curves ​

Compare a function plot, a Lissajous parametric curve, a polar rose and an implicit ellipse. Change parameter a to adjust the sine amplitude. See functions and equations for more animated examples.

Function, parametric, polar and implicit curves

Download 2d-plots.eido · View in Viewer

Full Eidolang source
txt
space plane
param a 1 range 0.5 1.5
fn wave(x) = a*sin(x)+2.5
plot graph wave domain -5 5
curve loop (-3+1.4*cos(t),-1+sin(2*t)) t from 0 to 2pi samples 120
polar rose (1.5*cos(3*t)) t from 0 to 2pi samples 180
equation oval (x-3)^2/2+(y+1)^2 = 1 domain 1 5 -3 1
label graph text "plot"
label loop text "parametric curve"
label rose text "polar curve"
label oval text "implicit equation"

Subpaths, joined paths and loci ​

The red subpath highlights part of a circle, the lower green pathjoin connects two segments, and the purple locus traces Q. Change u to move P and Q together.

Subpaths, joined paths and loci

Download 2d-paths.eido · View in Viewer

Full Eidolang source
txt
space plane
param u 0.7 range 0 2pi
circle carrier (-2,0) radius 2
subpath highlight carrier from 20deg to 140deg
point P on carrier at u
point Q = translate(P,(4,0))
locus trail Q driver u samples 100
segment link P Q
segment first (-4,-3) (0,-3)
segment second (0,-3) (2,-2)
pathjoin route first second
hide first
hide second
style carrier stroke #8b949e dash 6 4
style highlight stroke #e0447c width 4
style trail stroke #b58cf2 width 2
style route stroke #3fb68b width 3
label highlight text "subpath"
label trail text "locus"
label route text "pathjoin"

Frames, transforms and annotations ​

A local frame drives the blue triangle, its rotated, translated and scaled copies, a right-angle mark, matching ticks, labels and a textbox. Drag X to change the frame direction and scale.

Frames, transforms and annotations

Download 2d-frames-and-labels.eido · View in Viewer

Full Eidolang source
txt
space plane
point O -3 -1
point X -1 -1
frame local O X
point A in local 0 0
point B in local 1 0
point C in local 1 1
polygon original A B C
rotate turned original around O by 60deg
translate shifted original by (5,0)
scale enlarged original around O by 1.6
mark right A B C
segment lower A B
segment side B C
mark tick lower
mark tick side
label shifted text "translate"
hide A
hide B
textbox note -4 4 width 8 height 1.5 text "Drag X to change the local frame. Marks and labels follow the geometry."
style original stroke #4c8dff fill #4c8dff opacity 0.65
style turned stroke #3fb68b fill #3fb68b opacity 0.4
style shifted stroke #e0447c fill #e0447c opacity 0.4
style enlarged stroke #d9a53f opacity 0.5