Giter Club home page Giter Club logo

raytrace's Introduction

raytrace

Python raytracer

The speed difference is explained at http://www.excamera.com/sphinx/article-ray.html

Updated for Python 3.x.

You'll need to install two packages.

  1. Pillow is a fork of the PIL package. It provides the Image module for this application. to install it run the following.
pip install pillow
  1. Numpy is a scientific package that helps with mathematical functions.
pip install numpy

raytrace's People

Contributors

jamesbowman avatar sparthir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

raytrace's Issues

great work. citation?

This is great stuff.
Can you put it on Zenodo to create a DOI so that I can cite you, in case I use it for my work in the future?

License?

This is awesome. Would you be open to putting a License on the work?

Multi-core Processing

Just came across this article and started to wonder if it is also another option to speed up the raytracing in Python.

https://medium.com/@urban_institute/using-multiprocessing-to-make-python-code-faster-23ea5ef996ba

There is a cost so without experimenting I'm not sure if it will be more efficient yet but I believe that by default Python is single core (I could be wrong).

However it could find out how many cores you have and send out chunks of pixels to be calculated on different cores and return them. You can find out how many cores with:

import multiprocessing
print( multiprocessing.cpu_count() )

Could be interesting to play with to see if it can get even faster. :)

Python 3 Compatibility

I ran into some issues running this but then I realized it's because I was running Python 3.8. As 2.x becomes more and more deprecated and less supported may I suggest we upgrade it to Python 3.x?

I have made the changes that got it working under Python 3.x and wonder if you want me to put in a pull request for you?

My version also has an updated ReadMe.md file with instructions for the packages needed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.