Skip to content
Snippets Groups Projects
Commit 88385fcc authored by Vytor Calixto's avatar Vytor Calixto :space_invader:
Browse files

Robot struct e base do código

parent 0fc1b382
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,11 @@ typedef struct{
int x, y, t;
} Tuple;
typedef struct {
int x, y;
double theta;
} Robot;
double menorDistancia (int xa, int ya, int xb,int yb){
return (sqrt((xb-xa)*(xb-xa) + (yb-ya)*(yb-ya)));
}
......@@ -18,6 +23,7 @@ double menorDistancia (int xa, int ya, int xb,int yb){
int main(int argc, char const *argv[]) {
int t_size;
Tuple *tuplas;
Robot r = {0, 0, 0};
puts("Quantos pontos há na lista? Mínimo de 10 elementos.");
scanf("%d", &t_size);
if(t_size < 10) {
......@@ -36,6 +42,11 @@ int main(int argc, char const *argv[]) {
}
// calcular velocidade das rodas entre cada coordenada
for(int i=0; i < t_size; ++i) {
// pega o ângulo entre a posição do robô e o próximo ponto
// gira o robô
// calcula a velocidade para as rodas
}
// gerar tabela e grafico
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment