#NEWLINE# @ property #NEWLINE# def sun_vector( self ) : #NEWLINE# #INDENT# ' Returns the sun vector ' #NEWLINE# sun_altitude = self . get_daytime_setting ( 'sun_altitude' ) #NEWLINE# sun_azimuth = self . get_daytime_setting ( 'sun_azimuth' ) #NEWLINE# theta = ( ( ( 90 - sun_altitude ) / 180.0 ) * math . pi ) #NEWLINE# phi = ( ( sun_azimuth / 180.0 ) * math . pi ) #NEWLINE# sun_vector = Vec3 ( ( math . sin ( theta ) * math . cos ( phi ) ) , ( math . sin ( theta ) * math . sin ( sun_azimuth ) ) , math . cos ( theta ) ) #NEWLINE# return sun_vector