Homework 2

Get a robot to brush your teeth

B) Functions

Thought:

The idea behind forming of functions is to break a complicated job into a series of simple trivial steps.

Our model:

Functions here are used to express the basic commands discussed in the previous section. The basic functions are :

a) positionBrush ([x,y,z],[x,y,z]) : This function combines the basic commands of align, rotate and position .It places the brush in proper place for cleaning to start.We may note here that position and orientation of brush changes while cleaning various parts of teeth

b) applyPressure : This function is a direct manifestation of the basic command that applies appropriate pressure.

c) cleanTeethVertically : This function implements the vertical movements of the move command .It takes into account the extent and speed with which it brushes so that it does not hurt.

d) cleanTeethHorizontally : This function is the horizontal counterpart of the cleanTeethVertically function.

In programming sense we call these functions through a main() function .

The main function would call the functions when required in a sequential order.For instance it would call 1st the positionBrush() , then the applyPressure() function and then the cleanTeeth functions.

D)Learning

In our model there are very few possibilities of learning . We can consider the learning aspect function by function.

The align , rotate and position function may vary depending on the shape of the teeth ( which may vary from person to person).Therefore small variations could be incorporated over time .

In the same way move and apply functions could vary from person to person and even for different part of the teeth. These functions may hurt the subject so sensory inputs and inputs from the subject may be put to use.

VIDEO:

The following video demonstrates the functions and its execution VIDEO.

ANUJ GUPTA| Y9111 | SE367