Commit bde0c616 authored by Faruk Hammoud's avatar Faruk Hammoud
Browse files

initial

parent dc3584fb
.DS_Store
applet
application.linux32
application.linux64
application.windows32
application.windows64
application.macosx
\ No newline at end of file
//NiloProject Versao alpha 0.3
//by Faruk Hammoud, Escola Politecnica da Universidade de Sao Paulo, 2017.
PImage poli;
PImage calatrava;
PImage pizza;
import camera3D.*;
import camera3D.generators.*;
import camera3D.generators.util.*;
import processing.net.*;
//DEFINES
int MAP_MAX = 1000;
//Funções Anexas
void Definicoes() {
TAREFAS.AlteraTarefaCodigo("Exemplo", "MOUSEPRESSED");
TAREFAS.AlteraTarefaLetra("Exemplo", 'd');
TAREFAS.Tarefa("Ativa Frame Base");
noCursor();
}
//Funções Main
void setup() {
fullScreen(P3D);
poli = loadImage("poli.png");
calatrava = loadImage("calatrava.jpg");
pizza = loadImage("pizza.png");
Definicoes();
}
void draw() {
FRAMES.Mostrar();
lights();
directionalLight(0, 255, 0, 0, -1, 0);
}
\ No newline at end of file
#-------------------------------------------------------------------------------#
# Ola, #
# Eu sou Faruk, e esse eh o codigo do NiloProject #
# Uma IDE interativa para Python #
# #
#-------------------------------------------------------------------------------#
# Versao: a0.6 (12/12/2018) . Por Faruk Hammoud, 2018. #
# Compilado em Processing 3.4 (by Processing Foundation) - Python Mode #
# Distribuicao Livre #
# Suporte 24/7 : faruk.hammoud@usp.br #
#-------------------------------------------------------------------------------#
add_library('serial')
add_library('arduino')
add_library('udp')
from sys_index import *
from sys_interface import *
ARDUINO_INICIALIZADO = False
udp = 0
control_ultimo = False
try:
#ard = Arduino(this, Arduino.list()[0], 57600)
print(".ARDUINO INICIALIZADO.")
#ARDUINO_INICIALIZADO = True
except BaseException as erro:
print(erro)
def setup():
#print(Data().rvgSample('data/lua/rvgs/cubic1.rvg',150,150))
font = loadFont("Menlo-Regular-20.vlw");
textFont(font, 20);
udp = UDP(6000)
udp.listen(True)
delay(1000)
fullScreen()
frameRate(20)#Manter isso aqui(diminuir pra 5 em caso de MAX CPU)
if ARDUINO_INICIALIZADO:
ARDUINO.inicializa(ard)
Data().obtemPacotes()
Data().importaCodigo('/meta_data/nilo_code.nlo')
Tarefas().alteraTarefaCodigo('Processa Scroll Up','SCROLLUP')
Tarefas().alteraTarefaCodigo('Processa Scroll Down','SCROLLDOWN')
Tarefas().alteraTarefaCodigo('Processa MouseDragged','MOUSEDRAGGED')
Tarefas().alteraTarefaCodigo('Processa MouseClicked','MOUSECLICKED')
Tarefas().alteraTarefaCodigo('Processa MouseDoubleClicked','MOUSEDOUBLECLICKED')
Tarefas().alteraTarefaCodigo('Processa MousePressed','MOUSEPRESSED')
Tarefas().alteraTarefaCodigo('Processa MouseReleased','MOUSERELEASED')
Tarefas().alteraTarefaCodigo('Processa Esquerda','LEFT')
Tarefas().alteraTarefaCodigo('Processa Cima','UP')
Tarefas().alteraTarefaCodigo('Processa Direita','RIGHT')
Tarefas().alteraTarefaCodigo('Processa Baixo','DOWNS')
Tarefas().alteraTarefaCodigo('Processa Enter','ENTER')
Tarefas().alteraTarefaCodigo('Ativa Selecao Refletida','CTRL')
Tarefas().alteraTarefaCodigo('Tabula','TAB')
Tarefas().alteraTarefaCodigo('Copia','CTRL-C')
Tarefas().alteraTarefaCodigo('Corta','CTRL-X')
Tarefas().alteraTarefaCodigo('Cola','CTRL-V')
def draw():
Frames().mostrar()
Thread(target=Interpretador().interpreta())
INTERFACE.reset()
def keyPressed():
INTERFACE.actTempoTecla()
global control_ultimo
if control_ultimo:
if keyCode == 88:
Tarefas().tarefaCodigo('CTRL-X')
if keyCode == 67:
Tarefas().tarefaCodigo('CTRL-C')
if keyCode == 86:
Tarefas().tarefaCodigo('CTRL-V')
if keyCode == CONTROL:
Tarefas().tarefaCodigo('CTRL')
control_ultimo = False
elif keyCode == CONTROL:
control_ultimo = True
else:
if keyCode == 9:
Tarefas().tarefaCodigo('TAB')
elif keyCode == 40:
Tarefas().tarefaCodigo('DOWNS')
INTERFACE.algo_aconteceu = True
elif keyCode == 37:
Tarefas().tarefaCodigo('LEFT')
elif keyCode == 39:
Tarefas().tarefaCodigo('RIGHT')
elif keyCode == 38:
Tarefas().tarefaCodigo('UP')
INTERFACE.algo_aconteceu = True
elif keyCode == 10:
Tarefas().tarefaCodigo('ENTER')
INTERFACE.algo_aconteceu = True
elif keyCode == 27:
Tarefas().tarefaCodigo('ESC')
elif keyCode >= 32 and keyCode <= 125 or keyCode == 222 :
Tarefas().tarefaLetra(key)
n = - len(INTERFACE.tmp_text)
x = - tamanhoTexto(INTERFACE.tmp_text)
INTERFACE.tmp_text = Interpretador().normaliza(INTERFACE.tmp_text[0:INTERFACE.cursor_letra] +str(key)+ INTERFACE.tmp_text[INTERFACE.cursor_letra:])
n += len(INTERFACE.tmp_text)
x += tamanhoTexto(INTERFACE.tmp_text)
INTERFACE.cursor_letra+=n
INTERFACE.cursor_x += x
if key==DELETE:
INTERFACE.delete()
if key==BACKSPACE:
INTERFACE.backspace()
else:INTERFACE.palavrasChave()
def keyReleased():
Tarefas().tarefa('Desativa Selecao Refletida')
def mousePressed():
INTERFACE.algo_aconteceu = True
Tarefas().tarefaCodigo('MOUSEPRESSED')
def mouseReleased():
Tarefas().tarefaCodigo('MOUSERELEASED')
def mouseDragged():
INTERFACE.algo_aconteceu = True
Tarefas().tarefaCodigo('MOUSEDRAGGED')
def mouseClicked(evt):
INTERFACE.algo_aconteceu = True
n = evt.getCount()
INTERFACE.mouse_lado = mouseButton
if n == 1:
Tarefas().tarefaCodigo('MOUSECLICKED')
else:
Tarefas().tarefaCodigo('MOUSEDOUBLECLICKED')
def mouseWheel(event):
e = event.getCount()
if e>0:
Tarefas().tarefaCodigo('SCROLLUP')
else:
Tarefas().tarefaCodigo('SCROLLDOWN')
pass
def receive(data,ip,port):
data = subset(data,0,len(data)-2)
LUVA.data = str(data)
println(Luva.data)
AAR 1:20 Narrow Flange, Wheel reference profile.
Made by Christian Hauch, 4-11-97, from
draving supplied by AAR.
0.00 -30.44
0.00 -30.19
0.00 -29.94
0.00 -29.69
0.00 -29.44
0.00 -29.19
0.00 -28.94
0.00 -28.69
0.00 -28.44
0.00 -28.19
0.00 -27.94
0.00 -27.69
0.00 -27.44
0.00 -27.19
0.00 -26.94
0.00 -26.69
0.00 -26.44
0.00 -26.19
0.00 -25.94
0.00 -25.69
0.00 -25.44
0.00 -25.19
0.00 -24.94
0.00 -24.69
0.00 -24.44
0.00 -24.19
0.00 -23.94
0.00 -23.69
0.00 -23.44
0.00 -23.19
0.00 -22.94
0.00 -22.69
0.00 -22.44
0.00 -22.19
0.00 -21.94
0.00 -21.69
0.00 -21.44
0.00 -21.19
0.00 -20.94
0.00 -20.69
0.00 -20.44
0.00 -20.19
0.00 -19.94
0.00 -19.69
0.00 -19.44
0.00 -19.19
0.00 -18.94
0.00 -18.69
0.00 -18.44
0.00 -18.19
0.00 -17.94
0.00 -17.69
0.00 -17.44
0.00 -17.19
0.00 -16.94
0.00 -16.69
0.00 -16.44
0.00 -16.19
0.00 -15.94
0.00 -15.69
0.00 -15.44
0.00 -15.19
0.00 -14.94
0.00 -14.69
0.00 -14.44
0.00 -14.19
0.00 -13.94
0.00 -13.69
0.00 -13.44
0.00 -13.19
0.00 -12.94
0.00 -12.69
0.00 -12.44
0.00 -12.19
0.00 -11.94
0.00 -11.69
0.00 -11.44
0.00 -11.19
0.00 -10.94
0.00 -10.69
0.00 -10.44
0.00 -10.19
0.00 -9.94
0.00 -9.69
0.00 -9.44
0.00 -9.19
0.00 -8.94
0.00 -8.69
0.00 -8.44
0.00 -8.19
0.00 -7.94
0.00 -7.69
0.00 -7.44
0.00 -7.19
0.00 -6.94
0.00 -6.69
0.00 -6.44
0.00 -6.19
0.00 -5.94
0.00 -5.69
0.00 -5.44
0.00 -5.19
0.00 -4.94
0.00 -4.69
0.00 -4.44
0.00 -4.19
0.00 -3.94
0.00 -3.69
0.00 -3.44
0.00 -3.19
0.00 -2.94
0.00 -2.69
0.00 -2.44
0.00 -2.19
0.00 -1.94
0.00 -1.69
0.00 -1.44
0.00 -1.19
0.00 -0.94
0.00 -0.69
0.00 -0.44
0.00 -0.19
0.00 0.06
0.00 0.31
0.00 0.56
0.00 0.81
0.00 1.06
0.00 1.31
0.00 1.56
0.00 1.81
0.00 2.06
0.00 2.31
0.00 2.56
0.00 2.81
0.00 3.06
0.00 3.31
0.00 3.56
0.00 3.81
0.00 4.06
0.00 4.31
0.00 4.56
0.00 4.81
0.00 5.06
0.00 5.31
0.00 5.56
0.00 5.81
0.00 6.06
0.00 6.31
0.00 6.56
0.01 6.81
0.03 7.05
0.05 7.30
0.08 7.55
0.11 7.80
0.14 8.05
0.17 8.30
0.20 8.54
0.24 8.79
0.27 9.04
0.31 9.29
0.35 9.53
0.39 9.78
0.44 10.03
0.48 10.27
0.53 10.52
0.58 10.76
0.63 11.01
0.68 11.25
0.74 11.50
0.79 11.74
0.85 11.98
0.91 12.23
0.97 12.47
1.03 12.71
1.10 12.95
1.16 13.19
1.23 13.43
1.30 13.67
1.37 13.91
1.45 14.15
1.52 14.39
1.60 14.63
1.68 14.87
1.76 15.10
1.84 15.34
1.92 15.57
2.01 15.81
2.09 16.04
2.18 16.28
2.27 16.51
2.36 16.74
2.46 16.98
2.55 17.21
2.65 17.44
2.75 17.67
2.85 17.90
2.95 18.12
3.05 18.35
3.16 18.58
3.27 18.80
3.38 19.02
3.50 19.25
3.62 19.46
3.75 19.68
3.87 19.90
4.01 20.11
4.14 20.32
4.28 20.53
4.42 20.74
4.56 20.94
4.71 21.14
4.86 21.34
5.01 21.54
5.17 21.73
5.33 21.93
5.49 22.12
5.66 22.30
5.83 22.49
6.00 22.67
6.17 22.85
6.35 23.03
6.53 23.20
6.71 23.37
6.90 23.54
7.09 23.70
7.28 23.86
7.47 24.02
7.66 24.18
7.86 24.33
8.06 24.48
8.27 24.63
8.47 24.77
8.68 24.91
8.89 25.05
9.10 25.18
9.31 25.31
9.53 25.44
9.74 25.56
9.96 25.68
10.19 25.80
10.41 25.91
10.63 26.02
10.86 26.13
11.09 26.23
11.32 26.33
11.55 26.42
11.78 26.51
12.02 26.60
12.25 26.68
12.49 26.76
12.73 26.84
12.97 26.91
13.21 26.98
13.45 27.05
13.69 27.11
13.93 27.17
14.18 27.22
14.42 27.27
14.67 27.32
14.91 27.36
15.16 27.40
15.41 27.43
15.66 27.46
15.91 27.48
16.15 27.46
16.40 27.44
16.65 27.41
16.90 27.37
17.15 27.34
17.39 27.30
17.64 27.25
17.88 27.20
18.13 27.15
18.37 27.09
18.62 27.03
18.86 26.97
19.10 26.90
19.34 26.83
19.58 26.76
19.81 26.68
20.05 26.59
20.28 26.51
20.52 26.42
20.75 26.32
20.98 26.23
21.21 26.13
21.43 26.02
21.66 25.91
21.88 25.80
22.11 25.69
22.33 25.57
22.54 25.45
22.76 25.32
22.97 25.19
23.19 25.06
23.40 24.92
23.60 24.79
23.81 24.64
24.01 24.50
24.21 24.35
24.41 24.20
24.61 24.04
24.80 23.89
24.99 23.72
25.18 23.56
25.37 23.39
25.55 23.22
25.73 23.05
25.91 22.88
26.09 22.70
26.26 22.52
26.43 22.33
26.60 22.15
26.76 21.96
26.92 21.77
27.08 21.57
27.23 21.38
27.39 21.18
27.53 20.98
27.68 20.77
27.82 20.57
27.96 20.36
28.09 20.15
28.23 19.94
28.36 19.72
28.48 19.51
28.60 19.29
28.72 19.07
28.84 18.85
28.95 18.62
29.06 18.40
29.16 18.17
29.26 17.94
29.36 17.71
29.46 17.48
29.55 17.25
29.65 17.02
29.74 16.79
29.83 16.55
29.93 16.32
30.02 16.09
30.11 15.86
30.19 15.62
30.28 15.39
30.36 15.15
30.45 14.92
30.53 14.68
30.61 14.44
30.69 14.21
30.77 13.97
30.85 13.73
30.93 13.49
31.00 13.26
31.08 13.02
31.16 12.78
31.25 12.55
31.33 12.31
31.43 12.08
31.52 11.85
31.62 11.62
31.72 11.39
31.83 11.16
31.93 10.94
32.05 10.71
32.16 10.49
32.28 10.27
32.40 10.05
32.52 9.84
32.65 9.62
32.78 9.41
32.91 9.20
33.05 8.99
33.19 8.78
33.33 8.57
33.48 8.37
33.62 8.17
33.77 7.97
33.93 7.77
34.08 7.58
34.24 7.38
34.41 7.19
34.57 7.00
34.74 6.82
34.91 6.64
35.08 6.45
35.26 6.28
35.43 6.10
35.61 5.93
35.80 5.76
35.98 5.59
36.17 5.42
36.36 5.26
36.55 5.10
36.75 4.94
36.94 4.79
37.14 4.64
37.34 4.49
37.55 4.34
37.75 4.20
37.96 4.06
38.17 3.92
38.38 3.79
38.59 3.66
38.81 3.53
39.02 3.41
39.24 3.29
39.46 3.17
39.68 3.05
39.91 2.94
40.13 2.83
40.36 2.72
40.59 2.62
40.82 2.52
41.05 2.43
41.28 2.33
41.51 2.25
41.75 2.16
41.98 2.08
42.22 2.00
42.46 1.92
42.70 1.85
42.94 1.78
43.18 1.72
43.42 1.65
43.66 1.60
43.91 1.54
44.15 1.49
44.40 1.44
44.64 1.40
44.89 1.36
45.14 1.32
45.39 1.28
45.63 1.25
45.88 1.23
46.13 1.20
46.38 1.18
46.63 1.17
46.88 1.16
47.13 1.14
47.38 1.13
47.63 1.12
47.88 1.11
48.13 1.09
48.38 1.08
48.63 1.07
48.88 1.06
49.13 1.04
49.38 1.03
49.63 1.02
49.88 1.01
50.13 0.99
50.38 0.98
50.63 0.97
50.87 0.96
51.12 0.94
51.37 0.93
51.62 0.92
51.87 0.91
52.12 0.89
52.37 0.88
52.62 0.87
52.87 0.86
53.12 0.84
53.37 0.83