code: def _calculate_sun_vector(self):
          
          z_axis = Vector3(0., 0., -1.)
          x_axis = Vector3(1., 0., 0.)
          north_vector = Vector3(0., 1., 0.)
  
          # rotate north vector based on azimuth, altitude, and north
          _sun_vector = north_vector \
              .rotate_around(x_axis, self.altitude_in_radians) \
              .rotate_around(z_axis, self.azimuth_in_radians) \
              .rotate_around(z_axis, math.radians(-1 * self.north_angle))
  
          _sun_vector.normalize()
          try:
              _sun_vector.flip()
          except AttributeError:
              # euclid3
              _sun_vector = Vector3(-1 * _sun_vector.x,
                                    -1 * _sun_vector.y,
                                    -1 * _sun_vector.z)
  
          self._sun_vector = _sun_vector
docs: Calculate sun vector for this sun.