A package to calculate and visualize light interactions with water droplets.
Project description
Refractulator
Refractulator is a Python package that calculates and visualizes how light interacts with water droplets (or any medium given the appropriate refraction data).
Installation
pip install refractulator
Usage
from refractulator import Refractulator
import numpy as np
# Initialize Refractulator
refr = Refractulator(radius=1.0)
# Define incoming direction
D = np.array([1.0, 0.0, 0.0])
# Generate ray origins (example)
ray_origins = np.random.uniform(-0.5, 0.5, size=(100, 3))
# Calculate rays
rays = refr.calculate_rays_cylinder(ray_origins, D)
# Print the number of rays calculated
print(f"Number of rays calculated: {len(rays)}")
Features
- Calculate refracted and reflected rays interacting with a spherical medium.
- Support for multiple colors with different refractive indices.
- (Optional) Visualization tools for ray paths.
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2024 Scott Kilgore
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file refractulator-0.1.0.tar.gz.
File metadata
- Download URL: refractulator-0.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d853a1107d3953e3edd0b3e8d337d4db13c0e809fc4a05c0fe75b7cfac5d461d
|
|
| MD5 |
4a101c1bf8041d2b4c17dbf54885e644
|
|
| BLAKE2b-256 |
573a0444b0d7ec199569bb7cf39d4cfbf286f904f356bdef3456290bf44cc36f
|
File details
Details for the file refractulator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: refractulator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee25c0afacaba1cdf458eb54724dec8d33a3db0440d45aa105e3177d59f5df64
|
|
| MD5 |
0113b2c5fd621982207f2156410f9d95
|
|
| BLAKE2b-256 |
e4a38d6a7b2216ffe117a82b76f4d00226e2204182608d54382f918c73a10d8b
|