<jupyter_start><jupyter_text>Lecture 14 - Motor Control Introduction to modeling and simulation of human movementhttps://github.com/BMClab/bmc/blob/master/courses/ModSim2018.md Desirée Miraldo* Tutorial on classes in Python ([Object oriented programming](https://panda.ime.usp.br/pensepy/static/pensepy/13-Classes/classesintro.html))<jupyter_code>import numpy as np
class Point:
    
    
    def __init__(self, x0=0, y0=0): #method
        self.x0 = x0
        self.y0 = y0
        
    def distance2origin(self):
        d = np.sqrt(self.x0**2 + self.y0**2)
        
        return d
    
    def distance2point(self,x,y):
    
        d = np.sqrt((x-self.x0)**2 + (y-self.y0)**2)
        
        return d
q = Point()
q.x0
p = Point(1,4) #instance
p.x0
p.y0
p.distance2origin()
p.distance2point(1,4)
def distance(x,y):
    d = np.sqrt(x**2 + y**2)

    return d
d = distance(1,5)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13815789473684212, 'fraction_numerical': 0.04276315789473684, 'mean_word_length': 2.8686440677966103, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '356691', 'license': 'MIT', 'n_tokens_mistral': 360, 'n_tokens_neox': 347, 'n_words': 69, 'path': 'courses/modsim2018/tasks/Desiree/tutorial14_MotorControl.ipynb', 'repo_name': 'desireemiraldo/bmc', 'size': '912'}