#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 29 18:50:15 2024

@author: sam
"""



'''Another Vector Function with Parametric Surface'''

import numpy as np
import FinalProject as FP

def function(x,y,z):
    return np.array([x,y,z])

def surface(θ,φ): # unit sphere example
    x = np.sin(θ) * np.cos(φ)
    y = np.sin(θ) * np.sin(φ)
    z = np.cos(θ)
    return np.array([x,y,z])

# where 0<θ<π, 0<φ<2π (defining θ-polar angle and φ-azimuthal angle)
# expected result 4π ≈ 12.56637



print(FP.integral(function,surface,[0,np.pi],[0,2*np.pi]))