zoukankan      html  css  js  c++  java
  • Processing in Eclipse

    This article is the summary of http://processing.org/learning/eclipse/

    0. Environment

    Windows XP sp3

    1.Steps

    1.1 Install Java(JDK)

    1.2 Install Processing

    1.3 Download and install Eclipse

    1.4 Create a new Java project

    FILE --> NEW PROJECT and select "Java Project." Click next. Enter your project name (for example, "TestProcessing") and select "Finish."

    1.5 Import the Processing libraries

    FILE --> IMPORT --> GENERAL --> FILE SYSTEM
    --> browse and find the Processing application, look inside the directory called "lib" --> Select the file "core.jar" --> FINISH
    --> Right-click on the file and select --> BUILD PATH --> ADD TO BUILD PATH

    1.6 Create a class and write your code

    Create a class "MyProcessingSketch"
    ////////////////////////////////////////////////////////////
    import processing.core.*;
    public class MyProcessingSketch extends PApplet
    {
      public void setup()
      {
        size(200,200);
        background(0);
      }
      public void draw()
      {
        stroke(255);
        if (mousePressed)
        {
          line(mouseX,mouseY,pmouseX,pmouseY);
        }
      }
    }

    ////////////////////////////////////////////////////////////

    1.7 Run as Java Application

    ////////////////////////////////////////////////////////////

      public static void main(String args[])
      {
        PApplet.main(new String[] { "--present", "MyProcessingSketch" });
      }

    ////////////////////////////////////////////////////////////

    Note that the String "MyProcessingSketch" must match the name of your class (and if it is in a package, should include the package, i.e. packagename.MyProcessingSketch).

    2. Reference

    http://processing.org/learning/eclipse/

  • 相关阅读:
    CentOS Python 安装MySQL-python
    Ubuntu64位安装Adobe Reader 9.5.5
    Codeforces Round #316 (Div. 2) (ABC题)
    cocos2dx 3.2+ 项目创建与问题总汇
    Mongodb的索引
    uva 12083 Guardian of Decency (二分图匹配)
    Linux查看内存使用量和交换区使用量
    053第423题
    [Python]xlrd 读取excel 日期类型2种方式
    求解组合问题的一个迭代算法
  • 原文地址:https://www.cnblogs.com/chenyineng/p/2669768.html
Copyright © 2011-2022 走看看