Skip to content

Commit 7e8b6e4

Browse files
Add files via upload
1 parent b5dd3a8 commit 7e8b6e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sightpy/camera.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def __init__(self, look_from, look_at, screen_width = 400 ,screen_height = 300,
4141
def get_ray(self,n): # n = index of refraction of scene main medium (for air n = 1.)
4242

4343
# in each pixel, take a random position to avoid aliasing.
44-
x = self.x + (np.random.rand(len(self.x )) - 0.5)*self.camera_width/2. /(self.screen_width)
45-
y = self.y + (np.random.rand(len(self.y )) - 0.5)*self.camera_height/2. /(self.screen_height)
44+
x = self.x + (np.random.rand(len(self.x )) - 0.5)*self.camera_width /(self.screen_width)
45+
y = self.y + (np.random.rand(len(self.y )) - 0.5)*self.camera_height /(self.screen_height)
4646

4747
# set ray direction in world space:
4848
rx, ry = random_in_unit_disk(x.shape[0])

0 commit comments

Comments
 (0)