What this tool does
ShadowCalculator.com (also referred to as just Shadow Calculator on this website) is a browser-based tool that shows how shadow length and direction change with date, time, latitude, and object height.
The app uses the open-source library SunCalc for solar position calculations, Three.js for 3D visualization, Leaflet.js for interactive maps, and CARTO (powered by OpenStreetMap data) for map tiles and rendering. Location search uses Nominatim geocoding via Leaflet Control Geocoder. All shadow computations happen locally on your device.
Scientific assumptions
- Flat ground (no terrain or slope).
- Standard geometry:
L = H / tan(α), where H is object height and α is solar altitude. - Approximate city coordinates and time zones, suitable for visualization but not survey-grade work.
Disclaimer
This is a truly vibe coded site with no guarantee of functionality or long term maintenance.
This site is provided for informational and educational purposes only. Use it as a quick reference for shadow length and direction, but not for navigation, engineering certification, safety-critical design, or any use where precise solar position or shadow length is required.
Privacy & Data Usage
What Stays Local (Private)
The following data never leaves your device:
- Your exact location: When you click "Use My Location," your browser determines your coordinates locally using GPS/WiFi. This location is not transmitted to any server.
- Shadow calculations: All sun position math and 3D rendering happens in your browser.
- Settings: Date, time, object height, and other parameters are processed locally.
What Is Sent to Third Parties
The interactive map feature requires loading resources from external services:
- CARTO (map tiles): When you view the map, your browser requests map image tiles from CARTO's servers. They see your IP address and which map areas you're viewing, similar to visiting any website. The map data comes from OpenStreetMap contributors. CARTO may collect standard web analytics. See CARTO's Privacy Policy.
- Nominatim (location search): When you search for a city or address, your search query is sent to OpenStreetMap's Nominatim geocoding service. They see your IP address and search terms. See their Usage Policy.
- Google Fonts: The Inter font is loaded from Google Fonts, which may log your IP address and browser information. See Google's Privacy Policy.
- GitHub Pages (hosting): This site is hosted on GitHub Pages, which may collect basic technical logs (IP address, user agent, page views) as part of their standard hosting. See GitHub's Privacy Statement.
No Analytics or Tracking
This site does not use Google Analytics, advertising cookies, or any tracking scripts. We do not collect, store, or sell your personal information.
Open-source license
The source code for this site is intended to be open-sourced on GitHub
under the MIT License. See the LICENSE file in the repository
for details.
Questions or comments? See the project repository on GitHub.