Skip to content

Commit

Permalink
correction in documentation, removing checkerboard.png/pov, adding my…
Browse files Browse the repository at this point in the history
… comments
  • Loading branch information
guillermoaguilar committed Mar 23, 2020
1 parent 203bec4 commit 517c420
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 122 deletions.
3 changes: 3 additions & 0 deletions .gitignore
@@ -1,3 +1,6 @@
transparency/checkerboard.png
transparency/checkerboard.pov

*~

# Byte-compiled / optimized / DLL files
Expand Down
Binary file removed transparency/checkerboard.png
Binary file not shown.
117 changes: 0 additions & 117 deletions transparency/checkerboard.pov

This file was deleted.

10 changes: 5 additions & 5 deletions transparency/checkerboard_factory.py
Expand Up @@ -45,7 +45,7 @@ def find_checkerboard(self, n_checks, reflectances=None, sample_repeat=9):
n_checks : int
Number of checks in each direction.
reflectances : list[float] or None
Reflectance values for the checks to draw from randomly.
Reflectance values [in povray a.u.] for the checks to draw from randomly.
When None, default values as in Wiebel, Aguilar and Maertens 2017 are used.
sample_repeat : int
Repeating >reflectances< this many times, then drawing without replacing.
Expand Down Expand Up @@ -76,11 +76,11 @@ def build_image(self, tau, alpha, background=.27, camera_offset=(0, 0, 0), look_
Parameters
----------
tau : float
Luminosity of the transparent partial overlay. [0.0, 10.0]
Reflectance [in povray a.u.] of the transparent partial overlay. [0.0, 10.0]
alpha : float
Alpha value of the transparent partial overlay. [0.0, 1.0]
background : float
Background luminosity. [0.0, 1.0]
Background luminance. [0.0, 1.0]
camera_offset, look_at_offset : tuple[int]
xyz coordinate offset from default camera position / look_at focus position
transparency_coords : list or None, optional
Expand Down Expand Up @@ -270,9 +270,9 @@ def write_pov(filename, r_checks, positions, transparency=None, cb_transf=None,
planes, pointers : list[str]
list of povray instructions
background : float
background luminosity
background luminance
light : float
light source luminosity
light source intensity
camera_offset, look_at_offset : tuple[float]
xyz coordinate offset from default camera position / look_at focus position
"""
Expand Down
14 changes: 14 additions & 0 deletions transparency/comments.md
@@ -0,0 +1,14 @@
23.03.2002 My Comments/ ToDo list:

- decide about how to import. checkerboard_mask.png cannot be found
- check consistency in indentation, in checkerboard_factory.py is mixed.
- in README, add instructions to how to install requirements.
- in example usage, make a one line comment what is happening in each step
- add plt.imshow() calls, to display the resulting images
- find_checkerboard() gives error when n_checks^2 > len(reflectances)*sample_repeat. Maybe check that this is not the case, if it is, then increase sample_repeat to min required and warn user
- get_stacked() returns a tuple with the masks included...
- with Yiqun with add an additional constrain to the checkerboard sampling: all reflectance values have to be behind the transparency, the same ones but shuffled. Check code and add this option here with a switch to activate this restriction / or not.
- it's not luminosity but luminance. change accordingly in all documentation, also fn parameters
- in texture factor, get_image(), alpha is inverted. higher alpha -> more transmissive.
- missing option of having a regular checkerboard with transparency on top... ?
- TextureFactory missing the 'stacked' version. maybe both horizontal and vertical stacked?

0 comments on commit 517c420

Please sign in to comment.