Semester2: Week 1 Fady

 Over the break, I reflected on what was done over the past semester and what I could improve to be more successful during the next semester.

I worked on the volume measuring device that we are planning on using to measure the inflow and outflow in the eye.

Here is a detailed plan of the device:

  1. Mount the ball in the middle of the device.
  2. Mount the ultrasonic sensors around the ball at evenly spaced intervals, making sure that each sensor has a clear line of sight to the surface of the ball.
  3. Use the sensors to measure the distance from the sensors to the surface of the ball.
  4. Use the measured distances and trigonometry to calculate the coordinates of the point on the surface of the ball that is directly beneath each sensor.
  5. Use the coordinates to create a 3D model of the surface of the ball.
  6. Use the 3D model to calculate the volume of the ball. A simple way to do this is to divide the ball into small tetrahedrons and sum their volumes.
  7. Implement this using python.
I started briefly writing out a plan for my code:

import numpy as np


#Function to measure the distance
def measure_distance(sensor_id):
    
    pass

#Function to calculate coordinates
def calculate_coordinates(distances):
    
    pass

#Function to create a 3d model
def create_3d_model(coordinates):
    
    pass

#Function to Calculate volume
def calculate_volume(model):
    
    pass


if __name__ == "__eyeball__":
    distances = np.zeros(11)
    for i in range(11):
        distances[i] = measure_distance(i)
    coordinates = calculate_coordinates(distances)
    model = create_3d_model(coordinates)
    volume = calculate_volume(model)
    print(f"Volume of ball is: {volume}")

 

Comments

Popular posts from this blog

Week 11 Alex

Week 7 - Brinkley

Week 9 - Brinkley