Skip to main content

Compute the optics of the 'thin'-lens-equation.

Project description

TestStatus PyPiStatus BlackStyle PackStyleBlack LicenseBadge

This python-packag is about the thin-lens-equation:

ImgThinLens

 1     1     1
--- = --- + ---
 f     g     b

The focal-length of the imaging-optics: f. The image-distance an image has from the aperture’s principal plane: b. The object-distance an object has from the aperture’s principal plane: g. The screen-distance a screen has from the aperture’s principal plane: d.

Note that the screen-distance d is not part of the thin-lens-equation. In case d != b the image on the screen is ‘out of focus’, thus blurred. Only when d == b the image on the screen is ‘in focus’, thus sharp.

Install

pip install thin_lens

Usage

import thin_lens

f = 1.0

b = thin_lens.image_distance_for_object_distance(
    object_distance=100.0,
    focal_length=f,
)

assert b > f

print(b)

gives:

1.0101010101010102

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thin_lens-0.0.1.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

thin_lens-0.0.1-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page