Giter VIP home page Giter VIP logo

teia's Introduction

Teia

É uma visualizador gráfico de rede social. Que usa Processing¹ como motor gráfico.

Dependência

  • Processing²
  • Postgresql

Eclipse

Sugiro usar Eclipse IDE e utilizar o plugin de Processing para Eclipse².

Postgresql

Baixe o driver postgresql (http://jdbc.postgresql.org/download.html) e importe o jar para o projeto que você criar com esses sources.

Conhecimento

  • Grafos
  • Computação Gráfica
  • Processing
  • Animaçãos
  • Java

Formatação do Código

Basta configurar o seu eclipse para formatar 2 espaços e regrar 80 characteres para o código e 60 characteres para comentários. Que está ótimo. Para agilizar aperte CTRL+3 digite save actions aperte enter, depois vá em formatter e configure.

teia's People

Contributors

tonussi avatar

Watchers

James Cloos avatar

teia's Issues

NullPointerException no início ?!?!

Dando esse erro no início e depois. Mas roda normalmente o desenho após a excecão. Acredito que ambas as threads concorrem ao PApplet ao mesmo tempo. Porém na solução abaixo dando maior prioridade para as mulheres, ainda sim existe a concorrência pelo PApplet.

java.lang.NullPointerException
    at processing.core.PApplet.pushMatrix(PApplet.java:13132)
    at view.EspecialistaDesenho.displayHomem(EspecialistaDesenho.java:25)
    at view.TrabalhadorAmigoHomem.run(TrabalhadorAmigoHomem.java:24)
java.lang.NullPointerException
    at processing.core.PApplet.pushMatrix(PApplet.java:13132)
    at view.EspecialistaDesenho.displayMulher(EspecialistaDesenho.java:71)
    at view.TrabalhadorAmigoMulher.run(TrabalhadorAmigoMulher.java:24)

teia-101 86206
teia-379 83984

Teia constructor inicializando as threads.

https://github.com/tonussi/teia/blob/master/src/teia/Teia.java#L138-L152

    /*
     * Inicia threads trabalhadores dos desenhos dos amigos
     * tipo homem
     */
    trabalhadorAmigoHomem = new TrabalhadorAmigoHomem(amigosHomens,
        especialistaDesenho, especialistaMovimento);
    trabalhadorAmigoHomem.start();
    trabalhadorAmigoHomem.setPriority(1);

    /*
     * Inicia threads trabalhadores dos desenhos dos amigos
     * tipo mulher
     */
    trabalhadorAmigoMulher = new TrabalhadorAmigoMulher(amigosMulheres,
        especialistaDesenho, especialistaMovimento);
    trabalhadorAmigoMulher.start();
    trabalhadorAmigoHomem.setPriority(10);

Método draw() rodando as threads.

https://github.com/tonussi/teia/blob/master/src/teia/Teia.java#L202-L209

  @Override
  public void draw() {

    background(43);
    translate(width / 2, height / 2);

    trabalhadorAmigoHomem.run();
    trabalhadorAmigoMulher.run();

  }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.