[summary] Here we calculate the length of the steps taken by the motion blur [description] We want a higher intensity lead to a longer total motion blur path and more different steps along the way. Hence we sample
()
| 124 | |
| 125 | # first we find the lengths of the motion blur steps |
| 126 | def getSteps(): |
| 127 | """[summary] |
| 128 | Here we calculate the length of the steps taken by |
| 129 | the motion blur |
| 130 | [description] |
| 131 | We want a higher intensity lead to a longer total motion |
| 132 | blur path and more different steps along the way. |
| 133 | |
| 134 | Hence we sample |
| 135 | |
| 136 | MAX_PATH_LEN =[U(0,1) + U(0, intensity^2)] * diagonal * 0.75 |
| 137 | |
| 138 | and each step: beta(1, 30) * (1 - self.INTENSITY + eps) * diagonal) |
| 139 | """ |
| 140 | |
| 141 | # getting max length of blur motion |
| 142 | self.MAX_PATH_LEN = 0.75 * self.DIAGONAL * \ |
| 143 | (uniform() + uniform(0, self.INTENSITY**2)) |
| 144 | |
| 145 | # getting step |
| 146 | steps = [] |
| 147 | |
| 148 | while sum(steps) < self.MAX_PATH_LEN: |
| 149 | |
| 150 | # sample next step |
| 151 | step = beta(1, 30) * (1 - self.INTENSITY + eps) * self.DIAGONAL |
| 152 | if step < self.MAX_PATH_LEN: |
| 153 | steps.append(step) |
| 154 | |
| 155 | # note the steps and the total number of steps |
| 156 | self.NUM_STEPS = len(steps) |
| 157 | self.STEPS = np.asarray(steps) |
| 158 | |
| 159 | def getAngles(): |
| 160 | """[summary] |
nothing calls this directly
no outgoing calls
no test coverage detected