Geometry lessons
For segment 0,0 to 10,0 and point 4,3, the nearest segment point is 4,0.

Find the nearest point on a 2D line segment to a given point.
Enter four segment coordinates and two point coordinates and press the button. This example runs the actual widget in your browser.
Set the heading, labels and example coordinates, then adjust typography, colours and responsive spacing.
Enter a segment as x1,y1,x2,y2 and a point as x,y. The widget reports the nearest point constrained to the segment and its fraction along that segment.
For segment 0,0 to 10,0 and point 4,3, the nearest segment point is 4,0.
Let readers explore a small set of planar coordinates.
Provide a compact geometry calculator on a resource page.
Start with Complementor installed and your license connected. Enable this module in the WordPress library, then configure it in Elementor.
Activate Elementor and Complementor and enable the module.
Add the widget to a page in Elementor.
Set example coordinates and labels.
Style the widget and publish.
Run the example and check the result.
Configure the settings available for this module to suit the page you are building.
Edit the heading, input labels and initial values, action and result labels.
Choose an optional button icon.
Adjust typography, colours, responsive spacing and alignment.
Compare the existing Elementor workflow with this Complementor module before choosing your setup.
Use a dedicated application for diagrams, robust geometry operations and complex datasets. This widget outputs a compact text result.
Complementor uses classic Elementor APIs. Atomic-native controls are not implemented. Check your theme, cache and integrations on a staging site before release.
Check these settings if the published page behaves differently from the editor.
Check the required comma-separated coordinate count and enter finite numbers.
Press the action button with JavaScript enabled.
Yes. The projection is clamped to the segment, so an endpoint can be nearest.
The module processes it in the browser and does not itself submit or persist the input.
This module is included in Complementor All Access. Choose your production website allowance; every plan includes the same available modules.
Renews at $29 USD each year.
Renews at $49 USD each year.
Renews at $99 USD each year.
Applicable taxes extra. Annual subscriptions renew automatically unless canceled in your customer account. Read the terms and 14-day technical-issue refund policy.